The implementation for identifying which nodes in the dirty tracker
tree to merge was incorrect. Each leaf node identifies if it is
static (hasn't invalidated for some time), regularly invalidating,
or somewhere in between.
The previous logic would merge the nodes if all of the children
were (static OR invalidating). The original intent of the algorithm
is to merge the nodes if (all static) OR (all invalidating).
This patch fixes the implementation, which fixes the oscillating
behavior in some cases, and describes in more detail the reasoning
for the heuristic.
Differential Revision: https://phabricator.services.mozilla.com/D55767
--HG--
extra : moz-landing-system : lando