RESOLVED FIXED 139701
Add layout test for animated GIFs in iframes moved in and out of the viewport using -webkit-transform
https://bugs.webkit.org/show_bug.cgi?id=139701
Summary Add layout test for animated GIFs in iframes moved in and out of the viewport...
Chris Dumez
Reported 2014-12-16 13:41:50 PST
Add layout test for animated GIFs in iframes moved in and out of the viewport using -webkit-transform CSS property.
Attachments
Patch (6.42 KB, patch)
2014-12-16 13:47 PST, Chris Dumez
no flags
Patch (6.34 KB, patch)
2015-01-07 13:44 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-12-16 13:47:19 PST
Chris Dumez
Comment 2 2015-01-05 12:27:30 PST
Ping review
Simon Fraser (smfr)
Comment 3 2015-01-07 13:41:12 PST
Comment on attachment 243390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243390&action=review > LayoutTests/fast/images/animated-gif-iframe-webkit-transform.html:58 > +function isFirstImagePaused() { > + var firstFrame = document.getElementById("testFrame1"); > + return internals.hasPausedImageAnimations(firstFrame.contentDocument.getElementById('testImage')); > +} > + > +function isSecondImagePaused() { > + var secondFrame = document.getElementById("testFrame2"); > + return internals.hasPausedImageAnimations(secondFrame.contentDocument.getElementById('testImage')); > +} > + > +function forceLayout() { > + document.getElementById("scroller-cont").offsetLeft; > +} > + > +function checkSecondImageUnpaused() { > + shouldBecomeEqual("isSecondImagePaused()", "false", translateImagesRight); > +} > + > +function checkSecondImagePaused() { > + shouldBecomeEqual("isSecondImagePaused()", "true", finishJSTest); > +} > + > +function translateImagesLeft() { > + shouldBeFalse("isFirstImagePaused()"); > + debug("Translating images left so that first image is no longer visible, but second image is."); > + forceLayout(); > + document.getElementById("scroller-cont").style["-webkit-transform"] = "translate(-800px, 0px)"; > + shouldBecomeEqual("isFirstImagePaused()", "true", checkSecondImageUnpaused); > +} > + > +function translateImagesRight() { > + debug("Translating images right so that second image is no longer visible, but first image is."); > + forceLayout(); > + document.getElementById("scroller-cont").style["-webkit-transform"] = "translate(0px, 0px)"; > + shouldBecomeEqual("isFirstImagePaused()", "false", checkSecondImagePaused); > +} JS style is opening paren on new line.
Chris Dumez
Comment 4 2015-01-07 13:44:47 PST
WebKit Commit Bot
Comment 5 2015-01-07 14:26:29 PST
Comment on attachment 244188 [details] Patch Clearing flags on attachment: 244188 Committed r178053: <http://trac.webkit.org/changeset/178053>
WebKit Commit Bot
Comment 6 2015-01-07 14:26:33 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.