Title: [218864] trunk/Source
- Revision
- 218864
- Author
- cdu...@apple.com
- Date
- 2017-06-27 22:06:03 -0700 (Tue, 27 Jun 2017)
Log Message
Port HysteresisActivity to Seconds type
https://bugs.webkit.org/show_bug.cgi?id=173902
Reviewed by Simon Fraser.
Source/WebCore:
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::stop):
* platform/ios/WebSQLiteDatabaseTrackerClient.mm:
Source/WebKit2:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_pageScrolledHysteresis):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218863 => 218864)
--- trunk/Source/WebCore/ChangeLog 2017-06-28 04:52:09 UTC (rev 218863)
+++ trunk/Source/WebCore/ChangeLog 2017-06-28 05:06:03 UTC (rev 218864)
@@ -1,3 +1,15 @@
+2017-06-27 Chris Dumez <cdu...@apple.com>
+
+ Port HysteresisActivity to Seconds type
+ https://bugs.webkit.org/show_bug.cgi?id=173902
+
+ Reviewed by Simon Fraser.
+
+ * platform/HysteresisActivity.h:
+ (WebCore::HysteresisActivity::HysteresisActivity):
+ (WebCore::HysteresisActivity::stop):
+ * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
+
2017-06-27 Jeremy Jones <jere...@apple.com>
MediaPlayerPrivate m_private may not yet be created when setPrivateBrowsingMode is called.
Modified: trunk/Source/WebCore/platform/HysteresisActivity.h (218863 => 218864)
--- trunk/Source/WebCore/platform/HysteresisActivity.h 2017-06-28 04:52:09 UTC (rev 218863)
+++ trunk/Source/WebCore/platform/HysteresisActivity.h 2017-06-28 05:06:03 UTC (rev 218864)
@@ -27,10 +27,11 @@
#define HysteresisActivity_h
#include "Timer.h"
+#include <wtf/Seconds.h>
namespace WebCore {
-static const double DefaultHysteresisSeconds = 5.0;
+static const Seconds defaultHysteresisDuration { 5_s };
enum class HysteresisState {
Started,
@@ -39,7 +40,7 @@
class HysteresisActivity {
public:
- explicit HysteresisActivity(WTF::Function<void(HysteresisState)>&& callback = [](HysteresisState) { }, double hysteresisSeconds = DefaultHysteresisSeconds)
+ explicit HysteresisActivity(WTF::Function<void(HysteresisState)>&& callback = [](HysteresisState) { }, Seconds hysteresisSeconds = defaultHysteresisDuration)
: m_callback(WTFMove(callback))
, m_hysteresisSeconds(hysteresisSeconds)
, m_active(false)
@@ -65,7 +66,7 @@
return;
m_active = false;
- m_timer.startOneShot(1_s * m_hysteresisSeconds);
+ m_timer.startOneShot(m_hysteresisSeconds);
}
void impulse()
@@ -89,7 +90,7 @@
}
WTF::Function<void(HysteresisState)> m_callback;
- double m_hysteresisSeconds; // FIXME: Should use Seconds.
+ Seconds m_hysteresisSeconds;
bool m_active;
Timer m_timer;
};
Modified: trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm (218863 => 218864)
--- trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm 2017-06-28 04:52:09 UTC (rev 218863)
+++ trunk/Source/WebCore/platform/ios/WebSQLiteDatabaseTrackerClient.mm 2017-06-28 05:06:03 UTC (rev 218864)
@@ -41,7 +41,7 @@
namespace WebCore {
-const double hysteresisDuration = 2; // 2 seconds.
+const Seconds hysteresisDuration { 2_s };
WebSQLiteDatabaseTrackerClient& WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient()
{
Modified: trunk/Source/WebKit2/ChangeLog (218863 => 218864)
--- trunk/Source/WebKit2/ChangeLog 2017-06-28 04:52:09 UTC (rev 218863)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-28 05:06:03 UTC (rev 218864)
@@ -1,5 +1,15 @@
2017-06-27 Chris Dumez <cdu...@apple.com>
+ Port HysteresisActivity to Seconds type
+ https://bugs.webkit.org/show_bug.cgi?id=173902
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::m_pageScrolledHysteresis):
+
+2017-06-27 Chris Dumez <cdu...@apple.com>
+
Move WebsiteDataRecord processing off-thread in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
https://bugs.webkit.org/show_bug.cgi?id=173882
<rdar://problem/32984366>
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (218863 => 218864)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-06-28 04:52:09 UTC (rev 218863)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-06-28 05:06:03 UTC (rev 218864)
@@ -255,7 +255,7 @@
namespace WebKit {
-static const double pageScrollHysteresisSeconds = 0.3;
+static const Seconds pageScrollHysteresisDuration { 300_ms };
static const Seconds initialLayerVolatilityTimerInterval { 20_ms };
static const Seconds maximumLayerVolatilityTimerInterval { 2_s };
@@ -342,7 +342,7 @@
#if ENABLE(MEDIA_STREAM)
, m_userMediaPermissionRequestManager { std::make_unique<UserMediaPermissionRequestManager>(*this) }
#endif
- , m_pageScrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisSeconds)
+ , m_pageScrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) pageStoppedScrolling(); }, pageScrollHysteresisDuration)
, m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
, m_canRunModal(parameters.canRunModal)
#if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes