mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20662 - mbrubeck:smallbitvec, r=nox
Update to smallbitvec 2.1 --- - [x] `./mach build -d` does not report any errors - [x] `./mach build-geckolib` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because covered by existing tests <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20662) <!-- Reviewable:end -->
This commit is contained in:
commit
3695fc4efc
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