Open Bug 1372266 Opened 8 years ago Updated 3 years ago

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

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- ?

People

(Reporter: chenpighead, Unassigned)

References

Details

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
Hi Josh, since you're the author of these changes, we'd like to have your feedback before going any further.
Flags: needinfo?(josh)
Blocks: stylo
Priority: -- → P2
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)
Lower the priority and un-assign myself according to comment 2.
Assignee: jeremychen → nobody
Status: ASSIGNED → NEW
Priority: P2 → P4
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.