cssnode: Remove unused widget path vfuncs
authorBenjamin Otte <otte@redhat.com>
Tue, 21 Jan 2020 02:03:46 +0000 (03:03 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 21 Jan 2020 11:47:16 +0000 (12:47 +0100)
gtk/gtkcssnode.c
gtk/gtkcssnodeprivate.h
gtk/gtkcsspathnode.c
gtk/gtkcsstransientnode.c
gtk/gtkcsswidgetnode.c

index 4fe350d5ffc83309a59d256f9fa9cc34d88afc01..008c2a6f359d9d326703e0f3c4338de079187685 100644 (file)
@@ -495,18 +495,6 @@ gtk_css_node_real_init_matcher (GtkCssNode     *cssnode,
   return TRUE;
 }
 
-static GtkWidgetPath *
-gtk_css_node_real_create_widget_path (GtkCssNode *cssnode)
-{
-  return gtk_widget_path_new ();
-}
-
-static const GtkWidgetPath *
-gtk_css_node_real_get_widget_path (GtkCssNode *cssnode)
-{
-  return NULL;
-}
-
 static GtkStyleProvider *
 gtk_css_node_real_get_style_provider (GtkCssNode *cssnode)
 {
@@ -587,8 +575,6 @@ gtk_css_node_class_init (GtkCssNodeClass *klass)
   klass->queue_validate = gtk_css_node_real_queue_validate;
   klass->dequeue_validate = gtk_css_node_real_dequeue_validate;
   klass->init_matcher = gtk_css_node_real_init_matcher;
-  klass->create_widget_path = gtk_css_node_real_create_widget_path;
-  klass->get_widget_path = gtk_css_node_real_get_widget_path;
   klass->get_style_provider = gtk_css_node_real_get_style_provider;
   klass->get_frame_clock = gtk_css_node_real_get_frame_clock;
 
@@ -1392,18 +1378,6 @@ gtk_css_node_init_matcher (GtkCssNode     *cssnode,
   return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher);
 }
 
-GtkWidgetPath *
-gtk_css_node_create_widget_path (GtkCssNode *cssnode)
-{
-  return GTK_CSS_NODE_GET_CLASS (cssnode)->create_widget_path (cssnode);
-}
-
-const GtkWidgetPath *
-gtk_css_node_get_widget_path (GtkCssNode *cssnode)
-{
-  return GTK_CSS_NODE_GET_CLASS (cssnode)->get_widget_path (cssnode);
-}
-
 GtkStyleProvider *
 gtk_css_node_get_style_provider (GtkCssNode *cssnode)
 {
index 20ef434e7e6b5663be0dc8cf296c9ee56a65ced5..680189813f9fcc095f088bff6bb3069f445be37e 100644 (file)
@@ -78,8 +78,6 @@ struct _GtkCssNodeClass
 
   gboolean              (* init_matcher)                (GtkCssNode            *cssnode,
                                                          GtkCssMatcher         *matcher);
-  GtkWidgetPath *       (* create_widget_path)          (GtkCssNode            *cssnode);
-  const GtkWidgetPath * (* get_widget_path)             (GtkCssNode            *cssnode);
   /* get style provider to use or NULL to use parent's */
   GtkStyleProvider *    (* get_style_provider)          (GtkCssNode            *cssnode);
   /* get frame clock or NULL (only relevant for root node) */
@@ -157,8 +155,6 @@ void                    gtk_css_node_validate           (GtkCssNode            *
 
 gboolean                gtk_css_node_init_matcher       (GtkCssNode            *cssnode,
                                                          GtkCssMatcher         *matcher);
-GtkWidgetPath *         gtk_css_node_create_widget_path (GtkCssNode            *cssnode);
-const GtkWidgetPath *   gtk_css_node_get_widget_path    (GtkCssNode            *cssnode) G_GNUC_PURE;
 GtkStyleProvider *      gtk_css_node_get_style_provider (GtkCssNode            *cssnode) G_GNUC_PURE;
 
 void                    gtk_css_node_print              (GtkCssNode                *cssnode,
index 64cd49260bdf76cf163e5bd3cdf00c402dff54db..164487e4e8c1188a23c16c0f7cd3f3ab1491df6f 100644 (file)
@@ -59,37 +59,6 @@ gtk_css_path_node_real_init_matcher (GtkCssNode     *node,
                                 gtk_css_node_get_declaration (node));
 }
 
-static GtkWidgetPath *
-gtk_css_path_node_real_create_widget_path (GtkCssNode *node)
-{
-  GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
-  GtkWidgetPath *path;
-  guint length;
-
-  if (path_node->path == NULL)
-    path = gtk_widget_path_new ();
-  else
-    path = gtk_widget_path_copy (path_node->path);
-
-  length = gtk_widget_path_length (path);
-  if (length > 0)
-    {
-      gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
-                                                   path,
-                                                   length - 1);
-    }
-
-  return path;
-}
-
-static const GtkWidgetPath *
-gtk_css_path_node_real_get_widget_path (GtkCssNode *node)
-{
-  GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
-
-  return path_node->path;
-}
-
 static GtkCssStyle *
 gtk_css_path_node_update_style (GtkCssNode   *cssnode,
                                 GtkCssChange  change,
@@ -122,8 +91,6 @@ gtk_css_path_node_class_init (GtkCssPathNodeClass *klass)
   node_class->invalidate = gtk_css_path_node_invalidate;
   node_class->update_style = gtk_css_path_node_update_style;
   node_class->init_matcher = gtk_css_path_node_real_init_matcher;
-  node_class->create_widget_path = gtk_css_path_node_real_create_widget_path;
-  node_class->get_widget_path = gtk_css_path_node_real_get_widget_path;
   node_class->get_style_provider = gtk_css_path_node_get_style_provider;
 }
 
index a8485f0858fd74721f8c50d25e785d299db1f16c..218358005d4d309cdd264bea1947d1c35fdf1005 100644 (file)
 
 G_DEFINE_TYPE (GtkCssTransientNode, gtk_css_transient_node, GTK_TYPE_CSS_NODE)
 
-static GtkWidgetPath *
-gtk_css_transient_node_create_widget_path (GtkCssNode *node)
-{
-  GtkWidgetPath *result;
-  GtkCssNode *parent;
-
-  parent = gtk_css_node_get_parent (node);
-  if (parent == NULL)
-    result = gtk_widget_path_new ();
-  else
-    result = gtk_css_node_create_widget_path (parent);
-
-  gtk_widget_path_append_type (result, gtk_css_node_get_widget_type (node));
-  gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node), result, -1);
-  
-  return result;
-}
-
-static const GtkWidgetPath *
-gtk_css_transient_node_get_widget_path (GtkCssNode *node)
-{
-  GtkCssNode *parent;
-
-  parent = gtk_css_node_get_parent (node);
-  if (parent == NULL)
-    return NULL;
-
-  return gtk_css_node_get_widget_path (parent);
-}
-
 static GtkCssStyle *
 gtk_css_transient_node_update_style (GtkCssNode   *cssnode,
                                      GtkCssChange  change,
@@ -67,8 +37,6 @@ gtk_css_transient_node_class_init (GtkCssTransientNodeClass *klass)
 {
   GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass);
 
-  node_class->create_widget_path = gtk_css_transient_node_create_widget_path;
-  node_class->get_widget_path = gtk_css_transient_node_get_widget_path;
   node_class->update_style = gtk_css_transient_node_update_style;
 }
 
index 142f6b275000a321c0efa89638bce36cb5a56681..d71cd21f2d1cc54aae69e98463f775079154307d 100644 (file)
@@ -38,20 +38,6 @@ gtk_css_widget_node_finalize (GObject *object)
   G_OBJECT_CLASS (gtk_css_widget_node_parent_class)->finalize (object);
 }
 
-static void
-gtk_css_widget_node_style_changed (GtkCssNode        *cssnode,
-                                   GtkCssStyleChange *change)
-{
-  GtkCssWidgetNode *node;
-
-  node = GTK_CSS_WIDGET_NODE (cssnode);
-
-  if (node->widget)
-    gtk_widget_clear_path (node->widget);
-
-  GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, change);
-}
-
 static gboolean
 gtk_css_widget_node_queue_callback (GtkWidget     *widget,
                                     GdkFrameClock *frame_clock,
@@ -133,40 +119,6 @@ gtk_css_widget_node_init_matcher (GtkCssNode     *node,
   return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->init_matcher (node, matcher);
 }
 
-static GtkWidgetPath *
-gtk_css_widget_node_create_widget_path (GtkCssNode *node)
-{
-  GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
-  GtkWidgetPath *path;
-  guint length;
-
-  if (widget_node->widget == NULL)
-    path = gtk_widget_path_new ();
-  else
-    path = _gtk_widget_create_path (widget_node->widget);
-  
-  length = gtk_widget_path_length (path);
-  if (length > 0)
-    {
-      gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
-                                                   path,
-                                                   length - 1);
-    }
-
-  return path;
-}
-
-static const GtkWidgetPath *
-gtk_css_widget_node_get_widget_path (GtkCssNode *node)
-{
-  GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
-
-  if (widget_node->widget == NULL)
-    return NULL;
-
-  return gtk_widget_get_path (widget_node->widget);
-}
-
 static GtkStyleProvider *
 gtk_css_widget_node_get_style_provider (GtkCssNode *node)
 {
@@ -211,11 +163,8 @@ gtk_css_widget_node_class_init (GtkCssWidgetNodeClass *klass)
   node_class->queue_validate = gtk_css_widget_node_queue_validate;
   node_class->dequeue_validate = gtk_css_widget_node_dequeue_validate;
   node_class->init_matcher = gtk_css_widget_node_init_matcher;
-  node_class->create_widget_path = gtk_css_widget_node_create_widget_path;
-  node_class->get_widget_path = gtk_css_widget_node_get_widget_path;
   node_class->get_style_provider = gtk_css_widget_node_get_style_provider;
   node_class->get_frame_clock = gtk_css_widget_node_get_frame_clock;
-  node_class->style_changed = gtk_css_widget_node_style_changed;
 }
 
 static void