selector: Make :not() selectors not radical
authorBenjamin Otte <otte@redhat.com>
Mon, 27 Jan 2020 01:49:36 +0000 (02:49 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 28 Jan 2020 01:17:03 +0000 (02:17 +0100)
commitccdc3ee40654b44989e60d8e728aa2096f539673
tree76fb186a7c5a44c874011d31e1b9de11cd6c946a
parent93cf76b068a752dd90276f461b9f43f8542229a7
selector: Make :not() selectors not radical

:not() selectors cannot be radical because the bloomfilter only knows if
a value is set in any of the nodes, but cannot determine the opposite
(if a value is not set in at least one node), but that would be required
for:not() selectors.
However, this is very unlikely to happen in the real world, so it's not
worth optimizing.

Unfortunately, change tracking could know this, so by excluding the
:not() selectors from radical changes, the change tracking will now pick
them up. If that turns out to be a performance problem, we need to add a
special category for radical not filters, so change tracking and bloom
filters can deal with them.

The testcase demonstrating the problem in widget-factory has been
extrated and added.
gtk/gtkcssselector.c
testsuite/css/change/test4.nodes
testsuite/css/style/bloomfilter-not.css [new file with mode: 0644]
testsuite/css/style/bloomfilter-not.nodes [new file with mode: 0644]
testsuite/css/style/bloomfilter-not.ui [new file with mode: 0644]
testsuite/css/style/meson.build