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

Issue 1235133004: Use LayoutObject to locate the flow thread. (Closed)

Created:
5 years, 5 months ago by mstensho (USE GERRIT)
Modified:
5 years, 5 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-paint_chromium.org, dshwang, slimming-paint-reviews_chromium.org
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Use LayoutObject to locate the flow thread. No need for (poorly) duplicated efforts in DeprecatedPaintLayer. Cleaned up the code a little while I was here. One of the transform checks was getting in the way, so I removed them both. They did nothing useful anyway. The flow thread (i.e. pagination layer) itself can never be transformed. Also removed the fast-path completely, since most layers don't use it. When all this was gone, it became obvious that we should just fold updatePagination() into updatePaginationRecursive(). What really went wrong here was that we failed to re-establish the layers when evacuating a flow thread (which happens when a multicol container ceases to be one), so we just kept what we had, and the flow thread got deleted without any of the decendant layers noticing (so that we were pointing to dead enclosing pagination layers). There's code in LayoutBoxModelObject::moveChildTo() that normally handles such things (notifications that involve re-establishing the layers), but only for LayoutInline and LayoutBlock. In this case we were dealing with a LayoutSVGRoot, which is LayoutReplaced. There could be other problems with SVG with layers inside because of this, but in this bug, the correct fix is to just disallow pagination-awareness inside SVG, which LayoutObject::locateFlowThreadContainingBlock() already does for us, if we but just bother to invoke it. BUG=507992 R=chrishtr@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198891

Patch Set 1 #

Total comments: 4

Patch Set 2 : code review. Kill the fast path that almost nobody treads. #

Total comments: 3

Patch Set 3 : Fold updatePagination() into updatePaginationRecursive() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -50 lines) Patch
A LayoutTests/fast/multicol/dynamic/multicol-with-abspos-svg-with-foreignobject-with-multicol-crash.html View 1 chunk +20 lines, -0 lines 0 comments Download
A + LayoutTests/fast/multicol/dynamic/multicol-with-abspos-svg-with-foreignobject-with-multicol-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/paint/DeprecatedPaintLayer.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/paint/DeprecatedPaintLayer.cpp View 1 2 1 chunk +9 lines, -50 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
mstensho (USE GERRIT)
5 years, 5 months ago (2015-07-14 13:05:06 UTC) #1
chrishtr
I can't access the attached bug?
5 years, 5 months ago (2015-07-14 18:47:57 UTC) #2
chrishtr
https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp#newcode482 Source/core/paint/DeprecatedPaintLayer.cpp:482: if (!m_stackingNode->isTreatedAsStackingContextForPainting() && !layoutObject()->isColumnSpanAll()) { Is this fast path ...
5 years, 5 months ago (2015-07-14 18:54:01 UTC) #3
mstensho (USE GERRIT)
You have access to the bug now. Sorry that I forgot it in the first ...
5 years, 5 months ago (2015-07-14 19:13:39 UTC) #4
chrishtr
https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp#newcode482 Source/core/paint/DeprecatedPaintLayer.cpp:482: if (!m_stackingNode->isTreatedAsStackingContextForPainting() && !layoutObject()->isColumnSpanAll()) { On 2015/07/14 at 19:13:39, ...
5 years, 5 months ago (2015-07-14 19:46:44 UTC) #5
mstensho (USE GERRIT)
https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/1/Source/core/paint/DeprecatedPaintLayer.cpp#newcode482 Source/core/paint/DeprecatedPaintLayer.cpp:482: if (!m_stackingNode->isTreatedAsStackingContextForPainting() && !layoutObject()->isColumnSpanAll()) { On 2015/07/14 19:46:44, chrishtr ...
5 years, 5 months ago (2015-07-14 19:52:34 UTC) #6
chrishtr
https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp#newcode481 Source/core/paint/DeprecatedPaintLayer.cpp:481: m_enclosingPaginationLayer = containingFlowThread->layer(); Should there be code that nulls ...
5 years, 5 months ago (2015-07-14 19:57:43 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp#newcode481 Source/core/paint/DeprecatedPaintLayer.cpp:481: m_enclosingPaginationLayer = containingFlowThread->layer(); On 2015/07/14 19:57:43, chrishtr wrote: > ...
5 years, 5 months ago (2015-07-14 20:05:32 UTC) #8
chrishtr
https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp File Source/core/paint/DeprecatedPaintLayer.cpp (right): https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp#newcode458 Source/core/paint/DeprecatedPaintLayer.cpp:458: updatePagination(); I think you can blow away DeprecatedPaintLayer::updatePagination and ...
5 years, 5 months ago (2015-07-14 20:11:08 UTC) #9
mstensho (USE GERRIT)
On 2015/07/14 20:11:08, chrishtr wrote: > https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp > File Source/core/paint/DeprecatedPaintLayer.cpp (right): > > https://codereview.chromium.org/1235133004/diff/20001/Source/core/paint/DeprecatedPaintLayer.cpp#newcode458 > ...
5 years, 5 months ago (2015-07-14 20:19:00 UTC) #10
chrishtr
lgtm
5 years, 5 months ago (2015-07-14 20:21:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1235133004/40001
5 years, 5 months ago (2015-07-14 20:21:33 UTC) #13
commit-bot: I haz the power
5 years, 5 months ago (2015-07-14 22:18:37 UTC) #14
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198891

Powered by Google App Engine
This is Rietveld 408576698