mirror of
https://github.com/servo/servo.git
synced 2025-07-28 01:30:32 +01:00
Auto merge of #18431 - mbrubeck:pdb-size, r=SimonSapin
Use SmallBitVec to optimize size of PropertyDeclarationBlock https://bugzilla.mozilla.org/show_bug.cgi?id=1398322 <!-- 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/18431) <!-- Reviewable:end -->
This commit is contained in:
commit
e7f45028dc
12 changed files with 146 additions and 125 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