-
mstensho@opera.com authored
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 Review URL: https://codereview.chromium.org/1320843005 git-svn-id: svn://svn.chromium.org/blink/trunk@201993 bbb929c8-8fbe-4397-9dbb-9b2b20218538
23a9f596