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

Issue 2459293004: Avoid unnecessary relayout of floats when not paginated. (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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid unnecessary relayout of floats when not paginated. Made a mistake when excluding floats from being considered for pagination relayout skipping, by ALWAYS marking them for layout, EVEN WHEN NOT PAGINATED. Make sure that we check that we're paginated first. No need to slow down layout when not paginated. Broke the logic for determining whether we need layout or not into a separate method, so that we don't need a quarter of a dozen calls to setChildNeedsLayout(). The logic is now reversed; rather than checking if we don't need layout, we check if we DO need layout. Tried to make the code a bit clearer, and document what goes on at each step. Committed: https://crrev.com/fbebed78158693067e5bc3eeb90934f33590ef3b Cr-Commit-Position: refs/heads/master@{#429051}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -33 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 chunk +34 lines, -29 lines 2 comments Download

Messages

Total messages: 16 (9 generated)
mstensho (USE GERRIT)
Follow-up to https://codereview.chromium.org/2462643002/
4 years, 1 month ago (2016-10-31 23:11:53 UTC) #7
eae
https://codereview.chromium.org/2459293004/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2459293004/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode4738 third_party/WebKit/Source/core/layout/LayoutBox.cpp:4738: if (child.offsetToNextPage() != remainingSpace) Is checking the break offset ...
4 years, 1 month ago (2016-11-01 16:55:10 UTC) #8
mstensho (USE GERRIT)
https://codereview.chromium.org/2459293004/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2459293004/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode4738 third_party/WebKit/Source/core/layout/LayoutBox.cpp:4738: if (child.offsetToNextPage() != remainingSpace) On 2016/11/01 16:55:10, eae wrote: ...
4 years, 1 month ago (2016-11-01 17:54:26 UTC) #9
eae
Ah, that makes sense. Thanks for the explanation. LGTM
4 years, 1 month ago (2016-11-01 17:57:39 UTC) #10
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/2459293004/1
4 years, 1 month ago (2016-11-01 18:01:43 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-01 18:07:10 UTC) #14
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 18:24:57 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/fbebed78158693067e5bc3eeb90934f33590ef3b
Cr-Commit-Position: refs/heads/master@{#429051}

Powered by Google App Engine
This is Rietveld 408576698