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

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed)

Created:
4 years, 11 months ago by meade_UTC10
Modified:
4 years, 8 months ago
Reviewers:
esprehn, Timothy Loh, shans
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rjwright, rwlbuis, shans, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@maps
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Partial implementation of inline StylePropertyMap. - Implemented get, getAll, getProperties, set, append and remove - Basic flow of types implemented: set(styleValue) -> toCSSValue() -> sets in Element.setInlineStyle get() <- makes StyleValue from retrievedCSSValue from Element.inlineStyle.getPropertyCSSValue Spec: https://drafts.css-houdini.org/css-typed-om/#inline-stylepropertymap-objects TODO after this CL: Iteration, custom properties BUG=545318 Committed: https://crrev.com/285b76a05c09b684956fab196db9c11d63d2a726 Cr-Commit-Position: refs/heads/master@{#386551}

Patch Set 1 #

Patch Set 2 : Mostly working, caching not working #

Patch Set 3 : fix bad merge #

Patch Set 4 : sync to head #

Patch Set 5 : Update tests #

Total comments: 36

Patch Set 6 : remove unnessary changes to Element.cpp #

Patch Set 7 : Add more tests #

Patch Set 8 : Don't crash if property is set to null, add test #

Patch Set 9 : Address Tim's comments #

Patch Set 10 : Make m_ownerElement a Member<Element> instead of Element* #

Patch Set 11 : Hide styleMap interface behind flag, add webexposed expectations with flag #

Patch Set 12 : Only retrieve the CSSValue from m_ownerElement if they style is not marked as clean #

Patch Set 13 : Update updatePropertyIfNeeded to get the properties from the other inline style #

Patch Set 14 : update test #

Patch Set 15 : Update to handle percentages and keywords more correctly. #

Patch Set 16 : Fix windows maybe #

Total comments: 1

Patch Set 17 : Update #

Patch Set 18 : Update types to match HEAD #

Patch Set 19 : Sync to head #

Patch Set 20 : Remove spurious file #

Total comments: 30

Patch Set 21 : Update for Tim's comments #

Patch Set 22 : Revert LengthValue.h #

Patch Set 23 : Remove trace on m_ownerElement since it's not garbage collected #

Patch Set 24 : Make m_ownerElement a RefPtrWillBeMember #

Patch Set 25 : Remove caching from InlineStylePropertyMap #

Patch Set 26 : Fix non-oilpan build #

Patch Set 27 : Update to HEAD and remove WillBe types #

Patch Set 28 : Remove missed WillBe type in Element.h and Element.cpp #

Total comments: 20

Patch Set 29 : Address Tim's comments #

Total comments: 8

Patch Set 30 : Address review comments #

Total comments: 8

Patch Set 31 : Add/update more tests, add missing return statement #

Total comments: 4

Patch Set 32 : #

Patch Set 33 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -26 lines) Patch
A third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_append.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getAll.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +48 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_setGet.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +73 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +152 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/MutableStylePropertyMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +45 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2 chunks +16 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 4 chunks +12 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (14 generated)
meade_UTC10
Hey Tim, this isn't finished yet, but could you please take a look and let ...
4 years, 10 months ago (2016-02-05 03:24:57 UTC) #2
Timothy Loh
Direction seems fine. I think we should try and get some performance numbers for e.g. ...
4 years, 10 months ago (2016-02-09 07:29:32 UTC) #3
meade_UTC10
https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h File third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h (right): https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h#newcode17 third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h:17: static bool propertyCanTake(CSSPropertyID id, StyleValue::StyleValueType type) On 2016/02/09 07:29:32, ...
4 years, 10 months ago (2016-02-10 05:55:39 UTC) #4
Timothy Loh
https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h (right): https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h#newcode46 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h:46: Element* m_ownerElement; On 2016/02/10 05:55:39, Eddy wrote: > On ...
4 years, 10 months ago (2016-02-10 06:01:32 UTC) #5
meade_UTC10
https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h (right): https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h#newcode46 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h:46: Element* m_ownerElement; On 2016/02/10 06:01:31, Timothy Loh wrote: > ...
4 years, 10 months ago (2016-02-10 23:45:18 UTC) #6
Timothy Loh
https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h File third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h (right): https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h#newcode17 third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h:17: static bool propertyCanTake(CSSPropertyID id, StyleValue::StyleValueType type) On 2016/02/10 05:55:39, ...
4 years, 10 months ago (2016-02-15 04:41:53 UTC) #9
meade_UTC10
https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h File third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h (right): https://codereview.chromium.org/1590193002/diff/80001/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h#newcode17 third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h:17: static bool propertyCanTake(CSSPropertyID id, StyleValue::StyleValueType type) On 2016/02/15 04:41:53, ...
4 years, 10 months ago (2016-02-16 04:26:51 UTC) #10
dstockwell
https://codereview.chromium.org/1590193002/diff/300001/third_party/WebKit/Source/core/html/HTMLElement.idl File third_party/WebKit/Source/core/html/HTMLElement.idl (right): https://codereview.chromium.org/1590193002/diff/300001/third_party/WebKit/Source/core/html/HTMLElement.idl#newcode60 third_party/WebKit/Source/core/html/HTMLElement.idl:60: [RuntimeEnabled=CSSTypedOM] readonly attribute StylePropertyMap styleMap; This should be defined ...
4 years, 10 months ago (2016-02-25 02:55:08 UTC) #11
meade_UTC10
On 2016/02/25 02:55:08, dstockwell wrote: > https://codereview.chromium.org/1590193002/diff/300001/third_party/WebKit/Source/core/html/HTMLElement.idl > File third_party/WebKit/Source/core/html/HTMLElement.idl (right): > > https://codereview.chromium.org/1590193002/diff/300001/third_party/WebKit/Source/core/html/HTMLElement.idl#newcode60 > ...
4 years, 9 months ago (2016-03-07 04:12:59 UTC) #12
meade_UTC10
Ping Tim - now that the other CL is in, this is ready for proper ...
4 years, 9 months ago (2016-03-22 04:53:04 UTC) #15
Timothy Loh
BTW braces aren't required for single line if statements, I think leaving them out is ...
4 years, 9 months ago (2016-03-23 03:45:09 UTC) #16
meade_UTC10
https://codereview.chromium.org/1590193002/diff/380001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html File third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html (right): https://codereview.chromium.org/1590193002/diff/380001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html#newcode16 third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html:16: testElement.style.width = '10px'; On 2016/03/23 03:45:08, Timothy Loh wrote: ...
4 years, 8 months ago (2016-03-29 06:27:37 UTC) #17
esprehn
What does the spec say about the caching? I thought we were going to always ...
4 years, 8 months ago (2016-03-29 22:13:42 UTC) #19
meade_UTC10
On 2016/03/29 22:13:42, esprehn wrote: > What does the spec say about the caching? I ...
4 years, 8 months ago (2016-03-30 00:54:00 UTC) #20
esprehn
On 2016/03/30 at 00:54:00, meade wrote: > On 2016/03/29 22:13:42, esprehn wrote: > > What ...
4 years, 8 months ago (2016-03-30 00:56:16 UTC) #21
esprehn
ex. var width1 = element.styleMap.get("width"); doSomething(element); var width2 = element.styleMap.get("width"); if (width1 == width2) { ...
4 years, 8 months ago (2016-03-30 01:02:02 UTC) #23
meade_UTC10
On 2016/03/30 01:02:02, esprehn wrote: > ex. > > var width1 = element.styleMap.get("width"); > doSomething(element); ...
4 years, 8 months ago (2016-03-30 05:14:15 UTC) #24
esprehn
On 2016/03/30 at 05:14:15, meade wrote: > On 2016/03/30 01:02:02, esprehn wrote: > > ex. ...
4 years, 8 months ago (2016-03-31 05:04:51 UTC) #25
meade_UTC10
On 2016/03/31 05:04:51, esprehn wrote: > On 2016/03/30 at 05:14:15, meade wrote: > > On ...
4 years, 8 months ago (2016-03-31 05:44:29 UTC) #27
Timothy Loh
https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp (right): https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp#newcode20 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp:20: ASSERT(propertyID != CSSPropertyInvalid); I'm personally not a fan of ...
4 years, 8 months ago (2016-04-05 07:55:04 UTC) #28
meade_UTC10
https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp (right): https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp#newcode20 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp:20: ASSERT(propertyID != CSSPropertyInvalid); On 2016/04/05 07:55:03, Timothy Loh wrote: ...
4 years, 8 months ago (2016-04-06 04:33:13 UTC) #29
Timothy Loh
https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp (right): https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp#newcode20 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp:20: ASSERT(propertyID != CSSPropertyInvalid); On 2016/04/06 04:33:13, Eddy wrote: > ...
4 years, 8 months ago (2016-04-07 03:42:53 UTC) #30
meade_UTC10
https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp (right): https://codereview.chromium.org/1590193002/diff/540001/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp#newcode20 third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp:20: ASSERT(propertyID != CSSPropertyInvalid); On 2016/04/07 03:42:53, Timothy Loh wrote: ...
4 years, 8 months ago (2016-04-07 05:41:30 UTC) #31
Timothy Loh
almost there https://codereview.chromium.org/1590193002/diff/580001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html File third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html (right): https://codereview.chromium.org/1590193002/diff/580001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html#newcode1 third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html:1: <!DOCTYPE html> should probably test case sensitivity ...
4 years, 8 months ago (2016-04-07 06:34:17 UTC) #32
meade_UTC10
https://codereview.chromium.org/1590193002/diff/580001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html File third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html (right): https://codereview.chromium.org/1590193002/diff/580001/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html#newcode1 third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_append.html:1: <!DOCTYPE html> On 2016/04/07 06:34:17, Timothy Loh wrote: > ...
4 years, 8 months ago (2016-04-07 07:15:36 UTC) #33
Timothy Loh
lgtm, but fix up all the argument orders in the tests first https://codereview.chromium.org/1590193002/diff/600001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html ...
4 years, 8 months ago (2016-04-11 01:34:24 UTC) #34
meade_UTC10
https://codereview.chromium.org/1590193002/diff/600001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html (right): https://codereview.chromium.org/1590193002/diff/600001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html#newcode12 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_delete.html:12: assert_equals('80px', testElement.styleMap.get('width').cssString); On 2016/04/11 01:34:24, Timothy Loh wrote: > ...
4 years, 8 months ago (2016-04-11 03:52:16 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1590193002/640001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1590193002/640001
4 years, 8 months ago (2016-04-12 02:01:37 UTC) #40
commit-bot: I haz the power
Committed patchset #33 (id:640001)
4 years, 8 months ago (2016-04-12 02:07:40 UTC) #42
commit-bot: I haz the power
4 years, 8 months ago (2016-04-12 02:08:36 UTC) #44
Message was sent while issue was closed.
Patchset 33 (id:??) landed as
https://crrev.com/285b76a05c09b684956fab196db9c11d63d2a726
Cr-Commit-Position: refs/heads/master@{#386551}

Powered by Google App Engine
This is Rietveld 408576698