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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 2101143002: DevTools: Fix a bug where user agent shadow dom elements were inspectable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 treeOutline.handlePasteKeyboardEvent(event); 862 treeOutline.handlePasteKeyboardEvent(event);
863 }, 863 },
864 864
865 /** 865 /**
866 * @param {!WebInspector.DOMNode} node 866 * @param {!WebInspector.DOMNode} node
867 * @return {!WebInspector.DOMNode} 867 * @return {!WebInspector.DOMNode}
868 */ 868 */
869 _leaveUserAgentShadowDOM: function(node) 869 _leaveUserAgentShadowDOM: function(node)
870 { 870 {
871 var userAgentShadowRoot = node.ancestorUserAgentShadowRoot(); 871 var userAgentShadowRoot = node.ancestorUserAgentShadowRoot();
872 return userAgentShadowRoot ? /** @type {!WebInspector.DOMNode} */ (userA gentShadowRoot.parentNode) : node; 872 return (userAgentShadowRoot && userAgentShadowRoot.parentNode) ? this._l eaveUserAgentShadowDOM(userAgentShadowRoot.parentNode) : node;
dgozman 2016/06/28 01:30:29 Let's turn this into a while loop.
873 }, 873 },
874 874
875 /** 875 /**
876 * @param {!WebInspector.DOMNode} node 876 * @param {!WebInspector.DOMNode} node
877 */ 877 */
878 revealAndSelectNode: function(node) 878 revealAndSelectNode: function(node)
879 { 879 {
880 if (WebInspector.inspectElementModeController && WebInspector.inspectEle mentModeController.isInInspectElementMode()) 880 if (WebInspector.inspectElementModeController && WebInspector.inspectEle mentModeController.isInInspectElementMode())
881 WebInspector.inspectElementModeController.stopInspection(); 881 WebInspector.inspectElementModeController.stopInspection();
882 882
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 */ 1287 */
1288 wasShown: function() 1288 wasShown: function()
1289 { 1289 {
1290 this._toolbarItem.setToggled(true); 1290 this._toolbarItem.setToggled(true);
1291 this._nodeChanged(); 1291 this._nodeChanged();
1292 WebInspector.ThrottledWidget.prototype.wasShown.call(this); 1292 WebInspector.ThrottledWidget.prototype.wasShown.call(this);
1293 }, 1293 },
1294 1294
1295 __proto__: WebInspector.ThrottledWidget.prototype 1295 __proto__: WebInspector.ThrottledWidget.prototype
1296 } 1296 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698