Diff
Modified: trunk/Source/WebCore/ChangeLog (222618 => 222619)
--- trunk/Source/WebCore/ChangeLog 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/ChangeLog 2017-09-28 18:37:22 UTC (rev 222619)
@@ -1,3 +1,23 @@
+2017-09-28 Ross Kirsling <[email protected]>
+
+ [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 <[email protected]>
Add support for <link rel=preconnect>
Modified: trunk/Source/WebCore/PAL/ChangeLog (222618 => 222619)
--- trunk/Source/WebCore/PAL/ChangeLog 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/PAL/ChangeLog 2017-09-28 18:37:22 UTC (rev 222619)
@@ -1,3 +1,13 @@
+2017-09-28 Ross Kirsling <[email protected]>
+
+ [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 <[email protected]>
Add support for <link rel=preconnect>
Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (222618 => 222619)
--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-09-28 18:37:22 UTC (rev 222619)
@@ -127,6 +127,7 @@
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 */; };
@@ -262,6 +263,7 @@
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>"; };
@@ -429,8 +431,7 @@
0CF99CA61F738436007EE793 /* CoreMediaSoftLink.cpp */,
0CF99CA71F738437007EE793 /* CoreMediaSoftLink.h */,
);
- name = cf;
- path = "New Group";
+ path = cf;
sourceTree = "<group>";
};
1C09D0341E31C32800725F18 = {
@@ -461,6 +462,7 @@
A3788E9F1F05B7CE00679425 /* system */,
A30D411D1F0DD0AC00B71954 /* text */,
0C2D9E721EEF5AF600DBC317 /* ExportMacros.h */,
+ A39DE74D1F7C443C007BCB00 /* HysteresisActivity.h */,
0708AC321F4C874A001F788F /* Logger.h */,
07377ADB1F5777D70027F16D /* LoggerHelper.h */,
A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */,
@@ -593,6 +595,7 @@
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 */,
Copied: trunk/Source/WebCore/PAL/pal/HysteresisActivity.h (from rev 222618, trunk/Source/WebCore/platform/HysteresisActivity.h) (0 => 222619)
--- trunk/Source/WebCore/PAL/pal/HysteresisActivity.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/HysteresisActivity.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/RunLoop.h>
+#include <wtf/Seconds.h>
+
+namespace PAL {
+
+static const Seconds defaultHysteresisDuration { 5_s };
+
+enum class HysteresisState {
+ Started,
+ Stopped
+};
+
+class HysteresisActivity {
+public:
+ explicit HysteresisActivity(WTF::Function<void(HysteresisState)>&& callback = [](HysteresisState) { }, Seconds hysteresisSeconds = defaultHysteresisDuration)
+ : m_callback(WTFMove(callback))
+ , m_hysteresisSeconds(hysteresisSeconds)
+ , m_active(false)
+ , m_timer(RunLoop::main(), this, &HysteresisActivity::hysteresisTimerFired)
+ {
+ }
+
+ void start()
+ {
+ if (m_active)
+ return;
+ m_active = true;
+
+ if (m_timer.isActive())
+ m_timer.stop();
+ else
+ m_callback(HysteresisState::Started);
+ }
+
+ void stop()
+ {
+ if (!m_active)
+ return;
+ m_active = false;
+
+ m_timer.startOneShot(m_hysteresisSeconds);
+ }
+
+ void impulse()
+ {
+ if (!m_active) {
+ start();
+ stop();
+ }
+ }
+
+ HysteresisState state() const
+ {
+ return m_active || m_timer.isActive() ? HysteresisState::Started : HysteresisState::Stopped;
+ }
+
+private:
+ void hysteresisTimerFired()
+ {
+ m_timer.stop();
+ m_callback(HysteresisState::Stopped);
+ }
+
+ WTF::Function<void(HysteresisState)> m_callback;
+ Seconds m_hysteresisSeconds;
+ bool m_active;
+ RunLoop::Timer<HysteresisActivity> m_timer;
+};
+
+} // namespace PAL
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (222618 => 222619)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-09-28 18:37:22 UTC (rev 222619)
@@ -3729,7 +3729,6 @@
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 */; };
@@ -12066,7 +12065,6 @@
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>"; };
@@ -24610,7 +24608,6 @@
CD62FB941AF018E70012ED7D /* GenericTaskQueue.h */,
A8748BDF12CBF2DC001FBA41 /* HashTools.h */,
BC3BC29B0E91AB0F00835588 /* HostWindow.h */,
- 862F129F18C1DCE4005C54AF /* HysteresisActivity.h */,
1AE00D57182DAC8D00087DD7 /* KeyedCoding.h */,
E15FF7D418C9553800FE4C87 /* KeypressCommand.h */,
A3D42A841F33BA3600A64B62 /* LayoutUnit.cpp */,
@@ -28138,7 +28135,6 @@
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 */,
Deleted: trunk/Source/WebCore/platform/HysteresisActivity.h (222618 => 222619)
--- trunk/Source/WebCore/platform/HysteresisActivity.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/HysteresisActivity.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef HysteresisActivity_h
-#define HysteresisActivity_h
-
-#include <wtf/RunLoop.h>
-#include <wtf/Seconds.h>
-
-namespace WebCore {
-
-static const Seconds defaultHysteresisDuration { 5_s };
-
-enum class HysteresisState {
- Started,
- Stopped
-};
-
-class HysteresisActivity {
-public:
- explicit HysteresisActivity(WTF::Function<void(HysteresisState)>&& callback = [](HysteresisState) { }, Seconds hysteresisSeconds = defaultHysteresisDuration)
- : m_callback(WTFMove(callback))
- , m_hysteresisSeconds(hysteresisSeconds)
- , m_active(false)
- , m_timer(RunLoop::main(), this, &HysteresisActivity::hysteresisTimerFired)
- {
- }
-
- void start()
- {
- if (m_active)
- return;
- m_active = true;
-
- if (m_timer.isActive())
- m_timer.stop();
- else
- m_callback(HysteresisState::Started);
- }
-
- void stop()
- {
- if (!m_active)
- return;
- m_active = false;
-
- m_timer.startOneShot(m_hysteresisSeconds);
- }
-
- void impulse()
- {
- if (!m_active) {
- start();
- stop();
- }
- }
-
- HysteresisState state() const
- {
- return m_active || m_timer.isActive() ? HysteresisState::Started : HysteresisState::Stopped;
- }
-
-private:
- void hysteresisTimerFired()
- {
- m_timer.stop();
- m_callback(HysteresisState::Stopped);
- }
-
- WTF::Function<void(HysteresisState)> m_callback;
- Seconds m_hysteresisSeconds;
- bool m_active;
- RunLoop::Timer<HysteresisActivity> m_timer;
-};
-
-} // namespace WebCore
-
-#endif // HysteresisActivity_h
Modified: trunk/Source/WebCore/platform/UserActivity.cpp (222618 => 222619)
--- trunk/Source/WebCore/platform/UserActivity.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/UserActivity.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -45,14 +45,14 @@
#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();
Modified: trunk/Source/WebCore/platform/UserActivity.h (222618 => 222619)
--- trunk/Source/WebCore/platform/UserActivity.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/UserActivity.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
// 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 @@
WEBCORE_EXPORT explicit UserActivity(const char* description);
private:
- void hysteresisUpdated(HysteresisState);
+ void hysteresisUpdated(PAL::HysteresisState);
Impl m_impl;
};
Modified: trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp (222618 => 222619)
--- trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -41,7 +41,7 @@
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);
Modified: trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h (222618 => 222619)
--- trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -20,7 +20,7 @@
#if USE(CAIRO)
#include "BackingStoreBackendCairo.h"
-#include <WebCore/HysteresisActivity.h>
+#include <pal/HysteresisActivity.h>
namespace WebCore {
@@ -33,7 +33,7 @@
void scroll(const IntRect&, const IntSize&) override;
RefPtr<cairo_surface_t> m_scrollSurface;
- WebCore::HysteresisActivity m_scrolledHysteresis;
+ PAL::HysteresisActivity m_scrolledHysteresis;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.h (222618 => 222619)
--- trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
WebSQLiteDatabaseTrackerClient();
virtual ~WebSQLiteDatabaseTrackerClient();
- void hysteresisUpdated(HysteresisState);
+ void hysteresisUpdated(PAL::HysteresisState);
- HysteresisActivity m_hysteresis;
+ PAL::HysteresisActivity m_hysteresis;
};
}
Modified: trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm (222618 => 222619)
--- trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm 2017-09-28 18:37:22 UTC (rev 222619)
@@ -50,7 +50,7 @@
}
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::hysteresisUpdated(HysteresisState state)
+void WebSQLiteDatabaseTrackerClient::hysteresisUpdated(PAL::HysteresisState state)
{
- if (state == HysteresisState::Started)
+ if (state == PAL::HysteresisState::Started)
[WebDatabaseTransactionBackgroundTaskController startBackgroundTask];
else
[WebDatabaseTransactionBackgroundTaskController endBackgroundTask];
Modified: trunk/Source/WebKit/ChangeLog (222618 => 222619)
--- trunk/Source/WebKit/ChangeLog 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/ChangeLog 2017-09-28 18:37:22 UTC (rev 222619)
@@ -1,3 +1,25 @@
+2017-09-28 Ross Kirsling <[email protected]>
+
+ [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 <[email protected]>
Add support for <link rel=preconnect>
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp (222618 => 222619)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
: 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 @@
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 };
Modified: trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp (222618 => 222619)
--- trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -39,7 +39,7 @@
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(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::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;
}
}
Modified: trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h (222618 => 222619)
--- trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
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;
};
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (222618 => 222619)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -339,7 +339,7 @@
#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 @@
, 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::updateUserActivity()
{
- if (m_userActivityHysteresis.state() == HysteresisState::Started)
+ if (m_userActivityHysteresis.state() == PAL::HysteresisState::Started)
m_userActivity.start();
else
m_userActivity.stop();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (222618 => 222619)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
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 @@
bool m_processSuppressionEnabled;
UserActivity m_userActivity;
- WebCore::HysteresisActivity m_userActivityHysteresis;
+ PAL::HysteresisActivity m_userActivityHysteresis;
uint64_t m_pendingNavigationID { 0 };
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (222618 => 222619)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2017-09-28 18:37:22 UTC (rev 222619)
@@ -162,7 +162,7 @@
, 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
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (222618 => 222619)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2017-09-28 18:25:28 UTC (rev 222618)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2017-09-28 18:37:22 UTC (rev 222619)
@@ -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 @@
#endif
HashSet<String> m_dnsPrefetchedHosts;
- WebCore::HysteresisActivity m_dnsPrefetchHystereris;
+ PAL::HysteresisActivity m_dnsPrefetchHystereris;
std::unique_ptr<WebAutomationSessionProxy> m_automationSessionProxy;