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

Issue 1310253005: Strip anonymous wrappers when a block flow no longer requires them (Closed)

Created:
5 years, 4 months ago by rhogan
Modified:
5 years, 3 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Strip anonymous wrappers when a block flow no longer requires them When a floating/out-of-flow or inline child is added to a an element with block children ensure that we don't create unnecessary anonymous wrappers for it but use any adjacent wrappers if they are available. For good measure, also ensure any sequences of out-of-flow/floating/inline elements the addition of the inline child creates are folded into the same anonymous block. If we remove a child and it leaves us without any block children then reset the parent to have inline children so that it doesn't get an unnecessary anonymous wrapper. BUG=411256 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=202391

Patch Set 1 #

Total comments: 6

Patch Set 2 : Updated #

Patch Set 3 : Updated #

Patch Set 4 : Updated #

Total comments: 6

Patch Set 5 : Updated #

Patch Set 6 : Updated #

Patch Set 7 : Updated #

Total comments: 1

Patch Set 8 : Updated #

Total comments: 9

Patch Set 9 : Updated #

Total comments: 10

Patch Set 10 : Updated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+718 lines, -515 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block.html View 5 6 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inline-before-float-in-block-children-block.html View 5 6 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inline-before-float-in-block-children-block-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inline-between-floats-with-preceding-anonymous-box.html View 1 2 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes.html View 1 2 5 6 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inlines-in-block-children-block.html View 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/add-inlines-in-block-children-block-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
M LayoutTests/platform/linux/css1/box_properties/float_on_text_elements-expected.txt View 1 2 3 4 4 chunks +88 lines, -88 lines 0 comments Download
M LayoutTests/platform/linux/fast/block/do-not-strip-anonymous-blocks-when-block-child-becomes-float-and-continuation-on-line-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/linux/fast/block/do-not-strip-anonymous-blocks-when-block-child-becomes-float-and-other-block-on-line-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/platform/linux/fast/block/float/add-inline-between-floats-with-preceding-anonymous-box-expected.png View 1 2 5 6 Binary file 0 comments Download
A LayoutTests/platform/linux/fast/block/float/add-inline-between-floats-with-preceding-anonymous-box-expected.txt View 1 2 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/platform/linux/fast/block/float/add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes-expected.png View 1 2 5 6 Binary file 0 comments Download
A LayoutTests/platform/linux/fast/block/float/add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes-expected.txt View 1 2 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M LayoutTests/platform/linux/fast/block/float/nestedAnonymousBlocks-expected.txt View 1 2 3 4 5 6 7 1 chunk +8 lines, -8 lines 0 comments Download
M LayoutTests/platform/linux/fast/box-sizing/box-sizing-expected.txt View 1 2 2 chunks +11 lines, -11 lines 0 comments Download
M LayoutTests/platform/linux/fast/css/color-correction-on-backgrounds-expected.txt View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/platform/linux/fast/css/word-space-extra-expected.txt View 1 2 3 chunks +399 lines, -399 lines 0 comments Download
M LayoutTests/platform/linux/fast/forms/input-align-image-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/linux/fast/text/word-break-run-rounding-expected.txt View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +37 lines, -1 line 0 comments Download

Messages

Total messages: 20 (3 generated)
rhogan
mstensho@ For now my test coverage is just the test cases from the bug. I'll ...
5 years, 3 months ago (2015-08-25 19:41:05 UTC) #2
szager1
https://codereview.chromium.org/1310253005/diff/1/Source/core/layout/LayoutBlock.cpp File Source/core/layout/LayoutBlock.cpp (right): https://codereview.chromium.org/1310253005/diff/1/Source/core/layout/LayoutBlock.cpp#newcode454 Source/core/layout/LayoutBlock.cpp:454: while (nextChild && (nextChild->isFloatingOrOutOfFlowPositioned() || nextChild->isInline() || nextChild->isAnonymousBlock())) { ...
5 years, 3 months ago (2015-08-26 17:04:40 UTC) #4
mstensho (USE GERRIT)
https://codereview.chromium.org/1310253005/diff/1/LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html File LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html (right): https://codereview.chromium.org/1310253005/diff/1/LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html#newcode10 LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html:10: <div id="a"> please terminate me. https://codereview.chromium.org/1310253005/diff/1/LayoutTests/fast/block/float/add-inline-before-float-in-block-children-block-expected.html File LayoutTests/fast/block/float/add-inline-before-float-in-block-children-block-expected.html (right): ...
5 years, 3 months ago (2015-08-26 19:44:15 UTC) #5
rhogan
Not quite there yet - but ready for another look > https://codereview.chromium.org/1310253005/diff/1/Source/core/layout/LayoutBlock.cpp > File Source/core/layout/LayoutBlock.cpp ...
5 years, 3 months ago (2015-09-02 19:16:55 UTC) #6
mstensho (USE GERRIT)
> I don't think we can look harder - but maybe I'm not seeing it. ...
5 years, 3 months ago (2015-09-03 08:44:30 UTC) #7
rhogan
https://codereview.chromium.org/1310253005/diff/60001/Source/core/layout/LayoutBlock.cpp File Source/core/layout/LayoutBlock.cpp (right): https://codereview.chromium.org/1310253005/diff/60001/Source/core/layout/LayoutBlock.cpp#newcode387 Source/core/layout/LayoutBlock.cpp:387: LayoutBlockFlow* block = toLayoutBlockFlow(child); On 2015/09/03 at 08:44:30, mstensho ...
5 years, 3 months ago (2015-09-06 15:09:27 UTC) #8
mstensho (USE GERRIT)
https://codereview.chromium.org/1310253005/diff/120001/Source/core/layout/LayoutBlock.cpp File Source/core/layout/LayoutBlock.cpp (right): https://codereview.chromium.org/1310253005/diff/120001/Source/core/layout/LayoutBlock.cpp#newcode464 Source/core/layout/LayoutBlock.cpp:464: // If we are a block that allows inline ...
5 years, 3 months ago (2015-09-07 14:01:48 UTC) #9
rhogan
On 2015/09/07 at 14:01:48, mstensho wrote: > https://codereview.chromium.org/1310253005/diff/120001/Source/core/layout/LayoutBlock.cpp > File Source/core/layout/LayoutBlock.cpp (right): > > https://codereview.chromium.org/1310253005/diff/120001/Source/core/layout/LayoutBlock.cpp#newcode464 ...
5 years, 3 months ago (2015-09-07 17:33:46 UTC) #10
mstensho (USE GERRIT)
On 2015/09/07 17:33:46, rhogan wrote: > On 2015/09/07 at 14:01:48, mstensho wrote: > > > ...
5 years, 3 months ago (2015-09-07 17:38:31 UTC) #11
rhogan
On 2015/09/07 at 17:38:31, mstensho wrote: > That's what I'm thinking too. Ready for another ...
5 years, 3 months ago (2015-09-08 18:37:29 UTC) #12
mstensho (USE GERRIT)
A bit concerned about performance implications here, but not about the correctness. :) https://codereview.chromium.org/1310253005/diff/140001/Source/core/layout/LayoutBlock.cpp File ...
5 years, 3 months ago (2015-09-09 20:14:50 UTC) #13
rhogan
Thanks for the review - incorporated your comments except the following: > > https://codereview.chromium.org/1310253005/diff/140001/Source/core/layout/LayoutBlock.cpp#newcode801 > ...
5 years, 3 months ago (2015-09-14 12:41:04 UTC) #14
mstensho (USE GERRIT)
Almost there now. :) https://codereview.chromium.org/1310253005/diff/160001/LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html File LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html (right): https://codereview.chromium.org/1310253005/diff/160001/LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html#newcode10 LayoutTests/fast/block/float/add-abspos-before-float-in-block-children-block-expected.html:10: <div id="a"> Please close the ...
5 years, 3 months ago (2015-09-15 11:47:30 UTC) #15
rhogan
On 2015/09/15 at 11:47:30, mstensho wrote: > Almost there now. :) > Addressed all your ...
5 years, 3 months ago (2015-09-15 21:03:18 UTC) #16
mstensho (USE GERRIT)
lgtm, but maybe you should run the performance tests. It's easy to construct a test ...
5 years, 3 months ago (2015-09-16 08:48:10 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1310253005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1310253005/180001
5 years, 3 months ago (2015-09-16 19:53:25 UTC) #19
commit-bot: I haz the power
5 years, 3 months ago (2015-09-16 22:07:58 UTC) #20
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=202391

Powered by Google App Engine
This is Rietveld 408576698