Open Bug 1916584 Opened 1 year ago Updated 1 year ago

[css-properties-values-api] Consider propagating initial value errors

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: zrhoffman, Assigned: zrhoffman)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

PropertyRegistration::validate_initial_value returns the initial value validation failure reason, but if that validation fails when parsing an @property rule, a less informative BasicParseErrorKind::AtRuleBodyInvalid error is returned instead <https://searchfox.org/mozilla-central/rev/8fffdc727aa5/servo/components/style/properties_and_values/rule.rs#92>.

Instead, PropertyRegistrationError should be propagated.

Blocks: 1920365

PropertyInitialValueParseError is also moved to the style_traits crate,
and its variants are documented.

Assignee: nobody → zach
Status: NEW → ASSIGNED

A TODO for bug 1920365 is added, including the custom property name in
@property error messages.

As a drive-by, a nearby comment is also punctuated.

Attachment #9426359 - Attachment description: Bug 1916584 - Add CSS errors for invalid @property initial values. r=flod,nchevobbe,#style → WIP: Bug 1916584 - Add CSS errors for invalid @property initial values. r=flod,nchevobbe,#style
Attachment #9426359 - Attachment description: WIP: Bug 1916584 - Add CSS errors for invalid @property initial values. r=flod,nchevobbe,#style → Bug 1916584 - Add CSS errors for invalid @property initial values. r=flod,nchevobbe,#style
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: