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

Issue 2846563002: Optimize collapsed border calculation (step 1) (Closed)

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

Description

Optimize collapsed border calculation (step 1) Previously we didn't cache results of collapsed borders computation during layout or overflow recalculation, so we had to recompute all collapsed borders before paint invalidation if the table's collapsed borders are marked invalid. Now when a table's collapsed borders need to be invalidated, mark all cells' collapsed borders need to be invalidated [1]. When a cell needs its collapsed border values (regardless of lifecycle phase), we check the invalidation flag and update and cache the result when necessary. As LayoutTableCell::CollapsedBorderValues will be used for both layout and paint, the include_color paremeter of ComputeCollapsedXXXBorder() is removed. As adjacent cells with the same span share collapsed borders, we can also get the collapsed border from the adjacent cell if its collapsed borders are valid. [1] In the next step, we'll only invalidate collapsed borders for affected cells instead of all cells. BUG=626748, 663208 Review-Url: https://codereview.chromium.org/2846563002 Cr-Commit-Position: refs/heads/master@{#468174} Committed: https://chromium.googlesource.com/chromium/src/+/c731464f86c6a5c5c3f2b64890e04b38750896fc

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : - #

Total comments: 19

Patch Set 4 : - #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -279 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutTable.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.h View 1 2 3 5 chunks +27 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 1 2 3 32 chunks +248 lines, -262 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCellTest.cpp View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (24 generated)
Xianzhu
3 years, 7 months ago (2017-04-27 16:58:23 UTC) #12
wkorman
lgtm https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode789 third_party/WebKit/Source/core/layout/LayoutTable.cpp:789: DCHECK(CollapseBorders()); I was briefly confused with this vs. ...
3 years, 7 months ago (2017-04-27 20:11:15 UTC) #13
Xianzhu
https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode789 third_party/WebKit/Source/core/layout/LayoutTable.cpp:789: DCHECK(CollapseBorders()); On 2017/04/27 20:11:15, wkorman wrote: > I was ...
3 years, 7 months ago (2017-04-28 20:31:45 UTC) #19
wkorman
https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.h File third_party/WebKit/Source/core/layout/LayoutTable.h (right): https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.h#newcode419 third_party/WebKit/Source/core/layout/LayoutTable.h:419: void InvalidateCollapsedBordersForAllCellsIfNeeded(); On 2017/04/28 20:31:44, Xianzhu wrote: > On ...
3 years, 7 months ago (2017-04-28 21:40:15 UTC) #22
Xianzhu
On 2017/04/28 21:40:15, wkorman wrote: > https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.h > File third_party/WebKit/Source/core/layout/LayoutTable.h (right): > > https://codereview.chromium.org/2846563002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.h#newcode419 > ...
3 years, 7 months ago (2017-04-28 21:59:53 UTC) #23
wkorman
On 2017/04/28 21:59:53, Xianzhu wrote: > However, in cases like: > void DestroySomethingIfNeeded() { > ...
3 years, 7 months ago (2017-04-28 22:06:00 UTC) #24
Xianzhu
On 2017/04/28 22:06:00, wkorman wrote: > On 2017/04/28 21:59:53, Xianzhu wrote: > > However, in ...
3 years, 7 months ago (2017-04-28 22:12:51 UTC) #25
wkorman
On 2017/04/28 22:06:00, wkorman wrote: > On 2017/04/28 21:59:53, Xianzhu wrote: > > However, in ...
3 years, 7 months ago (2017-04-28 22:17:07 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/2846563002/60001
3 years, 7 months ago (2017-04-28 23:09:00 UTC) #31
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 23:14:29 UTC) #34
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/c731464f86c6a5c5c3f2b64890e0...

Powered by Google App Engine
This is Rietveld 408576698