New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 850611 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression



Sign in to add a comment

SVG not animating in img tag

Reported by antoine....@gmail.com, Jun 7 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36

Steps to reproduce the problem:
1. Create a SVG file with SMIL animations
2. Use the SVG file with a <img> tag

What is the expected behavior?
The animation should play

What went wrong?
The animation doesn't play, although the same animation plays when the SVG is directly imported in the HTML dom, or thru an <object> tg.

Did this work before? Yes Chromium 66

Does this work in other browsers? Yes

Chrome version: 67.0.3396.79  Channel: stable
OS Version: 
Flash Version:
 
3ca0d3f5a504419d9cd23af6f5ff3953.zip
1.6 KB Download
I also tested with the latest Chromium (69.0.3453.0) and confirm the bug is still there.

I also confirmed the bug on a colleague's macOS on Chrome 67, so this doesn't seem to be Linux specific.
Forgot the codepen: https://codepen.io/saveman71/project/editor/ZWnErb (exactly same as the attached file on the first message).
Cc: pdr@chromium.org trchen@chromium.org
Labels: RegressedIn-67 FoundIn-67 Target-68 FoundIn-68 FoundIn-69
Owner: wangxianzhu@chromium.org
Status: Assigned (was: Unconfirmed)
Surprisingly, this bisects to enabling SPv175.

No idea why, but I suppose some missing effect node for SVG-as-image.

Re-assign as necessary.

And leaving this as a P2 unless we hear more reports. antoine.bolvy@, is this causing you problems in a user-facing web site?

Comment 4 by f...@opera.com, Jun 7 2018

It tends to be something around frame-scheduling (aroun SVGImage::ServiceAnimations probably) - I think I've fixed this at least twice by now for various reasons =).
I noticed that at work during development of a new feature (the animated svg is originally a spinner), so it does not affect me immediately since I can easily use the object tag as a workaround. However, I suspect this is used quite widely, just search for "svg spinner" and you'll see a lot of resources using this kind of animated svg.
Cc: wangxianzhu@chromium.org
Owner: chrishtr@chromium.org
I think the bug is that SVG images invalidate raster by calling InvalidatePaintRectangleOnWindow, but the callsite in ObjectPaintInvalidator::InvalidatePaintUsingContainer is never called
SPv175 mode.

@fs: is there really no test for SVG images?

Comment 8 by f...@opera.com, Jun 7 2018

There are tests in svg/as-*image (I know there's one for CSS animations in there.) There are unit tests, but those are for very specific cases.
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cab2a51906d80cec7c9b9a6084152dc0aeadbf9d

commit cab2a51906d80cec7c9b9a6084152dc0aeadbf9d
Author: Chris Harrelson <chrishtr@chromium.org>
Date: Sun Jun 10 02:31:48 2018

[SPv175] Fix SVG image opacity animations

Now mark changes to property trees as requiring subtree invalidation, in cases
where the document is not in composited mode.

Bug:  850611 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I256b752f520aa7c91520c01b3b05f8399c70d1a9
Reviewed-on: https://chromium-review.googlesource.com/1091595
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565904}
[modify] https://crrev.com/cab2a51906d80cec7c9b9a6084152dc0aeadbf9d/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc
[modify] https://crrev.com/cab2a51906d80cec7c9b9a6084152dc0aeadbf9d/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/cab2a51906d80cec7c9b9a6084152dc0aeadbf9d/third_party/blink/renderer/core/paint/paint_property_tree_builder.h
[modify] https://crrev.com/cab2a51906d80cec7c9b9a6084152dc0aeadbf9d/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc

Labels: -Pri-2 Merge-Request-68 Pri-1
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 11 2018

Labels: -Merge-Request-68 Hotlist-Merge-Review Merge-Review-68
This bug requires manual review: M68 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-68 Merge-Approved-68
Approving merge for M68. Branch:3440
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 12 2018

Labels: -merge-approved-68 merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fbb903828b7ff609fc86171801e00e7fa3eef9d

commit 3fbb903828b7ff609fc86171801e00e7fa3eef9d
Author: Chris Harrelson <chrishtr@chromium.org>
Date: Tue Jun 12 21:09:15 2018

[SPv175] Fix SVG image opacity animations

Now mark changes to property trees as requiring subtree invalidation, in cases
where the document is not in composited mode.

Bug:  850611 

TBR=chrishtr@chromium.org

(cherry picked from commit cab2a51906d80cec7c9b9a6084152dc0aeadbf9d)

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I256b752f520aa7c91520c01b3b05f8399c70d1a9
Reviewed-on: https://chromium-review.googlesource.com/1091595
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#565904}
Reviewed-on: https://chromium-review.googlesource.com/1097947
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#323}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[add] https://crrev.com/3fbb903828b7ff609fc86171801e00e7fa3eef9d/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc
[modify] https://crrev.com/3fbb903828b7ff609fc86171801e00e7fa3eef9d/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/3fbb903828b7ff609fc86171801e00e7fa3eef9d/third_party/blink/renderer/core/paint/paint_property_tree_builder.h
[modify] https://crrev.com/3fbb903828b7ff609fc86171801e00e7fa3eef9d/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc

Status: Fixed (was: Assigned)

Comment 15 by pdr@chromium.org, Jun 16 2018

 Issue 853443  has been merged into this issue.

Comment 16 by f...@opera.com, Jun 25 2018

 Issue 855887  has been merged into this issue.

Sign in to add a comment