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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js

Issue 2140753003: DevTools: remove BaseToolbarPaneWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js b/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
index bcf26d33a10e77d7e9061a8f4684c53335b1345e..1eb7e828b57ca539d3e3922f4a202fbc53ab1e68 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
@@ -13,20 +13,6 @@ WebInspector.SharedSidebarModel = function()
WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._onNodeChanged, this);
}
-/**
- * @param {?WebInspector.DOMNode} node
- * @return {?WebInspector.DOMNode}
- */
-WebInspector.SharedSidebarModel.elementNode = function(node)
-{
- if (node && node.nodeType() === Node.TEXT_NODE && node.parentNode)
- node = node.parentNode;
-
- if (node && node.nodeType() !== Node.ELEMENT_NODE)
- node = null;
- return node;
-}
-
WebInspector.SharedSidebarModel.Events = {
ComputedStyleChanged: "ComputedStyleChanged"
}
@@ -94,7 +80,7 @@ WebInspector.SharedSidebarModel.prototype = {
*/
_elementNode: function()
{
- return WebInspector.SharedSidebarModel.elementNode(this.node());
+ return this.node() ? this.node().enclosingElementOrSelf() : null;
},
/**

Powered by Google App Engine
This is Rietveld 408576698