[PAL] Move HysteresisActivity into PAL
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 18:37:22 +0000 (18:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 18:37:22 +0000 (18:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177516

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-09-28
Reviewed by Alex Christensen.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/UserActivity.cpp:
(WebCore::UserActivity::UserActivity):
(WebCore::UserActivity::hysteresisUpdated):
* platform/UserActivity.h:
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h:
* platform/ios/WebSQLiteDatabaseTrackerClient.h:
* platform/ios/WebSQLiteDatabaseTrackerClient.mm:
(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/HysteresisActivity.h: Renamed from Source/WebCore/platform/HysteresisActivity.h.

Source/WebKit:

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
* Shared/WebSQLiteDatabaseTracker.cpp:
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
* Shared/WebSQLiteDatabaseTracker.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_pageScrolledHysteresis):
(WebKit::m_userActivityHysteresis):
(WebKit::WebPage::updateUserActivity):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:

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

19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/HysteresisActivity.h [moved from Source/WebCore/platform/HysteresisActivity.h with 95% similarity]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/UserActivity.cpp
Source/WebCore/platform/UserActivity.h
Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h
Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.h
Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp
Source/WebKit/Shared/WebSQLiteDatabaseTracker.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h

index fbc38b3..1a6756b 100644 (file)
@@ -1,3 +1,23 @@
+2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [PAL] Move HysteresisActivity into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=177516
+
+        Reviewed by Alex Christensen.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/UserActivity.cpp:
+        (WebCore::UserActivity::UserActivity):
+        (WebCore::UserActivity::hysteresisUpdated):
+        * platform/UserActivity.h:
+        * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
+        (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
+        * platform/graphics/cairo/BackingStoreBackendCairoImpl.h:
+        * platform/ios/WebSQLiteDatabaseTrackerClient.h:
+        * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
+        (WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
+        (WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):
+
 2017-09-28  Chris Dumez  <cdumez@apple.com>
 
         Add support for <link rel=preconnect>
index e636504..e328bb4 100644 (file)
@@ -1,3 +1,13 @@
+2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [PAL] Move HysteresisActivity into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=177516
+
+        Reviewed by Alex Christensen.
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/HysteresisActivity.h: Renamed from Source/WebCore/platform/HysteresisActivity.h.
+
 2017-09-28  Chris Dumez  <cdumez@apple.com>
 
         Add support for <link rel=preconnect>
index 255a3a7..9b7f290 100644 (file)
                A3788E981F05B6CE00679425 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = A3788E971F05B6CE00679425 /* Sound.h */; };
                A3788E9C1F05B78200679425 /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9B1F05B78200679425 /* Sound.cpp */; };
                A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3788E9D1F05B78E00679425 /* SoundMac.mm */; };
+               A39DE74E1F7C443D007BCB00 /* HysteresisActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = A39DE74D1F7C443C007BCB00 /* HysteresisActivity.h */; };
                A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E511F3D1DC5009C14B1 /* SleepDisabler.cpp */; };
                A3AB6E561F3D1DDB009C14B1 /* SleepDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3AB6E531F3D1DDB009C14B1 /* SleepDisabler.h */; };
                A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E541F3D1DDB009C14B1 /* SystemSleepListener.cpp */; };
                A3788E971F05B6CE00679425 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
                A3788E9B1F05B78200679425 /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = "<group>"; };
                A3788E9D1F05B78E00679425 /* SoundMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SoundMac.mm; sourceTree = "<group>"; };
+               A39DE74D1F7C443C007BCB00 /* HysteresisActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HysteresisActivity.h; sourceTree = "<group>"; };
                A3AB6E511F3D1DC5009C14B1 /* SleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SleepDisabler.cpp; sourceTree = "<group>"; };
                A3AB6E531F3D1DDB009C14B1 /* SleepDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SleepDisabler.h; sourceTree = "<group>"; };
                A3AB6E541F3D1DDB009C14B1 /* SystemSleepListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemSleepListener.cpp; sourceTree = "<group>"; };
                                0CF99CA61F738436007EE793 /* CoreMediaSoftLink.cpp */,
                                0CF99CA71F738437007EE793 /* CoreMediaSoftLink.h */,
                        );
-                       name = cf;
-                       path = "New Group";
+                       path = cf;
                        sourceTree = "<group>";
                };
                1C09D0341E31C32800725F18 = {
                                A3788E9F1F05B7CE00679425 /* system */,
                                A30D411D1F0DD0AC00B71954 /* text */,
                                0C2D9E721EEF5AF600DBC317 /* ExportMacros.h */,
+                               A39DE74D1F7C443C007BCB00 /* HysteresisActivity.h */,
                                0708AC321F4C874A001F788F /* Logger.h */,
                                07377ADB1F5777D70027F16D /* LoggerHelper.h */,
                                A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */,
                                0C5AF91B1F43A4C7002EAC02 /* GraphicsServicesSPI.h in Headers */,
                                A102658E1F567E9D00B4C844 /* HIServicesSPI.h in Headers */,
                                A10265891F56747A00B4C844 /* HIToolboxSPI.h in Headers */,
+                               A39DE74E1F7C443D007BCB00 /* HysteresisActivity.h in Headers */,
                                0C2DA11F1F3BE9E000DBC317 /* ImageIOSPI.h in Headers */,
                                0C2DA1421F3BEB4900DBC317 /* IOPMLibSPI.h in Headers */,
                                0C2DA1431F3BEB4900DBC317 /* IOPSLibSPI.h in Headers */,
similarity index 95%
rename from Source/WebCore/platform/HysteresisActivity.h
rename to Source/WebCore/PAL/pal/HysteresisActivity.h
index a5c82fd..563600e 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef HysteresisActivity_h
-#define HysteresisActivity_h
+#pragma once
 
 #include <wtf/RunLoop.h>
 #include <wtf/Seconds.h>
 
-namespace WebCore {
+namespace PAL {
 
 static const Seconds defaultHysteresisDuration { 5_s };
 
@@ -95,6 +94,4 @@ private:
     RunLoop::Timer<HysteresisActivity> m_timer;
 };
 
-} // namespace WebCore
-
-#endif // HysteresisActivity_h
+} // namespace PAL
index 6905c23..25141cb 100644 (file)
                854FE7390A2297BE0058D7AD /* TreeWalker.h in Headers */ = {isa = PBXBuildFile; fileRef = 854FE72F0A2297BE0058D7AD /* TreeWalker.h */; settings = {ATTRIBUTES = (Private, ); }; };
                861C2EA413FB4FDD00062ABB /* LoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA313FB4FDD00062ABB /* LoadTiming.cpp */; };
                862F129E18C1576F005C54AF /* CountedUserActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 862F129D18C1572C005C54AF /* CountedUserActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               862F12A018C1DD02005C54AF /* HysteresisActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 862F129F18C1DCE4005C54AF /* HysteresisActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
                86512EDE154A2AEF00A90426 /* PerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */; };
                86512EDF154A2AEF00A90426 /* PerformanceResourceTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */; };
                868160D418766A0A0021E79D /* UserActivity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868160D1187669C40021E79D /* UserActivity.cpp */; };
                85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLOptionsCollection.idl; sourceTree = "<group>"; };
                861C2EA313FB4FDD00062ABB /* LoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadTiming.cpp; sourceTree = "<group>"; };
                862F129D18C1572C005C54AF /* CountedUserActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountedUserActivity.h; sourceTree = "<group>"; };
-               862F129F18C1DCE4005C54AF /* HysteresisActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HysteresisActivity.h; sourceTree = "<group>"; };
                86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceResourceTiming.cpp; sourceTree = "<group>"; };
                86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceResourceTiming.h; sourceTree = "<group>"; };
                86512EDD154A2AEF00A90426 /* PerformanceResourceTiming.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceResourceTiming.idl; sourceTree = "<group>"; };
                                CD62FB941AF018E70012ED7D /* GenericTaskQueue.h */,
                                A8748BDF12CBF2DC001FBA41 /* HashTools.h */,
                                BC3BC29B0E91AB0F00835588 /* HostWindow.h */,
-                               862F129F18C1DCE4005C54AF /* HysteresisActivity.h */,
                                1AE00D57182DAC8D00087DD7 /* KeyedCoding.h */,
                                E15FF7D418C9553800FE4C87 /* KeypressCommand.h */,
                                A3D42A841F33BA3600A64B62 /* LayoutUnit.cpp */,
                                41614A791DA64241004AD06F /* HTTPHeaderValues.h in Headers */,
                                514C76730CE923A1007EF3CD /* HTTPParsers.h in Headers */,
                                375CD232119D43C800A2A859 /* Hyphenation.h in Headers */,
-                               862F12A018C1DD02005C54AF /* HysteresisActivity.h in Headers */,
                                5EBB89331C77782900C65D41 /* IceCandidate.h in Headers */,
                                B275356E0B053814002CE64F /* Icon.h in Headers */,
                                513F14540AB634C400094DDF /* IconLoader.h in Headers */,
index 3bcb2f3..62e2d21 100644 (file)
@@ -45,14 +45,14 @@ void UserActivity::Impl::endActivity()
 #endif
 
 UserActivity::UserActivity(const char* description)
-    : HysteresisActivity([this](HysteresisState state) { hysteresisUpdated(state); })
+    : PAL::HysteresisActivity([this](PAL::HysteresisState state) { hysteresisUpdated(state); })
     , m_impl(description)
 {
 }
 
-void UserActivity::hysteresisUpdated(HysteresisState state)
+void UserActivity::hysteresisUpdated(PAL::HysteresisState state)
 {
-    if (state == HysteresisState::Started)
+    if (state == PAL::HysteresisState::Started)
         m_impl.beginActivity();
     else
         m_impl.endActivity();
index 7b0c1da..eeb2d73 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef UserActivity_h
 #define UserActivity_h
 
-#include "HysteresisActivity.h"
+#include <pal/HysteresisActivity.h>
 
 #if HAVE(NS_ACTIVITY)
 #include <objc/objc.h>
@@ -40,7 +40,7 @@ namespace WebCore {
 // The UserActivity type is used to indicate to the operating system that
 // a user initiated or visible action is taking place, and as such that
 // resources should be allocated to the process accordingly.
-class UserActivity : public HysteresisActivity {
+class UserActivity : public PAL::HysteresisActivity {
 public:
     class Impl {
     public:
@@ -59,7 +59,7 @@ public:
     WEBCORE_EXPORT explicit UserActivity(const char* description);
 
 private:
-    void hysteresisUpdated(HysteresisState);
+    void hysteresisUpdated(PAL::HysteresisState);
 
     Impl m_impl;
 };
index 15e696a..1a81cdc 100644 (file)
@@ -41,7 +41,7 @@ static RefPtr<cairo_surface_t> createCairoImageSurfaceWithFastMalloc(const IntSi
 
 BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl(const IntSize& size, float deviceScaleFactor)
     : BackingStoreBackendCairo(size)
-    , m_scrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_scrollSurface = nullptr; }, scrollHysteresisDuration)
+    , m_scrolledHysteresis([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) m_scrollSurface = nullptr; }, scrollHysteresisDuration)
 {
     IntSize scaledSize = m_size;
     scaledSize.scale(deviceScaleFactor);
index 4537d35..458a9fc 100644 (file)
@@ -20,7 +20,7 @@
 
 #if USE(CAIRO)
 #include "BackingStoreBackendCairo.h"
-#include <WebCore/HysteresisActivity.h>
+#include <pal/HysteresisActivity.h>
 
 namespace WebCore {
 
@@ -33,7 +33,7 @@ private:
     void scroll(const IntRect&, const IntSize&) override;
 
     RefPtr<cairo_surface_t> m_scrollSurface;
-    WebCore::HysteresisActivity m_scrolledHysteresis;
+    PAL::HysteresisActivity m_scrolledHysteresis;
 };
 
 } // namespace WebCore
index 7b2d242..f9377cd 100644 (file)
@@ -27,8 +27,8 @@
 
 #if PLATFORM(IOS)
 
-#include "HysteresisActivity.h"
 #include "SQLiteDatabaseTrackerClient.h"
+#include <pal/HysteresisActivity.h>
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 
@@ -47,9 +47,9 @@ private:
     WebSQLiteDatabaseTrackerClient();
     virtual ~WebSQLiteDatabaseTrackerClient();
 
-    void hysteresisUpdated(HysteresisState);
+    void hysteresisUpdated(PAL::HysteresisState);
 
-    HysteresisActivity m_hysteresis;
+    PAL::HysteresisActivity m_hysteresis;
 };
 
 }
index 0a9bb95..07d3d5d 100644 (file)
@@ -50,7 +50,7 @@ WebSQLiteDatabaseTrackerClient& WebSQLiteDatabaseTrackerClient::sharedWebSQLiteD
 }
 
 WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient()
-    : m_hysteresis([this](HysteresisState state) { hysteresisUpdated(state); }, hysteresisDuration)
+    : m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); }, hysteresisDuration)
 {
 }
 
@@ -72,9 +72,9 @@ void WebSQLiteDatabaseTrackerClient::didFinishLastTransaction()
     });
 }
 
-void WebSQLiteDatabaseTrackerClient::hysteresisUpdated(HysteresisState state)
+void WebSQLiteDatabaseTrackerClient::hysteresisUpdated(PAL::HysteresisState state)
 {
-    if (state == HysteresisState::Started)
+    if (state == PAL::HysteresisState::Started)
         [WebDatabaseTransactionBackgroundTaskController startBackgroundTask];
     else
         [WebDatabaseTransactionBackgroundTaskController endBackgroundTask];
index e24bc9a..da852c9 100644 (file)
@@ -1,3 +1,25 @@
+2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
+
+        [PAL] Move HysteresisActivity into PAL
+        https://bugs.webkit.org/show_bug.cgi?id=177516
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
+        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
+        * Shared/WebSQLiteDatabaseTracker.cpp:
+        (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
+        (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
+        * Shared/WebSQLiteDatabaseTracker.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_pageScrolledHysteresis):
+        (WebKit::m_userActivityHysteresis):
+        (WebKit::WebPage::updateUserActivity):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+        * WebProcess/WebProcess.h:
+
 2017-09-28  Chris Dumez  <cdumez@apple.com>
 
         Add support for <link rel=preconnect>
index 6e6ffe2..ed80915 100644 (file)
@@ -34,7 +34,7 @@
 #include "NetworkCacheSubresourcesEntry.h"
 #include "NetworkProcess.h"
 #include <WebCore/DiagnosticLoggingKeys.h>
-#include <WebCore/HysteresisActivity.h>
+#include <pal/HysteresisActivity.h>
 #include <wtf/HashCountedSet.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/RefCounted.h>
@@ -207,7 +207,7 @@ private:
         : m_storage(storage)
         , m_mainResourceKey(mainResourceKey)
         , m_loadCompletionHandler(WTFMove(loadCompletionHandler))
-        , m_loadHysteresisActivity([this](HysteresisState state) { if (state == HysteresisState::Stopped) markLoadAsCompleted(); })
+        , m_loadHysteresisActivity([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) markLoadAsCompleted(); })
     {
         m_loadHysteresisActivity.impulse();
     }
@@ -239,7 +239,7 @@ private:
     Key m_mainResourceKey;
     Vector<std::unique_ptr<SubresourceLoad>> m_subresourceLoads;
     WTF::Function<void()> m_loadCompletionHandler;
-    HysteresisActivity m_loadHysteresisActivity;
+    PAL::HysteresisActivity m_loadHysteresisActivity;
     std::unique_ptr<SubresourcesEntry> m_existingEntry;
     bool m_didFinishLoad { false };
     bool m_didRetrieveExistingEntry { false };
index 92a7f94..fb691b1 100644 (file)
@@ -39,7 +39,7 @@ namespace WebKit {
 
 WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(NetworkProcess& process)
     : m_process(process)
-    , m_hysteresis([this](HysteresisState state) { hysteresisUpdated(state); })
+    , m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); })
     , m_childProcessType(ChildProcessType::Network)
 {
     SQLiteDatabaseTracker::setClient(this);
@@ -47,7 +47,7 @@ WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(NetworkProcess& process)
 
 WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(WebProcess& process)
     : m_process(process)
-    , m_hysteresis([this](HysteresisState state) { hysteresisUpdated(state); })
+    , m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); })
     , m_childProcessType(ChildProcessType::WebContent)
 {
     SQLiteDatabaseTracker::setClient(this);
@@ -67,14 +67,14 @@ void WebSQLiteDatabaseTracker::didFinishLastTransaction()
     });
 }
 
-void WebSQLiteDatabaseTracker::hysteresisUpdated(HysteresisState state)
+void WebSQLiteDatabaseTracker::hysteresisUpdated(PAL::HysteresisState state)
 {
     switch (m_childProcessType) {
     case ChildProcessType::WebContent:
-        m_process.parentProcessConnection()->send(Messages::WebProcessProxy::SetIsHoldingLockedFiles(state == HysteresisState::Started), 0);
+        m_process.parentProcessConnection()->send(Messages::WebProcessProxy::SetIsHoldingLockedFiles(state == PAL::HysteresisState::Started), 0);
         break;
     case ChildProcessType::Network:
-        m_process.parentProcessConnection()->send(Messages::NetworkProcessProxy::SetIsHoldingLockedFiles(state == HysteresisState::Started), 0);
+        m_process.parentProcessConnection()->send(Messages::NetworkProcessProxy::SetIsHoldingLockedFiles(state == PAL::HysteresisState::Started), 0);
         break;
     }
 }
index ea5cea1..7c5b75a 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef WebSQLiteDatabaseTracker_h
 #define WebSQLiteDatabaseTracker_h
 
-#include <WebCore/HysteresisActivity.h>
 #include <WebCore/SQLiteDatabaseTrackerClient.h>
+#include <pal/HysteresisActivity.h>
 #include <wtf/Noncopyable.h>
 
 namespace WebKit {
@@ -47,10 +47,10 @@ public:
     void didFinishLastTransaction() override;
 
 private:
-    void hysteresisUpdated(WebCore::HysteresisState);
+    void hysteresisUpdated(PAL::HysteresisState);
 
     ChildProcess& m_process;
-    WebCore::HysteresisActivity m_hysteresis;
+    PAL::HysteresisActivity m_hysteresis;
     enum class ChildProcessType { Network, WebContent };
     ChildProcessType m_childProcessType;
 };
index 170edf7..321ea4f 100644 (file)
@@ -339,7 +339,7 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
 #if ENABLE(MEDIA_STREAM)
     , m_userMediaPermissionRequestManager { std::make_unique<UserMediaPermissionRequestManager>(*this) }
 #endif
-    , m_pageScrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisDuration)
+    , m_pageScrolledHysteresis([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisDuration)
     , m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
     , m_canRunModal(parameters.canRunModal)
 #if PLATFORM(IOS)
@@ -352,7 +352,7 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters)
     , m_activityState(parameters.activityState)
     , m_processSuppressionEnabled(true)
     , m_userActivity("Process suppression disabled for page.")
-    , m_userActivityHysteresis([this](HysteresisState) { updateUserActivity(); })
+    , m_userActivityHysteresis([this](PAL::HysteresisState) { updateUserActivity(); })
     , m_userInterfaceLayoutDirection(parameters.userInterfaceLayoutDirection)
     , m_overrideContentSecurityPolicy { parameters.overrideContentSecurityPolicy }
     , m_cpuLimit(parameters.cpuLimit)
@@ -620,7 +620,7 @@ void WebPage::updateThrottleState()
 
 void WebPage::updateUserActivity()
 {
-    if (m_userActivityHysteresis.state() == HysteresisState::Started)
+    if (m_userActivityHysteresis.state() == PAL::HysteresisState::Started)
         m_userActivity.start();
     else
         m_userActivity.stop();
index 1f9650a..f8df3d1 100644 (file)
@@ -49,7 +49,6 @@
 #include <WebCore/ActivityState.h>
 #include <WebCore/DictionaryPopupInfo.h>
 #include <WebCore/FrameLoaderTypes.h>
-#include <WebCore/HysteresisActivity.h>
 #include <WebCore/IntRect.h>
 #include <WebCore/IntSizeHash.h>
 #include <WebCore/Page.h>
@@ -61,6 +60,7 @@
 #include <WebCore/UserScriptTypes.h>
 #include <WebCore/WebCoreKeyboardUIMode.h>
 #include <memory>
+#include <pal/HysteresisActivity.h>
 #include <wtf/HashMap.h>
 #include <wtf/MonotonicTime.h>
 #include <wtf/RefPtr.h>
@@ -1453,7 +1453,7 @@ private:
     RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
     Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
 
-    WebCore::HysteresisActivity m_pageScrolledHysteresis;
+    PAL::HysteresisActivity m_pageScrolledHysteresis;
 
     bool m_canRunBeforeUnloadConfirmPanel { false };
 
@@ -1553,7 +1553,7 @@ private:
 
     bool m_processSuppressionEnabled;
     UserActivity m_userActivity;
-    WebCore::HysteresisActivity m_userActivityHysteresis;
+    PAL::HysteresisActivity m_userActivityHysteresis;
 
     uint64_t m_pendingNavigationID { 0 };
 
index 7b6cd4f..44eb883 100644 (file)
@@ -162,7 +162,7 @@ WebProcess::WebProcess()
     , m_webInspectorInterruptDispatcher(WebInspectorInterruptDispatcher::create())
     , m_webLoaderStrategy(*new WebLoaderStrategy)
     , m_cacheStorageProvider(WebCacheStorageProvider::create())
-    , m_dnsPrefetchHystereris([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); })
+    , m_dnsPrefetchHystereris([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); })
 #if ENABLE(NETSCAPE_PLUGIN_API)
     , m_pluginProcessConnectionManager(PluginProcessConnectionManager::create())
 #endif
index d43f7dd..739a857 100644 (file)
@@ -34,8 +34,8 @@
 #include "ViewUpdateDispatcher.h"
 #include "WebInspectorInterruptDispatcher.h"
 #include <WebCore/ActivityState.h>
-#include <WebCore/HysteresisActivity.h>
 #include <WebCore/Timer.h>
+#include <pal/HysteresisActivity.h>
 #include <pal/SessionID.h>
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
@@ -389,7 +389,7 @@ private:
 #endif
 
     HashSet<String> m_dnsPrefetchedHosts;
-    WebCore::HysteresisActivity m_dnsPrefetchHystereris;
+    PAL::HysteresisActivity m_dnsPrefetchHystereris;
 
     std::unique_ptr<WebAutomationSessionProxy> m_automationSessionProxy;