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

Issue 1320843005: Update outer flow thread membership before changing multicolness. (Closed)

Created:
5 years, 3 months ago by mstensho (USE GERRIT)
Modified:
5 years, 3 months ago
CC:
blink-reviews, szager+layoutwatch_chromium.org, zoltan1, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, blink-reviews-rendering, jchaffraix+rendering, mstensho (USE GERRIT)
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Update outer flow thread membership before changing multicolness. This change is about being more strict about applying style changes in tree order: first adjust the relationship to the ancestry, THEN adjust the children. This order is important if a multicol container has a child out-of-flow multicol container with a spanner, and this child is changed to become in-flow at the same time as it ceases to be a multicol container, and instead becomes a spanner. If we change it from multicol to spanner first (instead of making it part of the outer multicol container first), the outer multicol container is going to believe that it contains the inner spanner, and we'd end up with a spanner inside another spanner, which isn't allowed. #a - multicol #b - abspos multicol, changing it to static spanner #c - spanner (but it should become a regular block once #b becomes a spanner) The effect of this fix is that we swap the ordering of notifying the flow thread about descendant style changes (flowThreadDescendantStyleWillChange(), flowThreadDescendantStyleDidChange()), compared to when handling style changes locally on the object (styleWillChange(), styleDidChange()) takes place. More specifically, we need to get to flowThreadDescendantStyleDidChange() first (which registers or unregisters descendants in the flow thread - i.e. updates the LayoutMultiColumnSet / LayoutMultiColumnSpanner placeholder structure), and THEN to evacuateAndDestroy() (via LayoutBlockFlow::styleDidChange() and createOrDestroyMultiColumnFlowThreadIfNeeded()), instead of the other way around. This way we register #b (now a spanner) in #a first. That will prevent #a from seeing anything inside #b (spanners are rather opaque). Since we're now notifying the flow thread from LayoutBox instead of LayoutObject, we can change the style change notification methods to take LayoutBox instead of any kind of LayoutObject. The flow thread only cares about LayoutBox or better here anyway. This allows for some cleanup in the notification methods, since we no longer need to worry about computed style weirdness on text layout objects. BUG=516532 R=eae@chromium.org,jchaffraix@chromium.org,leviw@chromium.org Committed: https://crrev.com/23a9f596190602d0089129625d49f61a8deb1a37 git-svn-id: svn://svn.chromium.org/blink/trunk@201993 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -32 lines) Patch
A LayoutTests/fast/multicol/dynamic/abspos-multicol-with-spanner-becomes-spanner.html View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/dynamic/abspos-multicol-with-spanner-becomes-spanner-expected.html View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBox.cpp View 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutFlowThread.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutMultiColumnFlowThread.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutMultiColumnFlowThread.cpp View 1 chunk +4 lines, -18 lines 0 comments Download
M Source/core/layout/LayoutObject.cpp View 2 chunks +0 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
mstensho (USE GERRIT)
5 years, 3 months ago (2015-08-31 13:44:47 UTC) #1
eae
Nice, LGTM!
5 years, 3 months ago (2015-09-09 17:14:33 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320843005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320843005/1
5 years, 3 months ago (2015-09-09 17:51:20 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=201993
5 years, 3 months ago (2015-09-09 19:33:47 UTC) #5
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:02:02 UTC) #6
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/23a9f596190602d0089129625d49f61a8deb1a37

Powered by Google App Engine
This is Rietveld 408576698