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

Issue 2485173002: Before turning objects into spanners, check that they are not already spanners. (Closed)

Created:
4 years, 1 month ago by mstensho (USE GERRIT)
Modified:
4 years, 1 month ago
Reviewers:
eae
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews, mstensho (USE GERRIT)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Before turning objects into spanners, check that they are not already spanners. During style recalculation, we may end up in a situation where we think that we go from a state where an object couldn't contain spanners, to being able to contain them, while in reality, the object was able to contain spanners all along. This happens when changing the writing mode on the multicol container and all objects in the parent chain between the spanner and the multicol container (and there is nothing that prevents the descendant from being a spanner). The problem is that when determining whether an object is a writing mode root, we compare the object's writing mode to that of its parent. If they are different, we decide that it's a writing mode root. However, if we're in styleWillChange() for said object, and its writing mode is actually about to change to the same value as that of the parent, there'll be no writing mode root in the end. Still, we're going to think that we used to be a writing mode root (i.e. not be able to contain spanners). It would be possible to fix it for writing mode roots, to provide a reliable implementation of isWritingModeRoot(), by using a bit in LayoutObject to specify whether it's a writing mode root, rather than using current computed style to determine that. Using computed style during style recalculation is risky. That said, it's probably better to be fault-tolerant for such situations in toggleSpannersInSubtree() instead, especially since may be other (unknown, at the time being) scenarios where this situation may occur. BUG=662754 Committed: https://crrev.com/3a83cc34b92519d437c479e2e88f69589ebc5427 Cr-Commit-Position: refs/heads/master@{#430887}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/fast/multicol/dynamic/spanner-change-multicol-writing-mode-crash.html View 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp View 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
mstensho (USE GERRIT)
One-liner, with lots of documentation. :(
4 years, 1 month ago (2016-11-08 13:58:40 UTC) #6
eae
LGTM
4 years, 1 month ago (2016-11-09 00:10:22 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2485173002/1
4 years, 1 month ago (2016-11-09 07:58:58 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-09 08:04:04 UTC) #10
commit-bot: I haz the power
4 years, 1 month ago (2016-11-09 08:06:04 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/3a83cc34b92519d437c479e2e88f69589ebc5427
Cr-Commit-Position: refs/heads/master@{#430887}

Powered by Google App Engine
This is Rietveld 408576698