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

Issue 2906253003: Replace call sites to BorderValue functions to save the BorderValue construction cost (Closed)

Created:
3 years, 6 months ago by nainar
Modified:
3 years, 6 months ago
Reviewers:
meade_UTC10, rune, shend
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace call sites to BorderValue functions to save the BorderValue construction cost Currently we construct BorderValues via functions ComputedStyle::Border{Left,Right,Start,End} only to access two methods at most (Style and Width) or perform comparison. This patch splits out the accessors for Style and Width and adds comparison functions to ComputedStyle to save this construction cost. We haven't removed the callsites in Layout land that return a BorderValue and are saving it for a future patch to reduce complexity. BUG=628043, 721287 Review-Url: https://codereview.chromium.org/2906253003 Cr-Commit-Position: refs/heads/master@{#475896} Committed: https://chromium.googlesource.com/chromium/src/+/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0

Patch Set 1 #

Patch Set 2 : Ready for review #

Patch Set 3 : Redo LayoutTable/LayoutTableSection #

Total comments: 49

Patch Set 4 : rune@ renames #

Patch Set 5 : rune@ renames #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -126 lines) Patch
M third_party/WebKit/Source/core/layout/CollapsedBorderValue.h View 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 7 chunks +46 lines, -34 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 18 chunks +41 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.cpp View 1 2 3 4 4 chunks +81 lines, -56 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 8 chunks +37 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (21 generated)
nainar
shend@, PTAL? Thanks!
3 years, 6 months ago (2017-05-30 02:44:24 UTC) #4
nainar
Fixed the issue (redid the two classes). Passes the previously failing tests locally now.
3 years, 6 months ago (2017-05-30 09:47:35 UTC) #9
shend
lgtm
3 years, 6 months ago (2017-05-31 05:42:11 UTC) #12
nainar
3 years, 6 months ago (2017-05-31 08:44:38 UTC) #14
rune
https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp File third_party/WebKit/Source/core/layout/LayoutTable.cpp (right): https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTable.cpp#newcode1399 third_party/WebKit/Source/core/layout/LayoutTable.cpp:1399: 2; Weird formatting, but I guess this is what ...
3 years, 6 months ago (2017-05-31 09:02:03 UTC) #16
nainar
rune@, I've taken a stab at some suggested names without trying to delve too much ...
3 years, 6 months ago (2017-05-31 09:31:57 UTC) #17
rune
https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp#newcode1353 third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:1353: EBorderStyle sbs = side == kBorderBefore ? Style()->BorderBeforeStyle() On ...
3 years, 6 months ago (2017-05-31 11:02:10 UTC) #18
nainar
rune@, Made the changes you asked for, PTAL? Thanks! https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/2906253003/diff/40001/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp#newcode1353 third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:1353: ...
3 years, 6 months ago (2017-05-31 12:32:49 UTC) #23
rune
lgtm
3 years, 6 months ago (2017-05-31 13:16:42 UTC) #24
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/2906253003/80001
3 years, 6 months ago (2017-05-31 13:29:49 UTC) #29
commit-bot: I haz the power
3 years, 6 months ago (2017-05-31 13:34:23 UTC) #32
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9a4d00a687e0cf0ea029a68b2dd4...

Powered by Google App Engine
This is Rietveld 408576698