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

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

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 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
« no previous file with comments | « Source/devtools/front_end/ui/PieChart.js ('k') | Source/devtools/front_end/ui/RootView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/Popover.js
diff --git a/Source/devtools/front_end/ui/Popover.js b/Source/devtools/front_end/ui/Popover.js
index d2d429768355e3312460bebc150a789e9a9b3124..4c27d50c3e943de386832982318e1fddf7e7cacc 100644
--- a/Source/devtools/front_end/ui/Popover.js
+++ b/Source/devtools/front_end/ui/Popover.js
@@ -92,6 +92,9 @@ WebInspector.Popover.prototype = {
WebInspector.Popover._popover.hide();
WebInspector.Popover._popover = this;
+ var document = anchor instanceof Element ? anchor.ownerDocument : contentElement.ownerDocument;
+ var window = document.defaultView;
+
// Temporarily attach in order to measure preferred dimensions.
var preferredSize = view ? view.measurePreferredSize() : this.contentElement.measurePreferredSize();
preferredWidth = preferredWidth || preferredSize.width;
@@ -116,7 +119,7 @@ WebInspector.Popover.prototype = {
hide: function()
{
- window.removeEventListener("resize", this._hideBound, false);
+ this._containerElement.ownerDocument.defaultView.removeEventListener("resize", this._hideBound, false);
this.detach();
this._containerElement.remove();
delete WebInspector.Popover._popover;
« no previous file with comments | « Source/devtools/front_end/ui/PieChart.js ('k') | Source/devtools/front_end/ui/RootView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698