Skip to content
  • Benjamin Otte's avatar
    stylecontext: Change fallback behavior on state mismatch · fe51ac27
    Benjamin Otte authored
    For functions that take state flags as an argument we need to special
    case the situation where the passed in flags don't match the current
    state.
    
    Previously we would create a copy of the style info, change its state
    and do the lookup from there.
    
    Now that GtkCssNode has replaced style infos, this doesn't work as well
    anymore as copying a GtkCssNode is not possible.
    However, unike style infos, GtkCssNodes are instant-apply, so we don't
    need to copy anymore, we can just change the state of the node.
    
    This causes some invalidations to be queued, but we can take that
    performance hit as this is fallback code.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1228852
    fe51ac27