Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'bugfix_package_10' into cutting-edge

  • Loading branch information...
commit a3b1ee7f1369ed70a2fca827fb7824eb9d037038 2 parents 6439efb + 4e5621f
@chriskr chriskr authored
Showing with 520 additions and 411 deletions.
  1. +7 −0 src/build-application/build_overlay_1_0.js
  2. +1 −0  src/client-en.xml
  3. +2 −2 src/ecma-debugger/dominspection/domserializer.js
  4. +18 −18 src/ecma-debugger/dominspection/templates.js
  5. +31 −14 src/ecma-debugger/eventlisteners/evlisteners.css
  6. +15 −9 src/ecma-debugger/helpers.js
  7. +55 −12 src/ecma-debugger/js-source-view.js
  8. +4 −4 src/ecma-debugger/objectinspection.6.0/templates.js
  9. +5 −4 src/ecma-debugger/runtimes.js
  10. +20 −8 src/ecma-debugger/views.js
  11. +1 −1  src/lib/usertracker.js
  12. +9 −3 src/lib/xmlhttprequestprototype.js
  13. +2 −1  src/repl/repl_view.js
  14. +231 −230 src/scripts/spec_links.js
  15. +7 −0 src/style/css_suggest_values.js
  16. +3 −0  src/style/stylesheets.js
  17. +3 −2 src/syntaxhighlight/js/tokenizer.js
  18. BIN  src/ui-images/icons/icon_refetch_listeners.png
  19. BIN  src/ui-images/icons/icon_reformat.png
  20. +2 −6 src/ui-scripts/actions/actionbroker.js
  21. +2 −0  src/ui-scripts/actions/actionhandlerinterface.js
  22. +2 −0  src/ui-scripts/actions/globalactionhandler.js
  23. +7 −5 src/ui-scripts/actions/keyidentifier.js
  24. +12 −16 src/ui-scripts/containers.js
  25. +1 −1  src/ui-scripts/overlay.js
  26. +1 −1  src/ui-scripts/tabs.js
  27. +10 −9 src/ui-scripts/tooltip/tooltip.js
  28. +9 −10 src/ui-scripts/view.js
  29. +3 −0  src/ui-strings/ui_strings-en.js
  30. +1 −1  src/ui-style/tabs.css
  31. +4 −3 src/window-manager/window-manager.js
  32. +23 −23 test-scripts/innerHTML/dom_versus_inner_html.html
  33. +7 −7 test-scripts/innerHTML/templates_6_0_test.js
  34. +7 −7 test-scripts/innerHTML/templates_6_0_test_html5.js
  35. +7 −7 test-scripts/selector-matching-performance/test-selectors.js
  36. +5 −4 test-scripts/test-scripts/keyidentifier.html
  37. +3 −3 test-scripts/test-tokenizer/test-tokenizer.html
View
7 src/build-application/build_overlay_1_0.js
@@ -0,0 +1,7 @@
+window.app.builders.Overlay || ( window.app.builders.Overlay = {} );
+
+window.app.builders.Overlay["1.0"] = function(service)
+{
+ return true;
+};
+
View
1  src/client-en.xml
@@ -349,6 +349,7 @@ window.load_screen_timeout = window.setTimeout(function()
<script src="./build-application/build_resource_manager_1_0.js"></script>
<script src="./build-application/build_profiler_1_0.js"></script>
<script src="./build-application/build_document_manager_1_0.js"></script>
+<script src="./build-application/build_overlay_1_0.js"></script>
<script src="./debug/debug.js"/>
<script src="./debug/po_tester.js"/>
View
4 src/ecma-debugger/dominspection/domserializer.js
@@ -159,7 +159,7 @@ window.cls.DOMSerializer.prototype = new function()
{
tree += LINEBREAK + getIndent(node[DEPTH] - start_depth) +
"<" + node_name + attrs + ">" +
- helpers.escapeTextHtml(one_child_value) +
+ helpers.escape_html(one_child_value) +
"</" + node_name + ">";
i = child_pointer - 1;
}
@@ -216,7 +216,7 @@ window.cls.DOMSerializer.prototype = new function()
{
if( !/^\s*$/.test(node[ VALUE ] ) )
{
- tree += LINEBREAK + getIndent(node[DEPTH] - start_depth) + helpers.escapeTextHtml(node[VALUE]);
+ tree += LINEBREAK + getIndent(node[DEPTH] - start_depth) + helpers.escape_html(node[VALUE]);
}
}
}
View
36 src/ecma-debugger/dominspection/templates.js
@@ -145,7 +145,7 @@
{
for (var i = 0, attr, attr_value, attrs = ''; attr = node[ATTRS][i]; i++)
{
- attr_value = helpers.escapeAttributeHtml(attr[ATTR_VALUE]);
+ attr_value = helpers.escape_html_attr(attr[ATTR_VALUE]);
if (typeof is_search_hit != 'boolean' || is_search_hit)
{
attrs += " <key>" + safe_escape_attr_key(attr) +
@@ -163,7 +163,7 @@
{
for (var i = 0, attr, attr_value, attrs = ''; attr = node[ATTRS][i]; i++)
{
- attr_value = helpers.escapeAttributeHtml(attr[ATTR_VALUE]);
+ attr_value = helpers.escape_html_attr(attr[ATTR_VALUE]);
attrs += " <key>" +
"<match-token>" + safe_escape_attr_key(attr) + "</match-token>" +
"</key>=<value>\"" +
@@ -199,14 +199,14 @@
continue;
}
node_name = (node[NAMESPACE] ? node[NAMESPACE] + ':': '') + node[NAME];
- node_name = helpers.escapeTextHtml(node_name);
+ node_name = helpers.escape_html(node_name);
if (force_lower_case && disregard_force_lower_case(node))
{
disregard_force_lower_case_depth = node[DEPTH];
force_lower_case = false;
}
else if (disregard_force_lower_case_depth &&
- disregard_force_lower_case_depth == node[DEPTH])
+ disregard_force_lower_case_depth >= node[DEPTH])
{
disregard_force_lower_case_depth = 0;
force_lower_case = model.isTextHtml() &&
@@ -267,7 +267,7 @@
"<div class='search-match dom-search comment pre-wrap' " +
"obj-id='" + node[ID] + "' handler='show-search-match' >" +
(open_tag ? open_tag + "!--" : "#comment") +
- "<match-token>" + helpers.escapeTextHtml(node[VALUE]) + "</match-token>" +
+ "<match-token>" + helpers.escape_html(node[VALUE]) + "</match-token>" +
(close_tag ? "--" + close_tag : "") +
"</div>";
}
@@ -305,7 +305,7 @@
"<div class='search-match dom-search' " +
"obj-id='" + node[ID] + "' handler='show-search-match' >" +
"<span class='dom-search-text-node'>#text</span>" +
- "<match-token>" + helpers.escapeTextHtml(node[VALUE]) + "</match-token>" +
+ "<match-token>" + helpers.escape_html(node[VALUE]) + "</match-token>" +
"</div>";
}
}
@@ -367,7 +367,7 @@
force_lower_case = false;
}
else if (disregard_force_lower_case_depth &&
- disregard_force_lower_case_depth == node[DEPTH])
+ disregard_force_lower_case_depth >= node[DEPTH])
{
disregard_force_lower_case_depth = 0;
force_lower_case = model.isTextHtml() && window.settings.dom.get('force-lowercase');
@@ -394,7 +394,7 @@
case ELEMENT_NODE:
{
var node_name = (node[NAMESPACE] ? node[NAMESPACE] + ':' : '') + node[NAME];
- node_name = helpers.escapeTextHtml(node_name);
+ node_name = helpers.escape_html(node_name);
var ev_listener = node[EVENT_LISTENER_LIST] && node[EVENT_LISTENER_LIST].length
? EV_LISTENER_MARKUP
: "";
@@ -407,7 +407,7 @@
attrs = '';
for (k = 0; attr = node[ATTRS][k]; k++)
{
- attr_value = helpers.escapeAttributeHtml(attr[ATTR_VALUE]);
+ attr_value = helpers.escape_html_attr(attr[ATTR_VALUE]);
attrs += " <key>" +
((attr[ATTR_PREFIX] ? attr[ATTR_PREFIX] + ':' : '') +
/* Regarding escaping "<". It happens that there are very
@@ -453,7 +453,7 @@
{
one_child_text_content += "<text" +
" ref-id='" + data[child_pointer][ID] + "' " +
- ">" + helpers.escapeTextHtml(data[child_pointer][VALUE]) + "</text>";
+ ">" + helpers.escape_html(data[child_pointer][VALUE]) + "</text>";
}
}
if (has_only_text_content)
@@ -538,7 +538,7 @@
"ref-id='" + node[ID] + "' " +
"class='comment pre-wrap'>" +
"&lt;!--" +
- helpers.escapeTextHtml(node[VALUE]) +
+ helpers.escape_html(node[VALUE]) +
"--&gt;</div>";
}
}
@@ -570,7 +570,7 @@
(no_contextmenu ? "" : "data-menu='dom-element' ") +
">" +
"<text ref-id='"+ node[ID] + "' " +
- ">" + helpers.escapeTextHtml(node[VALUE]) + "</text>" +
+ ">" + helpers.escape_html(node[VALUE]) + "</text>" +
"</div>";
}
}
@@ -642,7 +642,7 @@
disregard_force_lower_case_depth = node[DEPTH];
force_lower_case = false;
}
- else if (disregard_force_lower_case_depth && disregard_force_lower_case_depth == node[DEPTH])
+ else if (disregard_force_lower_case_depth && disregard_force_lower_case_depth >= node[DEPTH])
{
disregard_force_lower_case_depth = 0;
force_lower_case = model.isTextHtml() && window.settings.dom.get('force-lowercase');
@@ -673,7 +673,7 @@
case ELEMENT_NODE:
{
var node_name = (node[NAMESPACE] ? node[NAMESPACE] + ':' : '') + node[NAME];
- node_name = helpers.escapeTextHtml(node_name);
+ node_name = helpers.escape_html(node_name);
if (force_lower_case)
{
node_name = node_name.toLowerCase();
@@ -683,7 +683,7 @@
attrs = '';
for (k = 0; attr = node[ATTRS][k]; k++)
{
- attr_value = helpers.escapeAttributeHtml(attr[ATTR_VALUE]);
+ attr_value = helpers.escape_html_attr(attr[ATTR_VALUE]);
attrs += " <key>" +
(attr[ATTR_PREFIX] ? attr[ATTR_PREFIX] + ':' : '') +
/* regarding escaping "<". it happens that there are very starnge keys in broken html.
@@ -750,7 +750,7 @@
"ref-id='"+node[ID] + "' " +
"class='comment pre-wrap'>" +
"<span class='comment-node'>#comment</span>" +
- helpers.escapeTextHtml(node[VALUE]) + "</div>";
+ helpers.escape_html(node[VALUE]) + "</div>";
}
break;
}
@@ -793,7 +793,7 @@
">" +
(node[NAME] ? node[NAME] : this._node_name_map[node[TYPE]]) +
"<text ref-id='" + node[ID] + "' >" +
- helpers.escapeTextHtml(node[VALUE]) + "</text>" +
+ helpers.escape_html(node[VALUE]) + "</text>" +
"</div>";
}
}
@@ -808,7 +808,7 @@
"<text ref-id='" + node[ID]+ "' " +
" class='" + (only_whitespace ? "only-whitespace" : "") + "'>" +
(only_whitespace ? helpers.escape_whitespace(node[VALUE])
- : helpers.escapeTextHtml(node[VALUE])) +
+ : helpers.escape_html(node[VALUE])) +
"</text>" +
"</div>";
}
View
45 src/ecma-debugger/eventlisteners/evlisteners.css
@@ -1,17 +1,14 @@
-.ev-rt-list
+.ev-rt-list > li
{
- margin-top: 5px;
-}
-
-.ev-type-list
-{
- margin: 0;
+ margin-bottom: 6px;
}
.ev-listener-tooltip
{
margin: 0;
margin-top: -13px;
+ white-space: pre;
+ min-width: 180px;
}
.list-selected-node
@@ -39,17 +36,21 @@
.ev-listener
{
- display: inline-block;
- height: 12px;
- line-height: 12px;
- vertical-align: middle;
+
margin-left: 3px;
padding: 0 2px;
- background-color: hsl(0, 0%, 70%);
+ background-color: rgba(0, 0, 0, 0.29);
color: #fff;
border-radius: 2px;
}
+.ev-listener.tooltip-selected
+{
+ box-shadow: none;
+ color: #fff;
+ background-color: rgba(82, 122, 204, 0.55);
+}
+
.ev-listener::after
{
content: "ev";
@@ -58,6 +59,7 @@
.ev-type
{
font: inherit;
+ position: relative;
}
.ev-listener-tooltip .ev-type,
@@ -66,7 +68,7 @@
background-color: hsla(0, 0%, 0%, 0.04);
padding: 2px 8px;
border-width: 1px 0;
- margin: 5px 0px 1px;
+ margin: 5px 0 1px;
}
.ev-listener-tooltip .ev-type
@@ -76,7 +78,17 @@
.ev-phase
{
- float: right;
+ /*
+ Propably an expensive way to right align text. But a common float causes an unstable
+ box with horizontal scrollbars which disappears on hover with an ugly jumping tooltip.
+ */
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ box-sizing: border-box;
+ padding-right: 8px;
+ text-align: right;
font-style: italic;
color: hsl(0, 0%, 50%);
}
@@ -97,6 +109,11 @@
margin-left: 12px;
}
+.ev-rt-list .ev-rt-title
+{
+ margin-left: 0;
+}
+
.tooltip-function-source .js-tooltip-examine-container
{
padding: 0;
View
24 src/ecma-debugger/helpers.js
@@ -113,24 +113,30 @@ window.cls.Helpers = function()
|| top_url.replace(/\?.*$/, '').replace(/#.*$/, '').replace(/\/[^/]*$/, "/") + url );
}
- this.escapeTextHtml = (function()
+ this.escape_html = (function()
{
- var re_amp = /&/g, re_lt = /</g;
+ var re_amp = /&/g;
+ var re_lt = /</g;
+ var re_cd_end = /]]>/g;
return function(str)
{
- return str ? str.replace(re_amp, "&amp;").replace(re_lt, "&lt;") : str;
+ return str ? str.replace(re_amp, "&amp;")
+ .replace(re_lt, "&lt;")
+ .replace(re_cd_end, "]]&gt;")
+ : str;
}
})();
- this.escapeAttributeHtml = (function()
+ this.escape_html_attr = (function()
{
- var re_amp = /&/g, re_lt = /</g, re_quot = /"/g, re_s_quot = /'/g;
+ var re_quot = /"/g;
+ var re_apos = /'/g;
return function(str)
{
- return str.replace(re_amp, "&amp;")
- .replace(re_lt, "&lt;")
- .replace(re_quot, "&quot;")
- .replace(re_s_quot, "&#x27;");
+ return str ? this.escape_html(str)
+ .replace(re_quot, "&quot;")
+ .replace(re_apos, "&#x27;")
+ : str;
}
})();
View
67 src/ecma-debugger/js-source-view.js
@@ -221,8 +221,7 @@ cls.JsSourceView = function(id, name, container_class)
container.innerHTML = "" +
"<div id='" + SCROLL_CONTENT_ID + "'>"+
"<div class='" + CONTAINER_CLASS_NAME + "' " +
- "data-menu='js-source-content' " +
- "data-tooltip='" + cls.JSSourceTooltip.tooltip_name + "'></div>"+
+ "data-menu='js-source-content'></div>" +
"</div>"+
"<div id='" + SCROLL_CONTAINER_ID + "' handler='scroll-js-source'>"+
"<div id='" + SCROLL_ID + "'></div>"+
@@ -311,8 +310,7 @@ cls.JsSourceView = function(id, name, container_class)
this.onresize = function(container)
{
- // optimization - having no line wrapping allows to optimize out width-only changes
- if(this.isvisible() && context['container-height'] != parseInt(container.style.height))
+ if(this.isvisible())
{
__view_is_destroyed = true;
this.createView(container);
@@ -565,7 +563,7 @@ cls.JsSourceView = function(id, name, container_class)
{
document.getElementById(SCROLL_ID).innerHTML = "";
if (typeof script_id == "number" && !isNaN(script_id) &&
- typeof line_no == "number" && !isNaN(line_no))
+ typeof line_no == "number" && !isNaN(line_no))
{
new ConfirmDialog(ui_strings.D_RELOAD_SCRIPTS,
function(){ runtimes.reloadWindow(); }).show();
@@ -981,10 +979,49 @@ cls.JsSourceView = function(id, name, container_class)
}
};
- eventHandlers.mousewheel['scroll-js-source-view'] = function(event, target)
+ var _last_delta = 0;
+ var _accumulated_delta = 0;
+ var UNIT_LINES = 1;
+ var UNIT_PIXELS = 2;
+
+ this._get_lines_from_delta = function(delta, unit)
{
- this._scroll_lines((event.detail > 0 ? 1 : -1) * 3 , event, target);
- }.bind(this);
+ var lines = 0;
+ if (unit == UNIT_LINES)
+ lines = delta;
+ else if (unit == UNIT_PIXELS)
+ {
+ if (_last_delta * delta < 0)
+ // Scroll direction has changed - reset accumulated delta.
+ _accumulated_delta = 0;
+
+ _last_delta = delta;
+ _accumulated_delta += delta;
+ // Convert pixels to lines.
+ delta = _accumulated_delta / window.defaults["js-source-line-height"];
+
+ if (Math.abs(delta) >= 1)
+ {
+ // Enough delta to scroll at least one line, round delta
+ // to full integer towards 0 and store remainder for later.
+ lines = delta > 0 ? Math.floor(delta) : Math.ceil(delta);
+ _accumulated_delta -= lines * window.defaults["js-source-line-height"];
+ }
+ }
+
+ return lines;
+ }
+
+ window.eventHandlers.mousewheel['scroll-js-source-view'] = function(unit, event, target)
+ {
+ if (event.wheelDeltaX)
+ // Horizontal scrolling is handled natively by the browser.
+ return;
+
+ var lines = this._get_lines_from_delta(-event.wheelDelta / 40, unit);
+ if (lines)
+ this._scroll_lines(lines, event, target);
+ }.bind(this, navigator.platform == 'MacIntel' ? UNIT_PIXELS : UNIT_LINES);
this._handlers['show-window-go-to-line'] = function(event, target)
{
@@ -1001,7 +1038,13 @@ cls.JsSourceView = function(id, name, container_class)
this._handlers["scroll-page-down"] = this._scroll_lines.bind(this, PAGE_SCROLL);
this._handlers["scroll-arrow-up"] = this._scroll_lines.bind(this, -ARROW_SCROLL);
this._handlers["scroll-arrow-down"] = this._scroll_lines.bind(this, ARROW_SCROLL);
- this.init(id, name, container_class, null, "scroll-js-source-view");
+ this.init(id,
+ name,
+ container_class,
+ null,
+ "scroll-js-source-view",
+ null,
+ cls.JSSourceTooltip.tooltip_name);
this._go_to_line = new cls.GoToLine(this);
messages.addListener("update-layout", updateLayout);
messages.addListener("runtime-destroyed", onRuntimeDestroyed);
@@ -1308,7 +1351,7 @@ cls.JsSourceView.create_ui_widgets = function()
new Switches ('js_source', switches);
- eventHandlers.change['set-tab-size'] = function(event, target)
+ window.eventHandlers.change['set-tab-size'] = function(event, target)
{
var
style = document.styleSheets.getDeclaration(DIV_SELECTOR),
@@ -1321,7 +1364,7 @@ cls.JsSourceView.create_ui_widgets = function()
}
}
- eventHandlers.change['set-max-search-hits'] = function(event, target)
+ window.eventHandlers.change['set-max-search-hits'] = function(event, target)
{
var max_search_hits = Number(event.target.value);
if (100 < max_search_hits && max_search_hits < 10000)
@@ -1330,7 +1373,7 @@ cls.JsSourceView.create_ui_widgets = function()
}
}
- eventHandlers.click['show-event-breakpoint-view'] = function(event, target)
+ window.eventHandlers.click['show-event-breakpoint-view'] = function(event, target)
{
var view = window.views['event-breakpoints'];
UIWindowBase.showWindow(view.id,
View
8 src/ecma-debugger/objectinspection.6.0/templates.js
@@ -153,7 +153,7 @@
for (var prop = null, i = 0; prop = property_list[i]; i++)
{
value = prop[PROPERTY_VALUE];
- esc_name = helpers.escapeAttributeHtml(prop[NAME]);
+ esc_name = helpers.escape_html_attr(prop[NAME]);
switch (type = prop[PROPERTY_TYPE])
{
case "number":
@@ -206,7 +206,7 @@
}
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '' : '';
- value = helpers.escapeAttributeHtml(value);
+ value = helpers.escape_html_attr(value);
if (short_val)
{
if (!searchterm ||
@@ -219,7 +219,7 @@
"<key data-spec='dom#" + esc_name + "'" +
editable(prop) + ">" + esc_name + "</key>\u00A0" +
"<value class='" + type + "' data-value='\"" + value + "\"'>" +
- "\"" + helpers.escapeTextHtml(short_val) + "\"" +
+ "\"" + helpers.escape_html(short_val) + "\"" +
"</value>" +
"</item>"
);
@@ -294,7 +294,7 @@
ret.push(STYLE_EXPANDED);
ret.push(
"/>" +
- "<key " + (has_match ? "" : " class='no-match'") +
+ "<key " + (has_match ? "" : " class='no-match' ") +
"data-spec='dom#" + esc_name + "'" + editable(prop) +
">" + esc_name + "</key>" +
(esc_name ? " " : "") +
View
9 src/ecma-debugger/runtimes.js
@@ -10,6 +10,7 @@ cls.EcmascriptDebugger["6.0"].Runtime = function(runtime)
var OBJECT_ID = 3;
var URI = 4;
var DESCRIPTION = 5;
+ var EXTENSION_NAME = 7;
this.runtime_id = runtime[RUNTIME_ID];
this.html_frame_path = runtime[HTML_FRAME_PATH];
@@ -17,6 +18,7 @@ cls.EcmascriptDebugger["6.0"].Runtime = function(runtime)
this.object_id = runtime[OBJECT_ID];
this.uri = runtime[URI];
this.description = runtime[DESCRIPTION];
+ this.extension_name = runtime[EXTENSION_NAME];
};
cls.EcmascriptDebugger["6.0"].Runtime.prototype = new URIPrototype("uri");
@@ -38,7 +40,7 @@ cls.EcmascriptDebugger["6.0"].ExtensionRuntime = function(rt)
this.type = "extension";
this.id = rt.runtime_id;
this.uri = rt.uri;
- this.title = "Extension Runtime " + rt.runtime_id;
+ this.title = "Extension" + (rt.extension_name ? ": " + rt.extension_name : " Runtime " + rt.runtime_id);
};
/**
@@ -1366,9 +1368,8 @@ cls.EcmascriptDebugger["6.0"].Runtimes = function(service_version)
}
else if (window.services.exec && window.services.exec.is_implemented)
{
- var msg = [[["reload",
- null,
- window.window_manager_data.get_debug_context()]]];
+ var action_list = ["reload", null, window_id];
+ var msg = [[action_list]];
window.services.exec.requestExec(cls.TagManager.IGNORE_RESPONSE, msg);
}
}
View
28 src/ecma-debugger/views.js
@@ -79,17 +79,29 @@ cls.AboutView.create_ui_widgets = function()
about:
function(setting)
{
- new XMLHttpRequest().loadResource('AUTHORS', function(xml)
+ var on_about_sucess = function(xml)
{
- var
- authors = document.getElementById('about-authors'),
- response_text = xml.responseText;
- if(authors && response_text)
- {
+ var authors = document.getElementById('about-authors');
+ var response_text = xml.responseText;
+ if (authors && response_text)
authors.textContent = response_text;
+ };
+
+ var on_about_error = function()
+ {
+ var authors = document.getElementById('about-authors');
+ if (authors)
+ {
+ var tmpl = ["a", ui_strings.S_CONTRIBUTORS,
+ "target", "_blank",
+ "style", "color: inherit",
+ "href", "https://github.com/operasoftware/dragonfly/blob/master/AUTHORS"];
+ authors.render(tmpl);
}
- });
- return ['ul', ['li', 'id', 'about-authors', 'class', 'padding selectable']];
+ };
+
+ new XMLHttpRequest().loadResource("AUTHORS", on_about_sucess, null, on_about_error);
+ return ["ul", ["li", "id", "about-authors", "class", "padding selectable"]];
}
},
"about"
View
2  src/lib/usertracker.js
@@ -31,7 +31,7 @@ cls.UserTracker = function(url, storagekey)
conn.onreadystatechange = rshandler;
conn.open("GET", url, true);
- conn.send(null);
+ try { conn.send(null); } catch(e) {};
}
View
12 src/lib/xmlhttprequestprototype.js
@@ -5,12 +5,18 @@
* "this" value
*/
-XMLHttpRequest.prototype.loadResource = function(url, callback, context)
+XMLHttpRequest.prototype.loadResource = function(url, callback, context, error_callback)
{
this.onload = function()
{
callback(this, context);
- }
+ };
+
+ this.onerror = function()
+ {
+ setTimeout(error_callback, 0, context);
+ };
+
this.open('GET', url);
- this.send(null);
+ try { this.send(null); } catch(e) {};
};
View
3  src/repl/repl_view.js
@@ -472,7 +472,8 @@ cls.ReplView = function(id, name, container_class, html, default_handler) {
this._highlight_completion = function(index)
{
var sel = window.getSelection();
- sel.collapseToStart();
+ if (!sel.isCollapsed)
+ sel.collapseToStart();
// with no arg, clear the selection.
if (index === null || index === undefined) {
View
461 src/scripts/spec_links.js
@@ -243,6 +243,7 @@ SpecLinks.specs = {
"min-width": "http://www.w3.org/TR/css3-box/#min-width",
"min-height": "http://www.w3.org/TR/css3-box/#min-width",
"overflow": "http://www.w3.org/TR/css3-box/#overflow0",
+ "overflow-wrap": "http://www.w3.org/TR/css3-text/#overflow-wrap",
"overflow-x": "http://www.w3.org/TR/css3-box/#overflow-x",
"overflow-y": "http://www.w3.org/TR/css3-box/#overflow-y",
"padding": "http://www.w3.org/TR/css3-box/#padding1",
@@ -274,7 +275,7 @@ SpecLinks.specs = {
"text-overflow": "http://www.w3.org/TR/css3-text/#text-overflow",
"text-shadow": "http://www.w3.org/TR/css3-text/#text-shadow",
"word-spacing": "http://www.w3.org/TR/css3-text/#word-spacing",
- "word-wrap": "http://www.w3.org/TR/css3-text/#word-wrap0",
+ "word-wrap": "http://www.w3.org/TR/css3-text/#overflow-wrap",
"-o-transition-property": "http://www.w3.org/TR/css3-transitions/#the-transition-property-property-",
"-o-transition-duration": "http://www.w3.org/TR/css3-transitions/#transition-duration",
"-o-transition-timing-function": "http://www.w3.org/TR/css3-transitions/#transition-timing-function",
@@ -1312,235 +1313,235 @@ SpecLinks.specs = {
"FileException": "http://www.w3.org/TR/FileAPI/#FileException",
// ES5 (put in a new section? (using Mike Smith’s version as real spec is PDF)
- "NaN": "http://es5.github.com/#x15.1.1.1",
- "Infinity": "http://es5.github.com/#x15.1.1.2",
- "undefined": "http://es5.github.com/#x15.1.1.3",
- "eval": "http://es5.github.com/#x15.1.2.1",
- "parseInt": "http://es5.github.com/#x15.1.2.2",
- "parseFloat": "http://es5.github.com/#x15.1.2.3",
- "isNaN": "http://es5.github.com/#x15.1.2.4",
- "isFinite": "http://es5.github.com/#x15.1.2.4",
- "decodeURI": "http://es5.github.com/#x15.1.3.1",
- "decodeURIComponent": "http://es5.github.com/#x15.1.3.2",
- "encodeURI": "http://es5.github.com/#x15.1.3.3",
- "encodeURIComponent": "http://es5.github.com/#x15.1.3.4",
-
- "Object": "http://es5.github.com/#x15.2",
- //"prototype": "http://es5.github.com/#x15.2.3.1",
- "getPrototypeOf": "http://es5.github.com/#x15.2.3.2",
- "getOwnPropertyDescriptor": "http://es5.github.com/#x15.2.3.3",
- "getOwnPropertyNames": "http://es5.github.com/#x15.2.3.4",
- "create": "http://es5.github.com/#x15.2.3.5",
- "defineProperty": "http://es5.github.com/#x15.2.3.6",
- "defineProperties": "http://es5.github.com/#x15.2.3.7",
- "seal": "http://es5.github.com/#x15.2.3.8",
- "freeze": "http://es5.github.com/#x15.2.3.9",
- "preventExtensions": "http://es5.github.com/#x15.2.3.10",
- "isSealed": "http://es5.github.com/#x15.2.3.11",
- "isFrozen": "http://es5.github.com/#x15.2.3.12",
- "isExtensible": "http://es5.github.com/#x15.2.3.13",
- "keys": "http://es5.github.com/#x15.2.3.14",
- //"constructor": "http://es5.github.com/#x15.2.4.1",
- //"toString": "http://es5.github.com/#x15.2.4.2",
- "toLocaleString": "http://es5.github.com/#x15.2.4.3",
- //"valueOf": "http://es5.github.com/#x15.2.4.4",
- "hasOwnProperty": "http://es5.github.com/#x15.2.4.5",
- "isPrototypeOf": "http://es5.github.com/#x15.2.4.6",
- "propertyIsEnumerable": "http://es5.github.com/#x15.2.4.7",
-
- "Function": "http://es5.github.com/#x15.3",
- //"prototype": "http://es5.github.com/#x15.3.3.1",
- //"length": "http://es5.github.com/#x15.3.3.2",
- //"constructor": "http://es5.github.com/#x15.3.4.1",
- //"toString": "http://es5.github.com/#x15.3.4.2",
- "apply": "http://es5.github.com/#x15.3.4.3",
- "call": "http://es5.github.com/#x15.3.4.4",
- "bind": "http://es5.github.com/#x15.3.4.5",
-
- "Array": "http://es5.github.com/#x15.4",
- //"prototype": "http://es5.github.com/#x15.4.3.1",
- "isArray": "http://es5.github.com/#x15.4.3.2",
- //"length": "http://es5.github.com/#x15.4.5.2",
- //"constructor": "http://es5.github.com/#x15.4.4.1",
- //"toString": "http://es5.github.com/#x15.4.4.2",
- "toLocaleString": "http://es5.github.com/#x15.4.4.3",
- "concat": "http://es5.github.com/#x15.4.4.4",
- "join": "http://es5.github.com/#x15.4.4.5",
- "pop": "http://es5.github.com/#x15.4.4.6",
- "push": "http://es5.github.com/#x15.4.4.7",
- "reverse": "http://es5.github.com/#x15.4.4.8",
- "shift": "http://es5.github.com/#x15.4.4.9",
- //"slice": "http://es5.github.com/#x15.4.4.10",
- "sort": "http://es5.github.com/#x15.4.4.11",
- "splice": "http://es5.github.com/#x15.4.4.12",
- "unshift": "http://es5.github.com/#x15.4.4.13",
- "indexOf": "http://es5.github.com/#x15.4.4.14",
- "lastIndexOf": "http://es5.github.com/#x15.4.4.15",
- "every": "http://es5.github.com/#x15.4.4.16",
- "some": "http://es5.github.com/#x15.4.4.17",
- "forEach": "http://es5.github.com/#x15.4.4.18",
- "map": "http://es5.github.com/#x15.4.4.19",
- "filter": "http://es5.github.com/#x15.4.4.20",
- "reduce": "http://es5.github.com/#x15.4.4.21",
- "reduceRight": "http://es5.github.com/#x15.4.4.22",
-
- "String": "http://es5.github.com/#x15.5",
- //"prototype": "http://es5.github.com/#x15.5.3.1",
- "fromCharCode": "http://es5.github.com/#x15.5.3.2",
- //"constructor": "http://es5.github.com/#x15.5.4.1",
- //"toString": "http://es5.github.com/#x15.5.4.2",
- //"valueOf": "http://es5.github.com/#x15.5.4.3",
- "charAt": "http://es5.github.com/#x15.5.4.4",
- "charCodeAt": "http://es5.github.com/#x15.5.4.5",
- "concat": "http://es5.github.com/#x15.5.4.6",
- "indexOf": "http://es5.github.com/#x15.5.4.7",
- "lastIndexOf": "http://es5.github.com/#x15.5.4.8",
- "localeCompare": "http://es5.github.com/#x15.5.4.9",
- "match": "http://es5.github.com/#x15.5.4.10",
- //"replace": "http://es5.github.com/#x15.5.4.11",
- //"search": "http://es5.github.com/#x15.5.4.12",
- //"slice": "http://es5.github.com/#x15.5.4.13",
- "split": "http://es5.github.com/#x15.5.4.14",
- "substring": "http://es5.github.com/#x15.5.4.15",
- "toLowerCase": "http://es5.github.com/#x15.5.4.16",
- "toLocaleLowerCase": "http://es5.github.com/#x15.5.4.17",
- "toUpperCase": "http://es5.github.com/#x15.5.4.18",
- "toLocaleUpperCase": "http://es5.github.com/#x15.5.4.19",
- "trim": "http://es5.github.com/#x15.5.4.20",
-
- "Boolean": "http://es5.github.com/#x15.6",
- //"prototype": "http://es5.github.com/#x15.6.3.1",
- //"constructor": "http://es5.github.com/#x15.6.4.1",
- //"toString": "http://es5.github.com/#x15.6.4.2",
- //"valueOf": "http://es5.github.com/#x15.6.4.3",
-
- "Number": "http://es5.github.com/#x15.7",
- //"prototype": "http://es5.github.com/#x15.7.3.1",
- "MAX_VALUE": "http://es5.github.com/#x15.7.3.2",
- "MIN_VALUE": "http://es5.github.com/#x15.7.3.3",
- "NaN": "http://es5.github.com/#x15.7.3.4",
- "NEGATIVE_INFINITY": "http://es5.github.com/#x15.7.3.5",
- "POSITIVE_INFINITY": "http://es5.github.com/#x15.7.3.6",
- //"constructor": "http://es5.github.com/#x15.7.4.1",
- //"toString": "http://es5.github.com/#x15.7.4.2",
- "toLocaleString": "http://es5.github.com/#x15.7.4.3",
- //"valueOf": "http://es5.github.com/#x15.7.4.4",
- "toFixed": "http://es5.github.com/#x15.7.4.5",
- "toExponential": "http://es5.github.com/#x15.7.4.6",
- "toPrecision": "http://es5.github.com/#x15.7.4.7",
-
- "Math": "http://es5.github.com/#x15.8",
- "E": "http://es5.github.com/#x15.8.1.1",
- "LN10": "http://es5.github.com/#x15.8.1.2",
- "LN2": "http://es5.github.com/#x15.8.1.3",
- "LOG2E": "http://es5.github.com/#x15.8.1.4",
- "LOG10E": "http://es5.github.com/#x15.8.1.5",
- "PI": "http://es5.github.com/#x15.8.1.6",
- "SQRT1_2": "http://es5.github.com/#x15.8.1.7",
- "SQRT2": "http://es5.github.com/#x15.8.1.8",
- "abs": "http://es5.github.com/#x15.8.2.1",
- "acos": "http://es5.github.com/#x15.8.2.2",
- "asin": "http://es5.github.com/#x15.8.2.3",
- "atan": "http://es5.github.com/#x15.8.2.4",
- "atan2": "http://es5.github.com/#x15.8.2.5",
- "ceil": "http://es5.github.com/#x15.8.2.6",
- "cos": "http://es5.github.com/#x15.8.2.7",
- "exp": "http://es5.github.com/#x15.8.2.8",
- "floor": "http://es5.github.com/#x15.8.2.9",
- //"log": "http://es5.github.com/#x15.8.2.10",
- "max": "http://es5.github.com/#x15.8.2.11",
- "min": "http://es5.github.com/#x15.8.2.12",
- "pow": "http://es5.github.com/#x15.8.2.13",
- "random": "http://es5.github.com/#x15.8.2.14",
- "round": "http://es5.github.com/#x15.8.2.15",
- "sin": "http://es5.github.com/#x15.8.2.16",
- "sqrt": "http://es5.github.com/#x15.8.2.17",
- "tan": "http://es5.github.com/#x15.8.2.18",
-
- "Date": "http://es5.github.com/#x15.9",
- //"prototype": "http://es5.github.com/#x15.9.4.1",
- //"parse": "http://es5.github.com/#x15.9.4.2",
- "UTC": "http://es5.github.com/#x15.9.4.3",
- "now": "http://es5.github.com/#x15.9.4.4",
- //"constructor": "http://es5.github.com/#x15.9.5.1",
- //"toString": "http://es5.github.com/#x15.9.5.2",
- "toDateString": "http://es5.github.com/#x15.9.5.3",
- "toTimeString": "http://es5.github.com/#x15.9.5.4",
- "toLocaleString": "http://es5.github.com/#x15.9.5.5",
- "toLocaleDateString": "http://es5.github.com/#x15.9.5.6",
- "toLocaleTimeString": "http://es5.github.com/#x15.9.5.7",
- //"valueOf": "http://es5.github.com/#x15.9.5.8",
- "getTime": "http://es5.github.com/#x15.9.5.9",
- "getFullYear": "http://es5.github.com/#x15.9.5.10",
- "getUTCFullYear": "http://es5.github.com/#x15.9.5.11",
- "getMonth": "http://es5.github.com/#x15.9.5.12",
- "getUTCMonth": "http://es5.github.com/#x15.9.5.13",
- "getDate": "http://es5.github.com/#x15.9.5.14",
- "getUTCDate": "http://es5.github.com/#x15.9.5.15",
- "getDay": "http://es5.github.com/#x15.9.5.16",
- "getUTCDay": "http://es5.github.com/#x15.9.5.17",
- "getHours": "http://es5.github.com/#x15.9.5.18",
- "getUTCHours": "http://es5.github.com/#x15.9.5.19",
- "getMinutes": "http://es5.github.com/#x15.9.5.20",
- "getUTCMinutes": "http://es5.github.com/#x15.9.5.21",
- "getSeconds": "http://es5.github.com/#x15.9.5.22",
- "getUTCSeconds": "http://es5.github.com/#x15.9.5.23",
- "getMilliseconds": "http://es5.github.com/#x15.9.5.24",
- "getUTCMilliseconds": "http://es5.github.com/#x15.9.5.25",
- "getTimezoneOffset": "http://es5.github.com/#x15.9.5.26",
- "setTime": "http://es5.github.com/#x15.9.5.27",
- "setMilliseconds": "http://es5.github.com/#x15.9.5.28",
- "setUTCMilliseconds": "http://es5.github.com/#x15.9.5.29",
- "setSeconds": "http://es5.github.com/#x15.9.5.30",
- "setUTCSeconds": "http://es5.github.com/#x15.9.5.31",
- "setMinutes": "http://es5.github.com/#x15.9.5.32",
- "setUTCMinutes": "http://es5.github.com/#x15.9.5.33",
- "setHours": "http://es5.github.com/#x15.9.5.34",
- "setUTCHours": "http://es5.github.com/#x15.9.5.35",
- "setDate": "http://es5.github.com/#x15.9.5.36",
- "setUTCDate": "http://es5.github.com/#x15.9.5.37",
- "setMonth": "http://es5.github.com/#x15.9.5.38",
- "setUTCMonth": "http://es5.github.com/#x15.9.5.39",
- "setFullYear": "http://es5.github.com/#x15.9.5.40",
- "setUTCFullYear": "http://es5.github.com/#x15.9.5.41",
- "toUTCString": "http://es5.github.com/#x15.9.5.42",
- "toISOString": "http://es5.github.com/#x15.9.5.43",
- "toJSON": "http://es5.github.com/#x15.9.5.44",
-
- "RegExp": "http://es5.github.com/#x15.10",
- //"prototype": "http://es5.github.com/#x15.10.5.1",
- //"constructor": "http://es5.github.com/#x15.10.6.1",
- "exec": "http://es5.github.com/#x15.10.6.2",
- "test": "http://es5.github.com/#x15.10.6.3",
- //"toString": "http://es5.github.com/#x15.10.6.4",
- "source": "http://es5.github.com/#x15.10.7.1",
- "global": "http://es5.github.com/#x15.10.7.2",
- "igoreCase": "http://es5.github.com/#x15.10.7.3",
- "multiline": "http://es5.github.com/#x15.10.7.4",
- "lastIndex": "http://es5.github.com/#x15.10.7.5",
-
- "Error": "http://es5.github.com/#x15.11",
- //"prototype": "http://es5.github.com/#x15.11.3.1",
- //"constructor": "http://es5.github.com/#x15.11.4.1",
- //"name": "http://es5.github.com/#x15.11.4.2",
- //"message": "http://es5.github.com/#x15.11.4.3",
- //"toString": "http://es5.github.com/#x15.11.4.4",
- "EvalError": "http://es5.github.com/#x15.11.6.1", //link to ES4 instead for this one?
- "RangeError": "http://es5.github.com/#x15.11.6.2",
- "ReferenceError": "http://es5.github.com/#x15.11.6.3",
- "SyntaxError": "http://es5.github.com/#x15.11.6.4",
- "TypeError": "http://es5.github.com/#x15.11.6.5",
- "URIError": "http://es5.github.com/#x15.11.6.6",
-
- "NativeError": "http://es5.github.com/#x15.11.7",
- //"prototype": "http://es5.github.com/#x15.11.7.6",
- //"constructor": "http://es5.github.com/#x15.11.7.8",
- //"name": "http://es5.github.com/#x15.11.7.9",
- //"message": "http://es5.github.com/#x15.11.7.10",
-
- "JSON": "http://es5.github.com/#x15.12",
- //"parse": "http://es5.github.com/#x15.12.2",
- "stringify": "http://es5.github.com/#x15.12.3",
+ "NaN": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.1.1",
+ "Infinity": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.1.2",
+ "undefined": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.1.3",
+ "eval": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.1",
+ "parseInt": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.2",
+ "parseFloat": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.3",
+ "isNaN": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.4",
+ "isFinite": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.2.4",
+ "decodeURI": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.3.1",
+ "decodeURIComponent": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.3.2",
+ "encodeURI": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.3.3",
+ "encodeURIComponent": "http://ecma-international.org/ecma-262/5.1/#sec-15.1.3.4",
+
+ "Object": "http://ecma-international.org/ecma-262/5.1/#sec-15.2",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.1",
+ "getPrototypeOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.2",
+ "getOwnPropertyDescriptor": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.3",
+ "getOwnPropertyNames": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.4",
+ "create": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.5",
+ "defineProperty": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.6",
+ "defineProperties": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.7",
+ "seal": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.8",
+ "freeze": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.9",
+ "preventExtensions": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.10",
+ "isSealed": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.11",
+ "isFrozen": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.12",
+ "isExtensible": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.13",
+ "keys": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.14",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.2",
+ "toLocaleString": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.3",
+ //"valueOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.4",
+ "hasOwnProperty": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.5",
+ "isPrototypeOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.6",
+ "propertyIsEnumerable": "http://ecma-international.org/ecma-262/5.1/#sec-15.2.4.7",
+
+ "Function": "http://ecma-international.org/ecma-262/5.1/#sec-15.3",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.3.1",
+ //"length": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.3.2",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.2",
+ "apply": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.3",
+ "call": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.4",
+ "bind": "http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.5",
+
+ "Array": "http://ecma-international.org/ecma-262/5.1/#sec-15.4",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.3.1",
+ "isArray": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.3.2",
+ //"length": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.5.2",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.2",
+ "toLocaleString": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.3",
+ "concat": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.4",
+ "join": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.5",
+ "pop": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.6",
+ "push": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.7",
+ "reverse": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.8",
+ "shift": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.9",
+ //"slice": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.10",
+ "sort": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.11",
+ "splice": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.12",
+ "unshift": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.13",
+ "indexOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.14",
+ "lastIndexOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.15",
+ "every": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.16",
+ "some": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.17",
+ "forEach": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.18",
+ "map": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.19",
+ "filter": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.20",
+ "reduce": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.21",
+ "reduceRight": "http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.22",
+
+ "String": "http://ecma-international.org/ecma-262/5.1/#sec-15.5",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.3.1",
+ "fromCharCode": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.3.2",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.2",
+ //"valueOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.3",
+ "charAt": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.4",
+ "charCodeAt": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.5",
+ "concat": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.6",
+ "indexOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.7",
+ "lastIndexOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.8",
+ "localeCompare": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.9",
+ "match": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.10",
+ //"replace": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.11",
+ //"search": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.12",
+ //"slice": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.13",
+ "split": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.14",
+ "substring": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.15",
+ "toLowerCase": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.16",
+ "toLocaleLowerCase": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.17",
+ "toUpperCase": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.18",
+ "toLocaleUpperCase": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.19",
+ "trim": "http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.20",
+
+ "Boolean": "http://ecma-international.org/ecma-262/5.1/#sec-15.6",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.6.3.1",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.6.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.6.4.2",
+ //"valueOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.6.4.3",
+
+ "Number": "http://ecma-international.org/ecma-262/5.1/#sec-15.7",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.1",
+ "MAX_VALUE": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.2",
+ "MIN_VALUE": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.3",
+ "NaN": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.4",
+ "NEGATIVE_INFINITY": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.5",
+ "POSITIVE_INFINITY": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.3.6",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.2",
+ "toLocaleString": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.3",
+ //"valueOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.4",
+ "toFixed": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.5",
+ "toExponential": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.6",
+ "toPrecision": "http://ecma-international.org/ecma-262/5.1/#sec-15.7.4.7",
+
+ "Math": "http://ecma-international.org/ecma-262/5.1/#sec-15.8",
+ "E": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.1",
+ "LN10": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.2",
+ "LN2": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.3",
+ "LOG2E": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.4",
+ "LOG10E": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.5",
+ "PI": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.6",
+ "SQRT1_2": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.7",
+ "SQRT2": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.1.8",
+ "abs": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.1",
+ "acos": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.2",
+ "asin": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.3",
+ "atan": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.4",
+ "atan2": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.5",
+ "ceil": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.6",
+ "cos": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.7",
+ "exp": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.8",
+ "floor": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.9",
+ //"log": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.10",
+ "max": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.11",
+ "min": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.12",
+ "pow": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.13",
+ "random": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.14",
+ "round": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.15",
+ "sin": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.16",
+ "sqrt": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.17",
+ "tan": "http://ecma-international.org/ecma-262/5.1/#sec-15.8.2.18",
+
+ "Date": "http://ecma-international.org/ecma-262/5.1/#sec-15.9",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.4.1",
+ //"parse": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.4.2",
+ "UTC": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.4.3",
+ "now": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.4.4",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.1",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.2",
+ "toDateString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.3",
+ "toTimeString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.4",
+ "toLocaleString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.5",
+ "toLocaleDateString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.6",
+ "toLocaleTimeString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.7",
+ //"valueOf": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.8",
+ "getTime": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.9",
+ "getFullYear": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.10",
+ "getUTCFullYear": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.11",
+ "getMonth": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.12",
+ "getUTCMonth": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.13",
+ "getDate": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.14",
+ "getUTCDate": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.15",
+ "getDay": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.16",
+ "getUTCDay": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.17",
+ "getHours": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.18",
+ "getUTCHours": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.19",
+ "getMinutes": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.20",
+ "getUTCMinutes": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.21",
+ "getSeconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.22",
+ "getUTCSeconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.23",
+ "getMilliseconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.24",
+ "getUTCMilliseconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.25",
+ "getTimezoneOffset": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.26",
+ "setTime": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.27",
+ "setMilliseconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.28",
+ "setUTCMilliseconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.29",
+ "setSeconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.30",
+ "setUTCSeconds": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.31",
+ "setMinutes": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.32",
+ "setUTCMinutes": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.33",
+ "setHours": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.34",
+ "setUTCHours": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.35",
+ "setDate": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.36",
+ "setUTCDate": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.37",
+ "setMonth": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.38",
+ "setUTCMonth": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.39",
+ "setFullYear": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.40",
+ "setUTCFullYear": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.41",
+ "toUTCString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.42",
+ "toISOString": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.43",
+ "toJSON": "http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.44",
+
+ "RegExp": "http://ecma-international.org/ecma-262/5.1/#sec-15.10",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.5.1",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.6.1",
+ "exec": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.6.2",
+ "test": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.6.3",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.6.4",
+ "source": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.7.1",
+ "global": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.7.2",
+ "igoreCase": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.7.3",
+ "multiline": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.7.4",
+ "lastIndex": "http://ecma-international.org/ecma-262/5.1/#sec-15.10.7.5",
+
+ "Error": "http://ecma-international.org/ecma-262/5.1/#sec-15.11",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.3.1",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.4.1",
+ //"name": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.4.2",
+ //"message": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.4.3",
+ //"toString": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.4.4",
+ "EvalError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.1", //link to ES4 instead for this one?
+ "RangeError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.2",
+ "ReferenceError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.3",
+ "SyntaxError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.4",
+ "TypeError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.5",
+ "URIError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.6.6",
+
+ "NativeError": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.7",
+ //"prototype": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.7.6",
+ //"constructor": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.7.8",
+ //"name": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.7.9",
+ //"message": "http://ecma-international.org/ecma-262/5.1/#sec-15.11.7.10",
+
+ "JSON": "http://ecma-international.org/ecma-262/5.1/#sec-15.12",
+ //"parse": "http://ecma-international.org/ecma-262/5.1/#sec-15.12.2",
+ "stringify": "http://ecma-international.org/ecma-262/5.1/#sec-15.12.3",
// CSSOM
"Screen": "http://dev.w3.org/csswg/cssom-view/#the-screen-interface",
View
7 src/style/css_suggest_values.js
@@ -985,6 +985,13 @@ suggest_values['overflow-y'] =
'inherit'
];
+suggest_values['overflow-wrap'] =
+[
+ 'normal',
+ 'break-word',
+ 'inherit'
+];
+
suggest_values['padding'] =
suggest_values['padding-top'] =
suggest_values['padding-right'] =
View
3  src/style/stylesheets.js
@@ -958,6 +958,9 @@ cls.Stylesheets.get_initial_value = function(prop, data, index_map)
case "overflow":
return "visible";
+ case "overflow-wrap":
+ return "normal";
+
case "overflow-x":
return "visible";
View
5 src/syntaxhighlight/js/tokenizer.js
@@ -57,7 +57,7 @@ cls.SimpleJSParser.prototype = new function()
* @param {String} script_source The script string.
* @param {Function} ontoken. Signature of the callback is (token_type, token).
* @param {String} escape. Optional. Currently supports only "html"
- * to escape "<" and "&" to "&lt;" and "&amp;".
+ * to escape "<", ">" and "&" to "&lt;", "&gt;" (for ]]>) and "&amp;".
*/
this.tokenize = function(script_source, ontoken, escape, start_state){};
@@ -355,6 +355,7 @@ cls.SimpleJSParser.prototype = new function()
var ESCAPE =
{
'<': '&lt;',
+ '>': '&gt;',
'&': '&amp;'
}
var default_parser=function(c)
@@ -868,7 +869,7 @@ cls.SimpleJSParser.prototype = new function()
if(__parse_error_first_token)
{
__line = "<div class='error-description'>" +
- helpers.escapeTextHtml(__parse_error_description) +
+ helpers.escape_html(__parse_error_description) +
"</div>" +
"<span class='not-error'>" + __line + "</span>" +
"<span class='first-error'>" + __buffer + "</span>";
View
BIN  src/ui-images/icons/icon_refetch_listeners.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  src/ui-images/icons/icon_reformat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
8 src/ui-scripts/actions/actionbroker.js
@@ -361,12 +361,8 @@ var ActionBroker = function()
var shared_shortcuts = this._current_shared_shortcuts[this._action_context.mode] || {};
var action = shortcuts[key_id] || shared_shortcuts[key_id] || '';
var propagate_event = true;
- if (action)
- {
- propagate_event = this._action_context.handle(action,
- event,
- this._container);
- }
+ if (action && this._action_context.is_enabled)
+ propagate_event = this._action_context.handle(action, event, this._container);
if (!(propagate_event === false) &&
this._action_context != this._global_handler)
View
2  src/ui-scripts/actions/actionhandlerinterface.js
@@ -52,6 +52,8 @@
return actions;
};
+ this.is_enabled = true;
+
this.mode = "default";
this._handlers = {};
View
2  src/ui-scripts/actions/globalactionhandler.js
@@ -6,6 +6,8 @@
*/
this.id = id;
+ this.is_enabled = true;
+
/**
* To handle a single action.
* Returning false (as in === false) will cancel the event
View
12 src/ui-scripts/actions/keyidentifier.js
@@ -5,6 +5,8 @@
/* private */
+ var EXCEPTIONS = ["Backspace", "Tab", "Enter", "Spacebar"];
+
this._named_shortcuts = {};
this._char_shortcuts = {};
this._name_keycode_map = KeyIdentifier.named_keys;
@@ -72,14 +74,14 @@
var tokens = shortcut.split(/[ ,\+]+/).map(function(t)
{
t = t.toLowerCase();
- // on Mac Opera cmd and ctrl are switched
+ // on Mac Opera cmd sets the meta flag
if (t == "cmd")
- t = "ctrl";
+ t = "meta";
return t;
});
- var mod_key = ["shift", "ctrl", "alt"/*, "meta"*/].reduce(function(m_key, mod, index)
+ var mod_key = ["shift", "ctrl", "alt", "meta"].reduce(function(m_key, mod, index)
{
var pos = tokens.indexOf(mod);
if (pos > -1)
@@ -199,12 +201,12 @@
// opera
this._handle_keydown_bound = function(event)
{
- var mod_key = ["shift", "ctrl", "alt"/*, "meta"*/].reduce(function(m_key, mod, index)
+ var mod_key = ["shift", "ctrl", "alt", "meta"].reduce(function(m_key, mod, index)
{
return m_key | (event[mod + "Key"] ? Math.pow(2, index) : 0);
}, 0);
- if (event.key.length > 1)
+ if (EXCEPTIONS.indexOf(event.key) != -1 || (!event.char && event.key.length > 1))
{
var key_id = this._name_keycode_map[event.key] << 4 | mod_key;
if (key_id in this._named_shortcuts)
View
28 src/ui-scripts/containers.js
@@ -66,29 +66,25 @@ var ContainerBase = function()
this.setup = function(view_id)
{
var view = views[this.view_id = view_id];
- var container = document.getElementById(this.type + '-to-' + this.cell.id) || this.update();
+ var container = document.getElementById(this.type + "-to-" + this.cell.id) || this.update();
if( view )
{
- container.removeAttribute('handler');
- container.removeAttribute('edit-handler');
- if (view.default_handler)
+ var names = ["handler", "edit-handler", "data-tooltip", "data-menu"];
+ var values = [view.default_handler, view.edit_handler, view.default_tooltip, view_id];
+ names.forEach(function(name, index)
{
- container.setAttribute('handler', view.default_handler);
- }
- if (view.edit_handler)
- {
- container.setAttribute('edit-handler', view.edit_handler);
- }
- container.className = view.container_class || '';
- container.setAttribute('data-menu', view_id || '');
- container.innerHTML = '';
+ if (values[index])
+ container.setAttribute(name, values[index]);
+ else
+ container.removeAttribute(name);
+ });
+ container.className = view.container_class || "";
+ container.innerHTML = "";
if (!view.has_container_id(container.id))
- {
view.addContainerId(container.id);
- }
view.update();
}
- }
+ };
this.init = function(cell)
{
View
2  src/ui-scripts/overlay.js
@@ -18,7 +18,7 @@ var Overlay = function()
this.__defineGetter__("is_visible", function()
{
- return !!(this.element && this.element.parentNode);
+ return Boolean(this.element && this.element.parentNode);
});
this.show = function(id)
View
2  src/ui-scripts/tabs.js
@@ -378,7 +378,7 @@ var TabsBase = function()
{
return sum + tab.orig_width;
}, 0);
- scale = (orig_width_sum - delta) / orig_width_sum;
+ scale = Math.max(orig_width_sum - delta, 0) / orig_width_sum;
}
}
View
19 src/ui-scripts/tooltip/tooltip.js
@@ -276,14 +276,7 @@ Tooltips.CSS_TOOLTIP_SELECTED = "tooltip-selected";
_cur_ctx.last_handler_ele.getAttribute(DATA_TOOLTIP_TEXT),
"class", "basic-tooltip"];
- if (content)
- {
- _cur_ctx.tooltip_ele.scrollTop = 0;
- _cur_ctx.tooltip_ele.scrollLeft = 0;
- ret = typeof content == "string"
- ? (_cur_ctx.tooltip_ele.textContent = content)
- : _cur_ctx.tooltip_ele.clearAndRender(content);
- }
+ _cur_ctx.tooltip_ele.innerHTML = "";
if (!box && _cur_ctx.last_box)
{
@@ -391,8 +384,16 @@ Tooltips.CSS_TOOLTIP_SELECTED = "tooltip-selected";
}
}
}
- }
+ if (content)
+ {
+ _cur_ctx.tooltip_ele.scrollTop = 0;
+ _cur_ctx.tooltip_ele.scrollLeft = 0;
+ ret = typeof content == "string"
+ ? (_cur_ctx.tooltip_ele.textContent = content)
+ : _cur_ctx.tooltip_ele.clearAndRender(content);
+ }
+ }
return ret;
};
View
19 src/ui-scripts/view.js
@@ -60,17 +60,18 @@ var ViewBase = new function()
return false;
}
- this.init = function(id, name, container_class, html, default_handler, edit_handler)
+ this.init = function(id, name, container_class, html, default_handler, edit_handler, default_tooltip)
{
this.id = id || getId();
this.name = name;
this.container_class = container_class;
this.inner = html; // only for testing;
this.container_ids = [];
- this.type = this.type || 'single-view';
- this.default_handler = default_handler || '';
- this.edit_handler = edit_handler || '';
- this.requires_view || ( this.requires_view = '' );
+ this.type = this.type || "single-view";
+ this.default_handler = default_handler || "";
+ this.edit_handler = edit_handler || "";
+ this.default_tooltip = default_tooltip || "";
+ this.requires_view || ( this.requires_view = "" );
if(!window.views)
{
window.views = {};
@@ -80,7 +81,7 @@ var ViewBase = new function()
{
ids[ids.length] = this.id;
}
- messages.post('view-initialized', {'view_id': this.id});
+ messages.post("view-initialized", {"view_id": this.id});
}
this.register_overlay = function(view)
@@ -304,11 +305,9 @@ var ViewBase = new function()
* @constructor
* @extends ViewBase
*/
-
-
-var View = function(id, name, container_class, html, default_handler)
+var View = function(id, name, container_class, html, default_handler, edit_handler, default_tooltip)
{
- this.init(id, name, container_class, html, default_handler);
+ this.init(id, name, container_class, html, default_handler, edit_handler, default_tooltip);
}
View.prototype = ViewBase;
View
3  src/ui-strings/ui_strings-en.js
@@ -633,6 +633,9 @@ ui_strings.S_CONFIRM_SWITCH_TO_NETWORK_PROFILER = "To improve the accuracy of ti
/* DESC: Label for the list of function when doing console.trace(). */
ui_strings.S_CONSOLE_TRACE_LABEL = "Stack trace:";
+/* DESC: Text for a link to the contributors list. */
+ui_strings.S_CONTRIBUTORS = "Contributors";
+
/* DESC: In 1 hour */
ui_strings.S_COOKIE_MANAGER_IN_1_HOUR = "In 1 hour";
View
2  src/ui-style/tabs.css
@@ -223,7 +223,7 @@ top-tabs .badge
.profiler_mode
{
- background: url("../ui-images/mode_profiler.png");
+ background-image: url("../ui-images/mode_profiler.png");
width: 25px;
}
View
7 src/window-manager/window-manager.js
@@ -47,8 +47,9 @@ cls.WindowManager["2.0"].WindowManagerData = function(session_ctx)
TITLE = 1,
WINDOW_TYPE = 2,
OPENER_ID = 3;
+ EXTENSION_NAME = 4;
*/
- return {window_id: win[0], title: win[1], window_type: win[2], opener_id: win[3]};
+ return {window_id: win[0], title: win[1], window_type: win[2], opener_id: win[3], extension_name: win[4]};
};
this._set_active_window_as_debug_context = function()
@@ -397,7 +398,7 @@ cls.WindowManager["2.0"].WindowsDropDown = function()
return (
'<option value="' + win.window_id + '"' +
( win.window_id == window_manager_data.get_debug_context() ? ' selected="selected"' : '' ) + '>' +
- helpers.escapeTextHtml(win.title || "") +
+ helpers.escape_html(win.title || "") +
'</option>');
}
@@ -479,7 +480,7 @@ cls.WindowManager["2.0"].DebuggerMenu = function(id, class_name)
{
return (
["cst-option",
- win.title || "\u00A0",
+ win.extension_name || win.title || "\u00A0",
"opt-index", index,
"value", win.window_id.toString(),
"class", win.window_id == window_manager_data.get_debug_context() ?
View
46 test-scripts/innerHTML/dom_versus_inner_html.html
@@ -550,7 +550,7 @@
|| top_url.replace(/\?.*$/, '').replace(/#.*$/, '').replace(/\/[^/]*$/, "/") + url );
}
- this.escapeTextHtml = (function()
+ this.escape_html = (function()
{
var re_amp = /&/g, re_lt = /</g;
return function(str)
@@ -559,7 +559,7 @@
}
})();
- this.escapeAttributeHtml = (function()
+ this.escape_html_attr = (function()
{
var re_amp = /&/g, re_lt = /</g, re_quot = /"/g;
return function(str)
@@ -1054,7 +1054,7 @@
{
ret.push(
"<item>" +
- "<key class='no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</key>" +
+ "<key class='no-expander'>" + helpers.escape_html(prop[NAME]) + "</key>" +
"<value class='" + type + "'>" + value + "</value>" +
"</item>"
);
@@ -1064,15 +1064,15 @@
{
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '…"' : '';
- value = helpers.escapeTextHtml(value).replace(/'/g, '&#39;');
+ value = helpers.escape_html(value).replace(/'/g, '&#39;');
if (short_val)
{
ret.push(
"<item>" +
"<input type='button' handler='expand-value' class='folder-key'/>" +
- "<key>" + helpers.escapeTextHtml(prop[NAME]) + "</key>" +
+ "<key>" + helpers.escape_html(prop[NAME]) + "</key>" +
"<value class='" + type + "' data-value='" + value + "'>" +
- "\"" + helpers.escapeTextHtml(short_val) +
+ "\"" + helpers.escape_html(short_val) +
"</value>" +
"</item>"
);
@@ -1081,7 +1081,7 @@
{
ret.push(
"<item>" +
- "<key class='no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</key>" +
+ "<key class='no-expander'>" + helpers.escape_html(prop[NAME]) + "</key>" +
"<value class='" + type + "'>\"" + value + "\"</value>" +
"</item>"
);
@@ -1093,7 +1093,7 @@
{
ret.push(
"<item>" +
- "<key class='no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</key>" +
+ "<key class='no-expander'>" + helpers.escape_html(prop[NAME]) + "</key>" +
"<value class='" + type + "'>" + type + "</value>" +
"</item>"
);
@@ -1113,7 +1113,7 @@
ret.push("style='background-position: 0px -11px') ");
ret.push(
"/>" +
- "<key>" + helpers.escapeTextHtml(prop[NAME]) + "</key>" +
+ "<key>" + helpers.escape_html(prop[NAME]) + "</key>" +
"<value class='object'>" + prop[OBJECT_VALUE][CLASS_NAME] + "</value>"
);
if (obj_id in tree)
@@ -1200,7 +1200,7 @@
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', value.toString(), 'class', type]
]);
break;
@@ -1209,21 +1209,21 @@
{
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '…"' : '';
- value = helpers.escapeTextHtml(value).replace(/'/g, '&#39;');
+ value = helpers.escape_html(value).replace(/'/g, '&#39;');
if (short_val)
{
ret.push(
['item',
['input', 'type', 'button', 'handler', 'expand-value', 'class', 'folder-key'],
- ['key', helpers.escapeTextHtml(prop[NAME])],
- ['value', helpers.escapeTextHtml(short_val), 'class', type, 'data-value', value]
+ ['key', helpers.escape_html(prop[NAME])],
+ ['value', helpers.escape_html(short_val), 'class', type, 'data-value', value]
]);
}
else
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', value, 'class', type]
]);
}
@@ -1234,7 +1234,7 @@
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', type, 'class', type]
]);
break;
@@ -1249,7 +1249,7 @@
'handler', 'examine-object',
'class', 'folder-key'
].concat(obj_id in tree ? ['style', 'background-position: 0px -11px'] : []),
- ['key', helpers.escapeTextHtml(prop[NAME])],
+ ['key', helpers.escape_html(prop[NAME])],
['value', prop[OBJECT_VALUE][CLASS_NAME], 'class', 'object'],
obj_id in tree ? _pretty_print_object(model, tree[obj_id], obj_id) : [],
'obj-id', obj_id.toString()
@@ -1339,7 +1339,7 @@
{
ret.push(
"<div class='item'>" +
- "<span class='key no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key no-expander'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "'>" + value + "</span>" +
"</div>"
);
@@ -1349,15 +1349,15 @@
{
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '…"' : '';
- value = helpers.escapeTextHtml(value).replace(/'/g, '&#39;');
+ value = helpers.escape_html(value).replace(/'/g, '&#39;');
if (short_val)
{
ret.push(
"<div class='item'>" +
"<input type='button' data-handler='expand-value' class='folder-key'/>" +
- "<span class='key'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "' data-value='" + value + "'>" +
- "\"" + helpers.escapeTextHtml(short_val) +
+ "\"" + helpers.escape_html(short_val) +
"</span>" +
"</div>"
);
@@ -1366,7 +1366,7 @@
{
ret.push(
"<div class='item'>" +
- "<span class='key no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key no-expander'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "'>\"" + value + "\"</span>" +
"</div>"
);
@@ -1378,7 +1378,7 @@
{
ret.push(
"<div class='item'>" +
- "<span class='key no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key no-expander'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "'>" + type + "</span>" +
"</div>"
);
@@ -1398,7 +1398,7 @@
ret.push("style='background-position: 0px -11px') ");
ret.push(
"/>" +
- "<span class='key'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value object'>" + prop[OBJECT_VALUE][CLASS_NAME] + "</span>"
);
if (obj_id in tree)
View
14 test-scripts/innerHTML/templates_6_0_test.js
@@ -55,7 +55,7 @@
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', value.toString(), 'class', type]
]);
break;
@@ -64,21 +64,21 @@
{
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '…"' : '';
- value = helpers.escapeTextHtml(value).replace(/'/g, '&#39;');
+ value = helpers.escape_html(value).replace(/'/g, '&#39;');
if (short_val)
{
ret.push(
['item',
['input', 'type', 'button', 'handler', 'expand-value', 'class', 'folder-key'],
- ['key', helpers.escapeTextHtml(prop[NAME])],
- ['value', helpers.escapeTextHtml(short_val), 'class', type, 'data-value', value]
+ ['key', helpers.escape_html(prop[NAME])],
+ ['value', helpers.escape_html(short_val), 'class', type, 'data-value', value]
]);
}
else
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', value, 'class', type]
]);
}
@@ -89,7 +89,7 @@
{
ret.push(
['item',
- ['key', helpers.escapeTextHtml(prop[NAME]), 'class', 'no-expander'],
+ ['key', helpers.escape_html(prop[NAME]), 'class', 'no-expander'],
['value', type, 'class', type]
]);
break;
@@ -104,7 +104,7 @@
'handler', 'examine-object',
'class', 'folder-key'
].concat(tree.hasOwnProperty(prop[NAME]) ? ['style', 'background-position: 0px -11px'] : []),
- ['key', helpers.escapeTextHtml(prop[NAME])],
+ ['key', helpers.escape_html(prop[NAME])],
['value', prop[OBJECT_VALUE][CLASS_NAME], 'class', 'object'],
tree.hasOwnProperty(prop[NAME]) ? _pretty_print_object(model, tree[prop[NAME]], obj_id, ret) : [],
'obj-id', obj_id.toString()
View
14 test-scripts/innerHTML/templates_6_0_test_html5.js
@@ -53,7 +53,7 @@
{
ret.push(
"<div class='item'>" +
- "<span class='key no-expander'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key no-expander'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "'>" + value + "</span>" +
"</div>"
);
@@ -63,15 +63,15 @@
{
short_val = value.length > MAX_VALUE_LENGTH ?
value.slice(0, MAX_VALUE_LENGTH) + '…"' : '';
- value = helpers.escapeTextHtml(value).replace(/'/g, '&#39;');
+ value = helpers.escape_html(value).replace(/'/g, '&#39;');
if (short_val)
{
ret.push(
"<div class='item'>" +
"<input type='button' data-handler='expand-value' class='folder-key'/>" +
- "<span class='key'>" + helpers.escapeTextHtml(prop[NAME]) + "</span>" +
+ "<span class='key'>" + helpers.escape_html(prop[NAME]) + "</span>" +
"<span class='value " + type + "' data-value='" + value + "'>" +
- "\"" + helpers.escapeTextHtml(short_val) +
+ "\"" + helpers.escape_html(short_val) +