Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSS animations in SVG do not repaint when SVG is zoomed
CSS animations in SVG do not repaint when SVG is zoomed https://bugs.webkit.org/show_bug.cgi?id=199364 rdar://problem/52459928 Reviewed by NOBODY (OOPS!). Partial Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=174874 This patch changes the coordinate system used by RenderImage for invalidation rects to account for zoom. When an SVG image issues invalidations to its ImageResource clients, the invalidation rect does not contain zoom. This is due to how SVG images work internally: images are laid out without zoom so that relative sizes are resolved correctly; as a result the invalidation rects do not include zoom. This patch simply removes the zoom from the image size in RenderImage::repaintOrMarkForLayout and clarifies the comment. This change should not affect bitmap image invalidation because bitmaps (even animated gifs) do not use invalidation rects. From local build testing, I have verified that this does indeed fix an issue described on test case from the bug. * Source/WebCore/rendering/RenderImage.cpp: (RenderImage::repaintOrMarkForLayout): Update Comment and simplify logic to remove for 'zoom' factor * LayoutTests/svg/repaint/resources/animate-center.svg: Add Test Case Resource * LayoutTests/svg/repaint/image-animation-with-zoom.html: Add Test Case * LayoutTests/svg/repaint/image-animation-with-zoom-expected.txt: Add Test Case Expectation
- Loading branch information