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

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

Issue 1502383003: [DevTools] Reset tooltip on resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js b/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
index 67ddb6103a5da2c6f37d611af45cfd814b323f61..f4a877200354d6316400d53d904081a3c3cb1066 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
@@ -16,7 +16,8 @@ WebInspector.Tooltip = function(doc)
doc.addEventListener("mousedown", this._hide.bind(this, true), true);
doc.addEventListener("mouseleave", this._hide.bind(this, true), true);
doc.addEventListener("keydown", this._hide.bind(this, true), true);
- WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.ZoomChanged, this._zoomChanged, this);
+ WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.ZoomChanged, this._reset, this);
+ doc.defaultView.addEventListener("resize", this._reset.bind(this), false);
}
WebInspector.Tooltip.Timing = {
@@ -136,7 +137,7 @@ WebInspector.Tooltip.prototype = {
delete this._tooltipLastClosed;
},
- _zoomChanged: function()
+ _reset: function()
{
this._hide(true);
this._tooltipElement.positionAt(0, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698