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, Unassigned, NeedInfo)
References
(Blocks 2 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 |
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Updated•9 years ago
|
Updated•9 years ago
|
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Updated•8 years ago
|
| Reporter | ||
Comment 2•7 years ago
|
||
This will control whether or not CSS.registerProperty and
CSS.unregisterProperty are available. Behavior with existing CSS
variables should be the same.
| Reporter | ||
Comment 3•7 years ago
|
||
This increases standards conformance.
| Reporter | ||
Comment 4•7 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
| Reporter | ||
Comment 5•7 years ago
|
||
Depends on D30858
| Reporter | ||
Comment 6•7 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
| Reporter | ||
Comment 7•7 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
| Reporter | ||
Comment 8•7 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
| Reporter | ||
Comment 9•7 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
| Reporter | ||
Comment 10•7 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
| Reporter | ||
Comment 11•7 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
| Reporter | ||
Comment 12•7 years ago
|
||
Depends on D30865
| Reporter | ||
Comment 13•7 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
| Reporter | ||
Comment 14•7 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•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 15•6 years ago
|
||
chrome 78 supported: https://developers.google.com/web/updates/2019/10/nic78
Comment 16•5 years 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•5 years 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.
Comment 18•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:emilio, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Updated•3 years ago
|
Comment 19•2 years ago
|
||
We have recently been using bug 1273706 as a meta bug to track this effort so let's close this. At a glance, support equivalent to what is covered by these patches have already landed (although some pieces could still be useful).
Description
•