[gtk/wip/otte/css: 300/307] cssnode: Don't invalidate the parent changes unless necessary
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/css: 300/307] cssnode: Don't invalidate the parent changes unless necessary
- Date: Tue, 18 Feb 2020 20:05:07 +0000 (UTC)
commit bd6dad80d5dc808bc74d5a43c2ab044e04dca310
Author: Benjamin Otte <otte redhat com>
Date: Sun Feb 9 22:10:39 2020 +0100
cssnode: Don't invalidate the parent changes unless necessary
If old_parent == new_parent, GTK_CSS_CHANGE_ANY_PARENT doesn't need to
be emitted.
gtk/gtkcssnode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index aac8df3cc1..9e13e6c058 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -754,7 +754,8 @@ gtk_css_node_reposition (GtkCssNode *node,
if (gtk_css_node_get_style_provider_or_null (node) == NULL)
gtk_css_node_invalidate_style_provider (node);
- gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ROOT
+ gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_PARENT
+ | GTK_CSS_CHANGE_ROOT
| GTK_CSS_CHANGE_TIMESTAMP
| GTK_CSS_CHANGE_ANIMATIONS);
@@ -800,8 +801,7 @@ gtk_css_node_reposition (GtkCssNode *node,
gtk_css_node_invalidate_style (node->next_sibling);
}
- gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_PARENT
- | GTK_CSS_CHANGE_ANY_SIBLING
+ gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_SIBLING
| GTK_CSS_CHANGE_NTH_CHILD
| (node->previous_sibling ? 0 : GTK_CSS_CHANGE_FIRST_CHILD)
| (node->next_sibling ? 0 : GTK_CSS_CHANGE_LAST_CHILD));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]