[ContentChangeObserver] Check if the transitioned content is visible at onAnimationEnd
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 20:47:47 +0000 (20:47 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 20:47:47 +0000 (20:47 +0000)
commita117a5bf893f43e77519d5d9c245c95e0c0e0459
treeb25ddc600388f037f969ae7cb30b6182db518968
parent7dd8711e682ae451b4bbb340cf41b5e89828945f
[ContentChangeObserver] Check if the transitioned content is visible at onAnimationEnd
https://bugs.webkit.org/show_bug.cgi?id=196171

Reviewed by Simon Fraser.

Source/WebCore:

At onAnimationEnd we don't yet have the final computed style for the transitioned content.
However the current state (before computing the final style) might already be qualified to be visible.
Introduce "CompletedTransition" to indicate that the transition is all set as far observing is concerned
(as opposed to "EndedTransition" where we still need to observe the content for the final style change).

Test: fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didFinishTransition):
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/ContentChangeObserver.h:

LayoutTests:

* fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end-expected.txt: Added.
* fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp
Source/WebCore/page/ios/ContentChangeObserver.h