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

Issue 2354463002: CSS Properties and Values API: Implement computation / computational independence (Closed)

Created:
4 years, 3 months ago by Timothy Loh
Modified:
4 years, 3 months ago
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

CSS Properties and Values API: Implement computation / computational independence This patch implements basic computation and computational independence logic for registered custom properties. For now we just handle variable references, length types and lists thereof, while images and transform functions containing lengths will be properly handled later. 'Computationally independent' has recently been renamed from 'computationally idempotent', so the function is updated to match. https://drafts.css-houdini.org/css-properties-values-api/#calculation-of-computed-values https://drafts.css-houdini.org/css-properties-values-api/#computationally-independent BUG=641877 Committed: https://crrev.com/1ed40ebf3aeeb391d0aa2e82c46988ad767c1c35 Cr-Commit-Position: refs/heads/master@{#420328}

Patch Set 1 #

Patch Set 2 : moo #

Patch Set 3 : (no change) #

Total comments: 16

Patch Set 4 : didnt add tests yet #

Patch Set 5 : test #

Total comments: 11

Patch Set 6 : test more #

Total comments: 2

Patch Set 7 : patch for landing #

Patch Set 8 : actually fix test :) #

Messages

Total messages: 39 (13 generated)
Timothy Loh
4 years, 3 months ago (2016-09-19 07:55:15 UTC) #4
sashab
https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp File third_party/WebKit/Source/core/css/PropertyRegistration.cpp (right): https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp#newcode22 third_party/WebKit/Source/core/css/PropertyRegistration.cpp:22: return !toCSSVariableReferenceValue(value).variableDataValue()->needsVariableResolution(); Can variables not have percentages etc in ...
4 years, 3 months ago (2016-09-19 23:25:03 UTC) #5
alancutter (OOO until 2018)
https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp File third_party/WebKit/Source/core/css/PropertyRegistration.cpp (right): https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp#newcode19 third_party/WebKit/Source/core/css/PropertyRegistration.cpp:19: static bool computationallyIndependent(const CSSValue& value) What happens to CSS ...
4 years, 3 months ago (2016-09-20 00:15:55 UTC) #6
alancutter (OOO until 2018)
https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode1120 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:1120: } Do we have tests for this code?
4 years, 3 months ago (2016-09-20 00:39:44 UTC) #7
Timothy Loh
Didn't add tests for computation yet, will do that shortly. https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp File third_party/WebKit/Source/core/css/PropertyRegistration.cpp (right): https://codereview.chromium.org/2354463002/diff/40001/third_party/WebKit/Source/core/css/PropertyRegistration.cpp#newcode19 ...
4 years, 3 months ago (2016-09-21 01:12:05 UTC) #8
Timothy Loh
Computation test added. For now ems are incorrectly resolved based on the parent's font-size, will ...
4 years, 3 months ago (2016-09-21 06:23:42 UTC) #9
sashab
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode1117 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:1117: Length length = primitiveValue.convertToLength(state.cssToLengthConversionData().copyWithAdjustedZoom(1)); I think we should really ...
4 years, 3 months ago (2016-09-22 00:29:22 UTC) #10
Timothy Loh
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode1117 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:1117: Length length = primitiveValue.convertToLength(state.cssToLengthConversionData().copyWithAdjustedZoom(1)); On 2016/09/22 00:29:22, sashab wrote: ...
4 years, 3 months ago (2016-09-22 02:42:48 UTC) #11
sashab
On 2016/09/22 at 02:42:48, timloh wrote: > https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp > File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): > > https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode1117 ...
4 years, 3 months ago (2016-09-22 02:44:30 UTC) #12
alancutter (OOO until 2018)
What does --x compute to in font-size: 10px; --length: 10em; --x: var(--length); ? Do we ...
4 years, 3 months ago (2016-09-22 03:08:43 UTC) #13
Timothy Loh
On 2016/09/22 02:44:30, sashab wrote: > On 2016/09/22 at 02:42:48, timloh wrote: > > > ...
4 years, 3 months ago (2016-09-22 03:49:36 UTC) #14
Timothy Loh
On 2016/09/22 03:08:43, alancutter wrote: > What does --x compute to in > font-size: 10px; ...
4 years, 3 months ago (2016-09-22 06:00:32 UTC) #15
Timothy Loh
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html File third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html#newcode27 third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html:27: <div id=div3></div> On 2016/09/22 03:08:43, alancutter wrote: > Rename ...
4 years, 3 months ago (2016-09-22 06:00:47 UTC) #16
sashab
LGTM once you add the comment explaining why zoom is 1 :) https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp ...
4 years, 3 months ago (2016-09-22 06:02:36 UTC) #17
alancutter (OOO until 2018)
lgtm after comments resolved. https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html File third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html#newcode27 third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html:27: <div id=div3></div> On 2016/09/22 at ...
4 years, 3 months ago (2016-09-22 07:58:41 UTC) #18
Timothy Loh
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html File third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html#newcode27 third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html:27: <div id=div3></div> On 2016/09/22 07:58:41, alancutter wrote: > On ...
4 years, 3 months ago (2016-09-22 08:18:58 UTC) #19
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/2354463002/120001
4 years, 3 months ago (2016-09-22 08:19:15 UTC) #22
alancutter (OOO until 2018)
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html File third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html#newcode27 third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html:27: <div id=div3></div> On 2016/09/22 at 08:18:58, Timothy Loh wrote: ...
4 years, 3 months ago (2016-09-22 08:25:57 UTC) #23
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/2354463002/140001
4 years, 3 months ago (2016-09-22 08:31:37 UTC) #26
Timothy Loh
https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html File third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html (right): https://codereview.chromium.org/2354463002/diff/80001/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html#newcode27 third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html:27: <div id=div3></div> On 2016/09/22 08:25:56, alancutter wrote: > On ...
4 years, 3 months ago (2016-09-22 08:31:43 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/146149)
4 years, 3 months ago (2016-09-22 09:54:41 UTC) #29
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/2354463002/140001
4 years, 3 months ago (2016-09-22 09:55:48 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/297646)
4 years, 3 months ago (2016-09-22 11:42:40 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/2354463002/140001
4 years, 3 months ago (2016-09-22 13:08:38 UTC) #35
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 3 months ago (2016-09-22 14:11:26 UTC) #37
commit-bot: I haz the power
4 years, 3 months ago (2016-09-22 14:19:40 UTC) #39
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1ed40ebf3aeeb391d0aa2e82c46988ad767c1c35
Cr-Commit-Position: refs/heads/master@{#420328}

Powered by Google App Engine
This is Rietveld 408576698