mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01: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_arc::Arc;
|
||||||
use servo_url::ServoUrl;
|
use servo_url::ServoUrl;
|
||||||
use style::attr::AttrValue;
|
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::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration};
|
||||||
use style::selector_parser::PseudoElement;
|
use style::selector_parser::PseudoElement;
|
||||||
use style::shared_lock::Locked;
|
use style::shared_lock::Locked;
|
||||||
|
@ -285,8 +285,14 @@ impl CSSStyleDeclaration {
|
||||||
let quirks_mode = window.Document().quirks_mode();
|
let quirks_mode = window.Document().quirks_mode();
|
||||||
let mut declarations = SourcePropertyDeclaration::new();
|
let mut declarations = SourcePropertyDeclaration::new();
|
||||||
let result = parse_one_declaration_into(
|
let result = parse_one_declaration_into(
|
||||||
&mut declarations, id, &value, &self.owner.base_url(),
|
&mut declarations,
|
||||||
window.css_error_reporter(), ParsingMode::DEFAULT, quirks_mode);
|
id,
|
||||||
|
&value,
|
||||||
|
&self.owner.base_url(),
|
||||||
|
window.css_error_reporter(),
|
||||||
|
ParsingMode::DEFAULT,
|
||||||
|
quirks_mode,
|
||||||
|
);
|
||||||
|
|
||||||
// Step 6
|
// Step 6
|
||||||
match result {
|
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 7
|
||||||
// Step 8
|
// Step 8
|
||||||
*changed = pdb.extend(
|
pdb.update(declarations.drain(), importance, &mut updates);
|
||||||
declarations.drain(),
|
|
||||||
importance,
|
|
||||||
DeclarationPushMode::Update,
|
|
||||||
);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
|
|
@ -53,6 +53,8 @@ files = [
|
||||||
"./components/net/tests/parsable_mime/text",
|
"./components/net/tests/parsable_mime/text",
|
||||||
# Mako does not lend itself easily to splitting long lines
|
# Mako does not lend itself easily to splitting long lines
|
||||||
"./components/style/properties/helpers/animated_properties.mako.rs",
|
"./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.
|
# Helper macro where actually a pseudo-element per line makes sense.
|
||||||
"./components/style/gecko/non_ts_pseudo_class_list.rs",
|
"./components/style/gecko/non_ts_pseudo_class_list.rs",
|
||||||
"./resources/hsts_preload.json",
|
"./resources/hsts_preload.json",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue