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

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

Issue 1518983002: Merge to 2564 "[DevTools] Reset tooltip on resize." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
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 d7174139f9559364c793dfdaf06e2e06cec04f4a..9e034548b30599cc52032e1842c15365c24a5c0d 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
@@ -17,7 +17,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 = {
@@ -137,7 +138,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