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

Issue 196533012: Make LayoutState always be RAII (Closed)

Created:
6 years, 9 months ago by leviw_travelin_and_unemployed
Modified:
6 years, 9 months ago
CC:
blink-reviews, mstensho+blink_opera.com, jfernandez, philipj_slow, bemjb+rendering_chromium.org, dsinclair, Manuel Rego, zoltan1, eae+blinkwatch, leviw+renderwatch, eric.carlson_apple.com, feature-media-reviews_chromium.org, jchaffraix+rendering, svillar, pdr., esprehn
Visibility:
Public.

Description

Make LayoutState always be RAII Repaint after layout will eventually do a tree walk that utilizes LayoutState (or more accurately, something *like* LayoutState) to quickly compute repaint rects while walking the tree. In the course of building that functionality, I got mired in the ugliness of LayoutState. LayoutStateMaintainer is an RAII that is partially broken due to the need to explicitly call "pop". RenderView would explicitly create and initialize a LayoutState on the stack then clear the pointer after layout. This patch fixes the LayoutStateMaintainer issue (which necessitated some refactoring in the rendering code) and introduces a RootLayoutStateScope that takes care of RenderView's case. BUG=343896 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169676

Patch Set 1 #

Patch Set 2 : Scoping RenderDeprecatedFlexibleBox #

Patch Set 3 : It's the ToT as you can see #

Total comments: 2

Patch Set 4 : Incorporate Julien's review #

Total comments: 1

Patch Set 5 : Updated to ToT #

Patch Set 6 : Correct overflow call from previous upload #

Patch Set 7 : Fix FlexBox LayoutState scoping #

Total comments: 2

Patch Set 8 : Updated to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -274 lines) Patch
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 1 chunk +36 lines, -34 lines 0 comments Download
M Source/core/rendering/RenderBlockFlow.cpp View 1 2 3 4 5 6 7 5 chunks +23 lines, -29 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderDeprecatedFlexibleBox.cpp View 1 2 3 1 chunk +27 lines, -25 lines 0 comments Download
M Source/core/rendering/RenderEmbeddedObject.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 1 2 3 4 5 6 3 chunks +25 lines, -24 lines 0 comments Download
M Source/core/rendering/RenderGrid.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderMedia.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderTable.cpp View 1 2 3 4 5 6 7 1 chunk +112 lines, -114 lines 0 comments Download
M Source/core/rendering/RenderTableRow.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderTableSection.cpp View 1 2 3 4 5 6 7 3 chunks +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderVTTCue.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderView.h View 1 2 3 4 5 6 7 5 chunks +36 lines, -14 lines 0 comments Download
M Source/core/rendering/RenderView.cpp View 1 2 3 4 5 6 7 3 chunks +12 lines, -15 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
leviw_travelin_and_unemployed
This ends up being a far bigger patch than I expected. Let me know what ...
6 years, 9 months ago (2014-03-12 23:40:21 UTC) #1
Julien - ping for review
I like this change overall! The table part is a bit too awkward for my ...
6 years, 9 months ago (2014-03-13 17:44:27 UTC) #2
leviw_travelin_and_unemployed
On 2014/03/13 17:44:27, Julien Chaffraix - PST wrote: > I like this change overall! The ...
6 years, 9 months ago (2014-03-14 22:37:00 UTC) #3
leviw_travelin_and_unemployed
On 2014/03/14 22:37:00, Levi wrote: > PTAL :) Ping! :)
6 years, 9 months ago (2014-03-17 17:34:24 UTC) #4
eseidel
lgtm https://codereview.chromium.org/196533012/diff/70001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/196533012/diff/70001/Source/core/rendering/RenderBlock.cpp#newcode1645 Source/core/rendering/RenderBlock.cpp:1645: if (needsPositionedMovementLayout() && !tryLayoutDoingPositionedMovementOnly()) Rietveld's diff display here ...
6 years, 9 months ago (2014-03-17 17:45:27 UTC) #5
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-17 17:59:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/196533012/70001
6 years, 9 months ago (2014-03-17 17:59:28 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 18:00:57 UTC) #8
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderBlockFlow.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-17 18:00:58 UTC) #9
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-17 18:39:25 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/196533012/90001
6 years, 9 months ago (2014-03-17 18:39:28 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 18:48:52 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-17 18:48:53 UTC) #13
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-17 19:20:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/196533012/110001
6 years, 9 months ago (2014-03-17 19:20:33 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 19:51:38 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-17 19:51:39 UTC) #17
leviw_travelin_and_unemployed
On 2014/03/17 19:51:39, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 9 months ago (2014-03-17 21:54:00 UTC) #18
leviw_travelin_and_unemployed
Ping :)
6 years, 9 months ago (2014-03-20 01:06:23 UTC) #19
esprehn
lgtm, some of these nested brace scopes you added are really long. We should break ...
6 years, 9 months ago (2014-03-20 01:10:54 UTC) #20
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-20 17:51:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/196533012/130001
6 years, 9 months ago (2014-03-20 17:51:22 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 17:51:34 UTC) #23
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderBox.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-20 17:51:35 UTC) #24
leviw_travelin_and_unemployed
The CQ bit was checked by leviw@chromium.org
6 years, 9 months ago (2014-03-20 18:12:55 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leviw@chromium.org/196533012/150001
6 years, 9 months ago (2014-03-20 18:13:10 UTC) #26
commit-bot: I haz the power
6 years, 9 months ago (2014-03-20 19:16:38 UTC) #27
Message was sent while issue was closed.
Change committed as 169676

Powered by Google App Engine
This is Rietveld 408576698