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

Issue 2701163002: 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 pathological layout on nested percent height tables A second go at https://codereview.chromium.org/2670603002. 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/2701163002 Cr-Commit-Position: refs/heads/master@{#451662} Committed: https://chromium.googlesource.com/chromium/src/+/a4b3b0ba32356230afd307830442db9a807008ad

Patch Set 1 #

Total comments: 7

Patch Set 2 : bug 687061 #

Messages

Total messages: 20 (12 generated)
rhogan
3 years, 10 months ago (2017-02-18 10:36:15 UTC) #5
mstensho (USE GERRIT)
https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes-2.html File third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes-2.html (right): https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes-2.html#newcode9 third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes-2.html:9: <script src="../../resources/check-layout.js"></script> Better use check-layout-th.js, to eliminate the -expected.txt ...
3 years, 10 months ago (2017-02-20 13:01:31 UTC) #8
rhogan
https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html File third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html (right): https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html#newcode13 third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html:13: <col style="width: 1161px;"> On 2017/02/20 at 13:01:31, mstensho wrote: ...
3 years, 10 months ago (2017-02-20 18:38:16 UTC) #9
rhogan
On 2017/02/20 at 13:01:31, mstensho wrote: ew.chromium.org/2701163002/diff/1/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode70 > third_party/WebKit/Source/core/layout/LayoutTable.cpp:70: m_oldAvailableLogicalHeight(0) { > No need (actually ...
3 years, 10 months ago (2017-02-20 18:39:11 UTC) #12
mstensho (USE GERRIT)
lgtm https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html File third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html (right): https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html#newcode13 third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html:13: <col style="width: 1161px;"> On 2017/02/20 18:38:16, rhogan wrote: ...
3 years, 10 months ago (2017-02-20 19:02:32 UTC) #13
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/2701163002/20001
3 years, 10 months ago (2017-02-20 20:50:03 UTC) #16
rhogan
On 2017/02/20 at 19:02:32, mstensho wrote: > lgtm > > https://codereview.chromium.org/2701163002/diff/1/third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html > File third_party/WebKit/LayoutTests/fast/table/layout-section-when-table-height-changes.html (right): ...
3 years, 10 months ago (2017-02-20 21:13:35 UTC) #17
commit-bot: I haz the power
3 years, 10 months ago (2017-02-20 22:10:49 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/a4b3b0ba32356230afd307830442...

Powered by Google App Engine
This is Rietveld 408576698