New issue
Advanced search Search tips

Issue 779939 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocked on:
issue 788292
issue 788554

Blocking:
issue 545324


Show other hotlists

Hotlists containing this issue:
style-pending
layout-backlog


Sign in to add a comment

Make Custom Properties first-class citizens so they can be handled as a CSS property

Project Member Reported by rjwright@chromium.org, Oct 31 2017

Issue description

This is a sub-task of Project Ribbon.

The code for Custom Property style code is spread throughout the style engine. It follows the same pipeline as normal CSS properties, but is a special case at every stop. The code is ugly, has some bugs in it, and apparently is slow.

We should elevate individual custom properties to the status of a CSS property so that they can be handled by the same or similar code as CSS properties. This means that instead of looking for an ID, finding CSSPropertyVariable (the CSSPropertyID for custom properties), and then looking up the property by name, we can treat the custom property’s name as its ID & handle the custom property like a CSS property.

 
Labels: -Type-Bug Type-Feature
Labels: -Type-Feature Type-Task
Status: Started (was: Assigned)
Project Member

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

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

commit d19bdb4b076865986e5121ca87d40828e581dd1d
Author: Renee Wright <rjwright@chromium.org>
Date: Mon Nov 20 15:46:34 2017

Use CSSProperty in PropertyHandle instead of CSSPropertyID

Also change CSSPropertyValue to take a CSSProperty instead of
a CSSPropertyID.

This is part of Project Ribbon.

This is the first patch in a series which will replace
CSSPropertyID with CSSProperty references in the style
engine wherever possible.

The next patches will propagate this change further out
into the rest of the animation directory, and
CSSPropertyValueSet.

Bug: 779939
Change-Id: I3f30c52a06185933a591d60f080803af72369d72
Reviewed-on: https://chromium-review.googlesource.com/765620
Commit-Queue: Renée Wright <rjwright@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517831}
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSProperty.h.tmpl
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSPropertySubclass.h.tmpl
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/Animation.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/Animation.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/AnimationInputHelpers.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CSSDefaultInterpolationType.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CSSInterpolationType.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CSSVarCycleInterpolationType.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/CompositorAnimations.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/EffectStack.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/EffectStack.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/EffectStackTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/Keyframe.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/KeyframeEffectModelTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/PropertyHandle.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/PropertyHandle.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/PropertyHandleTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/StringKeyframe.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/TransitionInterpolation.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/TransitionKeyframe.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSPropertyValue.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSPropertyValue.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSPropertyValueSet.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/CSSPropertyValueSet.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/FontFaceCacheTest.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
[add] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/properties/longhands/FloodOrStopOpacity.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/editing/EditingStyle.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/html/HTMLFontElement.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp
[modify] https://crrev.com/d19bdb4b076865986e5121ca87d40828e581dd1d/third_party/WebKit/Source/core/style/ComputedStyle.cpp

Blockedon: 788292
Blockedon: 788554
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 28 2017

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

commit b71e4fc98da03642b575bbbbf66dcf6cefb3a475
Author: Renee Wright <rjwright@chromium.org>
Date: Tue Nov 28 10:40:59 2017

Remove some CSSPropertyIDs in StylePropertyShorthand and related

Replace CSSPropertyIDs with CSSProperty references in
StylePropertyShorthand and in closely related methods.


Bug: 779939

Change-Id: I4f8ef90f28dcd7bc9f6192e82723948330e0a791
Reviewed-on: https://chromium-review.googlesource.com/778201
Commit-Queue: Renée Wright <rjwright@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519641}
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSProperty.h.tmpl
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/build/scripts/core/css/templates/StylePropertyShorthand.cpp.tmpl
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/build/scripts/core/css/templates/StylePropertyShorthand.h.tmpl
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/CSSPropertyValueSet.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/CSSPropertyValueSet.h
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/StylePropertySerializer.h
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/CSSPropertyAnimationUtils.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/CSSPropertyBaseCustom.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/shorthands/Animation.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/shorthands/Background.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/shorthands/GridColumn.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/shorthands/GridRow.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/css/properties/shorthands/Transition.cpp
[modify] https://crrev.com/b71e4fc98da03642b575bbbbf66dcf6cefb3a475/third_party/WebKit/Source/core/editing/EditingStyle.cpp

Labels: -Update-Monthly
Owner: e...@chromium.org
Handing over to the new style team. eae@ has the link to the design doc. Feel free to contact me with questions.

Comment 10 by e...@chromium.org, Feb 27 2018

Owner: ----
Status: Available (was: Started)

Sign in to add a comment