Rotation animations sometimes use the wrong origin (affects apple.com)
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2019 00:48:37 +0000 (00:48 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2019 00:48:37 +0000 (00:48 +0000)
commita2899c8c2099c998ca6ab89d02ef905074a740e8
tree8ceee55daf3fe30510a45fd7f3ff4e270264a91d
parentcde85a79d2e75ac53febc379a534683fc9a42efc
Rotation animations sometimes use the wrong origin (affects apple.com)
https://bugs.webkit.org/show_bug.cgi?id=194878
<rdar://problem/43908047>

Reviewed by Simon Fraser.

Source/WebCore:

Some versions of CoreAnimation apply additive animations in reverse
order. Detect this and reverse the list of animations we provide.

Update the existing animations/additive-transform-animations.html test to
be a ref-test that would identify this failure. Previously it relied on
a pixel test.

* platform/graphics/ca/GraphicsLayerCA.cpp: Use
    HAVE_CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED to decide whether or
    not to flip the list of animations (and mark the correct ones as
    additive).
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

Source/WTF:

* wtf/Platform.h: Add HAVE(CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED).

LayoutTests:

Update an old pixel test to be a new ref test, and remove all the old platform-specific
-expected versions.

* animations/additive-transform-animations-expected.png: Removed.
* animations/additive-transform-animations.html:
* legacy-animation-engine/animations/additive-transform-animations-expected.png: Removed.
* legacy-animation-engine/animations/additive-transform-animations.html:
* platform/gtk/animations/additive-transform-animations-expected.png: Removed.
* platform/gtk/animations/additive-transform-animations-expected.txt: Removed.
* platform/gtk/legacy-animation-engine/animations/additive-transform-animations-expected.png: Removed.
* platform/gtk/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.
* platform/ios/animations/additive-transform-animations-expected.txt: Removed.
* platform/ios/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.
* platform/mac/animations/additive-transform-animations-expected.txt: Removed.
* platform/mac/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.
* platform/win/animations/additive-transform-animations-expected.txt: Removed.
* platform/win/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.
* platform/wincairo/animations/additive-transform-animations-expected.txt: Removed.
* platform/wincairo/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.
* platform/wpe/animations/additive-transform-animations-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/additive-transform-animations-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/additive-transform-animations-expected.png [deleted file]
LayoutTests/animations/additive-transform-animations.html
LayoutTests/legacy-animation-engine/animations/additive-transform-animations-expected.png [deleted file]
LayoutTests/legacy-animation-engine/animations/additive-transform-animations.html
LayoutTests/platform/gtk/animations/additive-transform-animations-expected.png [deleted file]
LayoutTests/platform/gtk/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/gtk/legacy-animation-engine/animations/additive-transform-animations-expected.png [deleted file]
LayoutTests/platform/gtk/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/ios/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/ios/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/mac/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/mac/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/win/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/win/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/wincairo/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/wincairo/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/wpe/animations/additive-transform-animations-expected.txt [deleted file]
LayoutTests/platform/wpe/legacy-animation-engine/animations/additive-transform-animations-expected.txt [deleted file]
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp