Title: [242184] trunk/Source/WebCore
Revision
242184
Author
[email protected]
Date
2019-02-27 16:58:13 -0800 (Wed, 27 Feb 2019)

Log Message

[ContentChangeObserver] Move _WKObservingContentChanges from global to ContentChangeObserver class
https://bugs.webkit.org/show_bug.cgi?id=195091
<rdar://problem/48427271>

Reviewed by Tim Horton.

* page/ios/ContentChangeObserver.h:
* page/ios/ContentChangeObserver.mm:
(WebCore::ContentChangeObserver::startObservingContentChanges):
(WebCore::ContentChangeObserver::stopObservingContentChanges):
(WebCore::ContentChangeObserver::isObservingContentChanges):
* platform/ios/wak/WKContentObservation.cpp:
(WKObservingContentChanges): Deleted.
(WKStartObservingContentChanges): Deleted.
(WKStopObservingContentChanges): Deleted.
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WKContentObservationInternal.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (242183 => 242184)


--- trunk/Source/WebCore/ChangeLog	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/ChangeLog	2019-02-28 00:58:13 UTC (rev 242184)
@@ -1,3 +1,23 @@
+2019-02-27  Zalan Bujtas  <[email protected]>
+
+        [ContentChangeObserver] Move _WKObservingContentChanges from global to ContentChangeObserver class
+        https://bugs.webkit.org/show_bug.cgi?id=195091
+        <rdar://problem/48427271>
+
+        Reviewed by Tim Horton.
+
+        * page/ios/ContentChangeObserver.h:
+        * page/ios/ContentChangeObserver.mm:
+        (WebCore::ContentChangeObserver::startObservingContentChanges):
+        (WebCore::ContentChangeObserver::stopObservingContentChanges):
+        (WebCore::ContentChangeObserver::isObservingContentChanges):
+        * platform/ios/wak/WKContentObservation.cpp:
+        (WKObservingContentChanges): Deleted.
+        (WKStartObservingContentChanges): Deleted.
+        (WKStopObservingContentChanges): Deleted.
+        * platform/ios/wak/WKContentObservation.h:
+        * platform/ios/wak/WKContentObservationInternal.h:
+
 2019-02-27  Brady Eidson  <[email protected]>
 
         Universal links from Google search results pages don't open the app.

Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.h (242183 => 242184)


--- trunk/Source/WebCore/page/ios/ContentChangeObserver.h	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.h	2019-02-28 00:58:13 UTC (rev 242184)
@@ -98,6 +98,7 @@
     bool m_observingNextStyleRecalc { false };
     bool m_observingStyleRecalcScheduling { false };
     bool m_observingDOMTimerScheduling { false };
+    bool m_observingContentChanges { false };
 };
 
 }

Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.mm (242183 => 242184)


--- trunk/Source/WebCore/page/ios/ContentChangeObserver.mm	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.mm	2019-02-28 00:58:13 UTC (rev 242184)
@@ -60,8 +60,8 @@
     if (!containsObservedDOMTimer(timer))
         return;
     LOG_WITH_STREAM(ContentObservation, stream << "startObservingDOMTimerExecute: start observing (" << &timer << ") timer callback.");
-    WKStartObservingContentChanges();
     startObservingStyleRecalcScheduling();
+    m_observingContentChanges = true;
 }
 
 void ContentChangeObserver::stopObservingDOMTimerExecute(const DOMTimer& timer)
@@ -99,7 +99,7 @@
     if (!shouldObserveNextStyleRecalc())
         return;
     LOG(ContentObservation, "startObservingStyleResolve: start observing style resolve.");
-    WKStartObservingContentChanges();
+    m_observingContentChanges = true;
 }
 
 void ContentChangeObserver::stopObservingStyleResolve()
@@ -150,18 +150,19 @@
 void ContentChangeObserver::startObservingContentChanges()
 {
     startObservingDOMTimerScheduling();
-    WKStartObservingContentChanges();
+    setObservedContentChange(WKContentNoChange);
+    m_observingContentChanges = true;
 }
 
 void ContentChangeObserver::stopObservingContentChanges()
 {
     stopObservingDOMTimerScheduling();
-    WKStopObservingContentChanges();
+    m_observingContentChanges = false;
 }
 
 bool ContentChangeObserver::isObservingContentChanges()
 {
-    return WKObservingContentChanges();
+    return m_observingContentChanges;
 }
 
 void ContentChangeObserver::startObservingDOMTimerScheduling()

Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp (242183 => 242184)


--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp	2019-02-28 00:58:13 UTC (rev 242184)
@@ -34,25 +34,8 @@
 #include <wtf/HashMap.h>
 #include <wtf/NeverDestroyed.h>
 
-WKContentChange _WKContentChange                    = WKContentNoChange;
-bool            _WKObservingContentChanges          = false;
+WKContentChange _WKContentChange = WKContentNoChange;
 
-bool WKObservingContentChanges(void)
-{
-    return _WKObservingContentChanges;
-}
-
-void WKStartObservingContentChanges()
-{
-    _WKContentChange = WKContentNoChange;
-    _WKObservingContentChanges = true;
-}
-
-void WKStopObservingContentChanges(void)
-{
-    _WKObservingContentChanges = false;
-}
-
 WKContentChange WKObservedContentChange(void)
 {
     return _WKContentChange;

Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h (242183 => 242184)


--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.h	2019-02-28 00:58:13 UTC (rev 242184)
@@ -39,9 +39,6 @@
     WKContentIndeterminateChange    = 1
 }   WKContentChange;
 
-WEBCORE_EXPORT void WKStartObservingContentChanges(void);
-WEBCORE_EXPORT void WKStopObservingContentChanges(void);
-
 WEBCORE_EXPORT WKContentChange WKObservedContentChange(void);
 
 #ifdef __cplusplus

Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservationInternal.h (242183 => 242184)


--- trunk/Source/WebCore/platform/ios/wak/WKContentObservationInternal.h	2019-02-28 00:57:37 UTC (rev 242183)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservationInternal.h	2019-02-28 00:58:13 UTC (rev 242184)
@@ -34,7 +34,6 @@
 extern "C" {
 #endif
 
-bool WKObservingContentChanges(void);
 void WKSetObservedContentChange(WKContentChange);
 
 #ifdef __cplusplus
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to