Commit df711381 authored by Benjamin Otte's avatar Benjamin Otte

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.
parent 69e396ea
......@@ -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 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment