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

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

Issue 2742503002: [DevTools] Adjust popover position so accomodate for arrow. (Closed)
Patch Set: 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
« 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/GlassPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
index 8288888808d95548ba2f6ef1731c21c2d3625c42..29344488095629b9c87f10e229ada61e791ee97e 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
@@ -234,6 +234,8 @@ UI.GlassPane = class {
}
positionX = Math.max(gutterSize, Math.min(anchorBox.x, containerWidth - width - gutterSize));
+ if (this._showArrow && positionX - arrowSize >= gutterSize)
+ positionX -= arrowSize;
width = Math.min(width, containerWidth - positionX - gutterSize);
if (2 * arrowSize >= width) {
this._arrowElement.classList.add('arrow-none');
@@ -284,6 +286,8 @@ UI.GlassPane = class {
}
positionY = Math.max(gutterSize, Math.min(anchorBox.y, containerHeight - height - gutterSize));
+ if (this._showArrow && positionY - arrowSize >= gutterSize)
+ positionY -= arrowSize;
height = Math.min(height, containerHeight - positionY - gutterSize);
if (2 * arrowSize >= height) {
this._arrowElement.classList.add('arrow-none');
« 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