[gtk+] css: Remove generic 'none' handling
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] css: Remove generic 'none' handling
- Date: Mon, 9 Jan 2012 17:44:58 +0000 (UTC)
commit 6fdf6ba68faed2c154893b343cf36fd159e8019f
Author: Benjamin Otte <otte redhat com>
Date: Fri Dec 30 12:51:03 2011 +0100
css: Remove generic 'none' handling
Includes updated tests.
Who could have thought that our tests were broken. Ooops.
gtk/gtkstyleproperty.c | 8 --------
tests/css/parser/border-radius.css | 16 ++++++----------
tests/css/parser/border-radius.errors | 2 +-
tests/css/parser/border-radius.ref.css | 19 ++++++-------------
tests/css/parser/border.css | 4 ----
tests/css/parser/border.ref.css | 4 ----
tests/css/parser/font-family.ref.css | 2 +-
7 files changed, 14 insertions(+), 41 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 464875b..d139b9d 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -2366,14 +2366,6 @@ _gtk_style_property_parse_value (const GtkStyleProperty *property,
g_value_set_enum (value, GTK_CSS_INHERIT);
return TRUE;
}
- else if (_gtk_css_parser_try (parser, "none", TRUE))
- {
- /* Insert the default value, so it has an opportunity
- * to override other style providers when merged
- */
- g_param_value_set_default (property->pspec, value);
- return TRUE;
- }
else if (property->property_parse_func)
{
GError *error = NULL;
diff --git a/tests/css/parser/border-radius.css b/tests/css/parser/border-radius.css
index 72e26b3..7a3312f 100644
--- a/tests/css/parser/border-radius.css
+++ b/tests/css/parser/border-radius.css
@@ -31,34 +31,30 @@ h {
}
i {
- border-radius: none;
-}
-
-j {
border-radius: 1.125 / 5.5;
}
-k {
+j {
border-radius: 1 2.25 / 5;
}
-l {
+k {
border-radius: 1 2 3.5 / 5.5 6.75;
}
-m {
+l {
border-radius: 0 / 0;
}
-n {
+m {
border-radius: 0;
}
-o {
+n {
border-radius: 0 / 1;
}
-p {
+o {
border-radius: 1 / 0;
}
diff --git a/tests/css/parser/border-radius.errors b/tests/css/parser/border-radius.errors
index e6e1134..21deded 100644
--- a/tests/css/parser/border-radius.errors
+++ b/tests/css/parser/border-radius.errors
@@ -1,3 +1,4 @@
+border-radius.css:64: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:68: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:72: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:76: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
@@ -10,4 +11,3 @@ border-radius.css:100: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:104: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:108: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
border-radius.css:112: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
-border-radius.css:116: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/border-radius.ref.css b/tests/css/parser/border-radius.ref.css
index a4567e3..14f7f04 100644
--- a/tests/css/parser/border-radius.ref.css
+++ b/tests/css/parser/border-radius.ref.css
@@ -55,55 +55,48 @@ h {
}
i {
- border-bottom-left-radius: none;
- border-bottom-right-radius: none;
- border-top-left-radius: none;
- border-top-right-radius: none;
-}
-
-j {
border-bottom-left-radius: 1.125 5.5;
border-bottom-right-radius: 1.125 5.5;
border-top-left-radius: 1.125 5.5;
border-top-right-radius: 1.125 5.5;
}
-k {
+j {
border-bottom-left-radius: 2.25 5;
border-bottom-right-radius: 1 5;
border-top-left-radius: 1 5;
border-top-right-radius: 2.25 5;
}
-l {
+k {
border-bottom-left-radius: 2 6.75;
border-bottom-right-radius: 3.5 5.5;
border-top-left-radius: 1 5.5;
border-top-right-radius: 2 6.75;
}
-m {
+l {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
-n {
+m {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
-o {
+n {
border-bottom-left-radius: 0 1;
border-bottom-right-radius: 0 1;
border-top-left-radius: 0 1;
border-top-right-radius: 0 1;
}
-p {
+o {
border-bottom-left-radius: 1 0;
border-bottom-right-radius: 1 0;
border-top-left-radius: 1 0;
diff --git a/tests/css/parser/border.css b/tests/css/parser/border.css
index 1a0e252..3955f68 100644
--- a/tests/css/parser/border.css
+++ b/tests/css/parser/border.css
@@ -53,7 +53,3 @@ m {
n {
border-property: 1 2 ; 4;
}
-
-o {
- border-property: none
-}
diff --git a/tests/css/parser/border.ref.css b/tests/css/parser/border.ref.css
index 7cf5007..73bfc35 100644
--- a/tests/css/parser/border.ref.css
+++ b/tests/css/parser/border.ref.css
@@ -25,7 +25,3 @@ f {
n {
border-property: 1 2;
}
-
-o {
- border-property: none;
-}
diff --git a/tests/css/parser/font-family.ref.css b/tests/css/parser/font-family.ref.css
index b770bf4..319f3d0 100644
--- a/tests/css/parser/font-family.ref.css
+++ b/tests/css/parser/font-family.ref.css
@@ -1,5 +1,5 @@
a {
- font-family: none;
+ font-family: "none";
}
b {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]