[gtk+/wip/cssnode3: 6/81] stylecontext: Simplify a function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssnode3: 6/81] stylecontext: Simplify a function
- Date: Sat, 28 Feb 2015 23:10:13 +0000 (UTC)
commit e70a7bf751683a3984efc10c689683cd31745e64
Author: Benjamin Otte <otte redhat com>
Date: Sat Jan 24 19:44:47 2015 +0100
stylecontext: Simplify a function
gtk/gtkstylecontext.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index d9844d4..58daa80 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -751,24 +751,26 @@ store_in_global_parent_cache (GtkStyleContext *context,
static GtkCssStyle *
update_properties (GtkStyleContext *context,
+ GtkCssNode *cssnode,
GtkCssStyle *style,
- const GtkCssNodeDeclaration *decl,
- gboolean is_root,
- GtkCssStyle *parent,
const GtkBitmask *parent_changes)
{
GtkStyleContextPrivate *priv;
+ const GtkCssNodeDeclaration *decl;
GtkCssMatcher matcher;
GtkWidgetPath *path;
+ GtkCssStyle *parent;
GtkCssStyle *result;
priv = context->priv;
+ parent = gtk_css_node_get_parent_style (context, cssnode);
+ decl = gtk_css_node_get_declaration (cssnode);
result = lookup_in_global_parent_cache (context, parent, decl);
if (result)
return g_object_ref (result);
- path = create_query_path (context, decl, is_root);
+ path = create_query_path (context, decl, TRUE);
if (!_gtk_css_matcher_init (&matcher, path))
{
@@ -2981,10 +2983,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
GtkCssStyle *new_base;
new_base = update_properties (context,
+ cssnode,
GTK_CSS_ANIMATED_STYLE (current)->style,
- gtk_css_node_get_declaration (cssnode),
- TRUE,
- gtk_css_node_get_parent_style (context, cssnode),
parent_changes);
new_values = gtk_css_animated_style_new_advance (GTK_CSS_ANIMATED_STYLE (current),
new_base,
@@ -2994,10 +2994,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
else
{
new_values = update_properties (context,
+ cssnode,
current,
- gtk_css_node_get_declaration (cssnode),
- TRUE,
- gtk_css_node_get_parent_style (context, cssnode),
parent_changes);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]