mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
style: Move property allowance tests to PropertyId::parse_into.
It's not only more consistent (since we have a proper ParserContext there), but also fixes a bunch of bugs where Gecko accidentally exposes and allows setting internal state because of conversions from nsCSSPropertyID to PropertyId. This adds the extra complexity of caring about aliases for longer, but that's probably not a big deal in practice, since we also have PropertyDeclarationId. MozReview-Commit-ID: C2Js8PfloxQ
This commit is contained in:
parent
5905f8d3ea
commit
8de554f334
9 changed files with 137 additions and 135 deletions
|
@ -742,7 +742,7 @@ impl LayoutThread {
|
|||
Msg::RegisterPaint(name, mut properties, painter) => {
|
||||
debug!("Registering the painter");
|
||||
let properties = properties.drain(..)
|
||||
.filter_map(|name| PropertyId::parse(&*name, None)
|
||||
.filter_map(|name| PropertyId::parse(&*name)
|
||||
.ok().map(|id| (name.clone(), id)))
|
||||
.filter(|&(_, ref id)| id.as_shorthand().is_err())
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue