[gtk/wip/baedert/for-master: 7/12] shorthandproperty: Return unset/initial/inherit as-is
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 7/12] shorthandproperty: Return unset/initial/inherit as-is
- Date: Sat, 25 Apr 2020 14:44:38 +0000 (UTC)
commit 2901c0220bffb848de94f8c27ae38fde46641190
Author: Timm Bäder <mail baedert org>
Date: Sat Apr 18 10:55:15 2020 +0200
shorthandproperty: Return unset/initial/inherit as-is
We don't even need an array value these days.
gtk/gtkcssshorthandproperty.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkcssshorthandproperty.c b/gtk/gtkcssshorthandproperty.c
index 50ef48e928..42ce06abc7 100644
--- a/gtk/gtkcssshorthandproperty.c
+++ b/gtk/gtkcssshorthandproperty.c
@@ -79,10 +79,7 @@ gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
/* the initial value can be explicitly specified with the
* ‘initial’ keyword which all properties accept.
*/
- for (i = 0; i < shorthand->subproperties->len; i++)
- {
- data[i] = _gtk_css_initial_value_new ();
- }
+ return _gtk_css_initial_value_new ();
}
else if (gtk_css_parser_try_ident (parser, "inherit"))
{
@@ -92,10 +89,7 @@ gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
* strengthen inherited values in the cascade, and it can
* also be used on properties that are not normally inherited.
*/
- for (i = 0; i < shorthand->subproperties->len; i++)
- {
- data[i] = _gtk_css_inherit_value_new ();
- }
+ return _gtk_css_inherit_value_new ();
}
else if (gtk_css_parser_try_ident (parser, "unset"))
{
@@ -103,10 +97,7 @@ gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
* then if it is an inherited property, this is treated as
* inherit, and if it is not, this is treated as initial.
*/
- for (i = 0; i < shorthand->subproperties->len; i++)
- {
- data[i] = _gtk_css_unset_value_new ();
- }
+ return _gtk_css_unset_value_new ();
}
else if (!shorthand->parse (shorthand, data, parser))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]