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

Issue 2699843002: Remove ComputedStyleBase::setBitsDefault(). (Closed)

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

Description

Remove ComputedStyleBase::setBitsDefault(). ComputedStyle::setBitDefaults() resets its members to their initial value. Since part of ComputedStyle is generated in ComputedStyleBase, this method also calls ComputedStyleBase::setBitDefaults(), which resets the generated members as well. However, ComputedStyle::setBitDefaults() is only called in the ComputedStyle constructors, so the generated members are initialised once in the ComputedStyleBase constructor (since its a base class), and then re-initialised a second time by a setBitDefaults() call in the constructor body. This patch removes ComputedStyleBase::setBitDefaults() so that generated members are only initialised once, not twice. It also renames ComputedStyle::setBitDefaults() to initializeBitDefaults() so it's clearer that it's meant to be used inside the constructor. BUG=628043 Review-Url: https://codereview.chromium.org/2699843002 Cr-Commit-Position: refs/heads/master@{#451666} Committed: https://chromium.googlesource.com/chromium/src/+/f6f56fb3cadf1933dbc1b9f3419f13399287bc5d

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -11 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl View 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 27 (20 generated)
shend
Hi Naina, PTAL
3 years, 10 months ago (2017-02-16 04:37:45 UTC) #3
nainar
lgtm
3 years, 10 months ago (2017-02-16 04:48:57 UTC) #4
shend
Hi Eddy, PTAL :)
3 years, 10 months ago (2017-02-16 04:55:26 UTC) #6
meade_UTC10
lgtm Perhaps it would be better to rename the function to "initializeBitDefaults", which sounds more ...
3 years, 10 months ago (2017-02-17 06:41:48 UTC) #15
shend
On 2017/02/17 at 06:41:48, meade wrote: > lgtm > > Perhaps it would be better ...
3 years, 10 months ago (2017-02-19 22:38:30 UTC) #16
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/2699843002/40001
3 years, 10 months ago (2017-02-20 22:36:13 UTC) #24
commit-bot: I haz the power
3 years, 10 months ago (2017-02-20 22:40:57 UTC) #27
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/f6f56fb3cadf1933dbc1b9f3419f...

Powered by Google App Engine
This is Rietveld 408576698