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

Unified Diff: Source/core/inspector/InspectorOverlayPage.html

Issue 214443005: DevTools: Fix how highlighted element title is shown when element is highlighted in inspected page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/core/inspector/InspectorOverlayPage.html
diff --git a/Source/core/inspector/InspectorOverlayPage.html b/Source/core/inspector/InspectorOverlayPage.html
index c10cac7f9e50136e5034d24f2a8aabb22535a8d6..22c3e432485c0042ebf68e29ce9c466394908582 100644
--- a/Source/core/inspector/InspectorOverlayPage.html
+++ b/Source/core/inspector/InspectorOverlayPage.html
@@ -425,14 +425,15 @@ function _drawElementTitle(highlight)
var titleWidth = elementTitle.offsetWidth + 6;
var titleHeight = elementTitle.offsetHeight + 4;
- var anchorTop = marginQuad[0].y;
- var anchorBottom = marginQuad[3].y
+ var anchorTop = Math.min(marginQuad[0].y, marginQuad[1].y, marginQuad[2].y, marginQuad[3].y);
+ var anchorBottom = Math.max(marginQuad[0].y, marginQuad[1].y, marginQuad[2].y, marginQuad[3].y);
+ var anchorLeft = Math.min(marginQuad[0].x, marginQuad[1].x, marginQuad[2].x, marginQuad[3].x);
const arrowHeight = 7;
var renderArrowUp = false;
var renderArrowDown = false;
- var boxX = Math.max(2, marginQuad[0].x);
+ var boxX = Math.max(2, anchorLeft);
if (boxX + titleWidth > canvasWidth)
boxX = canvasWidth - titleWidth - 2;
« 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