This reuses our existing undisplayed style generation, but in a
per-document rather than per-nsComputedDOMStyle object, which means that
we can avoid re-resolving styles of elements in display: none subtrees
much more often.
This brings the test-case in the bug to par with other browsers or
better, and is much simpler than the initial approach I tried back in
the day.
Differential Revision: https://phabricator.services.mozilla.com/D147547