REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 19:05:43 +0000 (19:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 19:05:43 +0000 (19:05 +0000)
commitb7664fc00a46d286bf3d49a3b53e0a5df42edb82
tree4b2d93c4f76f4f14472c8358427e6caf96a3e3b7
parente33c59df8c35fc8c011efd3037aa30893599e336
REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear
https://bugs.webkit.org/show_bug.cgi?id=188655
rdar://problem/43382687

Reviewed by Antoine Quint.

Source/WebCore:

The logic that computes animation extent, used by backing store attachment code, failed
to account for the behavior where a keyframe animation with a missing 0% keyframe uses
the transform from the unanimated style. This resulted in the computed extent being wrong,
which caused us to remove the layer's backing store in some scenarios.

Fix both animation code paths to use the renderer style if the first keyframe doesn't
contain a transform.

Tests: compositing/backing/backing-store-attachment-empty-keyframe.html
       legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):

LayoutTests:

* compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added.
* compositing/backing/backing-store-attachment-empty-keyframe.html: Added.
* legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt: Added.
* legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt [new file with mode: 0644]
LayoutTests/compositing/backing/backing-store-attachment-empty-keyframe.html [new file with mode: 0644]
LayoutTests/legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe-expected.txt [new file with mode: 0644]
LayoutTests/legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/KeyframeEffect.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp