Changeset 90617 in webkit
- Timestamp:
- Jul 8, 2011 4:16:24 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90614 r90617 1 2011-07-08 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: Quotes are rendered as " in the DOM tree 4 https://bugs.webkit.org/show_bug.cgi?id=64154 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/elements/elements-panel-structure-expected.txt: 9 * inspector/elements/elements-panel-structure.html: 10 1 11 2011-07-08 Yury Semikhatsky <yurys@chromium.org> 2 12 -
trunk/LayoutTests/inspector/elements/elements-panel-structure-expected.txt
r78576 r90617 1 Tests that elements panel shows domtree structure.1 Tests that elements panel shows DOM tree structure. 2 2 3 Text 3 "Quoted Text" 4 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 5 5 - <html> … … 12 12 </head> 13 13 - <body onload="runTest()"> 14 <p>Tests that elements panel shows domtree structure.</p>14 <p>Tests that elements panel shows DOM tree structure.</p> 15 15 - <div id="level1"> 16 16 - <div id="level2"> 17 " Text"17 ""Quoted Text" " 18 18 <div id="level3"></div> 19 19 </div> -
trunk/LayoutTests/inspector/elements/elements-panel-structure.html
r82713 r90617 22 22 <body onload="runTest()"> 23 23 <p> 24 Tests that elements panel shows domtree structure.24 Tests that elements panel shows DOM tree structure. 25 25 </p> 26 26 27 27 <div id="level1"> 28 <div id="level2"> Text28 <div id="level2">"Quoted Text" 29 29 <div id="level3"></div> 30 30 </div> -
trunk/Source/WebCore/ChangeLog
r90616 r90617 1 2011-07-08 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: Quotes are rendered as " in the DOM tree 4 https://bugs.webkit.org/show_bug.cgi?id=64154 5 6 Reviewed by Yury Semikhatsky. 7 8 Since we currently rely on setting textContent rather than innerHTML for the DOM tree elements, 9 escapeHTML() calls unnecessarily HTML-escape certain characters in the DOM tree contents. 10 11 * inspector/front-end/ElementsTreeOutline.js: 12 (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM): 13 (): 14 1 15 2011-07-08 Vsevolod Vlasov <vsevik@chromium.org> 2 16 -
trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js
r90561 r90617 1365 1365 var attrSpanElement = parentElement.createChild("span", "webkit-html-attribute"); 1366 1366 var attrNameElement = attrSpanElement.createChild("span", "webkit-html-attribute-name"); 1367 attrNameElement.textContent = name .escapeHTML();1367 attrNameElement.textContent = name; 1368 1368 1369 1369 if (hasText) … … 1375 1375 attrSpanElement.appendChild(linkify(rewrittenHref, value, "webkit-html-attribute-value", node.nodeName().toLowerCase() === "a")); 1376 1376 } else { 1377 value = value. escapeHTML().replace(/([\/;:\)\]\}])/g, "$1\u200B");1377 value = value.replace(/([\/;:\)\]\}])/g, "$1\u200B"); 1378 1378 var attrValueElement = attrSpanElement.createChild("span", "webkit-html-attribute-value"); 1379 1379 attrValueElement.textContent = value; … … 1426 1426 1427 1427 case Node.ELEMENT_NODE: 1428 var tagName = this.treeOutline.nodeNameToCorrectCase(node.nodeName()) .escapeHTML();1428 var tagName = this.treeOutline.nodeNameToCorrectCase(node.nodeName()); 1429 1429 if (this._elementCloseTag) { 1430 1430 this._buildTagDOM(info.titleDOM, tagName, true, true); … … 1452 1452 if (showInlineText) { 1453 1453 var textNodeElement = info.titleDOM.createChild("span", "webkit-html-text-node"); 1454 textNodeElement.textContent = textChild.nodeValue() .escapeHTML();1454 textNodeElement.textContent = textChild.nodeValue(); 1455 1455 info.titleDOM.appendChild(document.createTextNode("\u200B")); 1456 1456 this._buildTagDOM(info.titleDOM, tagName, true, false); … … 1478 1478 info.titleDOM.appendChild(document.createTextNode("\"")); 1479 1479 var textNodeElement = info.titleDOM.createChild("span", "webkit-html-text-node"); 1480 textNodeElement.textContent = node.nodeValue() .escapeHTML();1480 textNodeElement.textContent = node.nodeValue(); 1481 1481 info.titleDOM.appendChild(document.createTextNode("\"")); 1482 1482 } … … 1486 1486 case Node.COMMENT_NODE: 1487 1487 var commentElement = info.titleDOM.createChild("span", "webkit-html-comment"); 1488 commentElement.appendChild(document.createTextNode("<!--" + node.nodeValue() .escapeHTML()+ "-->"));1488 commentElement.appendChild(document.createTextNode("<!--" + node.nodeValue() + "-->")); 1489 1489 break; 1490 1490 … … 1507 1507 case Node.CDATA_SECTION_NODE: 1508 1508 var cdataElement = info.titleDOM.createChild("span", "webkit-html-text-node"); 1509 cdataElement.appendChild(document.createTextNode("<![CDATA[" + node.nodeValue() .escapeHTML()+ "]]>"));1509 cdataElement.appendChild(document.createTextNode("<![CDATA[" + node.nodeValue() + "]]>")); 1510 1510 break; 1511 1511 default: 1512 var defaultElement = info.titleDOM.appendChild(document.createTextNode(this.treeOutline.nodeNameToCorrectCase(node.nodeName()).collapseWhitespace() .escapeHTML()));1512 var defaultElement = info.titleDOM.appendChild(document.createTextNode(this.treeOutline.nodeNameToCorrectCase(node.nodeName()).collapseWhitespace())); 1513 1513 } 1514 1514
Note: See TracChangeset
for help on using the changeset viewer.