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

Issue 2677843002: Change ComputedStyle::setUnique to take bool parameter. (Closed)

Created:
3 years, 10 months ago by shend
Modified:
3 years, 10 months ago
Reviewers:
sashab, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change ComputedStyle::setUnique to take bool parameter. Currently setUnique() takes no arguments and sets the corresponding nonproperty flag to be true. However, this is different to the traditional setters of property fields, where they set the field to an argument value. Instead of handling setUnique as a special case in the generator, we change setUnique to a normal setter that takes a boolean parameter. This decision was discussed in crrev.com/2667543002. This is prework for generating 'unique'. BUG=628043 Review-Url: https://codereview.chromium.org/2677843002 Cr-Commit-Position: refs/heads/master@{#448774} Committed: https://chromium.googlesource.com/chromium/src/+/25b1de1a5da3dbe754e4461cdd5c7ca2b3502ab6

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -17 lines) Patch
M third_party/WebKit/Source/core/css/ElementRuleCollector.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/SelectorChecker.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControlMultiLine.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/TextAutosizer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 2 chunks +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 13 (5 generated)
sashab
lgtm
3 years, 10 months ago (2017-02-07 02:57:00 UTC) #2
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/2677843002/1
3 years, 10 months ago (2017-02-07 21:21:24 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/25b1de1a5da3dbe754e4461cdd5c7ca2b3502ab6
3 years, 10 months ago (2017-02-07 23:14:45 UTC) #7
esprehn
I'm not sure this is a good idea, doing setUnique(false) is always wrong. :/
3 years, 10 months ago (2017-02-08 00:05:19 UTC) #9
sashab
How come? The default value is false, so calling setUnique(false) is resetting it to the ...
3 years, 10 months ago (2017-02-08 00:53:21 UTC) #10
shend
On 2017/02/08 at 00:53:21, sashab wrote: > How come? The default value is false, so ...
3 years, 10 months ago (2017-02-11 22:04:49 UTC) #11
shend
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2689983002/ by shend@chromium.org. ...
3 years, 10 months ago (2017-02-13 02:36:54 UTC) #12
esprehn
3 years, 10 months ago (2017-02-13 23:50:24 UTC) #13
Message was sent while issue was closed.
On 2017/02/08 at 00:53:21, sashab wrote:
> How come? The default value is false, so calling setUnique(false) is resetting
it to the default value. Many callers check unique() and expect true or false.

The transition from false -> true is fine, that's making the style unique, going
from true -> false though is not safe since you don't know why the style was
made unique. You're potentially turning on style sharing on a style that
shouldn't have it.

Powered by Google App Engine
This is Rietveld 408576698