New issue
Advanced search Search tips

Issue 785132 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 788904

Blocking:
issue 545318



Sign in to add a comment

[css-typed-om] Implement StylePropertyMaps

Project Member Reported by shend@chromium.org, Nov 15 2017

Issue description

Our implementation is slightly outdated. We need to update our implementations for the inline and computed StylePropertyMaps, and write an implemenation for the declared StylePropertyMap. We also need to implement update for all three style maps.

Spec: https://drafts.css-houdini.org/css-typed-om-1/#the-stylepropertymap
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4

commit 6c9ae5a9aefaa71945fdf153fe5b0548192b39c4
Author: Darren Shen <shend@chromium.org>
Date: Tue Nov 21 22:56:06 2017

[css-typed-om] Update IDL and implementation for StylePropertyMap.

The spec has changed StylePropertyMap's IDL. StylePropertyMap.append
and set now take a variadic number of (CSSStyleValue or Strings). This
patch changes the IDL and updates the implementation.

Bug:  785132 
Change-Id: I502abbd369bea20853e68f434f3c96dc6437a892
Reviewed-on: https://chromium-review.googlesource.com/768330
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518425}
[add] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/animation-direction-expected.txt
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl
[modify] https://crrev.com/6c9ae5a9aefaa71945fdf153fe5b0548192b39c4/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.h

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8085bb1d7bb78c7a9689c19af2b76ac53d07763a

commit 8085bb1d7bb78c7a9689c19af2b76ac53d07763a
Author: Darren Shen <shend@chromium.org>
Date: Wed Nov 22 02:03:20 2017

[css-typed-om] Change FilteredComputedStylePropertyMap

FilteredComputedStylePropertyMap is the style map passed to custom paint
API. According to the custom paint spec [1], the style map should be
"populated with only the computed value’s for properties listed in
inputProperties".

Currently, the style map will throw an error if you access a property
not listed in inputProperties. However, according to the typed OM spec
[2], accessing a property not in the style map should return null.

This patch changes the behaviour of FilteredComputedStylePropertyMap
to return null for properties not in inputProperties rather than
throwing an error.

[1] https://www.w3.org/TR/css-paint-api-1/#drawing-an-image
[2] https://drafts.css-houdini.org/css-typed-om-1/#get-a-value-from-a-stylepropertymap

Bug:  785132 
Change-Id: I94f6ba84fc91b5cb273054137713a39db6b844d9
Reviewed-on: https://chromium-review.googlesource.com/770637
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518500}
[modify] https://crrev.com/8085bb1d7bb78c7a9689c19af2b76ac53d07763a/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
[modify] https://crrev.com/8085bb1d7bb78c7a9689c19af2b76ac53d07763a/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMapTest.cpp

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37e0f535f484760ada8e5df480f572b56edcc68c

commit 37e0f535f484760ada8e5df480f572b56edcc68c
Author: Darren Shen <shend@chromium.org>
Date: Wed Nov 22 10:23:35 2017

[css-typed-om] Refactor StylePropertyMap.get/getAll and has.

Currently, StylePropertyMapReadonly.get/getAll/has are virtual functions
so that they can be overridden by specific types of style maps (e.g.
the computed style map).

However, because the whole function is virtual, overriding it requires
implementing the function from scratch. This means that there's a lot
of logic being duplicated across different style maps (e.g. validation,
converting CSSValues to style values).

This patch makes get/getAll/has non-virtual. To override behaviour,
subclasses just need to override two functions:

    const CSSValue* GetProperty(CSSPropertyID);
    const CSSValue* GetCustomProperty(AtomicString);

This makes it very easy to define new style maps and significantly
reduces amount of duplicate boilerplate code.

Future patches will do the same thing for other methods on
StylePropertyMap.

Bug:  785132 
Change-Id: Iae6e43684ff54a317bca0db6a0bf32629c298bc1
Reviewed-on: https://chromium-review.googlesource.com/770606
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518596}
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.h
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.cpp
[modify] https://crrev.com/37e0f535f484760ada8e5df480f572b56edcc68c/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.h

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57

commit 4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57
Author: Darren Shen <shend@chromium.org>
Date: Thu Nov 23 07:10:22 2017

[css-typed-om] Refactor StylePropertyMap.set/append.

This patch is a follow up of crrev.com/770606. We make set/append non-
virtual. To override behaviour, subclasses need to implement:

    void SetProperty(CSSPropertyID);
    // technically, there should be a SetCustomProperty as well, but
    // we don't support setting custom properties yet.

This reduces duplicate boilerplate code across different style maps.

Note: Most of this change is moving code from InlineStylePropertyMap
to the base StylePropertyMap class.

Bug:  785132 
Change-Id: I7ee0882846298fd58f7cec60b9f51884da1a8355
Reviewed-on: https://chromium-review.googlesource.com/770839
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518869}
[modify] https://crrev.com/4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/4684cfaf8fc4a4f88a5dbec29f02f3b322d6fe57/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4444668deadb64a6b106ac0167b49861965c207b

commit 4444668deadb64a6b106ac0167b49861965c207b
Author: Darren Shen <shend@chromium.org>
Date: Thu Nov 23 11:40:26 2017

[css-typed-om] Refactor StylePropertyMap.remove.

This patch is a follow up of crrev.com/770606. We make remove non-
virtual. To override behaviour, subclasses need to implement:

    void RemoveProperty(CSSPropertyID);
    // technically, there should be a RemoveCustomProperty as well, but
    // we don't support removing custom properties yet.

This reduces duplicate boilerplate code across different style maps.

Bug:  785132 
Change-Id: I407c9822313d4e9f1af37b58267aa9452b9b8a1c
Reviewed-on: https://chromium-review.googlesource.com/770644
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518890}
[modify] https://crrev.com/4444668deadb64a6b106ac0167b49861965c207b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/4444668deadb64a6b106ac0167b49861965c207b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/4444668deadb64a6b106ac0167b49861965c207b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/4444668deadb64a6b106ac0167b49861965c207b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h

Comment 6 by shend@chromium.org, Nov 27 2017

Labels: -Hotlist-Interop
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5836b72ac6451d6d3c11f9d3c83e04642c00fc27

commit 5836b72ac6451d6d3c11f9d3c83e04642c00fc27
Author: Darren Shen <shend@chromium.org>
Date: Fri Dec 01 22:29:17 2017

[css-typed-om] Remove unused computed style decl from filtered style map

FilteredComputedStylePropertyMap currently takes a
ComputedStyleDeclaration in its constructor, but doesn't do anything
with it. This patch removes it and moves the node parameter to the front
(makes more sense).

Bug:  785132 
Change-Id: I6897004f98bef50df5d1129fd3eacd560e0b6e78
Reviewed-on: https://chromium-review.googlesource.com/790115
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521091}
[modify] https://crrev.com/5836b72ac6451d6d3c11f9d3c83e04642c00fc27/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
[modify] https://crrev.com/5836b72ac6451d6d3c11f9d3c83e04642c00fc27/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.h
[modify] https://crrev.com/5836b72ac6451d6d3c11f9d3c83e04642c00fc27/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMapTest.cpp
[modify] https://crrev.com/5836b72ac6451d6d3c11f9d3c83e04642c00fc27/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp

Labels: -Update-Monthly
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/845b5fca7b2c75ad92d24f766251c1a20791c16f

commit 845b5fca7b2c75ad92d24f766251c1a20791c16f
Author: Darren Shen <shend@chromium.org>
Date: Wed Dec 06 23:42:31 2017

[css-typed-om] Implement StylePropertyMap.update.

This patch implements StylePropertyMap.update for CSS properties using
get and set.

Some tests were wrong because they didn't return a value in the update
callback.

Spec: https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-update

Bug:  785132 
Change-Id: I6b8a06bfc1dcf0bb35603237d3507d5d3da96182
Reviewed-on: https://chromium-review.googlesource.com/788478
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522255}
[delete] https://crrev.com/4776da5a82682d7b73573a18d7fa039bdce9e049/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/styleMap-update-function-expected.txt
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/styleMap-update-function.html
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/update-expected.txt
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/update.html
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h
[modify] https://crrev.com/845b5fca7b2c75ad92d24f766251c1a20791c16f/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f20555dccde4745b2821024f03447cd462ce37b

commit 7f20555dccde4745b2821024f03447cd462ce37b
Author: Darren Shen <shend@chromium.org>
Date: Wed Dec 13 22:26:58 2017

[css-typed-om] Refactor StylePropertyMap.getProperties/iteration.

This patch is a follow up of crrev.com/770606. We make getProperties
and getIterationEntries non-virtual. To override behaviour, subclasses
just need to implement one function:

    void ForEachProperty(const IterationCallback&);

which should iterate through every property in the style map and
invoke the callback. Both getProperties and getIterationEntries
can be implemented from this function.

This reduces duplicate boilerplate code across different style maps.
Note: Most of the change is combining getProperties and
getIterationEntries and moving the code to StylePropertyMapReadonly

Bug:  785132 
Change-Id: I829a50191774a7730b534b8e4cdf419ca935fe8f
Reviewed-on: https://chromium-review.googlesource.com/770674
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523911}
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
[delete] https://crrev.com/b592ae80f004eeb95e3f03844b9b688648b44ab1/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/getProperties-expected.txt
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.h
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMapTest.cpp
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.cpp
[modify] https://crrev.com/7f20555dccde4745b2821024f03447cd462ce37b/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.h

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc55847377e035fc4e589993a1c5b70959486407

commit dc55847377e035fc4e589993a1c5b70959486407
Author: Darren Shen <shend@chromium.org>
Date: Thu Dec 14 21:26:29 2017

[css-typed-om] Throw when setting multiple values on non list prop.

When setting multiple values on a non list valued property, we resolved
to throw a TypeError.

Spec:
https://github.com/w3c/css-houdini-drafts/issues/512

Bug:  785132 
Change-Id: I2a1a06ffc3eb6db66e08e2537eeaa570feaff0d3
Reviewed-on: https://chromium-review.googlesource.com/826744
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524182}
[modify] https://crrev.com/dc55847377e035fc4e589993a1c5b70959486407/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/set-expected.txt
[modify] https://crrev.com/dc55847377e035fc4e589993a1c5b70959486407/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/set.html
[modify] https://crrev.com/dc55847377e035fc4e589993a1c5b70959486407/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/080b22b4192d83776e75d9217c4ffcf4789276f2

commit 080b22b4192d83776e75d9217c4ffcf4789276f2
Author: Darren Shen <shend@chromium.org>
Date: Thu Dec 21 06:27:10 2017

[css-typed-om] Implement StylePropertyMap.delete for custom props.

Currently we throw an error when we try to delete a custom property, but
now we implement it correctly.

Bug:  785132 
Change-Id: I9f55cb3ef88690b00e5e87b91e0dd82d27817b33
Reviewed-on: https://chromium-review.googlesource.com/826665
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525632}
[delete] https://crrev.com/d182c05f302ad2e7dddca9dba88a453913a3a8c6/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/delete-expected.txt
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/080b22b4192d83776e75d9217c4ffcf4789276f2/third_party/WebKit/Source/core/dom/Element.h

Comment 14 by shend@chromium.org, Dec 27 2017

Blockedon: 788904
Project Member

Comment 15 by bugdroid1@chromium.org, Jan 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b74d9153d4eb073eaff2832266cb7d839e7db81

commit 0b74d9153d4eb073eaff2832266cb7d839e7db81
Author: Darren Shen <shend@chromium.org>
Date: Tue Jan 02 20:44:09 2018

[css-typed-om] Rename StylePropertyMapReadonly to StylePropertyMapReadOnly

To match the spec:
https://drafts.css-houdini.org/css-typed-om-1/#stylepropertymapreadonly

Bug:  785132 
Change-Id: I0cdd6aa9e4ec1129d272e64cc53d12487e3fb256
Reviewed-on: https://chromium-review.googlesource.com/846159
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Xida Chen <xidachen@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526532}
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/ElementComputedStyleMap.h
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl
[rename] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadOnly.cpp
[rename] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadOnly.h
[rename] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadOnly.idl
[modify] https://crrev.com/0b74d9153d4eb073eaff2832266cb7d839e7db81/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/016b3af16ec902f676be504633f6940bce146134

commit 016b3af16ec902f676be504633f6940bce146134
Author: Darren Shen <shend@chromium.org>
Date: Wed Jan 03 01:38:48 2018

[css-typed-om] Improve performance of StylePropertyMap.set.

This patch refactors StylePropertyMap.set to roughly double its speed:
1) Avoid creating CSSParserContext when possible.
2) Optimise for the common case of setting a non list-valued property.
3) Use CSSProperty as much as possible to avoid conversions between
   CSSPropertyID and CSSProperty.

Bug:  785132 
Change-Id: Ic57615c8414c03871fb57085de92efbb75bd6413
Reviewed-on: https://chromium-review.googlesource.com/838160
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526572}
[modify] https://crrev.com/016b3af16ec902f676be504633f6940bce146134/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Jan 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/efd690f517a0758bd37bb701c3ab84656922fd39

commit efd690f517a0758bd37bb701c3ab84656922fd39
Author: Darren Shen <shend@chromium.org>
Date: Thu Jan 04 01:19:23 2018

[css-typed-om] Implement declared style property map.

Implements style property map for interacting with CSS rules.

The tests are copied from the inline style property map tests,
with the only change being createInlineStyle -> createDeclaredStyle.

Spec: https://drafts.css-houdini.org/css-typed-om-1/#declared-stylepropertymap-objects

Bug:  785132 
Change-Id: I63aedf6d02ccacc506e7a1873c17fecafe466779
Reviewed-on: https://chromium-review.googlesource.com/823508
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526886}
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/resources/testhelper.js
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/append.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/declared.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/delete-expected.txt
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/get.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/getAll.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/getProperties.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/has.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/iterable.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/set-expected.txt
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/set.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/test.html
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/update-expected.txt
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/update.html
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/CSSStyleRule.cpp
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/CSSStyleRule.h
[modify] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/CSSStyleRule.idl
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/cssom/DeclaredStylePropertyMap.cpp
[add] https://crrev.com/efd690f517a0758bd37bb701c3ab84656922fd39/third_party/WebKit/Source/core/css/cssom/DeclaredStylePropertyMap.h

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d44f60321d4350a79389529465f944103a69f3d

commit 4d44f60321d4350a79389529465f944103a69f3d
Author: Darren Shen <shend@chromium.org>
Date: Mon Jan 08 22:54:07 2018

[css-typed-om] Implement set/append/update for custom CSS properties.

Allow StylePropertyMap.set/append/update to take custom properties.
Because registered custom properties haven't shipped, we only allow
custom properties to take CSSUnparsedValues. But once we have types
for custom properties, they can probably take other types of
CSSStyleValues.

Bug:  785132 
Change-Id: I5c4fa92c4791f858866ac726103e55a9e78ae4f2
Reviewed-on: https://chromium-review.googlesource.com/848459
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527793}
[delete] https://crrev.com/049975acdd1ea7b29aadcfdfca266f125f36e3cd/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/set-expected.txt
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/set.html
[delete] https://crrev.com/049975acdd1ea7b29aadcfdfca266f125f36e3cd/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/update-expected.txt
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/update.html
[delete] https://crrev.com/049975acdd1ea7b29aadcfdfca266f125f36e3cd/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/set-expected.txt
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/set.html
[delete] https://crrev.com/049975acdd1ea7b29aadcfdfca266f125f36e3cd/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/update-expected.txt
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/update.html
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/build/scripts/core/css/templates/CSSOMTypes.cpp.tmpl
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/DeclaredStylePropertyMap.cpp
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/DeclaredStylePropertyMap.h
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/4d44f60321d4350a79389529465f944103a69f3d/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h

Project Member

Comment 19 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47ead77cb35ad2a9a83248b292151462a66cd881

commit 47ead77cb35ad2a9a83248b292151462a66cd881
Author: Darren Shen <shend@chromium.org>
Date: Tue Jan 09 22:31:47 2018

[css-typed-om] Don't use ExecutionContext in StylePropertyMap::Update.

Currently StylePropertyMap::Update needs an ExecutionContext because
it needs a CSSParserContext. However, it doesn't actually use the
parser context. This patch refactors Update to not require a parser
context and thus removing the need for an ExecutionContext.

Bug:  785132 
Change-Id: I3e547d30bba5aef66b2215bf6af6654ac64d4417
Reviewed-on: https://chromium-review.googlesource.com/851712
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528139}
[modify] https://crrev.com/47ead77cb35ad2a9a83248b292151462a66cd881/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/declared/update.html
[modify] https://crrev.com/47ead77cb35ad2a9a83248b292151462a66cd881/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/inline/update.html
[modify] https://crrev.com/47ead77cb35ad2a9a83248b292151462a66cd881/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
[modify] https://crrev.com/47ead77cb35ad2a9a83248b292151462a66cd881/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h
[modify] https://crrev.com/47ead77cb35ad2a9a83248b292151462a66cd881/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl

Project Member

Comment 20 by bugdroid1@chromium.org, Jan 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84dbf945f0366566d6adff1255f783b7f4e0cc3b

commit 84dbf945f0366566d6adff1255f783b7f4e0cc3b
Author: Darren Shen <shend@chromium.org>
Date: Wed Jan 10 06:49:59 2018

[css-typed-om] Return CSS variables when iterating computed style map.



Bug:  785132 
Change-Id: Ifa06b7b06af71ecae2bed47a2ebaeef1bdd4574e
Reviewed-on: https://chromium-review.googlesource.com/823507
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528254}
[modify] https://crrev.com/84dbf945f0366566d6adff1255f783b7f4e0cc3b/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/computed/computed-expected.txt
[modify] https://crrev.com/84dbf945f0366566d6adff1255f783b7f4e0cc3b/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/computed/computed.html
[delete] https://crrev.com/b7c48e4a30b083b151c49018b22e54f5e6629bb2/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/computed/getProperties-expected.txt
[delete] https://crrev.com/b7c48e4a30b083b151c49018b22e54f5e6629bb2/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/computed/iterable-expected.txt
[modify] https://crrev.com/84dbf945f0366566d6adff1255f783b7f4e0cc3b/third_party/WebKit/LayoutTests/typedcssom/the-stylepropertymap/computed/iterable.html
[modify] https://crrev.com/84dbf945f0366566d6adff1255f783b7f4e0cc3b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp

Comment 21 by shend@chromium.org, Jan 15 2018

Status: Fixed (was: Started)
Most of this is done. Will close this and file separate issues for any interop bugs we encounter.

Sign in to add a comment