Timothy Nikkel cca7ff4dbc Bug 1878294. Teach the scale tracking in ActiveLayerTracker to understand svg transforms. r=longsonr
The bug comes about because the svg transform is changed, so IncrementScaleRestyleCountIfNeeded gets called. It determines that there is no transform because it doesn't check svg transforms, so it incorrectly concludes that there was a transform but now it was removed, and so marks the scale as having been changed. Then in ChooseScale in StackingContextHelper, because we think the scale is being animated, we clamp the allowed scale factor based on the ratio of the viewport and the size of the svg. So avoiding marking this as incorrectly having an animating scale fixes the bug.

A simpler fix for this bug would be to check if the mPreviousTransformScale was Nothing() and only marked as mutated if it was Some.

This fix is a bit more complicated but it allows us to detect svg transform scales changing.

Differential Revision: https://phabricator.services.mozilla.com/D200579
2024-02-28 13:37:38 +00:00
..