Permalink
Browse files

Merge branch 'bugfix_package_10' into cutting-edge

  • Loading branch information...
chriskr committed Sep 28, 2012
2 parents 6439efb + 4e5621f commit a3b1ee7f1369ed70a2fca827fb7824eb9d037038
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
@@ -0,0 +1,7 @@
+window.app.builders.Overlay || ( window.app.builders.Overlay = {} );
+
+window.app.builders.Overlay["1.0"] = function(service)
+{
+ return true;
+};
+
View
@@ -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"/>
@@ -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]);
}
}
}
@@ -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>";
}
@@ -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;
@@ -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;
}
})();
Oops, something went wrong.

0 comments on commit a3b1ee7

Please sign in to comment.