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:
bors-servo 2017-09-11 08:57:07 -05:00 committed by GitHub
commit e7f45028dc
12 changed files with 146 additions and 125 deletions

View file

@ -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)