[ContentChangeObserver] Move DOMTimer schedule handling from global to ContentChangeO...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 00:08:20 +0000 (00:08 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 00:08:20 +0000 (00:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195090
<rdar://problem/48426771>

Reviewed by Tim Horton.

Also remove some unused functions from WKContentObservationInternal.

* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::startObservingDOMTimerScheduling):
(WebCore::ContentChangeObserver::stopObservingDOMTimerScheduling):
(WebCore::ContentChangeObserver::isObservingDOMTimerScheduling):
* platform/ios/wak/WKContentObservation.cpp:
(WKStartObservingDOMTimerScheduling): Deleted.
(WKStopObservingDOMTimerScheduling): Deleted.
(WKIsObservingDOMTimerScheduling): Deleted.
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WKContentObservationInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242176 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.h
Source/WebCore/page/ios/ContentChangeObserver.mm
Source/WebCore/platform/ios/wak/WKContentObservation.cpp
Source/WebCore/platform/ios/wak/WKContentObservation.h
Source/WebCore/platform/ios/wak/WKContentObservationInternal.h

index 962d84e..a717f9a 100644 (file)
@@ -1,5 +1,27 @@
 2019-02-27  Zalan Bujtas  <zalan@apple.com>
 
+        [ContentChangeObserver] Move DOMTimer schedule handling from global to ContentChangeObserver class
+        https://bugs.webkit.org/show_bug.cgi?id=195090
+        <rdar://problem/48426771>
+
+        Reviewed by Tim Horton.
+
+        Also remove some unused functions from WKContentObservationInternal.
+
+        * page/ios/ContentChangeObserver.h:
+        * page/ios/ContentChangeObserver.mm:
+        (WebCore::ContentChangeObserver::startObservingDOMTimerScheduling):
+        (WebCore::ContentChangeObserver::stopObservingDOMTimerScheduling):
+        (WebCore::ContentChangeObserver::isObservingDOMTimerScheduling):
+        * platform/ios/wak/WKContentObservation.cpp:
+        (WKStartObservingDOMTimerScheduling): Deleted.
+        (WKStopObservingDOMTimerScheduling): Deleted.
+        (WKIsObservingDOMTimerScheduling): Deleted.
+        * platform/ios/wak/WKContentObservation.h:
+        * platform/ios/wak/WKContentObservationInternal.h:
+
+2019-02-27  Zalan Bujtas  <zalan@apple.com>
+
         [ContentChangeObserver] Move style recalc handling from global to ContentChangeObserver class
         https://bugs.webkit.org/show_bug.cgi?id=195087
 
index ab97386..75f5edb 100644 (file)
@@ -97,6 +97,7 @@ private:
     HashSet<const DOMTimer*> m_DOMTimerList;
     bool m_observingNextStyleRecalc { false };
     bool m_observingStyleRecalcScheduling { false };
+    bool m_observingDOMTimerScheduling { false };
 };
 
 }
index ecfc01a..5a2bcfc 100644 (file)
@@ -166,18 +166,18 @@ bool ContentChangeObserver::isObservingContentChanges()
 
 void ContentChangeObserver::startObservingDOMTimerScheduling()
 {
-    WKStartObservingDOMTimerScheduling();
+    m_observingDOMTimerScheduling = true;
     clearObservedDOMTimers();
 }
 
 void ContentChangeObserver::stopObservingDOMTimerScheduling()
 {
-    WKStopObservingDOMTimerScheduling();
+    m_observingDOMTimerScheduling = false;
 }
 
 bool ContentChangeObserver::isObservingDOMTimerScheduling()
 {
-    return WKIsObservingDOMTimerScheduling();
+    return m_observingDOMTimerScheduling;
 }
 
 void ContentChangeObserver::startObservingStyleRecalcScheduling()
index 9e445d4..ebb8ac6 100644 (file)
@@ -36,7 +36,6 @@
 
 WKContentChange _WKContentChange                    = WKContentNoChange;
 bool            _WKObservingContentChanges          = false;
-bool            _WKObservingDOMTimerScheduling      = false;
 
 bool WKObservingContentChanges(void)
 {
@@ -54,21 +53,6 @@ void WKStopObservingContentChanges(void)
     _WKObservingContentChanges = false;
 }
 
-void WKStartObservingDOMTimerScheduling(void)
-{
-    _WKObservingDOMTimerScheduling = true;
-}
-
-void WKStopObservingDOMTimerScheduling(void)
-{
-    _WKObservingDOMTimerScheduling = false;
-}
-
-bool WKIsObservingDOMTimerScheduling(void)
-{
-    return _WKObservingDOMTimerScheduling;
-}
-
 WKContentChange WKObservedContentChange(void)
 {
     return _WKContentChange;
index 1d83a91..3c33784 100644 (file)
@@ -42,10 +42,6 @@ typedef enum
 WEBCORE_EXPORT void WKStartObservingContentChanges(void);
 WEBCORE_EXPORT void WKStopObservingContentChanges(void);
 
-WEBCORE_EXPORT void WKStartObservingDOMTimerScheduling(void);
-WEBCORE_EXPORT void WKStopObservingDOMTimerScheduling(void);
-WEBCORE_EXPORT bool WKIsObservingDOMTimerScheduling(void);
-
 WEBCORE_EXPORT WKContentChange WKObservedContentChange(void);
 
 #ifdef __cplusplus
index 5764067..cccf633 100644 (file)
@@ -36,9 +36,6 @@ extern "C" {
 
 bool WKObservingContentChanges(void);
 void WKSetObservedContentChange(WKContentChange);
-bool WebThreadContainsObservedDOMTimer(void* timer);
-void WebThreadAddObservedDOMTimer(void* timer);
-void WebThreadRemoveObservedDOMTimer(void* timer);
 
 #ifdef __cplusplus
 }