style: Fix indentation of multiple CssParserContext construction.

This commit is contained in:
Emilio Cobos Álvarez 2017-11-27 15:32:34 +01:00
parent 92e9f12bd0
commit 7a5a35f5e0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 132 additions and 103 deletions

View file

@ -309,13 +309,16 @@ impl StylesheetInDocument for DocumentStyleSheet {
impl Stylesheet {
/// Updates an empty stylesheet from a given string of text.
pub fn update_from_str<R>(existing: &Stylesheet,
css: &str,
url_data: UrlExtraData,
stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R,
line_number_offset: u32)
where R: ParseErrorReporter
pub fn update_from_str<R>(
existing: &Stylesheet,
css: &str,
url_data: UrlExtraData,
stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R,
line_number_offset: u32,
)
where
R: ParseErrorReporter,
{
let namespaces = RwLock::new(Namespaces::default());
let (rules, source_map_url, source_url) =
@ -359,14 +362,14 @@ impl Stylesheet {
let mut input = ParserInput::new_with_line_number_offset(css, line_number_offset);
let mut input = Parser::new(&mut input);
let context =
ParserContext::new(
origin,
url_data,
None,
ParsingMode::DEFAULT,
quirks_mode
);
let context = ParserContext::new(
origin,
url_data,
None,
ParsingMode::DEFAULT,
quirks_mode
);
let error_context = ParserErrorContext { error_reporter };
let rule_parser = TopLevelRuleParser {