mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Fix build and tidy.
This commit is contained in:
parent
1716259a3a
commit
9118dd838e
2 changed files with 20 additions and 8 deletions
|
@ -17,7 +17,7 @@ use dom_struct::dom_struct;
|
|||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
use style::properties::{DeclarationPushMode, Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId};
|
||||
use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId};
|
||||
use style::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration};
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style::shared_lock::Locked;
|
||||
|
@ -285,8 +285,14 @@ impl CSSStyleDeclaration {
|
|||
let quirks_mode = window.Document().quirks_mode();
|
||||
let mut declarations = SourcePropertyDeclaration::new();
|
||||
let result = parse_one_declaration_into(
|
||||
&mut declarations, id, &value, &self.owner.base_url(),
|
||||
window.css_error_reporter(), ParsingMode::DEFAULT, quirks_mode);
|
||||
&mut declarations,
|
||||
id,
|
||||
&value,
|
||||
&self.owner.base_url(),
|
||||
window.css_error_reporter(),
|
||||
ParsingMode::DEFAULT,
|
||||
quirks_mode,
|
||||
);
|
||||
|
||||
// Step 6
|
||||
match result {
|
||||
|
@ -297,13 +303,17 @@ impl CSSStyleDeclaration {
|
|||
}
|
||||
}
|
||||
|
||||
let mut updates = Default::default();
|
||||
*changed =
|
||||
pdb.prepare_for_update(&declarations, importance, &mut updates);
|
||||
|
||||
if !*changed {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// Step 7
|
||||
// Step 8
|
||||
*changed = pdb.extend(
|
||||
declarations.drain(),
|
||||
importance,
|
||||
DeclarationPushMode::Update,
|
||||
);
|
||||
pdb.update(declarations.drain(), importance, &mut updates);
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
|
|
@ -53,6 +53,8 @@ files = [
|
|||
"./components/net/tests/parsable_mime/text",
|
||||
# Mako does not lend itself easily to splitting long lines
|
||||
"./components/style/properties/helpers/animated_properties.mako.rs",
|
||||
# Long regexes are long.
|
||||
"./components/style/gecko/regen_atoms.py",
|
||||
# Helper macro where actually a pseudo-element per line makes sense.
|
||||
"./components/style/gecko/non_ts_pseudo_class_list.rs",
|
||||
"./resources/hsts_preload.json",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue