[gtk+/wip/css-position: 3/5] csstypes: Change NTH_CHILD and NTH_LAST_CHILD change propagation



commit 5188c84df16eac75fc0d402ad9ccc95f6b4e67eb
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 6 03:58:56 2015 +0200

    csstypes: Change NTH_CHILD and NTH_LAST_CHILD change propagation
    
    For now assume that if those flags change for a node, they also changed
    for all sibling nodes. This is not strictly true but simplifies
    invalidation.
    
    The reason it simplifies invalidation is that when removing or adding a
    node, we can just invalidate the first node (for NTH_LAST_CHILD) and the
    new node (for NTH_CHILD) and all the other nodes will be invalidated
    automatically.

 gtk/gtkcsstypes.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcsstypes.c b/gtk/gtkcsstypes.c
index 440f60a..2fa18df 100644
--- a/gtk/gtkcsstypes.c
+++ b/gtk/gtkcsstypes.c
@@ -56,8 +56,8 @@ _gtk_css_change_for_sibling (GtkCssChange match)
     { GTK_CSS_CHANGE_NAME, GTK_CSS_CHANGE_SIBLING_NAME },
     { GTK_CSS_CHANGE_FIRST_CHILD, GTK_CSS_CHANGE_SIBLING_FIRST_CHILD },
     { GTK_CSS_CHANGE_LAST_CHILD, GTK_CSS_CHANGE_SIBLING_LAST_CHILD },
-    { GTK_CSS_CHANGE_NTH_CHILD, GTK_CSS_CHANGE_SIBLING_NTH_CHILD },
-    { GTK_CSS_CHANGE_NTH_LAST_CHILD, GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD },
+    { GTK_CSS_CHANGE_NTH_CHILD, GTK_CSS_CHANGE_NTH_CHILD | GTK_CSS_CHANGE_SIBLING_NTH_CHILD },
+    { GTK_CSS_CHANGE_NTH_LAST_CHILD, GTK_CSS_CHANGE_NTH_LAST_CHILD | GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD },
     { GTK_CSS_CHANGE_STATE, GTK_CSS_CHANGE_SIBLING_STATE },
     { GTK_CSS_CHANGE_SOURCE, 0 },
     { GTK_CSS_CHANGE_PARENT_STYLE, 0 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]