Implement multi-value support in StylePropertyMapReadOnly::GetAll
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: janv, Assigned: janv)
References
(Blocks 1 open bug)
Details
Attachments
(7 external files)
StylePropertyMapReadOnly::GetAll currently has a simplified implementation that does not fully support returning multiple values.
This bug aims to improve GetAll to properly handle multi-value reification and return all applicable values for a given property.
| Assignee | ||
Comment 1•8 months ago
|
||
Change Servo_DeclarationBlock_GetPropertyTypedValue and
Servo_ComputedValues_GetPropertyTypedValue to take a CSSPropertyId instead of
nsACString.
This forces callers to resolve and validate the property up front, so these
helpers only fail in unexpected cases. That makes result handling clearer for
follow-up GetAll work, where it is important to distinguish between properties
with no value and unexpected errors.
Some higher-level helpers are updated accordingly. This should also be
slightly more efficient by avoiding repeated property lookup.
| Assignee | ||
Comment 2•8 months ago
|
||
Servo_ComputedValues_GetPropertyTypedValue currently treats custom properties
without implementation support as an unexpected error.
Update the behavior to treat such cases as if the property has no value
instead. This aligns with the intended semantics for GetAll, where it is
important to distinguish between missing values and unexpected failures.
| Assignee | ||
Comment 3•8 months ago
|
||
Now that missing values and unexpected errors are handled separately,
unexpected errors from typed value retrieval helpers can be propagated.
This makes error handling simpler and more consistent.
| Assignee | ||
Comment 4•8 months ago
|
||
StylePropertyMapReadOnly::GetAll previously forwarded to Get, which was
sufficient for some time.
Now that the underlying infrastructure is in place, implement GetAll to
explicitly follow the spec and prepare for returning multiple typed values
from helpers.
| Assignee | ||
Comment 5•8 months ago
|
||
Switch typed value retrieval helpers from returning a single TypedValue to
returning a newly introduced TypedValueList.
This leverages the existing Stylo infrastructure for reifying multiple values
and makes StylePropertyMapReadOnly::GetAll return multiple values when
possible.
The PropertyTypedValue enum is intentionally not renamed in this patch. That
cleanup is done separately to make the core behavior change easier to review.
| Assignee | ||
Comment 6•8 months ago
|
||
Rename PropertyTypedValue to PropertyTypedValueList to reflect that typed
value retrieval now returns multiple values.
This is a follow-up to the previous patch that switched the underlying
representation from TypedValue to TypedValueList.
| Assignee | ||
Updated•7 months ago
|
Comment 8•7 months ago
|
||
| bugherder | ||
Updated•7 months ago
|
| Assignee | ||
Comment 9•7 months ago
|
||
Remove unnecessary uses of unsafe where they can be avoided, and limit the
scope of unsafe blocks where they are still required.
Comment 10•7 months ago
|
||
Comment 12•7 months ago
|
||
| bugherder | ||
Comment 13•7 months ago
|
||
| bugherder | ||
Comment 15•7 months ago
|
||
Comment 16•7 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•7 months ago
|
Comment 17•7 months ago
|
||
Comment 18•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/73f04f0aa7a0
https://hg.mozilla.org/mozilla-central/rev/26b19d11f6e2
Updated•6 months ago
|
Description
•