Commit 4141a7d7 authored by Benjamin Otte's avatar Benjamin Otte

csstypes: Propagate NTH_CHILD and NTH_LAST_CHILD to siblings

Otherwise, we'd have to mark eveyr child on changes, and it's far easier
to do that once we actually validate.
parent a7816909
......@@ -34,11 +34,16 @@ _gtk_css_change_for_sibling (GtkCssChange match)
| GTK_CSS_CHANGE_NTH_LAST_CHILD \
| GTK_CSS_CHANGE_STATE )
#define KEEP_STATES ( ~(BASE_STATES|GTK_CSS_CHANGE_SOURCE|GTK_CSS_CHANGE_PARENT_STYLE) \
| GTK_CSS_CHANGE_NTH_CHILD \
| GTK_CSS_CHANGE_NTH_LAST_CHILD)
#define SIBLING_SHIFT 8
return (match & ~(BASE_STATES|GTK_CSS_CHANGE_SOURCE|GTK_CSS_CHANGE_PARENT_STYLE)) | ((match & BASE_STATES) << SIBLING_SHIFT);
return (match & KEEP_STATES) | ((match & BASE_STATES) << SIBLING_SHIFT);
#undef BASE_STATES
#undef KEEP_STATES
#undef SIBLING_SHIFT
}
......
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