[ContentChangeObserver] Fix failing test cases
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Mar 2019 20:08:54 +0000 (20:08 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Mar 2019 20:08:54 +0000 (20:08 +0000)
commita67d15659c249627b76a7973a2ddbf718f53c38b
tree1a6c6b997d01f1d576830e978ef694893b362c5c
parentd51dc22ec95fcbfdb9d17a8fbf3665d4a1a8ab5b
[ContentChangeObserver] Fix failing test cases
https://bugs.webkit.org/show_bug.cgi?id=195524
<rdar://problem/48745101>

Reviewed by Simon Fraser.

Source/WebCore:

1. Do not start DOM timer install observation when we already detected change at touchstart.
2. hasPendingActivity() should only care about ContentChangeObserver flags.
3. Do not try to notify the client when we are in the mouseMoved dispatch call (currently it could happen
when a timer gets intalled and removed right away).

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::adjustObservedState):
(WebCore::ContentChangeObserver::isNotifyContentChangeAllowed const): Deleted.
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::hasPendingActivity const):
(WebCore::ContentChangeObserver::isObservationTimeWindowActive const):

LayoutTests:

They've been failing ever since the 32ms fixed time window was introduced.

* fast/events/touch/ios/content-observation/click-instead-of-hover-simple.html:
* fast/events/touch/ios/content-observation/stuck-with-hover-state.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/content-observation/click-instead-of-hover-simple.html
LayoutTests/fast/events/touch/ios/content-observation/stuck-with-hover-state.html
LayoutTests/fast/events/touch/ios/content-observation/visibility-change-happens-at-the-second-timer.html
LayoutTests/fast/events/touch/ios/content-observation/visibility-change-happens-on-timer-hops.html
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp
Source/WebCore/page/ios/ContentChangeObserver.h