aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/servo/media_queries.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/servo/media_queries.rs')
-rw-r--r--components/style/servo/media_queries.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs
index 336971f98df..14dec24b261 100644
--- a/components/style/servo/media_queries.rs
+++ b/components/style/servo/media_queries.rs
@@ -170,9 +170,9 @@ pub enum ExpressionKind {
/// <http://dev.w3.org/csswg/mediaqueries-3/#media1>
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
-pub struct Expression(pub ExpressionKind);
+pub struct MediaFeatureExpression(pub ExpressionKind);
-impl Expression {
+impl MediaFeatureExpression {
/// The kind of expression we're, just for unit testing.
///
/// Eventually this will become servo-only.
@@ -196,7 +196,7 @@ impl Expression {
let name = input.expect_ident_cloned()?;
input.expect_colon()?;
// TODO: Handle other media features
- Ok(Expression(match_ignore_ascii_case! { &name,
+ Ok(MediaFeatureExpression(match_ignore_ascii_case! { &name,
"min-width" => {
ExpressionKind::Width(Range::Min(specified::Length::parse_non_negative(context, input)?))
},
@@ -206,7 +206,7 @@ impl Expression {
"width" => {
ExpressionKind::Width(Range::Eq(specified::Length::parse_non_negative(context, input)?))
},
- _ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
+ _ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name)))
}))
})
}
@@ -228,7 +228,7 @@ impl Expression {
}
}
-impl ToCss for Expression {
+impl ToCss for MediaFeatureExpression {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
@@ -246,8 +246,8 @@ impl ToCss for Expression {
/// An enumeration that represents a ranged value.
///
-/// Only public for testing, implementation details of `Expression` may change
-/// for Stylo.
+/// Only public for testing, implementation details of `MediaFeatureExpression`
+/// may change for Stylo.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
pub enum Range<T> {