Commit 9f69ce15 authored by skobes's avatar skobes Committed by Commit bot

Fix console viewport test failures with scroll anchoring.

Update defaultConsoleRowHeight to account for the 1px border, and grow a visible
item instead of an offscreen one when testing setStickToBottom.

See bug for detailed analysis.

BUG=624534

Review-Url: https://codereview.chromium.org/2317343006
Cr-Commit-Position: refs/heads/master@{#418681}
parent 101eea61
......@@ -88,13 +88,13 @@ function test()
function testViewportMutationsShouldPreserveStickToBottom(next)
{
viewport._contentElement.children[1].innerText = "More than 2 lines: foo\n\nbar";
viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar";
dumpAndContinue(onMessagesDumped);
function onMessagesDumped()
{
viewport.setStickToBottom(false);
viewport._contentElement.children[1].innerText = "More than 3 lines: foo\n\n\nbar";
viewport._contentElement.lastChild.innerText = "More than 3 lines: foo\n\n\nbar";
dumpAndContinue(next);
}
},
......
......@@ -118,7 +118,9 @@ WebInspector.ConsoleViewMessage.prototype = {
{
if (this._cachedHeight)
return this._cachedHeight;
const defaultConsoleRowHeight = 18; // Sync with consoleView.css
// This value reflects the 18px min-height of .console-message, plus the
// 1px border of .console-message-wrapper. Keep in sync with consoleView.css.
const defaultConsoleRowHeight = 19;
if (this._message.type === WebInspector.ConsoleMessage.MessageType.Table) {
var table = this._message.parameters[0];
if (table && table.preview)
......
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