Bug 89687
| Summary: | Reloading a cached SVG image does not reset animations | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Philip Rogers <pdr> |
| Component: | SVG | Assignee: | Philip Rogers <pdr> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | bfulgham, zimmermann |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 89846 | ||
| Bug Blocks: | |||
Philip Rogers
If a user refreshes a page, the animation continues from the exact state it was in just prior to the refresh.
There is a reproduction on this page: http://socializepalmsprings.com/archivereference/test-for-chromium/svg-as-img.html
Original bug: crbug.com/132870
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nikolas Zimmermann
From SVGImage.cpp:
void SVGImage::drawSVGToImageBuffer(ImageBuffer* buffer, const IntSize& size, float zoom, float scale, ShouldClearBuffer shouldClear)
{
// FIXME: This doesn't work correctly with animations. If an image contains animations, that say run for 2 seconds,
// and we currently have one <img> that displays us. If we open another document referencing the same SVGImage it
// will display the document at a time where animations already ran - even though it has its own ImageBuffer.
// We currently don't implement SVGSVGElement::setCurrentTime, and can NOT go back in time, once animations started.
// There's no way to fix this besides avoiding style/attribute mutations from SVGAnimationElement.
Easy fixable today, as we have setCurrentTime support which is well-tested. I'm glad this can be resolved now.
Philip Rogers
(In reply to comment #1)
> Easy fixable today, as we have setCurrentTime support which is well-tested. I'm glad this can be resolved now.
If only it were so simple sometimes :P
https://bugs.webkit.org/show_bug.cgi?id=89846
Nikolas Zimmermann
(In reply to comment #2)
> (In reply to comment #1)
> > Easy fixable today, as we have setCurrentTime support which is well-tested. I'm glad this can be resolved now.
>
> If only it were so simple sometimes :P
> https://bugs.webkit.org/show_bug.cgi?id=89846
Heh, I didn't claim it's bug free, but at least setCurrentTime exists now...
When I wrote the comment in SVGImage.cpp, it seemed like light-years away for us to support it, glad it changed :-)
Brent Fulgham
The relevant test site no longer exists. We can't take further action on this bug report.