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

Issue 2695093007: [Typed CSSOM] Get computed values for custom properties

Created:
3 years, 10 months ago by rjwright
Modified:
3 years, 9 months ago
Reviewers:
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Typed CSSOM]Get computed values for registered custom properties Previously StylePropertyMap::get used to throw for custom properties. That exception has been moved into InlineStylePropertyMap::getAllInternal(AtomicString customPropertyName ...), and StylePropertMap::get now works for ComputedStylePropertyMap. I've simplified StylePropertyMap::get & StylePropertyMap::has somewhat. StylePropertyMap::getAll is now the only StylePropertyMap method that directly calls getAllInternal. Relative URLs do not work for custom properties, so the layout test has to work around that. Bug for the issue is here https://bugs.chromium.org/p/chromium/issues/detail?id=618165 Computed style for custom properties that are URL images seems to have null values for all its attributes, but a CSS property (e.g. background-image) that is specified as var(<that custom property>) has proper values for its attributes in the computed style value. See LayoutTests/typedcssom/computedstyle/custom-properties.html, test case t2. I don't know if that is a bug or not. BUG=648495

Patch Set 1 #

Patch Set 2 : Tidy up and add tests #

Patch Set 3 : Add test #

Patch Set 4 : remove unneeded comment #

Patch Set 5 : test whitespace #

Total comments: 10

Patch Set 6 : Fix unregistered props and registered but unset props #

Messages

Total messages: 17 (11 generated)
rjwright
3 years, 10 months ago (2017-02-24 04:32:00 UTC) #5
alancutter (OOO until 2018)
https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html File third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html (right): https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html#newcode75 third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html:75: } FYI you can avoid the incrementing variable name ...
3 years, 10 months ago (2017-02-24 05:11:48 UTC) #8
alancutter (OOO until 2018)
https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html File third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html (right): https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html#newcode75 third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html:75: } On 2017/02/24 at 05:11:48, alancutter wrote: > FYI ...
3 years, 10 months ago (2017-02-24 05:13:06 UTC) #9
alancutter (OOO until 2018)
https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html File third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html (right): https://codereview.chromium.org/2695093007/diff/80001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html#newcode88 third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html:88: // assert_equals(result.state, "loaded"); Leave these asserts in and check ...
3 years, 10 months ago (2017-02-24 05:57:21 UTC) #10
meade_UTC10
Is this CL deprecated in favour of the other one you were working on?
3 years, 9 months ago (2017-03-06 03:16:04 UTC) #15
rjwright
3 years, 9 months ago (2017-03-16 03:55:47 UTC) #16
On 2017/03/06 03:16:04, Eddy wrote:
> Is this CL deprecated in favour of the other one you were working on?

Yes, the implementation will be a merger of this code and the code you sent me.

Powered by Google App Engine
This is Rietveld 408576698