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

Issue 2735283002: Combine ComputedStyle default ctor with initial style ctor. (Closed)

Created:
3 years, 9 months ago by shend
Modified:
3 years, 9 months ago
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Combine ComputedStyle default ctor with initial style ctor. ComputedStyle has two constructors. The default constructor initialises all the fields and copies the DataRefs from initialStyle(). The other constructor creates the initial style, which initialises all the fields and also allocates the memory for each of the DataRefs. Having two constructors makes it more difficult to maintain and think about, so this patch removes the default constructor, which can be implemented instead by copying from the initial style. BUG=628043 Review-Url: https://codereview.chromium.org/2735283002 Cr-Commit-Position: refs/heads/master@{#456836} Committed: https://chromium.googlesource.com/chromium/src/+/fc3b987e456edc71cb5b4286ce0fa90599468468

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -22 lines) Patch
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 chunks +1 line, -19 lines 0 comments Download

Messages

Total messages: 31 (16 generated)
shend
Hi Naina, PTAL
3 years, 9 months ago (2017-03-08 05:10:04 UTC) #6
nainar
lgtm. On a side note wonder why your test results are invalid? :/
3 years, 9 months ago (2017-03-08 12:23:18 UTC) #7
shend
On 2017/03/08 at 12:23:18, nainar wrote: > lgtm. > > On a side note wonder ...
3 years, 9 months ago (2017-03-08 17:35:55 UTC) #8
shend
Hey Eddy, PTAL
3 years, 9 months ago (2017-03-08 17:36:11 UTC) #10
meade_UTC10
This lgtm, but I'd like to hear Sasha's opinion on the static_assert thing. Sasha, could ...
3 years, 9 months ago (2017-03-09 05:43:14 UTC) #12
shend
https://codereview.chromium.org/2735283002/diff/1/third_party/WebKit/Source/core/style/ComputedStyle.cpp File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): https://codereview.chromium.org/2735283002/diff/1/third_party/WebKit/Source/core/style/ComputedStyle.cpp#newcode148 third_party/WebKit/Source/core/style/ComputedStyle.cpp:148: "NonInheritedData should not grow"); On 2017/03/09 at 05:43:13, Eddy ...
3 years, 9 months ago (2017-03-09 14:59:54 UTC) #13
sashab
I'm surprised this patch actually works. This *seems* like a good cleanup, but there is ...
3 years, 9 months ago (2017-03-09 23:48:22 UTC) #15
shend
On 2017/03/09 at 23:48:22, sashab wrote: > I'm surprised this patch actually works. This *seems* ...
3 years, 9 months ago (2017-03-10 00:06:01 UTC) #16
sashab
Oh, I can't believe I missed this before, but I just saw that the initializer ...
3 years, 9 months ago (2017-03-10 01:02:30 UTC) #17
shend
On 2017/03/10 at 01:02:30, sashab wrote: > Oh, I can't believe I missed this before, ...
3 years, 9 months ago (2017-03-10 06:16:53 UTC) #18
shend
On 2017/03/10 at 01:02:30, sashab wrote: > Oh, I can't believe I missed this before, ...
3 years, 9 months ago (2017-03-10 06:16:53 UTC) #19
sashab
Thanks for clarifying this patch offline. LGTM but leave that TODO in, also please add ...
3 years, 9 months ago (2017-03-14 05:02:14 UTC) #20
shend
https://codereview.chromium.org/2735283002/diff/1/third_party/WebKit/Source/core/style/ComputedStyle.cpp File third_party/WebKit/Source/core/style/ComputedStyle.cpp (left): https://codereview.chromium.org/2735283002/diff/1/third_party/WebKit/Source/core/style/ComputedStyle.cpp#oldcode98 third_party/WebKit/Source/core/style/ComputedStyle.cpp:98: return adoptRef(new ComputedStyle()); On 2017/03/09 at 23:48:22, sashab wrote: ...
3 years, 9 months ago (2017-03-14 06:05:22 UTC) #21
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/2735283002/20001
3 years, 9 months ago (2017-03-14 21:15:33 UTC) #28
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 21:22:35 UTC) #31
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/fc3b987e456edc71cb5b4286ce0f...

Powered by Google App Engine
This is Rietveld 408576698