mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update to smallbitvec 2.1
This commit is contained in:
parent
5081755418
commit
e3f79d9130
5 changed files with 20 additions and 21 deletions
|
@ -426,15 +426,14 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
// https://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
||||
fn IndexedGetter(&self, index: u32) -> Option<DOMString> {
|
||||
self.owner.with_block(|pdb| {
|
||||
pdb.declarations().get(index as usize).map(|declaration| {
|
||||
let important = pdb.declarations_importance().get(index);
|
||||
let mut css = String::new();
|
||||
declaration.to_css(&mut css).unwrap();
|
||||
if important {
|
||||
css += " !important";
|
||||
}
|
||||
DOMString::from(css)
|
||||
})
|
||||
let declaration = pdb.declarations().get(index as usize)?;
|
||||
let important = pdb.declarations_importance().get(index as usize)?;
|
||||
let mut css = String::new();
|
||||
declaration.to_css(&mut css).unwrap();
|
||||
if important {
|
||||
css += " !important";
|
||||
}
|
||||
Some(DOMString::from(css))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue