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

Issue 922173002: Don't pass semi-detached renderers to the flow thread (or anyone else). (Closed)

Created:
5 years, 10 months ago by mstensho (USE GERRIT)
Modified:
5 years, 9 months ago
CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, mstensho (USE GERRIT), pdr+renderingwatchlist_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Don't pass semi-detached renderers to the flow thread (or anyone else). Clean up RenderBlock::removeLeftoverAnonymousBlock(), and make sure that it doesn't pass weird semi-detached renderers to anyone. Promote the children of the leftover block (like before), then keep the leftover block right in front of them (this is new; although it actually used to be exactly there, it used to be semi-detached, confusing anyone who wanted to traverse the tree), then notify the flow thread (and the grid code, that doesn't seem to care either way), then manually detach the leftover block (like before, only that it's a one-liner now) and finally destroy it. The leftover block used to be partially detached in the sense that it had its nextSibling reset, but still had its parent and previousSibling left intact. Missing a nextSibling could make the flow thread code incorrectly believe that we were removing the last piece of multicol content, and thus trigger a deletion of a column set. This would in turn trigger an assertion failure when attempting to insert more content later on, because the flow thread wouldn't find any suitable column set. BUG=457461 R=dsinclair@chromium.org,jchaffraix@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191096

Patch Set 1 #

Patch Set 2 : A child that got its children promoted will never be a last child in its parent. #

Total comments: 2

Patch Set 3 : code review #

Total comments: 2

Patch Set 4 : rebase master - it's LayoutBlock now. #

Patch Set 5 : Code review - make a helper method. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -43 lines) Patch
A LayoutTests/fast/multicol/dynamic/change-block-with-inline-to-multicol-assert.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/dynamic/change-block-with-inline-to-multicol-assert-expected.txt View 1 chunk +6 lines, -0 lines 0 comments Download
A + LayoutTests/fast/multicol/dynamic/insert-block-among-text-in-anonymous-wrapper.html View 1 chunk +5 lines, -4 lines 0 comments Download
A + LayoutTests/fast/multicol/dynamic/insert-block-among-text-in-anonymous-wrapper-expected.html View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutBlock.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 2 chunks +30 lines, -37 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
dsinclair
lgtm with nit. Please give jchaffraix@ a chance to chime in before landing. https://codereview.chromium.org/922173002/diff/20001/Source/core/rendering/RenderBlock.cpp File ...
5 years, 10 months ago (2015-02-17 18:25:02 UTC) #1
mstensho (USE GERRIT)
I hadn't published this review yet (wanted to write something about other solutions), but fine. ...
5 years, 10 months ago (2015-02-17 18:28:57 UTC) #2
dsinclair
On 2015/02/17 at 18:28:57, mstensho wrote: > I hadn't published this review yet (wanted to ...
5 years, 10 months ago (2015-02-17 18:30:37 UTC) #3
mstensho (USE GERRIT)
@jchaffraix - do you have anything to add here? https://codereview.chromium.org/922173002/diff/20001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/922173002/diff/20001/Source/core/rendering/RenderBlock.cpp#newcode1043 Source/core/rendering/RenderBlock.cpp:1043: ...
5 years, 10 months ago (2015-02-18 20:02:26 UTC) #5
Julien - ping for review
lgtm too! > @jchaffraix - do you have anything to add here? I missed that ...
5 years, 9 months ago (2015-02-26 18:29:47 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/922173002/80001
5 years, 9 months ago (2015-03-02 10:25:56 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://src.chromium.org/viewvc/blink?view=rev&revision=191096
5 years, 9 months ago (2015-03-02 11:49:13 UTC) #10
mstensho (USE GERRIT)
5 years, 9 months ago (2015-03-02 21:59:21 UTC) #11
Message was sent while issue was closed.
It appears that I forgot to publish this. Did push the code changes before the
CL landed, though. :)

https://codereview.chromium.org/922173002/diff/40001/Source/core/rendering/Re...
File Source/core/rendering/RenderBlock.cpp (right):

https://codereview.chromium.org/922173002/diff/40001/Source/core/rendering/Re...
Source/core/rendering/RenderBlock.cpp:1050:
children()->setLastChild(lastPromotee);
On 2015/02/26 18:29:47, Julien Chaffraix - PST wrote:
> This really looks like it could be a helper function. No other part of the
code
> does this though so it's a nit.

Done.

Powered by Google App Engine
This is Rietveld 408576698