Created attachment 340881 [details]
Repro html and gif file
If an animated GIF (either via background-image or img tag) is set to have a 90 degree rotation on the X or Y axis (3d) then it will not animate.
If there is no perspective this may make sense as a performance optimization, but it occurs even if perspective is set and the image is being shown.
Attachment has a simple repro case.
Resizing the window causes a single frame re-render.
This occurs on Safari 11.
This does not affect Chrome, nor Safari v6.
This happens because when the <img> element is drawn with perspective css, it is drawn to a layer by getting the current frame and setting its to the layer through GraphicsLayerCA::setContentsToImage().
Getting the current frame by calling BitmapImage::frameImageAtIndexCacheIfNeeded() forces sync image decoding and does start the animation timer for the next frame.
So the "set layer contents to image" code path does the wrong thing with rotated frames? We should turn off the optimization in that case.