Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: LayoutTests/http/tests/inspector/elements-test.js

Issue 220403005: DevTools: synchronize links in StylesSidebarPane on edits. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: extract common parts into _applyNewStyle method Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/styles/resources/styles-update-links.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/styles/resources/styles-update-links.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698