mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Box gradients and rects in Image. r=xidorn
Gradients and rects are rare, and large. Image is much smaller with them boxed. This is part of of the fix for Gecko bug 1397614 <https://bugzilla.mozilla.org/show_bug.cgi?id=1397614>
This commit is contained in:
parent
91b748ec22
commit
26b39241f9
4 changed files with 65 additions and 13 deletions
|
@ -11,6 +11,8 @@ use style::data::{ElementData, ElementStyles, RestyleData};
|
|||
use style::gecko::selector_parser as real;
|
||||
use style::properties::ComputedValues;
|
||||
use style::rule_tree::{RuleNode, StrongRuleNode};
|
||||
use style::values::computed;
|
||||
use style::values::specified;
|
||||
|
||||
#[test]
|
||||
fn size_of_selectors_dummy_types() {
|
||||
|
@ -47,3 +49,11 @@ size_of_test!(test_size_of_rule_node, RuleNode, 80);
|
|||
// 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);
|
||||
|
||||
size_of_test!(test_size_of_computed_image, computed::image::Image, 40);
|
||||
size_of_test!(test_size_of_specified_image, specified::image::Image, 40);
|
||||
|
||||
// FIXME(bz): These can shrink if we move the None_ value inside the
|
||||
// enum instead of paying an extra word for the Either discriminant.
|
||||
size_of_test!(test_size_of_computed_image_layer, computed::image::ImageLayer, 48);
|
||||
size_of_test!(test_size_of_specified_image_layer, specified::image::ImageLayer, 48);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue