[ContentChangeObserver] Cleanup adjustObservedState
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 22:12:46 +0000 (22:12 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 22:12:46 +0000 (22:12 +0000)
commite4117f886c6441119a41a2928059e32997b7aaee
treeb8f4547acea3a30db98eebbaf65b37981a7900de
parent45684967dce51847db88dad9510b525b2b2f9591
[ContentChangeObserver] Cleanup adjustObservedState
https://bugs.webkit.org/show_bug.cgi?id=195470
<rdar://problem/48717823>

Reviewed by Simon Fraser.

This is in preparation for introducing an observation window from touchStart -> mouseMoved.
1. Cancel pending activities (future timers, pending stylesheet recalcs) when visible content change is detected.
2. The fixed time window takes care of notifying the client -timers, style recalcs during the window should not signal themselves.
3. Reset m_isObservingPendingStyleRecalc at StartedStyleRecalc instead of EndedStyleRecalc.

* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::domTimerExecuteDidFinish):
(WebCore::ContentChangeObserver::styleRecalcDidStart):
(WebCore::ContentChangeObserver::styleRecalcDidFinish):
(WebCore::ContentChangeObserver::adjustObservedState):
* page/ios/ContentChangeObserver.h:
(WebCore::ContentChangeObserver::hasPendingActivity const):
(WebCore::ContentChangeObserver::isObservationTimeWindowActive const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp
Source/WebCore/page/ios/ContentChangeObserver.h