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

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js

Issue 2745903003: [DevTools] Do not inherit ObjectPopoverHelper from PopoverHelper. (Closed)
Patch Set: addressed review comments Created 3 years, 9 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/source_frame/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
index d1db34bc172d7a4e7f1c63f980909b3ba00c62fb..89fc28131474ed2abbdfe10cb6c64bb3b7b60650 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
@@ -400,16 +400,17 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
}
/**
- * @param {!Element} anchor
+ * @param {!Element|!AnchorBox} anchor
* @param {!UI.GlassPane} popover
* @return {!Promise<boolean>}
*/
_showErrorPopover(anchor, popover) {
- var messageBucket = anchor.enclosingNodeOrSelfWithClass('text-editor-line-decoration')._messageBucket;
+ var element = /** @type {!Element} */ (anchor);
+ var messageBucket = element.enclosingNodeOrSelfWithClass('text-editor-line-decoration')._messageBucket;
var messagesOutline = messageBucket.messagesDescription();
popover.setContentAnchorBox(
- anchor.enclosingNodeOrSelfWithClass('text-editor-line-decoration-icon') ? anchor.boxInWindow() :
- this._errorWavePopoverAnchor);
+ element.enclosingNodeOrSelfWithClass('text-editor-line-decoration-icon') ? element.boxInWindow() :
+ this._errorWavePopoverAnchor);
popover.contentElement.appendChild(messagesOutline);
return Promise.resolve(true);
}

Powered by Google App Engine
This is Rietveld 408576698