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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Popover.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined 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/ui/Popover.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Popover.js b/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
index e41df7d5de27db1eec9f1248d691c065ffc09abe..fc6dd925b18b1f6c27e0171913bdfb8b2079e550 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
@@ -254,16 +254,10 @@ WebInspector.Popover.prototype = {
/**
* @constructor
* @param {!Element} panelElement
- * @param {function(!Element, !Event):(!Element|!AnchorBox|undefined)} getAnchor
- * @param {function(!Element, !WebInspector.Popover):undefined} showPopover
- * @param {function()=} onHide
* @param {boolean=} disableOnClick
*/
-WebInspector.PopoverHelper = function(panelElement, getAnchor, showPopover, onHide, disableOnClick)
+WebInspector.PopoverHelper = function(panelElement, disableOnClick)
{
- this._getAnchor = getAnchor;
- this._showPopover = showPopover;
- this._onHide = onHide;
this._disableOnClick = !!disableOnClick;
panelElement.addEventListener("mousedown", this._mouseDown.bind(this), false);
panelElement.addEventListener("mousemove", this._mouseMove.bind(this), false);
@@ -273,6 +267,18 @@ WebInspector.PopoverHelper = function(panelElement, getAnchor, showPopover, onHi
WebInspector.PopoverHelper.prototype = {
/**
+ * @param {function(!Element, !Event):(!Element|!AnchorBox|undefined)} getAnchor
+ * @param {function(!Element, !WebInspector.Popover):undefined} showPopover
+ * @param {function()=} onHide
+ */
+ initializeCallbacks:function(getAnchor, showPopover, onHide)
+ {
+ this._getAnchor = getAnchor;
+ this._showPopover = showPopover;
+ this._onHide = onHide;
+ },
+
+ /**
* @param {number} timeout
* @param {number=} hideTimeout
*/

Powered by Google App Engine
This is Rietveld 408576698