mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Match on PropertyId (not strings) to parse a declaration.
This commit is contained in:
parent
58d452fa4e
commit
433c33c4df
6 changed files with 49 additions and 42 deletions
|
@ -165,8 +165,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
}
|
||||
|
||||
// Step 3
|
||||
// FIXME: give ownership on `property` here when parse_one_declaration can take &PropertyId
|
||||
let id = if let Ok(id) = PropertyId::parse((&*property).into()) {
|
||||
let id = if let Ok(id) = PropertyId::parse(property.into()) {
|
||||
id
|
||||
} else {
|
||||
// Unkwown property
|
||||
|
@ -203,7 +202,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
// Step 6
|
||||
let window = window_from_node(&*self.owner);
|
||||
let declarations =
|
||||
parse_one_declaration(&property, &value, &window.get_url(), window.css_error_reporter(),
|
||||
parse_one_declaration(id, &value, &window.get_url(), window.css_error_reporter(),
|
||||
ParserContextExtraData::default());
|
||||
|
||||
// Step 7
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue