mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Reduce the size of ApplicableDeclarationBlock.
The level is a u8, so on 64-bit it packs nicely after the u32 specificity.
This commit is contained in:
parent
3616b8f0c3
commit
6601ae2810
2 changed files with 7 additions and 4 deletions
|
@ -10,6 +10,7 @@ use style::data::{ComputedStyle, ElementData, ElementStyles};
|
|||
use style::gecko::selector_parser as real;
|
||||
use style::properties::ComputedValues;
|
||||
use style::rule_tree::StrongRuleNode;
|
||||
use style::stylist::ApplicableDeclarationBlock;
|
||||
|
||||
#[test]
|
||||
fn size_of_selectors_dummy_types() {
|
||||
|
@ -36,6 +37,8 @@ size_of_test!(test_size_of_element_data, ElementData, 56);
|
|||
|
||||
size_of_test!(test_size_of_property_declaration, style::properties::PropertyDeclaration, 32);
|
||||
|
||||
size_of_test!(test_size_of_application_declaration_block, ApplicableDeclarationBlock, 32);
|
||||
|
||||
// This is huge, but we allocate it on the stack and then never move it,
|
||||
// we only pass `&mut SourcePropertyDeclaration` references around.
|
||||
size_of_test!(test_size_of_parsed_declaration, style::properties::SourcePropertyDeclaration, 704);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue