Chromium Code Reviews| 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); |
| }, |