From 6fdf6ba68faed2c154893b343cf36fd159e8019f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 30 Dec 2011 12:51:03 +0100 Subject: [PATCH] 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 | 27 ++++++++++---------------- tests/css/parser/border.css | 4 ---- tests/css/parser/border.ref.css | 4 ---- tests/css/parser/font-family.ref.css | 2 +- 7 files changed, 18 insertions(+), 45 deletions(-) diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c index 464875b7cd..d139b9da85 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 72e26b35fc..7a3312fcf7 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 e6e1134be8..21deded700 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 a4567e3ce2..14f7f0408e 100644 --- a/tests/css/parser/border-radius.ref.css +++ b/tests/css/parser/border-radius.ref.css @@ -55,33 +55,33 @@ 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; } +l { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + m { border-bottom-left-radius: 0; border-bottom-right-radius: 0; @@ -90,20 +90,13 @@ m { } n { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -o { 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 1a0e25248b..3955f68876 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 7cf5007848..73bfc35f2d 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 b770bf489d..319f3d074d 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 {