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

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

Issue 2393763002: [DevTools] Cleanup DOMExtension.js. (Closed)
Patch Set: review comments 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..bf0207cf8589ded739e92883e8e852c8ded1c6b8 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,11 @@ 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();
+ if (!target)
+ return;
for (var watchExpression of this._watchExpressions)
- if (watchExpression.element().containsEventPoint(event))
+ if (watchExpression.element().isSelfOrAncestor(target))
watchExpression._populateContextMenu(contextMenu, event);
},
@@ -446,7 +449,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