Title: [197054] trunk/Source/WebKit2
Revision
197054
Author
barraclo...@apple.com
Date
2016-02-24 15:19:18 -0800 (Wed, 24 Feb 2016)

Log Message

Add WKPreference for HiddenPageDOMTimerThrottlingAutoIncreases
https://bugs.webkit.org/show_bug.cgi?id=154655

Reviewed by Geoff Garen.

Just plumbing WebCore.settings.setHiddenPageDOMTimerThrottlingAutoIncreases through as
WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases):
(WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _hiddenPageDOMTimerThrottlingAutoIncreases]):
(-[WKPreferences _setHiddenPageDOMTimerThrottlingAutoIncreases:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (197053 => 197054)


--- trunk/Source/WebKit2/ChangeLog	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/ChangeLog	2016-02-24 23:19:18 UTC (rev 197054)
@@ -1,3 +1,25 @@
+2016-02-24  Gavin Barraclough  <barraclo...@apple.com>
+
+        Add WKPreference for HiddenPageDOMTimerThrottlingAutoIncreases
+        https://bugs.webkit.org/show_bug.cgi?id=154655
+
+        Reviewed by Geoff Garen.
+
+        Just plumbing WebCore.settings.setHiddenPageDOMTimerThrottlingAutoIncreases through as
+        WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases):
+        (WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _hiddenPageDOMTimerThrottlingAutoIncreases]):
+        (-[WKPreferences _setHiddenPageDOMTimerThrottlingAutoIncreases:]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2016-02-24  Alex Christensen  <achristen...@webkit.org>
 
         Fix downloads when using NetworkSession

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (197053 => 197054)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-02-24 23:19:18 UTC (rev 197054)
@@ -199,6 +199,7 @@
     macro(ShowsURLsInToolTipsEnabled, showsURLsInToolTipsEnabled, Bool, bool, false) \
     macro(AcceleratedCompositingForOverflowScrollEnabled, acceleratedCompositingForOverflowScrollEnabled, Bool, bool, false) \
     macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED) \
+    macro(HiddenPageDOMTimerThrottlingAutoIncreases, hiddenPageDOMTimerThrottlingAutoIncreases, Bool, bool, false) \
     macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED) \
     macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false) \
     macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true) \

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (197053 => 197054)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-02-24 23:19:18 UTC (rev 197054)
@@ -1172,11 +1172,21 @@
     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingEnabled(enabled);
 }
 
+void WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingAutoIncreases(enabled);
+}
+
 bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef)
 {
     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingEnabled();
 }
 
+bool WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingAutoIncreases();
+}
+
 void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
     toImpl(preferencesRef)->setHiddenPageCSSAnimationSuspensionEnabled(enabled);

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (197053 => 197054)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2016-02-24 23:19:18 UTC (rev 197054)
@@ -281,6 +281,10 @@
 WK_EXPORT void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferences, bool enabled);
 WK_EXPORT bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferences);
 
+// Defaults to false
+WK_EXPORT void WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferences, bool enabled);
+WK_EXPORT bool WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferences);
+
 // Defaults to true on Mac, false on other platforms.
 WK_EXPORT void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferences, bool enabled);
 WK_EXPORT bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferences);

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (197053 => 197054)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2016-02-24 23:19:18 UTC (rev 197054)
@@ -329,6 +329,16 @@
     _preferences->setHiddenPageDOMTimerThrottlingEnabled(hiddenPageDOMTimerThrottlingEnabled);
 }
 
+- (BOOL)_hiddenPageDOMTimerThrottlingAutoIncreases
+{
+    return _preferences->hiddenPageDOMTimerThrottlingAutoIncreases();
+}
+
+- (void)_setHiddenPageDOMTimerThrottlingAutoIncreases:(BOOL)hiddenPageDOMTimerThrottlingAutoIncreases
+{
+    _preferences->setHiddenPageDOMTimerThrottlingAutoIncreases(hiddenPageDOMTimerThrottlingAutoIncreases);
+}
+
 - (BOOL)_pageVisibilityBasedProcessSuppressionEnabled
 {
     return _preferences->pageVisibilityBasedProcessSuppressionEnabled();

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h (197053 => 197054)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h	2016-02-24 23:19:18 UTC (rev 197054)
@@ -66,6 +66,7 @@
 @property (nonatomic, setter=_setLogsPageMessagesToSystemConsoleEnabled:) BOOL _logsPageMessagesToSystemConsoleEnabled WK_AVAILABLE(10_11, 9_0);
 
 @property (nonatomic, setter=_setHiddenPageDOMTimerThrottlingEnabled:) BOOL _hiddenPageDOMTimerThrottlingEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+@property (nonatomic, setter=_setHiddenPageDOMTimerThrottlingAutoIncreases:) BOOL _hiddenPageDOMTimerThrottlingAutoIncreases WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 @property (nonatomic, setter=_setPageVisibilityBasedProcessSuppressionEnabled:) BOOL _pageVisibilityBasedProcessSuppressionEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
 @property (nonatomic, setter=_setAllowFileAccessFromFileURLs:) BOOL _allowFileAccessFromFileURLs WK_AVAILABLE(10_11, 9_0);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (197053 => 197054)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-02-24 22:23:53 UTC (rev 197053)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-02-24 23:19:18 UTC (rev 197054)
@@ -2969,6 +2969,7 @@
     settings.setShowsURLsInToolTips(store.getBoolValueForKey(WebPreferencesKey::showsURLsInToolTipsEnabledKey()));
 
     settings.setHiddenPageDOMTimerThrottlingEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingEnabledKey()));
+    settings.setHiddenPageDOMTimerThrottlingAutoIncreases(store.getBoolValueForKey(WebPreferencesKey::hiddenPageDOMTimerThrottlingAutoIncreasesKey()));
 
     settings.setHiddenPageCSSAnimationSuspensionEnabled(store.getBoolValueForKey(WebPreferencesKey::hiddenPageCSSAnimationSuspensionEnabledKey()));
     settings.setLowPowerVideoAudioBufferSizeEnabled(store.getBoolValueForKey(WebPreferencesKey::lowPowerVideoAudioBufferSizeEnabledKey()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to