Remove unused CSSRGBA. r?manishearth
draft
Remove unused CSSRGBA. r?manishearth
MozReview-Commit-ID: 6i3COu6Dajb
--- 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)
}));