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

NEW
Unassigned

Status

()

P4
normal
2 years ago
a year ago

People

(Reporter: jeremychen, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Points:
---

Firefox Tracking Flags

(firefox57 wontfix, firefox58 wontfix, firefox59 ?)

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)
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
status-firefox57: --- → wontfix
status-firefox58: --- → fix-optional
You need to log in before you can comment on or make changes to this bug.