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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js

Issue 2393763002: [DevTools] Cleanup DOMExtension.js. (Closed)
Patch Set: test Created 4 years, 2 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/sources/WatchExpressionsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index d1b17f32b8c43c011928c7c6891aea853bb04ea6..ce7e657fbf837f5cdea126b91dc4ffb3fa5c75ee 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -184,8 +184,9 @@ WebInspector.WatchExpressionsSidebarPane.prototype = {
if (this._watchExpressions.length > 1)
contextMenu.appendItem(WebInspector.UIString.capitalize("Delete ^all ^watch ^expressions"), this._deleteAllButtonClicked.bind(this));
+ var target = event.deepElementFromPoint();
lushnikov 2016/10/05 16:03:59 that's bail-out early if there's no target if (!t
dgozman 2016/10/05 17:29:30 Done.
for (var watchExpression of this._watchExpressions)
- if (watchExpression.element().containsEventPoint(event))
+ if (target && watchExpression.element().isSelfOrAncestor(target))
watchExpression._populateContextMenu(contextMenu, event);
},
@@ -446,7 +447,8 @@ WebInspector.WatchExpression.prototype = {
if (!this.isEditing() && this._result && (this._result.type === "number" || this._result.type === "string"))
contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^value"), this._copyValueButtonClicked.bind(this));
- if (this._valueElement.containsEventPoint(event))
+ var target = event.deepElementFromPoint();
+ if (target && this._valueElement.isSelfOrAncestor(target))
contextMenu.appendApplicableItems(this._result);
},

Powered by Google App Engine
This is Rietveld 408576698