aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/parser.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-10-19 16:15:48 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-10-24 12:30:20 +0200
commit066de9f8d20ec6c7cad1faa3f94227f7d10be14e (patch)
treedd8c7276b7f78ab3cdb17ee153c427a1ff27ae7a /components/style/parser.rs
parent2bcb3b4ca999b626511019161a1b7dbe548b0105 (diff)
downloadservo-066de9f8d20ec6c7cad1faa3f94227f7d10be14e.tar.gz
servo-066de9f8d20ec6c7cad1faa3f94227f7d10be14e.zip
style: Minimal ParserContext cleanup.
MozReview-Commit-ID: I1Qgy1W7azU
Diffstat (limited to 'components/style/parser.rs')
-rw-r--r--components/style/parser.rs29
1 files changed, 16 insertions, 13 deletions
diff --git a/components/style/parser.rs b/components/style/parser.rs
index 6e08d937b76..f3d87b90648 100644
--- a/components/style/parser.rs
+++ b/components/style/parser.rs
@@ -69,13 +69,13 @@ impl<'a> ParserContext<'a> {
rule_type: Option<CssRuleType>,
parsing_mode: ParsingMode,
quirks_mode: QuirksMode,
- ) -> ParserContext<'a> {
+ ) -> Self {
ParserContext {
- stylesheet_origin: stylesheet_origin,
- url_data: url_data,
- rule_type: rule_type,
- parsing_mode: parsing_mode,
- quirks_mode: quirks_mode,
+ stylesheet_origin,
+ url_data,
+ rule_type,
+ parsing_mode,
+ quirks_mode,
namespaces: None,
}
}
@@ -85,8 +85,8 @@ impl<'a> ParserContext<'a> {
url_data: &'a UrlExtraData,
rule_type: Option<CssRuleType>,
parsing_mode: ParsingMode,
- quirks_mode: QuirksMode
- ) -> ParserContext<'a> {
+ quirks_mode: QuirksMode,
+ ) -> Self {
Self::new(
Origin::Author,
url_data,
@@ -118,11 +118,14 @@ impl<'a> ParserContext<'a> {
}
/// Record a CSS parse error with this context’s error reporting.
- pub fn log_css_error<R>(&self,
- context: &ParserErrorContext<R>,
- location: SourceLocation,
- error: ContextualParseError)
- where R: ParseErrorReporter
+ pub fn log_css_error<R>(
+ &self,
+ context: &ParserErrorContext<R>,
+ location: SourceLocation,
+ error: ContextualParseError,
+ )
+ where
+ R: ParseErrorReporter,
{
let location = SourceLocation {
line: location.line,