Commit 78d09f01 authored by samli@chromium.org's avatar samli@chromium.org

Devtools UI: Tooltip needs to consider tooltip height in placing tooltip

BUG=524387

Review URL: https://codereview.chromium.org/1310863003

git-svn-id: svn://svn.chromium.org/blink/trunk@201257 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9a2d66d2
......@@ -101,7 +101,7 @@ WebInspector.Tooltip.prototype = {
tooltipX = Number.constrain(tooltipX,
containerOffset.x + pageMargin,
containerOffset.x + containerOffsetWidth - tooltipWidth - pageMargin);
var onBottom = anchorBox.y + anchorOffset + anchorBox.height < containerOffset.y + containerOffsetHeight;
var onBottom = anchorBox.y + anchorOffset + anchorBox.height + tooltipHeight < containerOffset.y + containerOffsetHeight;
var tooltipY = onBottom ? anchorBox.y + anchorBox.height + anchorOffset : anchorBox.y - tooltipHeight - anchorOffset;
this._tooltipElement.positionAt(tooltipX, tooltipY);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment