Remove unused CSSRGBA. r?manishearth draft
authorXidorn Quan <me@upsuper.org>
Tue, 06 Jun 2017 17:47:32 +1000
changeset 590133 bc40336381a70747f37c02ff8de632e8a5aec94b
parent 590132 96609b72a1f52b8844374a8c923a22c8d3637408
child 590134 e9c1854ec27b0e0f882d0b18b4037303cfb2b310
push id62604
push userxquan@mozilla.com
push dateWed, 07 Jun 2017 07:07:54 +0000
reviewersmanishearth
milestone55.0a1
Remove unused CSSRGBA. r?manishearth MozReview-Commit-ID: 6i3COu6Dajb
servo/components/style/values/specified/mod.rs
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -223,35 +223,16 @@ impl CSSColor {
     #[inline]
     /// Returns transparent value.
     pub fn transparent() -> CSSColor {
         // We should probably set authored to "transparent", but maybe it doesn't matter.
         Color::RGBA(cssparser::RGBA::transparent()).into()
     }
 }
 
-#[derive(Clone, PartialEq, Debug)]
-#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
-#[allow(missing_docs)]
-pub struct CSSRGBA {
-    pub parsed: cssparser::RGBA,
-    pub authored: Option<Box<str>>,
-}
-
-no_viewport_percentage!(CSSRGBA);
-
-impl ToCss for CSSRGBA {
-    fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-        match self.authored {
-            Some(ref s) => dest.write_str(s),
-            None => self.parsed.to_css(dest),
-        }
-    }
-}
-
 /// Parse an `<integer>` value, handling `calc()` correctly.
 pub fn parse_integer(context: &ParserContext, input: &mut Parser) -> Result<Integer, ()> {
     match try!(input.next()) {
         Token::Number(ref value) => value.int_value.ok_or(()).map(Integer::new),
         Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
             let result = try!(input.parse_nested_block(|i| {
                 CalcNode::parse_integer(context, i)
             }));