aboutsummaryrefslogtreecommitdiffstats
path: root/components/style
diff options
context:
space:
mode:
Diffstat (limited to 'components/style')
-rw-r--r--components/style/build.rs3
-rw-r--r--components/style/legacy.rs22
-rw-r--r--components/style/properties.mako.rs27
-rw-r--r--components/style/viewport.rs3
4 files changed, 29 insertions, 26 deletions
diff --git a/components/style/build.rs b/components/style/build.rs
index 80965f329f5..76d58e81264 100644
--- a/components/style/build.rs
+++ b/components/style/build.rs
@@ -22,7 +22,8 @@ fn main() {
.env("PYTHONPATH", &mako)
.env("TEMPLATE", &template)
.arg("-c")
- .arg("from os import environ; from mako.template import Template; print(Template(filename=environ['TEMPLATE']).render())")
+ .arg("from os import environ; from mako.template import Template;\
+ print(Template(filename=environ['TEMPLATE']).render())")
.stderr(Stdio::inherit())
.output()
.unwrap();
diff --git a/components/style/legacy.rs b/components/style/legacy.rs
index 4d5123ff187..bf8e42c228d 100644
--- a/components/style/legacy.rs
+++ b/components/style/legacy.rs
@@ -33,24 +33,18 @@ pub trait PresentationalHintSynthesis {
/// you don't, you risk strange random nondeterministic failures due to false positives in
/// style sharing.
fn synthesize_presentational_hints_for_legacy_attributes<'a,N,V>(
- &self,
- node: &N,
- matching_rules_list: &mut V,
- shareable: &mut bool)
- where N: TNode<'a>,
- N::Element: TElementAttributes<'a>,
- V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
+ &self, node: &N, matching_rules_list: &mut V, shareable: &mut bool)
+ where N: TNode<'a>,
+ N::Element: TElementAttributes<'a>,
+ V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
}
impl PresentationalHintSynthesis for Stylist {
fn synthesize_presentational_hints_for_legacy_attributes<'a,N,V>(
- &self,
- node: &N,
- matching_rules_list: &mut V,
- shareable: &mut bool)
- where N: TNode<'a>,
- N::Element: TElementAttributes<'a>,
- V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
+ &self, node: &N, matching_rules_list: &mut V, shareable: &mut bool)
+ where N: TNode<'a>,
+ N::Element: TElementAttributes<'a>,
+ V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
let element = node.as_element();
let length = matching_rules_list.len();
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index 518ce6dd542..69d14fad990 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -567,8 +567,8 @@ pub mod longhands {
}
SpecifiedValue::Number(value) => computed_value::T::Number(value),
SpecifiedValue::Percentage(value) => {
- computed_value::T::Length(
- specified::Length::FontRelative(specified::FontRelativeLength::Em(value)).to_computed_value(context))
+ let fr = specified::Length::FontRelative(specified::FontRelativeLength::Em(value));
+ computed_value::T::Length(fr.to_computed_value(context))
}
}
}
@@ -1134,8 +1134,9 @@ pub mod longhands {
// CSS 2.1, Section 14 - Colors and Backgrounds
${new_style_struct("Background", is_inherited=False)}
- ${predefined_type("background-color", "CSSColor",
- "::cssparser::Color::RGBA(::cssparser::RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */")}
+ ${predefined_type(
+ "background-color", "CSSColor",
+ "::cssparser::Color::RGBA(::cssparser::RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */")}
<%self:longhand name="background-image">
use values::specified::Image;
@@ -1701,7 +1702,8 @@ pub mod longhands {
input.try(specified::LengthOrPercentage::parse_non_negative)
.map(|value| match value {
specified::LengthOrPercentage::Length(value) => value,
- specified::LengthOrPercentage::Percentage(value) => specified::Length::FontRelative(specified::FontRelativeLength::Em(value))
+ specified::LengthOrPercentage::Percentage(value) =>
+ specified::Length::FontRelative(specified::FontRelativeLength::Em(value))
})
.or_else(|()| {
match_ignore_ascii_case! { try!(input.expect_ident()),
@@ -1725,7 +1727,8 @@ pub mod longhands {
</%self:longhand>
${single_keyword("font-stretch",
- "normal ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded")}
+ "normal ultra-condensed extra-condensed condensed semi-condensed semi-expanded \
+ expanded extra-expanded ultra-expanded")}
// CSS 2.1, Section 16 - Text
@@ -3076,7 +3079,8 @@ pub mod longhands {
fn to_computed_value(&self, context: &computed::Context) -> computed_value::T {
computed_value::T{ filters: self.0.iter().map(|value| {
match value {
- &SpecifiedFilter::Blur(factor) => computed_value::Filter::Blur(factor.to_computed_value(context)),
+ &SpecifiedFilter::Blur(factor) =>
+ computed_value::Filter::Blur(factor.to_computed_value(context)),
&SpecifiedFilter::Brightness(factor) => computed_value::Filter::Brightness(factor),
&SpecifiedFilter::Contrast(factor) => computed_value::Filter::Contrast(factor),
&SpecifiedFilter::Grayscale(factor) => computed_value::Filter::Grayscale(factor),
@@ -4406,7 +4410,8 @@ pub mod shorthands {
Ok(Longhands {
border_${side}_color: color,
border_${side}_style: style,
- border_${side}_width: width.map(longhands::${to_rust_ident('border-%s-width' % side)}::SpecifiedValue),
+ border_${side}_width:
+ width.map(longhands::${to_rust_ident('border-%s-width' % side)}::SpecifiedValue),
})
</%self:shorthand>
% endfor
@@ -4421,7 +4426,8 @@ pub mod shorthands {
% for side in ["top", "right", "bottom", "left"]:
border_${side}_color: color.clone(),
border_${side}_style: style,
- border_${side}_width: width.map(longhands::${to_rust_ident('border-%s-width' % side)}::SpecifiedValue),
+ border_${side}_width:
+ width.map(longhands::${to_rust_ident('border-%s-width' % side)}::SpecifiedValue),
% endfor
})
</%self:shorthand>
@@ -4719,7 +4725,8 @@ pub mod shorthands {
</%self:shorthand>
<%self:shorthand name="transition"
- sub_properties="transition-property transition-duration transition-timing-function transition-delay">
+ sub_properties="transition-property transition-duration transition-timing-function
+ transition-delay">
use properties::longhands::{transition_delay, transition_duration, transition_property};
use properties::longhands::{transition_timing_function};
diff --git a/components/style/viewport.rs b/components/style/viewport.rs
index 9115b9a8b26..831c3769a56 100644
--- a/components/style/viewport.rs
+++ b/components/style/viewport.rs
@@ -434,7 +434,8 @@ impl ViewportConstraints {
length.to_computed_value(initial_viewport),
_ => unreachable!()
}),
- LengthOrPercentageOrAuto::Percentage(value) => Some(initial_viewport.$dimension.scale_by(value)),
+ LengthOrPercentageOrAuto::Percentage(value) =>
+ Some(initial_viewport.$dimension.scale_by(value)),
LengthOrPercentageOrAuto::Auto => None,
}
} else {