mirror of
https://github.com/servo/servo.git
synced 2025-06-18 13:24:29 +00:00
Use SmallBitVec for important flags in PDB
This commit is contained in:
parent
21006fb752
commit
a5a0e9ffe8
7 changed files with 129 additions and 114 deletions
|
@ -410,10 +410,10 @@ 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(|entry| {
|
||||
let (ref declaration, importance) = *entry;
|
||||
pdb.declarations().get(index as usize).map(|declaration| {
|
||||
let important = pdb.declarations_importance().get(index);
|
||||
let mut css = declaration.to_css_string();
|
||||
if importance.important() {
|
||||
if important {
|
||||
css += " !important";
|
||||
}
|
||||
DOMString::from(css)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue