[librsvg: 2/5] Remove RSVG_CSS_COLOR_SPEC_CURRENT_COLOR
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/5] Remove RSVG_CSS_COLOR_SPEC_CURRENT_COLOR
- Date: Tue, 14 Jan 2020 17:57:48 +0000 (UTC)
commit e409832a110aa1fce07d555e8b851276d87b2d2e
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jan 14 09:30:49 2020 -0600
Remove RSVG_CSS_COLOR_SPEC_CURRENT_COLOR
This was used in the C code for librsvg, but rsvg-convert does not
support it.
librsvg/rsvg-css.h | 1 -
rsvg_internals/src/color.rs | 10 ++--------
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/librsvg/rsvg-css.h b/librsvg/rsvg-css.h
index babf1dc5..93090b9b 100644
--- a/librsvg/rsvg-css.h
+++ b/librsvg/rsvg-css.h
@@ -36,7 +36,6 @@ G_BEGIN_DECLS
/* Keep this in sync with rust/src/color.rs:ColorKind */
typedef enum {
- RSVG_CSS_COLOR_SPEC_CURRENT_COLOR,
RSVG_CSS_COLOR_SPEC_ARGB,
RSVG_CSS_COLOR_PARSE_ERROR
} RsvgCssColorKind;
diff --git a/rsvg_internals/src/color.rs b/rsvg_internals/src/color.rs
index 5054c880..3807075c 100644
--- a/rsvg_internals/src/color.rs
+++ b/rsvg_internals/src/color.rs
@@ -45,7 +45,6 @@ impl Parse for cssparser::RGBA {
#[repr(C)]
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum ColorKind {
- CurrentColor,
ARGB,
ParseError,
}
@@ -68,11 +67,6 @@ fn rgba_to_argb(rgba: cssparser::RGBA) -> u32 {
impl<'i> From<Result<cssparser::Color, ParseError<'i>>> for ColorSpec {
fn from(result: Result<cssparser::Color, ParseError<'i>>) -> ColorSpec {
match result {
- Ok(cssparser::Color::CurrentColor) => ColorSpec {
- kind: ColorKind::CurrentColor,
- argb: 0,
- },
-
Ok(cssparser::Color::RGBA(rgba)) => ColorSpec {
kind: ColorKind::ARGB,
argb: rgba_to_argb(rgba),
@@ -185,11 +179,11 @@ mod tests {
}
#[test]
- fn parses_current_color() {
+ fn current_color_is_error() {
assert_eq!(
parse("currentColor"),
ColorSpec {
- kind: ColorKind::CurrentColor,
+ kind: ColorKind::ParseError,
argb: 0,
}
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]