Implement CSS Properties & Values in Firefox, via Stylo/Servo
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: jyc, Assigned: jyc, NeedInfo)
References
(Blocks 3 open bugs)
Details
Attachments
(11 files, 2 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This bug is going to track progress on implementing CSS Houdini "Properties and Values" (https://drafts.css-houdini.org/css-properties-values-api/) via Servo. The relevant Servo bug is https://github.com/servo/servo/issues/17155.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•3 years ago
|
||
status-firefox57=wontfix unless someone thinks this bug should block 57
Updated•3 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
This will control whether or not CSS.registerProperty and
CSS.unregisterProperty are available. Behavior with existing CSS
variables should be the same.
Assignee | ||
Comment 3•2 years ago
|
||
This increases standards conformance.
Assignee | ||
Comment 4•2 years ago
|
||
This will control whether or not CSS.registerProperty and
CSS.unregisterProperty are available. Behavior with existing CSS
variables should be the same.
Depends on D30857
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D30858
Assignee | ||
Comment 6•2 years ago
|
||
Add a new ExtraData enum. We carry it along with a custom property's
specified value in order to compute it, if it ends up being registered
as being able to contain URLs through Properties & Values. When the
specified value comes from a declaration, we keep track of the
associated UrlExtraData in the Specified variant. However, specified
values will also be able to come from animations: in that case we will
eventually (when we add support for registered custom properties to
animations) be able to carry along a copy of the computed value in the
Precomputed variant, to save us from recomputation and also to save us
from having to re-resolve the URL.
The properties_and_values module is addded by a later patch in this
series, so we omit the Precomputed variant for now.
Depends on D30859
Assignee | ||
Comment 7•2 years ago
|
||
Typed custom properties are exactly the same as regular custom
properties except when it comes to inheritance, computed values, and
animation, so this module is intended to be as independent from
custom_properties as possible (they do use types from each other,
though, where it would be clumsy to do otherwise).
This commit doesn't hook up the module to anything: that's handled by
later patches in this series.
Depends on D30860
Assignee | ||
Comment 8•2 years ago
|
||
Currently a CustomPropertiesMap parameterizes custom property
substitution (e.g. through substitute_references_in_value) and
resolution (through substitute_all).
To make the extensions introduced for registered custom property
substitution/resolution more clear, abstract out the concept of a
substitution map used for substitution and a resolution map used for
resolution.
This allows the implementation (in two modules, custom_properties and
properties_and_values) to somewhat mirror the specification (in CSS
Variables and CSS Properties and Values), in that the second ostensibly
extends and does not replace the first.
This commit should not change any existing behavior. A future patch in
this series will use these traits to implement registered custom
property substitution and resolution.
Depends on D30861
Assignee | ||
Comment 9•2 years ago
|
||
These are implementations of SubstitutionMap and ResolutionMap,
introduced in the previous commit, that perform registered custom
property substitution/resolution as specified in CSS Properties & Values.
They are used in a later patch in this series.
Depends on D30862
Assignee | ||
Comment 10•2 years ago
|
||
CSS Properties and Values specifies that the 'property set' containing
registered custom properties lives on the Document.1 Attach it to the
Stylist here so that it can be used during the cascade and computation.
The attached property set is actually used in a later patch in this
series.
Depends on D30863
Assignee | ||
Comment 11•2 years ago
|
||
The registered property set is necessary to resolve variable references
to registered custom properties without declarations and with initial
values.
Depends on D30864
Assignee | ||
Comment 12•2 years ago
|
||
Depends on D30865
Assignee | ||
Comment 13•2 years ago
|
||
The initial value for unregistered custom properties is the (invalid)
empty token stream. We also store the (possibly non-empty) initial value
of registered custom properties this way. This means that during
variable substitution and access through CSSOM, we must return the
initial value that was registered, if any, rather than the stored empty
value. We already implement the former; now implement the latter.
Depends on D30866
Assignee | ||
Comment 14•2 years ago
|
||
The tests that fail are those that involve:
- animations (not implemented)
- integer calc()s
- serialization of certain values (colors, degrees, resolutions)
Depends on D30867
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 15•1 year ago
|
||
chrome 78 supported: https://developers.google.com/web/updates/2019/10/nic78
Comment 16•3 months ago
|
||
As far as I can see, the patches attached here are meant to add the code to register custom properties and implement the JavaScript APIs around that features. Though they do not cover the declarative version via the @property
CSS rule.
Because the changes here are already bigger, I assume a separate bug should be filed for implementing that rule, right?
Sebastian
Comment 17•3 months ago
|
||
Yes, feel free to file a separate bug if you'd like to track that outside of this bug. It'd depend on this one though.
Description
•