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

Issue 2670603002: Avoid pathological layout on nested percent height tables (Closed)

Created:
3 years, 10 months ago by rhogan
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid unnecessary cell layout on nested percent height tables In the test, the nested percent height tables mean that each cell will get at least three layouts (LayoutTableRow::layout(),calcRowLogicalHeight(), layoutRows()) during the layout of the section - and this cascades down the tree with the lowest children getting hundreds of repeated layouts. This inefficiency has always been there, we've just introduced it for the percent height situation with crrev.com/2441373002. To avoid this don't bother computing the height of the section based on row sizes (calcRowLogicalHeight()), unless the section itself needed a layout - the previously calculated value will do. The only complication this introduces is: any extra logical height from the table that we previously discarded when distributing to the rows we will now try to distribute again. This can change the size of the section and cause extra paints. BUG=687061 Review-Url: https://codereview.chromium.org/2670603002 Cr-Commit-Position: refs/heads/master@{#449101} Committed: https://chromium.googlesource.com/chromium/src/+/d3ceb0147ad9f4d4a9b41cea0362d6221cb72302

Patch Set 1 #

Patch Set 2 : bug 687061 #

Patch Set 3 : bug 687061 #

Total comments: 9

Patch Set 4 : bug 687061 #

Total comments: 1

Patch Set 5 : bug 687061 #

Messages

Total messages: 37 (25 generated)
rhogan
3 years, 10 months ago (2017-02-06 20:47:22 UTC) #14
eae
LGTM Thank you Rob!
3 years, 10 months ago (2017-02-06 20:55:23 UTC) #16
mstensho (USE GERRIT)
https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html File third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html (right): https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html#newcode4 third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html:4: table { background-color: lightblue; height: 99px; } This seems ...
3 years, 10 months ago (2017-02-06 21:11:07 UTC) #17
rhogan
https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode454 third_party/WebKit/Source/core/layout/LayoutTable.cpp:454: bool neededLayout = section.needsLayout(); On 2017/02/06 at 21:11:07, mstensho ...
3 years, 10 months ago (2017-02-06 21:21:09 UTC) #18
mstensho (USE GERRIT)
https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode454 third_party/WebKit/Source/core/layout/LayoutTable.cpp:454: bool neededLayout = section.needsLayout(); On 2017/02/06 21:21:08, rhogan wrote: ...
3 years, 10 months ago (2017-02-06 21:25:27 UTC) #19
rhogan
On 2017/02/06 at 21:25:27, mstensho wrote: > https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp > File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): > > https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode454 ...
3 years, 10 months ago (2017-02-07 19:20:54 UTC) #23
mstensho (USE GERRIT)
Code changes look fine to me, but there seem to be serious regressions introduced by ...
3 years, 10 months ago (2017-02-07 19:52:33 UTC) #24
rhogan
Whoops, completely missed that. https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html File third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html (right): https://codereview.chromium.org/2670603002/diff/40001/third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html#newcode4 third_party/WebKit/LayoutTests/paint/invalidation/table-two-pass-layout-overpaint-expected.html:4: table { background-color: lightblue; height: ...
3 years, 10 months ago (2017-02-07 20:27:42 UTC) #25
mstensho (USE GERRIT)
lgtm, with some boring paperwork left, that I hope you have time to do before ...
3 years, 10 months ago (2017-02-07 21:09:10 UTC) #26
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/2670603002/80001
3 years, 10 months ago (2017-02-08 22:00:51 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/d3ceb0147ad9f4d4a9b41cea0362d6221cb72302
3 years, 10 months ago (2017-02-08 22:07:56 UTC) #36
eae
3 years, 10 months ago (2017-02-17 23:01:05 UTC) #37
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/2700183003/ by eae@chromium.org.

The reason for reverting is: Broke Google Hangouts.

BUG=693722.

Powered by Google App Engine
This is Rietveld 408576698