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

Side by Side Diff: Source/devtools/front_end/ElementsTreeOutline.js

Issue 197283031: DevTools: fix author shadow dom inspection mode, speacial-case ua. Fix crash from the bug. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 2410
2411 WebInspector.RemoteObject.resolveNode(this._node, "", scrollIntoViewCall back); 2411 WebInspector.RemoteObject.resolveNode(this._node, "", scrollIntoViewCall back);
2412 }, 2412 },
2413 2413
2414 /** 2414 /**
2415 * @return {!Array.<!WebInspector.DOMAgent>} 2415 * @return {!Array.<!WebInspector.DOMAgent>}
2416 */ 2416 */
2417 _visibleShadowRoots: function() 2417 _visibleShadowRoots: function()
2418 { 2418 {
2419 var roots = this._node.shadowRoots(); 2419 var roots = this._node.shadowRoots();
2420 if (roots.length && !WebInspector.settings.showShadowDOM.get()) { 2420 if (roots.length && !WebInspector.settings.showUAShadowDOM.get()) {
2421 roots = roots.filter(function(root) { 2421 roots = roots.filter(function(root) {
2422 return root.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.Author; 2422 return root.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.Author;
2423 }); 2423 });
2424 } 2424 }
2425 return roots; 2425 return roots;
2426 }, 2426 },
2427 2427
2428 /** 2428 /**
2429 * @return {!Array.<!WebInspector.DOMNode>} visibleChildren 2429 * @return {!Array.<!WebInspector.DOMNode>} visibleChildren
2430 */ 2430 */
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 var treeOutline = new WebInspector.ElementsTreeOutline(false, false); 2658 var treeOutline = new WebInspector.ElementsTreeOutline(false, false);
2659 treeOutline.rootDOMNode = /** @type {!WebInspector.DOMNode} */ (object); 2659 treeOutline.rootDOMNode = /** @type {!WebInspector.DOMNode} */ (object);
2660 treeOutline.element.classList.add("outline-disclosure"); 2660 treeOutline.element.classList.add("outline-disclosure");
2661 if (!treeOutline.children[0].hasChildren) 2661 if (!treeOutline.children[0].hasChildren)
2662 treeOutline.element.classList.add("single-node"); 2662 treeOutline.element.classList.add("single-node");
2663 treeOutline.setVisible(true); 2663 treeOutline.setVisible(true);
2664 treeOutline.element.treeElementForTest = treeOutline.children[0]; 2664 treeOutline.element.treeElementForTest = treeOutline.children[0];
2665 return treeOutline.element; 2665 return treeOutline.element;
2666 } 2666 }
2667 } 2667 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ElementsPanel.js ('k') | Source/devtools/front_end/InspectElementModeController.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698