[ContentChangeObserver] Add support for observing opacity.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 20:58:37 +0000 (20:58 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Mar 2019 20:58:37 +0000 (20:58 +0000)
commit0c8100e145eb078728b2ab6159b8610ebefd810b
tree687d5bdbdc5df5f3168b235e3fac420f4abd8262
parenta117a5bf893f43e77519d5d9c245c95e0c0e0459
[ContentChangeObserver] Add support for observing opacity.
https://bugs.webkit.org/show_bug.cgi?id=196172

Reviewed by Simon Fraser.

Source/WebCore:

This patch adds support for observing opacity changes. At this point we only track one transition at a time.
if the page registers transition on both left and opacity, the first is getting observed only.

Tests: fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left.html
       fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition.html
       fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove.html
       fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition.html
       fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart.html

* page/ios/ContentChangeObserver.cpp:
(WebCore::isConsideredHidden):
(WebCore::ContentChangeObserver::didAddTransition):
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::isObservedPropertyForTransition const):

LayoutTests:

* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left.html: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition.html: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove.html: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition.html: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp
Source/WebCore/page/ios/ContentChangeObserver.h