stylo: consider returning 'InvalidValue' error while parsing invalid values

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
P4
normal
a month ago
4 days ago

People

(Reporter: jeremychen, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a month ago
Currently, we return StyleParseError::UnspecifiedError [1] for invalid values in many places. However, the actual error is that we're parsing invalid values. Xidorn suggests maybe we could use something like PropertyDeclarationParseError::InvalidValue instead.


[1] http://searchfox.org/mozilla-central/rev/d840ebd5858a61dbc1622487c1fab74ecf235e03/servo/components/style/properties/longhand/font.mako.rs#1563
(Reporter)

Comment 1

a month ago
Hi Josh, since you're the author of these changes, we'd like to have your feedback before going any further.
Flags: needinfo?(josh)
(Reporter)

Updated

a month ago
Blocks: 1243581
Priority: -- → P2

Comment 2

a month ago
UnspecifiedError is intended as a placeholder for code that could benefit from returning more specific errors indicating what actually went wrong. I do not think that returning StyleParseError::PropertyValue(PropertyValueParseError::InvalidValue) will be a meaningful improvement at the moment, however.
Flags: needinfo?(josh)
(Reporter)

Comment 3

4 days ago
Lower the priority and un-assign myself according to comment 2.
Assignee: jeremychen → nobody
Status: ASSIGNED → NEW
Priority: P2 → P4
You need to log in before you can comment on or make changes to this bug.