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

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

Issue 2805543002: [DevTools] When adjusting glass pane's content width for arrow, do not comporomise the size (Closed)
Patch Set: Created 3 years, 8 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 831020febb1ea1fd6b2f977786e205be74dfe925..abba679e1b700a8945dfe4e3cb0400e9f321f1f3 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
@@ -240,7 +240,7 @@ UI.GlassPane = class {
positionX = Math.max(gutterSize, Math.min(anchorBox.x, containerWidth - width - gutterSize));
if (!enoughHeight)
- positionX += arrowSize;
+ positionX = Math.min(positionX + arrowSize, containerWidth - width - gutterSize);
else if (showArrow && positionX - arrowSize >= gutterSize)
positionX -= arrowSize;
width = Math.min(width, containerWidth - positionX - gutterSize);
@@ -298,7 +298,7 @@ UI.GlassPane = class {
positionY = Math.max(gutterSize, Math.min(anchorBox.y, containerHeight - height - gutterSize));
if (!enoughWidth)
- positionY += arrowSize;
+ positionY = Math.min(positionY + arrowSize, containerHeight - height - gutterSize);
else if (showArrow && positionY - arrowSize >= gutterSize)
positionY -= arrowSize;
height = Math.min(height, containerHeight - positionY - gutterSize);
« 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