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

Issue 2366313006: CSS Properties and Values API: Support non-inherited custom properties (Closed)

Created:
4 years, 2 months ago by Timothy Loh
Modified:
4 years, 2 months ago
Reviewers:
meade_UTC10
CC:
chromium-reviews, caseq+blink_chromium.org, blink-reviews-style_chromium.org, blink-reviews-css, devtools-reviews_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, kozyatinskiy+blink_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CSS Properties and Values API: Support non-inherited custom properties This patch adds supports for registering non-inherited properties. These properties are stored in a new class StyleNonInheritedVariables, similar to StyleVariableData (now renamed to StyleInheritedVariables). The new class differs in a couple of ways: it is not RefCounted and there is no root optimisation (this wouldn't make sense anyway). This patch fixes a bug in the getter on StyleInheritedVariables for registered properties where we wouldn't check the root node. This is covered by the added tests. Non-inherited custom properties are not yet supported for the devtools computed styles pane and @apply rules, and todos are added in relevant places in the code. BUG=641877 Committed: https://crrev.com/864454fb784c52c1202410dc28799c8dc0f9ad0c Cr-Commit-Position: refs/heads/master@{#421776}

Patch Set 1 #

Patch Set 2 : moo #

Total comments: 6

Patch Set 3 : use de morgan's law #

Unified diffs Side-by-side diffs Delta from patch set Stats (+392 lines, -264 lines) Patch
A third_party/WebKit/LayoutTests/custom-properties/registered-properties-inheritance.html View 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 chunks +14 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/PropertyRegistry.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp View 4 chunks +41 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 2 chunks +63 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/BUILD.gn View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 2 chunks +19 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 3 chunks +64 lines, -25 lines 0 comments Download
A + third_party/WebKit/Source/core/style/StyleInheritedVariables.h View 1 2 chunks +13 lines, -13 lines 0 comments Download
A + third_party/WebKit/Source/core/style/StyleInheritedVariables.cpp View 5 chunks +17 lines, -7 lines 0 comments Download
A third_party/WebKit/Source/core/style/StyleNonInheritedVariables.h View 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/style/StyleNonInheritedVariables.cpp View 1 chunk +47 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp View 5 chunks +5 lines, -1 line 0 comments Download
D third_party/WebKit/Source/core/style/StyleVariableData.h View 1 chunk +0 lines, -52 lines 0 comments Download
D third_party/WebKit/Source/core/style/StyleVariableData.cpp View 1 chunk +0 lines, -80 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (6 generated)
Timothy Loh
4 years, 2 months ago (2016-09-27 07:49:38 UTC) #2
meade_UTC10
lgtm https://codereview.chromium.org/2366313006/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2366313006/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode811 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:811: || (declaration.id() == CSSValueUnset && (!registration || registration->inherits())); ...
4 years, 2 months ago (2016-09-28 04:23:29 UTC) #3
Timothy Loh
https://codereview.chromium.org/2366313006/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/2366313006/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode811 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:811: || (declaration.id() == CSSValueUnset && (!registration || registration->inherits())); On ...
4 years, 2 months ago (2016-09-29 06:18:09 UTC) #4
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/2366313006/40001
4 years, 2 months ago (2016-09-29 06:18:28 UTC) #7
commit-bot: I haz the power
Exceeded global retry quota
4 years, 2 months ago (2016-09-29 07:45:39 UTC) #9
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/2366313006/40001
4 years, 2 months ago (2016-09-29 07:46:57 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-09-29 08:00:41 UTC) #12
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 08:03:40 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/864454fb784c52c1202410dc28799c8dc0f9ad0c
Cr-Commit-Position: refs/heads/master@{#421776}

Powered by Google App Engine
This is Rietveld 408576698