From 769188ddbbbaf5604d8f3cf65668820278cea67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 6 Jul 2018 05:05:57 +0200 Subject: [PATCH] style: Remove dead code. Bug: 1473793 Reviewed-by: heycam --- components/style/properties/gecko.mako.rs | 29 ++--------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 53d0baf9aba..c82288e14ae 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -49,8 +49,7 @@ use gecko::values::round_border_to_device_pixels; use logical_geometry::WritingMode; use media_queries::Device; use properties::computed_value_flags::*; -use properties::{longhands, Importance, LonghandId}; -use properties::{PropertyDeclaration, PropertyDeclarationBlock, PropertyDeclarationId}; +use properties::longhands; use rule_tree::StrongRuleNode; use selector_parser::PseudoElement; use servo_arc::{Arc, RawOffsetArc}; @@ -58,7 +57,7 @@ use std::marker::PhantomData; use std::mem::{forget, uninitialized, transmute, zeroed}; use std::{cmp, ops, ptr}; use values::{self, CustomIdent, Either, KeyframesName, None_}; -use values::computed::{NonNegativeLength, ToComputedValue, Percentage, TransitionProperty}; +use values::computed::{NonNegativeLength, Percentage, TransitionProperty}; use values::computed::font::FontSize; use values::computed::effects::{BoxShadow, Filter, SimpleShadow}; use values::computed::outline::OutlineStyle; @@ -307,30 +306,6 @@ impl ComputedValuesInner { pub fn has_moz_binding(&self) -> bool { !self.get_box().gecko.mBinding.mRawPtr.is_null() } - - pub fn to_declaration_block(&self, property: PropertyDeclarationId) -> PropertyDeclarationBlock { - let value = match property { - % for prop in data.longhands: - % if prop.animatable: - PropertyDeclarationId::Longhand(LonghandId::${prop.camel_case}) => { - PropertyDeclaration::${prop.camel_case}( - % if prop.boxed: - Box::new( - % endif - longhands::${prop.ident}::SpecifiedValue::from_computed_value( - &self.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}()) - % if prop.boxed: - ) - % endif - ) - }, - % endif - % endfor - PropertyDeclarationId::Custom(_name) => unimplemented!(), - _ => unimplemented!() - }; - PropertyDeclarationBlock::with_one(value, Importance::Normal) - } } <%def name="declare_style_struct(style_struct)">