A compositor-animated (property-bound) transform is re-sampled every frame, but
the device text path (bug 2044211) floors each glyph's per-frame device position
to the pixel grid. The glyphs then cross pixel boundaries at different sub-pixel
phases and snap independently, wiggling relative to one another - most visibly
under a rotation or skew.
The spatial tree already avoids snapping animated transforms because it causes
jitter (bug 637852); the text path never honored that. Propagate an
is_ancestor_or_self_animating flag down the tree (mirroring
is_ancestor_or_self_zooming) and rasterize text under such a transform in local
space, letting the shader apply the current transform each frame; it returns to
the crisp device path when the animation ends.
A reference frame's transform is bound to a property both for a CSS transform
animation and for APZ's async pinch-zoom container / fixed-position frames. Only
the former should count as animating, so exclude bound frames marked
is_2d_scale_translation - which APZ sets and a CSS transform reference frame
never does; otherwise the async-zoom container, present on essentially every
page, would push all text to local raster. Active pinch-zoom is handled
separately by is_ancestor_or_self_zooming.
The per-frame sub-pixel difference isn't surfaced by headless rasterization, so
add a unit test for the flag propagation instead.
Differential Revision: https://phabricator.services.mozilla.com/D311213