Summary: | Add layout test for animated GIFs in iframes moved in and out of the viewport using -webkit-transform | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | Layout and Rendering | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | barraclough, commit-queue, koivisto, simon.fraser | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | 139672 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Chris Dumez
2014-12-16 13:41:50 PST
Created attachment 243390 [details]
Patch
Ping review 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. Created attachment 244188 [details]
Patch
Comment on attachment 244188 [details] Patch Clearing flags on attachment: 244188 Committed r178053: <http://trac.webkit.org/changeset/178053> All reviewed patches have been landed. Closing bug. |