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

Issue 2403423002: [CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths (Closed)

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

Description

[CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths Makes Typed CSSOM Computed StylePropertyMap values reflect computed style values instead of resolved style values (as are returned by getComputedStyle) for some length-type properties (top, left, bottom, right, width, & height). For all other properties we get a value from ComputedStyleCSSValueMapping::get, and convert it to a CSSStyleValue using StyleValueFactory. These values may have undergone zoom- adjustment and other alterations in ComputedStyleCSSValueMapping. I may do a follow-up patch to add an option to ComputedStyleCSSValueMapping::get for retrieving raw values. We considered returning an CSSUnsupportedValue object (with cssText from ComputedStyleCSSValueMapping) for unsupported properties. However the custom paint code is already relying on this API, and changing to CSSUnsupportedValues broke some of their layout tests. I've decided to leave the CSSStyleValues in place for now as a best approximation to true computed style. BUG=648495 Review-Url: https://codereview.chromium.org/2403423002 Cr-Commit-Position: refs/heads/master@{#446731} Committed: https://chromium.googlesource.com/chromium/src/+/738869d74b447a741a2e8a5cb95f5c49e12459f0

Patch Set 1 #

Patch Set 2 : Re-calculate 'node' wherever it may have changed. Not sure if this is sensible. #

Patch Set 3 : got pseudoelements working #

Patch Set 4 : rebase. check document before using. remove force-full-layout section. #

Patch Set 5 : auto-format #

Patch Set 6 : add test for left #

Patch Set 7 : remove unnecessary change #

Total comments: 8

Patch Set 8 : review comments #

Patch Set 9 : get style map after documents is ready #

Patch Set 10 : get computed style map before steps #

Total comments: 1

Patch Set 11 : review comments #

Total comments: 13

Patch Set 12 : sasha's comments #

Total comments: 4

Patch Set 13 : rebased #

Patch Set 14 : fix rebase derp #

Patch Set 15 : squash and rebase #

Patch Set 16 : Use StyleValueFactory & ComputedStyleCSSValueMapping for unsupported #

Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -86 lines) Patch
M third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
A third_party/WebKit/LayoutTests/typedcssom/computedstyle/left.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/computedstyle/pseudo-elements.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +42 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/computedstyle/width.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +37 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSCalcLength.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSCalcLength.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h View 1 2 3 4 3 chunks +17 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +113 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.h View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMapTest.cpp View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 59 (30 generated)
rjwright
4 years ago (2016-12-08 03:58:44 UTC) #3
meade_UTC10
Minor comments only. Otherwise lgtm. https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html File third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html (left): https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html#oldcode34 third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html:34: }, 'Properties retrieved from ...
4 years ago (2016-12-08 23:22:15 UTC) #6
rjwright
On 2016/12/08 23:22:15, Eddy wrote: > Minor comments only. Otherwise lgtm. > > https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html > ...
4 years ago (2016-12-22 06:58:53 UTC) #7
meade_UTC10
https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html File third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html (left): https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html#oldcode34 third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html:34: }, 'Properties retrieved from ComputedStyleMap reflect the same values ...
3 years, 11 months ago (2017-01-05 03:43:45 UTC) #8
rjwright
On 2017/01/05 03:43:45, Eddy wrote: > https://codereview.chromium.org/2403423002/diff/120001/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html > File > third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html > (left): > > ...
3 years, 11 months ago (2017-01-06 08:08:40 UTC) #9
meade_UTC10
lgtm
3 years, 11 months ago (2017-01-09 00:47:35 UTC) #10
sashab
Definitely on the right track, only small things left. https://codereview.chromium.org/2403423002/diff/200001/third_party/WebKit/LayoutTests/TestExpectations File third_party/WebKit/LayoutTests/TestExpectations (right): https://codereview.chromium.org/2403423002/diff/200001/third_party/WebKit/LayoutTests/TestExpectations#newcode1870 third_party/WebKit/LayoutTests/TestExpectations:1870: ...
3 years, 11 months ago (2017-01-09 02:19:04 UTC) #11
rjwright
On 2017/01/09 02:19:04, sashab wrote: > Definitely on the right track, only small things left. ...
3 years, 11 months ago (2017-01-16 10:17:53 UTC) #14
sashab
https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h File third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h (right): https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h#newcode52 third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h:52: Member<Node> m_node; Basically here's how I feel about passing ...
3 years, 11 months ago (2017-01-17 01:12:38 UTC) #15
sashab
Sorry, that came across a bit harsh. Didn't intend it that way. Happy to discuss ...
3 years, 11 months ago (2017-01-17 01:18:41 UTC) #16
sashab
Sorry, that came across a bit harsh. Didn't intend it that way. Happy to discuss ...
3 years, 11 months ago (2017-01-17 01:18:41 UTC) #17
rjwright
On 2017/01/17 01:18:41, sashab wrote: > Sorry, that came across a bit harsh. Didn't intend ...
3 years, 11 months ago (2017-01-24 00:18:39 UTC) #18
sashab
lgtm https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp (right): https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp#newcode70 third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp:70: node = this->node(); Duplicate line; not needed https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp#newcode81 ...
3 years, 11 months ago (2017-01-24 02:27:00 UTC) #19
rjwright
https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp File third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp (right): https://codereview.chromium.org/2403423002/diff/220001/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp#newcode81 third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp:81: node = this->node(); On 2017/01/24 02:27:00, sashab wrote: > ...
3 years, 11 months ago (2017-01-25 00:14:11 UTC) #20
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/2403423002/260001
3 years, 11 months ago (2017-01-25 01:05:40 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/141695) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-25 01:09:36 UTC) #25
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/2403423002/260001
3 years, 11 months ago (2017-01-25 02:28:20 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/141772) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-25 02:31:41 UTC) #33
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/2403423002/280001
3 years, 11 months ago (2017-01-25 21:29:58 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/350324)
3 years, 11 months ago (2017-01-25 21:43:57 UTC) #38
rjwright
Hey Haraken, I need an owner's review for the change in third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp. Feel free to ...
3 years, 11 months ago (2017-01-25 22:06:25 UTC) #40
haraken
LGTM
3 years, 11 months ago (2017-01-25 22:27:08 UTC) #41
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/2403423002/280001
3 years, 11 months ago (2017-01-25 22:58:09 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/376262)
3 years, 11 months ago (2017-01-26 00:03:51 UTC) #45
rjwright
On 2017/01/26 00:03:51, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 11 months ago (2017-01-26 23:44:27 UTC) #49
meade_UTC10
Seems fine to me.
3 years, 11 months ago (2017-01-27 06:18:49 UTC) #52
meade_UTC10
lgtm
3 years, 11 months ago (2017-01-27 06:19:03 UTC) #53
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/2403423002/300001
3 years, 10 months ago (2017-01-27 19:12:26 UTC) #56
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 19:17:59 UTC) #59
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/738869d74b447a741a2e8a5cb95f...

Powered by Google App Engine
This is Rietveld 408576698