Skip to content

Commit

Permalink
style: Fix servo build.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed May 29, 2019
1 parent cd2ac08 commit 4671ef5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
4 changes: 2 additions & 2 deletions components/style/properties/helpers.mako.rs
Expand Up @@ -366,7 +366,7 @@


pub use self::single_value::SpecifiedValue as SingleSpecifiedValue; pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;


% if not simple_vector_bindings: % if not simple_vector_bindings and product == "gecko":
impl SpecifiedValue { impl SpecifiedValue {
fn compute_iter<'a, 'cx, 'cx_a>( fn compute_iter<'a, 'cx, 'cx_a>(
&'a self, &'a self,
Expand Down Expand Up @@ -496,7 +496,7 @@
.set_writing_mode_dependency(context.builder.writing_mode); .set_writing_mode_dependency(context.builder.writing_mode);
% endif % endif


% if property.is_vector and not property.simple_vector_bindings: % if property.is_vector and not property.simple_vector_bindings and product == "gecko":
// In the case of a vector property we want to pass down an // In the case of a vector property we want to pass down an
// iterator so that this can be computed without allocation. // iterator so that this can be computed without allocation.
// //
Expand Down
19 changes: 3 additions & 16 deletions components/style/properties/properties.mako.rs
Expand Up @@ -2482,20 +2482,7 @@ pub mod style_structs {
% if longhand.logical: % if longhand.logical:
${helpers.logical_setter(name=longhand.name)} ${helpers.logical_setter(name=longhand.name)}
% else: % else:
% if longhand.is_vector: % if longhand.ident == "display":
/// Set ${longhand.name}.
#[allow(non_snake_case)]
#[inline]
pub fn set_${longhand.ident}<I>(&mut self, v: I)
where
I: IntoIterator<Item = longhands::${longhand.ident}
::computed_value::single_value::T>,
I::IntoIter: ExactSizeIterator
{
self.${longhand.ident} = longhands::${longhand.ident}::computed_value
::List(v.into_iter().collect());
}
% elif longhand.ident == "display":
/// Set `display`. /// Set `display`.
/// ///
/// We need to keep track of the original display for hypothetical boxes, /// We need to keep track of the original display for hypothetical boxes,
Expand Down Expand Up @@ -3109,7 +3096,7 @@ impl ComputedValuesInner {
pub fn transform_requires_layer(&self) -> bool { pub fn transform_requires_layer(&self) -> bool {
use crate::values::generics::transform::TransformOperation; use crate::values::generics::transform::TransformOperation;
// Check if the transform matrix is 2D or 3D // Check if the transform matrix is 2D or 3D
for transform in &self.get_box().transform.0 { for transform in &*self.get_box().transform.0 {
match *transform { match *transform {
TransformOperation::Perspective(..) => { TransformOperation::Perspective(..) => {
return true; return true;
Expand Down Expand Up @@ -3452,7 +3439,7 @@ impl<'a> StyleBuilder<'a> {
} }
% endif % endif


% if not property.is_vector or property.simple_vector_bindings: % if not property.is_vector or property.simple_vector_bindings or product != "gecko":
/// Set the `${property.ident}` to the computed value `value`. /// Set the `${property.ident}` to the computed value `value`.
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub fn set_${property.ident}( pub fn set_${property.ident}(
Expand Down
2 changes: 1 addition & 1 deletion components/style/values/animated/effects.rs
Expand Up @@ -15,7 +15,7 @@ use crate::values::generics::effects::SimpleShadow as GenericSimpleShadow;
use crate::values::Impossible; use crate::values::Impossible;


/// An animated value for the `drop-shadow()` filter. /// An animated value for the `drop-shadow()` filter.
type AnimatedSimpleShadow = GenericSimpleShadow<Color, Length, Length>; pub type AnimatedSimpleShadow = GenericSimpleShadow<Color, Length, Length>;


/// An animated value for a single `filter`. /// An animated value for a single `filter`.
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
Expand Down

0 comments on commit 4671ef5

Please sign in to comment.