mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Make PropertyDeclarationBlock::important_count private.
This commit is contained in:
parent
460fd6eba8
commit
da4e5146e9
10 changed files with 183 additions and 219 deletions
|
@ -17,6 +17,7 @@ use style::values::specified::{BorderStyle, BorderWidth, CSSColor, Length, NoCal
|
|||
use style::values::specified::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrAutoOrContent};
|
||||
use style::values::specified::url::SpecifiedUrl;
|
||||
use style_traits::ToCss;
|
||||
use stylesheets::block_from;
|
||||
|
||||
fn parse_declaration_block(css_properties: &str) -> PropertyDeclarationBlock {
|
||||
let url = ServoUrl::parse("http://localhost").unwrap();
|
||||
|
@ -56,10 +57,7 @@ fn property_declaration_block_should_serialize_correctly() {
|
|||
Importance::Normal),
|
||||
];
|
||||
|
||||
let block = PropertyDeclarationBlock {
|
||||
declarations: declarations,
|
||||
important_count: 0,
|
||||
};
|
||||
let block = block_from(declarations);
|
||||
|
||||
let css_string = block.to_css_string();
|
||||
|
||||
|
@ -73,10 +71,7 @@ mod shorthand_serialization {
|
|||
pub use super::*;
|
||||
|
||||
pub fn shorthand_properties_to_string(properties: Vec<PropertyDeclaration>) -> String {
|
||||
let block = PropertyDeclarationBlock {
|
||||
declarations: properties.into_iter().map(|d| (d, Importance::Normal)).collect(),
|
||||
important_count: 0,
|
||||
};
|
||||
let block = block_from(properties.into_iter().map(|d| (d, Importance::Normal)));
|
||||
|
||||
block.to_css_string()
|
||||
}
|
||||
|
@ -882,10 +877,7 @@ mod shorthand_serialization {
|
|||
Importance::Normal)
|
||||
];
|
||||
|
||||
let block = PropertyDeclarationBlock {
|
||||
declarations: declarations,
|
||||
important_count: 0
|
||||
};
|
||||
let block = block_from(declarations);
|
||||
|
||||
let mut s = String::new();
|
||||
|
||||
|
@ -905,10 +897,7 @@ mod shorthand_serialization {
|
|||
Importance::Normal)
|
||||
];
|
||||
|
||||
let block = PropertyDeclarationBlock {
|
||||
declarations: declarations,
|
||||
important_count: 0
|
||||
};
|
||||
let block = block_from(declarations);
|
||||
|
||||
let mut s = String::new();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue