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

Issue 2121913002: [Typed OM] Add CSSValue -> CSSNumberValue conversion (Closed)

Created:
4 years, 5 months ago by meade_UTC10
Modified:
3 years, 9 months ago
Reviewers:
sashab
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Typed OM] Add CSSValue -> CSSNumberValue conversion Also add support for setting/getting CSSNumberValues in animation-iteration-count and opacity to allow testing in LayoutTests. BUG=545318

Patch Set 1 #

Total comments: 4

Patch Set 2 : Change iteration type #

Total comments: 9

Patch Set 3 : Update TODO comments #

Patch Set 4 : Add new consts to keep up with code changes. #

Patch Set 5 : Also add support for opacity #

Patch Set 6 : Make InlineStylePropertyMap error if wrong number #

Patch Set 7 : Fix test #

Patch Set 8 : sync #

Patch Set 9 : sync #

Messages

Total messages: 39 (22 generated)
meade_UTC10
4 years, 5 months ago (2016-07-05 05:25:17 UTC) #2
Timothy Loh
On 2016/07/05 05:25:17, Eddy wrote: bug= link is wrong
4 years, 5 months ago (2016-07-05 05:37:24 UTC) #3
Timothy Loh
How do we avoid setting negative numbers for properties that don't support it (and also ...
4 years, 5 months ago (2016-07-05 05:50:03 UTC) #4
meade_UTC10
https://codereview.chromium.org/2121913002/diff/1/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp (right): https://codereview.chromium.org/2121913002/diff/1/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp#newcode47 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp:47: for (const Member<CSSStyleValue> value : styleValueVector) { On 2016/07/05 ...
4 years, 5 months ago (2016-07-05 07:05:23 UTC) #5
meade_UTC10
Hey Sasha! Want to have a look at this one? After I can send it ...
4 years, 5 months ago (2016-07-11 07:01:57 UTC) #7
sashab
https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt (right): https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt#newcode4 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt:4: FAIL CSSNumberValues in a list round trip when passed ...
4 years, 5 months ago (2016-07-11 23:47:22 UTC) #8
meade_UTC10
https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt (right): https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt#newcode4 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt:4: FAIL CSSNumberValues in a list round trip when passed ...
4 years, 4 months ago (2016-07-27 07:14:29 UTC) #9
sashab
https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt (right): https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt#newcode4 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt:4: FAIL CSSNumberValues in a list round trip when passed ...
4 years, 4 months ago (2016-07-27 23:23:57 UTC) #10
Timothy Loh
https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt (right): https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt#newcode4 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt:4: FAIL CSSNumberValues in a list round trip when passed ...
4 years, 4 months ago (2016-07-28 02:11:31 UTC) #11
meade_UTC10
https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt (right): https://codereview.chromium.org/2121913002/diff/20001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt#newcode4 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/numbers-expected.txt:4: FAIL CSSNumberValues in a list round trip when passed ...
4 years, 4 months ago (2016-08-03 03:26:44 UTC) #12
sashab
LGTM, but looks like you need to fix some const-ness before landing :) I think ...
4 years, 4 months ago (2016-08-04 03:15:25 UTC) #17
meade_UTC10
On 2016/08/04 03:15:25, sashab wrote: > LGTM, but looks like you need to fix some ...
4 years, 4 months ago (2016-08-09 01:16:10 UTC) #22
Timothy Loh
On 2016/08/09 01:16:10, Eddy wrote: > On 2016/08/04 03:15:25, sashab wrote: > > LGTM, but ...
4 years, 4 months ago (2016-08-09 01:50:09 UTC) #23
meade_UTC10
On 2016/08/09 01:50:09, Timothy Loh wrote: > On 2016/08/09 01:16:10, Eddy wrote: > > On ...
4 years, 4 months ago (2016-08-17 03:34:03 UTC) #24
Timothy Loh
On 2016/08/17 03:34:03, Eddy wrote: > We don't. The InlineStylePropertyMap accepts whatever number, but the ...
4 years, 4 months ago (2016-08-18 03:24:27 UTC) #29
meade_UTC10
I've made it so that in that situation an error is thrown. Shane: In the ...
4 years, 4 months ago (2016-08-23 05:59:55 UTC) #31
meade_UTC10
4 years, 4 months ago (2016-08-23 11:32:01 UTC) #38
On 2016/08/18 03:24:27, Timothy Loh wrote:
> On 2016/08/17 03:34:03, Eddy wrote:
> > We don't. The InlineStylePropertyMap accepts whatever number, but the result
> > will be clamped when being returned from the ComputedStylePropertyMap. I've
> > added support for opacity + a test to show that it works.
> 
> I'm not convinced. I think opacity here is a special case -- the spec allows
any
> <number> but has clamping at computation time, but this is not the case for
> other properties. For animation-iteration-count, e.g., the spec says negative
> numbers are invalid (i.e. rejected at parse time). It looks like if you tried
to
> set a negative number with this code then it won't be clamped and
> Timing::assertValid will fail.

I also realised that this CL has really gone into the weeds - my original
intention was to implement getting, not setting. I've created a new CL where
I've removed all the setting logic in
https://codereview.chromium.org/2274463002/. Let's do that one first.

Powered by Google App Engine
This is Rietveld 408576698