Bug 78422

Summary: Convert svg/animations to use SMIL methods for driving the timeline
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, fishd, koivisto, krit, rakuco, tkent, webkit.review.bot, zherczeg, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 41761, 63396, 78219    
Attachments:
Description Flags
Patch
none
Follow-up patch
none
Cleanup patch
none
Cleanup patch - v2
none
Cleanup patch - v3 hausmann: review+

Nikolas Zimmermann
Reported 2012-02-11 14:28:40 PST
Convert svg/animations to use SMIL methods for driving the timeline. This allows us to remove the home-brewn sampleSVGAnimationAtTime method from DRTs LayoutTestController, and the support code all around in SVGSMILElement & SMILTimeContainer. Doing that, exposes two bugs in our SMIL implementation, that need to be resolved so that it works.
Attachments
Patch (332.04 KB, patch)
2012-02-11 15:31 PST, Nikolas Zimmermann
no flags
Follow-up patch (4.40 KB, patch)
2012-02-14 02:07 PST, Nikolas Zimmermann
no flags
Cleanup patch (144.16 KB, patch)
2012-02-14 04:10 PST, Nikolas Zimmermann
no flags
Cleanup patch - v2 (145.07 KB, patch)
2012-02-14 07:35 PST, Nikolas Zimmermann
no flags
Cleanup patch - v3 (144.50 KB, patch)
2012-02-15 00:49 PST, Nikolas Zimmermann
hausmann: review+
Nikolas Zimmermann
Comment 1 2012-02-11 15:31:28 PST
WebKit Review Bot
Comment 2 2012-02-11 15:33:35 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Darin Fisher (:fishd, Google)
Comment 3 2012-02-11 15:53:42 PST
Comment on attachment 126652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=126652&action=review > Source/WebKit/chromium/public/WebFrame.h:-629 > - virtual bool pauseSVGAnimation(const WebString& animationId, Chromium WebKit API change looks good to me.
Nikolas Zimmermann
Comment 4 2012-02-12 04:59:32 PST
FYIL new-run-webkit-tests svg/animations --randomize-order --iterations=100 All 9000 tests ran as expected. I don't see any flakiness anymore, even with -g. Note that this patch also doesn't need any rebaselines, it's all cross platform.
Nikolas Zimmermann
Comment 5 2012-02-13 06:05:16 PST
CC'ing Dirk/Zoltan/Antti for review.
Eric Seidel (no email)
Comment 6 2012-02-13 11:22:36 PST
Comment on attachment 126652 [details] Patch Seems like we should be able to do this in smaller (more reviewable) pieces.
Dirk Schulze
Comment 7 2012-02-13 20:18:22 PST
Comment on attachment 126652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=126652&action=review > Source/WebCore/ChangeLog:19 > + via beginElement/endElement - get removed if the begin/endTImes list is updated. Why? typo: s/endTImes/endTimes/ > Source/WebCore/ChangeLog:30 > + - document.getElementsByTagName('animateMotion')[0], always returned 'object SVGElement', instead of Normally this would be another bug report :) > Source/WebCore/ChangeLog:32 > + from SVGANimationElement were not available. Fix that by removing the last hacks from svgtags.in, s/SVGANimationElement/SVGAnimationElement/ > Source/WebCore/ChangeLog:70 > + * svg/svgtags.in: Enable animateMotion/hkern/mpath JS interfaces, which were not enabled, despite their IDLs existed. Another bug report.. normally ;) Do you test them? > LayoutTests/svg/animations/resources/SVGAnimationTestCase.js:77 > + // We still have to name this function runRepaintTest(), as svg/dynamic-updates/ ? where is repaintTest?
Nikolas Zimmermann
Comment 8 2012-02-14 00:27:36 PST
(In reply to comment #7) > typo: s/endTImes/endTimes/ > > > Source/WebCore/ChangeLog:30 > > + - document.getElementsByTagName('animateMotion')[0], always returned 'object SVGElement', instead of > > Normally this would be another bug report :) This is covered by animate-path-nested-transforms.js & animate-mpath-insert.js. > s/SVGANimationElement/SVGAnimationElement/ Fixed. > Another bug report.. normally ;) Do you test them? See above, both covered by svg/animations/ tests already. > > > LayoutTests/svg/animations/resources/SVGAnimationTestCase.js:77 > > + // We still have to name this function runRepaintTest(), as svg/dynamic-updates/ Oh, that comment is outdated, will fix.
Nikolas Zimmermann
Comment 9 2012-02-14 00:36:03 PST
(In reply to comment #6) > (From update of attachment 126652 [details]) > Seems like we should be able to do this in smaller (more reviewable) pieces. Point taken - but I already discussed with Dirk that he'll review it as-is.
Nikolas Zimmermann
Comment 10 2012-02-14 00:42:12 PST
Nikolas Zimmermann
Comment 11 2012-02-14 02:06:33 PST
Needs a follow-up change, for some last minute changes to lead to assertions in svg/animations/. Sorry.
Nikolas Zimmermann
Comment 12 2012-02-14 02:07:40 PST
Created attachment 126938 [details] Follow-up patch
WebKit Review Bot
Comment 13 2012-02-14 02:11:29 PST
Attachment 126938 [details] did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9 Updating OpenSource From git://git.webkit.org/WebKit + 6612fe4...3db9340 master -> origin/master (forced update) Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 107691 = 6612fe401de446ba8e6f5ae9e558e9f8593ff272 r107688 = 8a7f22a3d3816472d1f57c4f18232bbd60ff4597 r107689 = 818888131b08465aa4d43d5e865741d09553627e r107690 = fe093cab606d262debc8805bb541892699e59265 r107691 = c38205f7c7b217af975be90407f3d5bc69157e8c r107692 = 3db9340249163e9ff8eca4792746293bbc60277d Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Applying: [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets Using index info to reconstruct a base tree... <stdin>:1578: trailing whitespace. <stdin>:1647: trailing whitespace. <stdin>:1657: trailing whitespace. <stdin>:1672: trailing whitespace. return 0; <stdin>:1674: trailing whitespace. warning: squelched 7 whitespace errors warning: 12 lines add whitespace errors. Falling back to patching base and 3-way merge... warning: too many files (created: 168765 deleted: 3), skipping inexact rename detection Auto-merging LayoutTests/ChangeLog CONFLICT (content): Merge conflict in LayoutTests/ChangeLog Auto-merging Source/WebCore/ChangeLog CONFLICT (content): Merge conflict in Source/WebCore/ChangeLog Failed to merge in the changes. Patch failed at 0001 [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". rebase refs/remotes/origin/master: command returned error: 1 Died at Tools/Scripts/update-webkit line 164. If any of these errors are false positives, please file a bug against check-webkit-style.
Nikolas Zimmermann
Comment 14 2012-02-14 02:19:31 PST
Nikolas Zimmermann
Comment 15 2012-02-14 04:10:27 PST
Reopening to attach new patch.
Nikolas Zimmermann
Comment 16 2012-02-14 04:10:35 PST
Created attachment 126955 [details] Cleanup patch
WebKit Review Bot
Comment 17 2012-02-14 04:14:50 PST
Attachment 126955 [details] did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9 Updating OpenSource First, rewinding head to replay your work on top of it... Applying: [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets Using index info to reconstruct a base tree... <stdin>:1578: trailing whitespace. <stdin>:1647: trailing whitespace. <stdin>:1657: trailing whitespace. <stdin>:1672: trailing whitespace. return 0; <stdin>:1674: trailing whitespace. warning: squelched 7 whitespace errors warning: 12 lines add whitespace errors. Falling back to patching base and 3-way merge... warning: too many files (created: 168768 deleted: 3), skipping inexact rename detection Auto-merging LayoutTests/ChangeLog CONFLICT (content): Merge conflict in LayoutTests/ChangeLog Auto-merging Source/WebCore/ChangeLog Auto-merging Tools/ChangeLog CONFLICT (content): Merge conflict in Tools/ChangeLog Failed to merge in the changes. Patch failed at 0001 [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". rebase refs/remotes/origin/master: command returned error: 1 Died at Tools/Scripts/update-webkit line 164. If any of these errors are false positives, please file a bug against check-webkit-style.
Nikolas Zimmermann
Comment 18 2012-02-14 04:15:33 PST
Comment on attachment 126955 [details] Cleanup patch The "cleanup patch" does some house-keeping, and updates chromium expectations.
WebKit Review Bot
Comment 19 2012-02-14 05:00:59 PST
Comment on attachment 126955 [details] Cleanup patch Attachment 126955 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11518262 New failing tests: svg/animations/animate-text-nested-transforms.html
Nikolas Zimmermann
Comment 20 2012-02-14 07:35:55 PST
Created attachment 126977 [details] Cleanup patch - v2
WebKit Review Bot
Comment 21 2012-02-14 07:37:54 PST
Attachment 126977 [details] did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9 Updating OpenSource First, rewinding head to replay your work on top of it... Applying: [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets Using index info to reconstruct a base tree... <stdin>:1578: trailing whitespace. <stdin>:1647: trailing whitespace. <stdin>:1657: trailing whitespace. <stdin>:1672: trailing whitespace. return 0; <stdin>:1674: trailing whitespace. warning: squelched 7 whitespace errors warning: 12 lines add whitespace errors. Falling back to patching base and 3-way merge... warning: too many files (created: 168776 deleted: 3), skipping inexact rename detection Auto-merging LayoutTests/ChangeLog CONFLICT (content): Merge conflict in LayoutTests/ChangeLog Auto-merging Source/WebCore/ChangeLog CONFLICT (content): Merge conflict in Source/WebCore/ChangeLog Auto-merging Source/WebKit2/ChangeLog CONFLICT (content): Merge conflict in Source/WebKit2/ChangeLog Auto-merging Tools/ChangeLog CONFLICT (content): Merge conflict in Tools/ChangeLog Failed to merge in the changes. Patch failed at 0001 [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". rebase refs/remotes/origin/master: command returned error: 1 Died at Tools/Scripts/update-webkit line 164. If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 22 2012-02-14 08:09:58 PST
Comment on attachment 126977 [details] Cleanup patch - v2 Attachment 126977 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11521280 New failing tests: svg/animations/animate-text-nested-transforms.html
Nikolas Zimmermann
Comment 23 2012-02-14 11:23:53 PST
(In reply to comment #22) > (From update of attachment 126977 [details]) > Attachment 126977 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/11521280 > > New failing tests: > svg/animations/animate-text-nested-transforms.html Please ignore this failure for review, I'll skip it again, before landing, then check later on with the flakiness dashboard what's happening here. (The test is already marked as failing in trunk, I tried to revert it)
Dirk Schulze
Comment 24 2012-02-14 13:04:18 PST
Comment on attachment 126977 [details] Cleanup patch - v2 View in context: https://bugs.webkit.org/attachment.cgi?id=126977&action=review What is that for a style problem? > LayoutTests/ChangeLog:13 > + to expect values like "199.98". Use "200" instead. That doesn't reduce the Can there still be rounding issues between platforms? > LayoutTests/ChangeLog:-400 > - (g.setAttribute.rect.createSVGElement.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.g.appendChild.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.g.appendChild.rootSVGElement.appendChild.startSample): What is that? Your change log is broken, or is it really a previous commit that caused that? > LayoutTests/ChangeLog:-408 > - (rootSVGElement.setAttribute.text.createSVGElement.text.setAttribute.text.textContent.string_appeared_here.text.setAttribute.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.text.appendChild.rootSVGElement.appendChild.startSample): Ditto. > LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js:20 > +animateMotion.setAttribute("dur", "40s") 40s? Why not 4? > LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js:41 > + ["animation", 39.999, endSample] Why not 3.999? > LayoutTests/svg/animations/script-tests/animate-text-nested-transforms.js:13 > +animateMotion.setAttribute("dur", "40s") Ditto.
Dirk Schulze
Comment 25 2012-02-14 13:05:23 PST
Ah, your ChangeLog seems indeed be broken, why does it work with the other bots?
Nikolas Zimmermann
Comment 26 2012-02-14 13:13:05 PST
(In reply to comment #24) > (From update of attachment 126977 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=126977&action=review > > What is that for a style problem? Bot is wedged, see webkit-dev. > > > LayoutTests/ChangeLog:13 > > + to expect values like "199.98". Use "200" instead. That doesn't reduce the > > Can there still be rounding issues between platforms? I don't think so - you'll never know though. > > LayoutTests/ChangeLog:-400 > > - (g.setAttribute.rect.createSVGElement.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.g.appendChild.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.g.appendChild.rootSVGElement.appendChild.startSample): > > What is that? Your change log is broken, or is it really a previous commit that caused that? Well, prepare-ChangeLog is broken, I have to fix up the ChangeLog manually again. > > > LayoutTests/ChangeLog:-408 > > - (rootSVGElement.setAttribute.text.createSVGElement.text.setAttribute.text.textContent.string_appeared_here.text.setAttribute.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.text.appendChild.rootSVGElement.appendChild.startSample): > > Ditto. Thanks. > > > LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js:20 > > +animateMotion.setAttribute("dur", "40s") > > 40s? Why not 4? Ah, I talked with Rob about this on IRC. The animation runs so quick, that 0.001s may result in quite large differences from the start value (eg. rect beginning, x=50, animating to x=5000 in 1s). So I raised the duration - to make it slower. It doesn't matter at all for testing - it doesn't make the testcase slower. > Why not 3.999? See above.
Nikolas Zimmermann
Comment 27 2012-02-15 00:48:56 PST
Style bot is still wedged - I will upload a new version anyway to turn cr-linux ews green.
Nikolas Zimmermann
Comment 28 2012-02-15 00:49:20 PST
Created attachment 127127 [details] Cleanup patch - v3
Simon Hausmann
Comment 29 2012-02-15 00:56:11 PST
Comment on attachment 127127 [details] Cleanup patch - v3 rs=me
Nikolas Zimmermann
Comment 30 2012-02-15 01:00:16 PST
Comment on attachment 127127 [details] Cleanup patch - v3 Thanks Simon, landed patch in r107791.
Note You need to log in before you can comment on or make changes to this bug.