Changeset 185703 in webkit
- Timestamp:
- Jun 18, 2015, 10:13:21 AM (11 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/FormattedValue.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r185671 r185703 1 2015-06-18 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r185671. 4 https://bugs.webkit.org/show_bug.cgi?id=146114 5 6 Caused frequent flaky failures on profiler tests (Requested by 7 ap on #webkit). 8 9 Reverted changeset: 10 11 "Web Inspector: Improve a few more node preview types" 12 https://bugs.webkit.org/show_bug.cgi?id=146048 13 http://trac.webkit.org/changeset/185671 14 1 15 2015-06-17 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js
r185671 r185703 70 70 WebInspector.FormattedValue.createElementForNodePreview = function(preview) 71 71 { 72 var value = preview.value;73 72 var span = document.createElement("span"); 74 73 span.className = "formatted-node-preview syntax-highlighted"; 75 74 76 // Comment node preview. 77 if (value.startsWith("<!--")) { 78 var comment = span.appendChild(document.createElement("span")); 79 comment.className = "html-comment"; 80 comment.textContent = value; 81 return span; 82 } 83 84 // Doctype node preview. 85 if (value.startsWith("<!DOCTYPE")) { 86 var doctype = span.appendChild(document.createElement("span")); 87 doctype.className = "html-doctype"; 88 doctype.textContent = value; 89 return span; 90 } 91 92 // Element node previews have a very strict format, with at most a single attribute. 75 // A node preview has a very strict format, with at most a single attribute. 93 76 // We can style it up like a DOMNode without interactivity. 94 var matches = value.match(/^<(\S+?)(?: (\S+?)="(.*?)")?>$/); 95 96 // Remaining node types are often #text, #document, etc, with attribute nodes potentially being any string. 77 var matches = preview.value.match(/^<(\S+?)(?: (\S+?)="(.*?)")?>$/); 97 78 if (!matches) { 98 console. assert(!value.startsWith("<"), "Unexpected node preview format: " + value);99 span.textContent = value;79 console.error("Node preview did not match format.", preview.value) 80 span.textContent = preview.value; 100 81 return span; 101 82 }
Note:
See TracChangeset
for help on using the changeset viewer.