Currently when traversing a the tree to restyle, we look at whether a
given element to restyle is the root. This seems to always be the root
of the entire document, since we start our processing from the top. If
the current element being restyled is the root of the restyle, then we
use None as the parent node for restyling purposes.
In stylo we want to invoke restyling starting from an arbitrary node in
the document, not just the root of the document, so this change looks
for the parent element regardless of whether we're at the root of the
restyle.
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.
This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.
https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h