Commit 03b10adf authored by robhogan@gmail.com's avatar robhogan@gmail.com

Dirty line boxes correctly when a float gets layout

Using dirtyLinesFromChangedChild() was the wrong choice in
https://codereview.chromium.org/1167543008 as it can dirty the
lineboxes of descendants and ancestors. We're only interested
in dirtying the lineboxes of the current parent as it is
only to one of them we will possibly attach the float.

I have more to do here to understand why I'm not getting a
height on the span in my new test, but this successfully
addresses the assert in bug 510703 and seems obviously more
correct than what I currently have.


BUG=510703

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201025 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6092fdb7
...@@ -578,6 +578,13 @@ crbug.com/492664 imported/csswg-test/css-writing-modes-3/orthogonal-parent-shrin ...@@ -578,6 +578,13 @@ crbug.com/492664 imported/csswg-test/css-writing-modes-3/orthogonal-parent-shrin
crbug.com/492664 imported/csswg-test/css-writing-modes-3/text-orientation-script-001.html [ Skip ] crbug.com/492664 imported/csswg-test/css-writing-modes-3/text-orientation-script-001.html [ Skip ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/text-orientation-script-001e.html [ Failure ] crbug.com/492664 imported/csswg-test/css-writing-modes-3/text-orientation-script-001e.html [ Failure ]
crbug.com/510703 fast/repaint/line-flow-with-floats-10.html [ NeedsRebaseline ]
crbug.com/510703 fast/repaint/line-flow-with-floats-3.html [ NeedsRebaseline ]
crbug.com/510703 fast/repaint/line-flow-with-floats-4.html [ NeedsRebaseline ]
crbug.com/510703 fast/repaint/line-flow-with-floats-5.html [ NeedsRebaseline ]
crbug.com/510703 fast/repaint/line-flow-with-floats-6.html [ NeedsRebaseline ]
crbug.com/510703 fast/repaint/line-flow-with-floats-9.html [ NeedsRebaseline ]
# These tests pass but images do not match because of position: absolute in vertical flow bug # These tests pass but images do not match because of position: absolute in vertical flow bug
crbug.com/492664 imported/csswg-test/css-writing-modes-3/block-flow-direction-009.xht [ ImageOnlyFailure ] crbug.com/492664 imported/csswg-test/css-writing-modes-3/block-flow-direction-009.xht [ ImageOnlyFailure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/clip-rect-vlr-003.xht [ ImageOnlyFailure ] crbug.com/492664 imported/csswg-test/css-writing-modes-3/clip-rect-vlr-003.xht [ ImageOnlyFailure ]
......
PASS
XYZSaft
crbug.com/517030: Ensure trailing float gets a layout.
<!DOCTYPE html>
<object>
<span style="display: inline-block;">
<svg></svg>
<span style="float: left" id="float" data-expected-height=0><select style="margin: 200px"><option>AAAAA</option></select></span>
</span>
<form><svg></svg></form>
XYZSaft
</object>
<p>crbug.com/517030: Ensure trailing float gets a layout.</p>
<script src="../../../resources/check-layout.js"></script>
<script>
checkLayout('#float');
</script>
...@@ -9,12 +9,9 @@ ...@@ -9,12 +9,9 @@
[368, 440, 2, 59], [368, 440, 2, 59],
[14, 374, 48, 64], [14, 374, 48, 64],
[14, 363, 48, 64], [14, 363, 48, 64],
[8, 320, 418, 279] [8, 340, 418, 259]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'doubled-up\n'",
"InlineTextBox 'soldiers were always getting up and walking off to'",
"RootInlineBox",
"InlineTextBox 'other parts of\n'", "InlineTextBox 'other parts of\n'",
"InlineTextBox 'the ground, Alice soon came to the conclusion that it'", "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
"RootInlineBox", "RootInlineBox",
......
...@@ -14,15 +14,9 @@ ...@@ -14,15 +14,9 @@
[65, 400, 289, 39], [65, 400, 289, 39],
[65, 380, 304, 59], [65, 380, 304, 59],
[14, 420, 339, 39], [14, 420, 339, 39],
[8, 340, 418, 259] [8, 380, 418, 219]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'other parts of\n'",
"InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
"RootInlineBox",
"InlineTextBox 'was a very\n'",
"InlineTextBox 'difficult game indeed.\n'",
"RootInlineBox",
"InlineTextBox 'The players all played at once without waiting\n'", "InlineTextBox 'The players all played at once without waiting\n'",
"InlineTextBox 'for'", "InlineTextBox 'for'",
"RootInlineBox", "RootInlineBox",
......
...@@ -8,15 +8,9 @@ ...@@ -8,15 +8,9 @@
"repaintRects": [ "repaintRects": [
[372, 447, 48, 16], [372, 447, 48, 16],
[368, 440, 53, 59], [368, 440, 53, 59],
[8, 340, 418, 259] [8, 380, 418, 219]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'other parts of\n'",
"InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
"RootInlineBox",
"InlineTextBox 'was a very\n'",
"InlineTextBox 'difficult game indeed.\n'",
"RootInlineBox",
"InlineTextBox 'The players all played at once without waiting\n'", "InlineTextBox 'The players all played at once without waiting\n'",
"InlineTextBox 'for'", "InlineTextBox 'for'",
"RootInlineBox", "RootInlineBox",
......
...@@ -17,12 +17,9 @@ ...@@ -17,12 +17,9 @@
[46, 363, 16, 64], [46, 363, 16, 64],
[14, 440, 354, 59], [14, 440, 354, 59],
[14, 420, 355, 79], [14, 420, 355, 79],
[8, 320, 418, 279] [8, 340, 418, 259]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'doubled-up\n'",
"InlineTextBox 'soldiers were always getting up and walking off to'",
"RootInlineBox",
"InlineTextBox 'other parts of\n'", "InlineTextBox 'other parts of\n'",
"InlineTextBox 'the ground, Alice soon came to the conclusion that it'", "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
"RootInlineBox", "RootInlineBox",
......
...@@ -8,12 +8,9 @@ ...@@ -8,12 +8,9 @@
"repaintRects": [ "repaintRects": [
[28, 363, 20, 19], [28, 363, 20, 19],
[14, 363, 48, 64], [14, 363, 48, 64],
[8, 320, 418, 79] [8, 340, 418, 99]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'doubled-up\n'",
"InlineTextBox 'soldiers were always getting up and walking off to'",
"RootInlineBox",
"InlineTextBox 'other parts of\n'", "InlineTextBox 'other parts of\n'",
"InlineTextBox 'the ground, Alice soon came to the conclusion that it'", "InlineTextBox 'the ground, Alice soon came to the conclusion that it'",
"RootInlineBox", "RootInlineBox",
...@@ -23,6 +20,13 @@ ...@@ -23,6 +20,13 @@
"InlineTextBox 'The players all played at once without waiting\n'", "InlineTextBox 'The players all played at once without waiting\n'",
"InlineTextBox 'for'", "InlineTextBox 'for'",
"RootInlineBox", "RootInlineBox",
"InlineTextBox 'turns,\n'",
"InlineTextBox 'quarrelling all the while, and fighting for the'",
"RootInlineBox",
"InlineTextBox 'hedgehogs; and in\n'",
"InlineTextBox 'a very short time '",
"InlineTextBox 'the Queen'",
"RootInlineBox",
"LayoutBlockFlow P", "LayoutBlockFlow P",
"LayoutBlockFlow (floating) SPAN id='blueFloat'", "LayoutBlockFlow (floating) SPAN id='blueFloat'",
"LayoutText #text", "LayoutText #text",
......
...@@ -8,9 +8,25 @@ ...@@ -8,9 +8,25 @@
"repaintRects": [ "repaintRects": [
[420, 240, 1, 139], [420, 240, 1, 139],
[372, 243, 48, 48], [372, 243, 48, 48],
[8, 200, 418, 399] [8, 80, 418, 519]
], ],
"paintInvalidationClients": [ "paintInvalidationClients": [
"InlineTextBox 'The chief difficulty Alice found at first was in managing her'",
"RootInlineBox",
"InlineTextBox 'flamingo: she succeeded in getting its body tucked away,'",
"RootInlineBox",
"InlineTextBox 'comfortably enough, under her arm, with its legs hanging'",
"RootInlineBox",
"InlineTextBox 'down,\n'",
"InlineTextBox 'but generally, just as she had got its neck nicely'",
"RootInlineBox",
"InlineTextBox 'straightened\n'",
"InlineTextBox 'out, and was going to give the hedgehog a'",
"RootInlineBox",
"InlineTextBox 'blow with its head, it\n'",
"InlineTextBox 'would'",
"InlineTextBox ' twist itself round and look up in her'",
"RootInlineBox",
"InlineTextBox 'face, with\n'", "InlineTextBox 'face, with\n'",
"InlineTextBox 'such a puzzled expression that she could not help'", "InlineTextBox 'such a puzzled expression that she could not help'",
"RootInlineBox", "RootInlineBox",
......
...@@ -1549,7 +1549,7 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& pa ...@@ -1549,7 +1549,7 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& pa
layoutState.floats().append(FloatWithRect(box)); layoutState.floats().append(FloatWithRect(box));
if (box->needsLayout()) { if (box->needsLayout()) {
box->layout(); box->layout();
dirtyLinesFromChangedChild(o); markLinesDirtyInBlockRange(toLayoutBox(o)->logicalTop(), toLayoutBox(o)->logicalBottom());
} }
} else if (isFullLayout || o->needsLayout()) { } else if (isFullLayout || o->needsLayout()) {
// Replaced element. // Replaced element.
......
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