| OLD | NEW |
| 1 var initialize_ElementTest = function() { | 1 var initialize_ElementTest = function() { |
| 2 | 2 |
| 3 InspectorTest.findNode = function(matchFunction, callback) | 3 InspectorTest.findNode = function(matchFunction, callback) |
| 4 { | 4 { |
| 5 callback = InspectorTest.safeWrap(callback); | 5 callback = InspectorTest.safeWrap(callback); |
| 6 var result = null; | 6 var result = null; |
| 7 var pendingRequests = 0; | 7 var pendingRequests = 0; |
| 8 function processChildren(node) | 8 function processChildren(node) |
| 9 { | 9 { |
| 10 try { | 10 try { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 var section = sections[i]; | 211 var section = sections[i]; |
| 212 if (section.computedStyle && excludeComputed) | 212 if (section.computedStyle && excludeComputed) |
| 213 continue; | 213 continue; |
| 214 if (section.rule && excludeMatched) | 214 if (section.rule && excludeMatched) |
| 215 continue; | 215 continue; |
| 216 if (section.element && section.element.classList.contains("user-rule
") && !WebInspector.settings.showUserAgentStyles.get()) | 216 if (section.element && section.element.classList.contains("user-rule
") && !WebInspector.settings.showUserAgentStyles.get()) |
| 217 continue; | 217 continue; |
| 218 if (section.element.previousSibling && section.element.previousSibli
ng.className === "sidebar-separator") | 218 if (section.element.previousSibling && section.element.previousSibli
ng.className === "sidebar-separator") |
| 219 InspectorTest.addResult("======== " + section.element.previousSi
bling.textContent + " ========"); | 219 InspectorTest.addResult("======== " + section.element.previousSi
bling.textContent + " ========"); |
| 220 InspectorTest.addResult((section.expanded ? "[expanded] " : "[collap
sed] ") + (section.noAffect ? "[no-affect] " : "")); | 220 InspectorTest.addResult((section.expanded ? "[expanded] " : "[collap
sed] ") + (section.noAffect ? "[no-affect] " : "")); |
| 221 var chainEntries = section.titleElement.children; | 221 var chainEntries = section.titleElement.querySelectorAll(".media-lis
t .media"); |
| 222 chainEntries = Array.prototype.slice.call(chainEntries); |
| 223 if (section.titleElement.children[1]) |
| 224 chainEntries.push(section.titleElement.children[1]); |
| 225 |
| 222 for (var j = 0; j < chainEntries.length; ++j) { | 226 for (var j = 0; j < chainEntries.length; ++j) { |
| 223 var chainEntry = chainEntries[j]; | 227 var chainEntry = chainEntries[j]; |
| 224 var entryLine = includeSelectorGroupMarks ? buildMarkedSelectors
(chainEntry.children[1]) : chainEntry.children[1].textContent; | 228 var entryLine = includeSelectorGroupMarks ? buildMarkedSelectors
(chainEntry.children[1]) : chainEntry.children[1].textContent; |
| 225 if (chainEntry.children[2]) | 229 if (chainEntry.children[2]) |
| 226 entryLine += " " + chainEntry.children[2].textContent; | 230 entryLine += " " + chainEntry.children[2].textContent; |
| 227 entryLine += " (" + extractText(chainEntry.children[0]) + ")"; | 231 entryLine += " (" + extractText(chainEntry.children[0]) + ")"; |
| 228 InspectorTest.addResult(entryLine); | 232 InspectorTest.addResult(entryLine); |
| 229 } | 233 } |
| 230 section.expand(); | 234 section.expand(); |
| 231 InspectorTest.dumpStyleTreeOutline(section.propertiesTreeOutline, om
itLonghands ? 1 : 2); | 235 InspectorTest.dumpStyleTreeOutline(section.propertiesTreeOutline, om
itLonghands ? 1 : 2); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 { | 741 { |
| 738 var rectNames = ["margin", "border", "padding", "content"]; | 742 var rectNames = ["margin", "border", "padding", "content"]; |
| 739 var rects = window.internals.inspectorHighlightRects(document); | 743 var rects = window.internals.inspectorHighlightRects(document); |
| 740 for (var i = 0; i < rects.length; i++) | 744 for (var i = 0; i < rects.length; i++) |
| 741 { | 745 { |
| 742 var rectName = (i < rectNames.length ? rectNames[i] : "untitled"); | 746 var rectName = (i < rectNames.length ? rectNames[i] : "untitled"); |
| 743 var rect = rects.item(i); | 747 var rect = rects.item(i); |
| 744 output(rectName + " rect is " + rect.width + " x " + rect.height + " at
(" + rect.left + ", " + rect.top + ")"); | 748 output(rectName + " rect is " + rect.width + " x " + rect.height + " at
(" + rect.left + ", " + rect.top + ")"); |
| 745 } | 749 } |
| 746 } | 750 } |
| OLD | NEW |