Changeset 238699 in webkit


Ignore:
Timestamp:
Nov 29, 2018 3:08:21 PM (5 years ago)
Author:
Alan Bujtas
Message:

[ContentObservation] Make WKSetObservedContentChange logic more explicit.
https://bugs.webkit.org/show_bug.cgi?id=192183

Reviewed by Simon Fraser.

  • platform/ios/wak/WKContentObservation.cpp:

(WKSetObservedContentChange):
(WebThreadRemoveObservedDOMTimer):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238698 r238699  
     12018-11-29  Zalan Bujtas  <zalan@apple.com>
     2
     3        [ContentObservation] Make WKSetObservedContentChange logic more explicit.
     4        https://bugs.webkit.org/show_bug.cgi?id=192183
     5
     6        Reviewed by Simon Fraser.
     7
     8        * platform/ios/wak/WKContentObservation.cpp:
     9        (WKSetObservedContentChange):
     10        (WebThreadRemoveObservedDOMTimer):
     11
    1122018-11-29  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp

    r238695 r238699  
    5656}
    5757
    58 
    5958void WKStartObservingDOMTimerScheduling(void)
    6059{
     
    7877}
    7978
    80 void WKSetObservedContentChange(WKContentChange aChange)
     79void WKSetObservedContentChange(WKContentChange change)
    8180{
    82     if (aChange > _WKContentChange && (_WKObservingDOMTimerScheduling || aChange != WKContentIndeterminateChange)) {
    83         _WKContentChange = aChange;
    84         if (_WKContentChange == WKContentVisibilityChange)
    85             WebThreadClearObservedDOMTimers();
     81    // We've already have a definite answer.
     82    if (_WKContentChange == WKContentVisibilityChange)
     83        return;
     84
     85    if (change == WKContentVisibilityChange) {
     86        _WKContentChange = change;
     87        // Don't need to listen to DOM timers anymore.
     88        WebThreadClearObservedDOMTimers();
     89        return;
    8690    }
     91
     92    if (change == WKContentIndeterminateChange) {
     93        _WKContentChange = change;
     94        return;
     95    }
     96    ASSERT_NOT_REACHED();
    8797}
    8898
Note: See TracChangeset for help on using the changeset viewer.