Clean up DOMTimer related settings
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 19:22:22 +0000 (19:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 19:22:22 +0000 (19:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142837

Reviewed by Darin Adler.

Source/WebCore:

Clean up DOMTimer related settings:
- Make default minimum timer interval 4ms instead of 10ms as all ports
  were setting it to 4ms and the specifications says 4ms.
- Get rid of setters for default DOMTimer interval values as they are
  not set anymore.
- Move default DOMTimer interval values from Settings to DOMTimer as
  those are global (not per-page) and not really settings.
- Stop using abbreviations in the names (e.g. min -> minimum).
- Move DOMTimer settings members from Page to Settings. There is no
  reason for those to be stored on the Page. The getters were private
  so call-sites had to go via Settings anyway. Also, call-sites already
  had to do a null check on the page to get the settings. It seems
  unfortunate for the settings to do another null-check on the page for
  retrieving the setting value from the page.
- Inline the DOMTimer settings getters as these are trivial.

* dom/Document.cpp:
(WebCore::Document::minimumTimerInterval):
(WebCore::Document::timerAlignmentInterval):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::minimumTimerInterval):
(WebCore::ScriptExecutionContext::timerAlignmentInterval):
* page/DOMTimer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setTimerThrottlingEnabled):
(WebCore::Page::setMinimumTimerInterval): Deleted.
(WebCore::Page::minimumTimerInterval): Deleted.
* page/Page.h:
(WebCore::Page::timerAlignmentInterval): Deleted.
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setMinimumDOMTimerInterval):
(WebCore::Settings::setDOMTimerAlignmentInterval):
(WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
(WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
(WebCore::Settings::setMinDOMTimerInterval): Deleted.
(WebCore::Settings::minDOMTimerInterval): Deleted.
(WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::domTimerAlignmentInterval): Deleted.
* page/Settings.h:
(WebCore::Settings::minimumDOMTimerInterval):
(WebCore::Settings::domTimerAlignmentInterval):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setMinimumTimerInterval):

Source/WebKit/mac:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

* WebView.cpp:
(WebView::initWithFrame):
(WebView::defaultMinimumTimerInterval):

Source/WebKit2:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/page/DOMTimer.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index 69523f0..2138c69 100644 (file)
@@ -1,3 +1,61 @@
+2015-03-19  Chris Dumez  <cdumez@apple.com>
+
+        Clean up DOMTimer related settings
+        https://bugs.webkit.org/show_bug.cgi?id=142837
+
+        Reviewed by Darin Adler.
+
+        Clean up DOMTimer related settings:
+        - Make default minimum timer interval 4ms instead of 10ms as all ports
+          were setting it to 4ms and the specifications says 4ms.
+        - Get rid of setters for default DOMTimer interval values as they are
+          not set anymore.
+        - Move default DOMTimer interval values from Settings to DOMTimer as
+          those are global (not per-page) and not really settings.
+        - Stop using abbreviations in the names (e.g. min -> minimum).
+        - Move DOMTimer settings members from Page to Settings. There is no
+          reason for those to be stored on the Page. The getters were private
+          so call-sites had to go via Settings anyway. Also, call-sites already
+          had to do a null check on the page to get the settings. It seems
+          unfortunate for the settings to do another null-check on the page for
+          retrieving the setting value from the page.
+        - Inline the DOMTimer settings getters as these are trivial.
+
+        * dom/Document.cpp:
+        (WebCore::Document::minimumTimerInterval):
+        (WebCore::Document::timerAlignmentInterval):
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::minimumTimerInterval):
+        (WebCore::ScriptExecutionContext::timerAlignmentInterval):
+        * page/DOMTimer.h:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::setTimerThrottlingEnabled):
+        (WebCore::Page::setMinimumTimerInterval): Deleted.
+        (WebCore::Page::minimumTimerInterval): Deleted.
+        * page/Page.h:
+        (WebCore::Page::timerAlignmentInterval): Deleted.
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        (WebCore::Settings::setMinimumDOMTimerInterval):
+        (WebCore::Settings::setDOMTimerAlignmentInterval):
+        (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
+        (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
+        (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
+        (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
+        (WebCore::Settings::setMinDOMTimerInterval): Deleted.
+        (WebCore::Settings::minDOMTimerInterval): Deleted.
+        (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
+        (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
+        (WebCore::Settings::domTimerAlignmentInterval): Deleted.
+        * page/Settings.h:
+        (WebCore::Settings::minimumDOMTimerInterval):
+        (WebCore::Settings::domTimerAlignmentInterval):
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setMinimumTimerInterval):
+
 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Scrollbars look bad with GTK+ 3.16
index 0230a5a..e872df5 100644 (file)
@@ -2728,18 +2728,18 @@ void Document::writeln(const String& text, Document* ownerDocument)
 
 double Document::minimumTimerInterval() const
 {
-    Page* p = page();
-    if (!p)
+    Page* page = this->page();
+    if (!page)
         return ScriptExecutionContext::minimumTimerInterval();
-    return p->settings().minDOMTimerInterval();
+    return page->settings().minimumDOMTimerInterval();
 }
 
 double Document::timerAlignmentInterval() const
 {
-    Page* p = page();
-    if (!p)
+    Page* page = this->page();
+    if (!page)
         return ScriptExecutionContext::timerAlignmentInterval();
-    return p->settings().domTimerAlignmentInterval();
+    return page->settings().domTimerAlignmentInterval();
 }
 
 EventTarget* Document::errorEventTarget()
index fc23761..a48db34 100644 (file)
@@ -434,7 +434,7 @@ double ScriptExecutionContext::minimumTimerInterval() const
     // workers, we will have to override it in the appropriate
     // subclass, and provide a way to enumerate a Document's dedicated
     // workers so we can update them all.
-    return Settings::defaultMinDOMTimerInterval();
+    return DOMTimer::defaultMinimumInterval();
 }
 
 void ScriptExecutionContext::didChangeTimerAlignmentInterval()
@@ -445,7 +445,7 @@ void ScriptExecutionContext::didChangeTimerAlignmentInterval()
 
 double ScriptExecutionContext::timerAlignmentInterval() const
 {
-    return Settings::defaultDOMTimerAlignmentInterval();
+    return DOMTimer::defaultAlignmentInterval();
 }
 
 JSC::VM& ScriptExecutionContext::vm()
index 691c5b0..893f854 100644 (file)
@@ -48,6 +48,10 @@ namespace WebCore {
     public:
         virtual ~DOMTimer();
 
+        static double defaultMinimumInterval() { return 0.004; } // 4 milliseconds.
+        static double defaultAlignmentInterval() { return 0; }
+        static double hiddenPageAlignmentInterval() { return 1.0; } // 1 second.
+
         // Creates a new timer owned by specified ScriptExecutionContext, starts it
         // and returns its Id.
         static int install(ScriptExecutionContext&, std::unique_ptr<ScheduledAction>, int timeout, bool singleShot);
index 9e1c519..305836e 100644 (file)
@@ -187,9 +187,7 @@ Page::Page(PageConfiguration& pageConfiguration)
 #if ENABLE(VIEW_MODE_CSS_MEDIA)
     , m_viewMode(ViewModeWindowed)
 #endif // ENABLE(VIEW_MODE_CSS_MEDIA)
-    , m_minimumTimerInterval(Settings::defaultMinDOMTimerInterval())
     , m_timerThrottlingEnabled(false)
-    , m_timerAlignmentInterval(Settings::defaultDOMTimerAlignmentInterval())
     , m_isEditable(false)
     , m_isPrerender(false)
     , m_viewState(PageInitialViewState)
@@ -1128,21 +1126,6 @@ void Page::setMemoryCacheClientCallsEnabled(bool enabled)
         frame->loader().tellClientAboutPastMemoryCacheLoads();
 }
 
-void Page::setMinimumTimerInterval(double minimumTimerInterval)
-{
-    double oldTimerInterval = m_minimumTimerInterval;
-    m_minimumTimerInterval = minimumTimerInterval;
-    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNextWithWrap(false)) {
-        if (frame->document())
-            frame->document()->adjustMinimumTimerInterval(oldTimerInterval);
-    }
-}
-
-double Page::minimumTimerInterval() const
-{
-    return m_minimumTimerInterval;
-}
-
 void Page::hiddenPageDOMTimerThrottlingStateChanged()
 {
     setTimerThrottlingEnabled(m_viewState & ViewState::IsVisuallyIdle);
@@ -1159,9 +1142,9 @@ void Page::setTimerThrottlingEnabled(bool enabled)
         return;
 
     m_timerThrottlingEnabled = enabled;
-    m_timerAlignmentInterval = enabled ? Settings::hiddenPageDOMTimerAlignmentInterval() : Settings::defaultDOMTimerAlignmentInterval();
+    m_settings->setDOMTimerAlignmentInterval(enabled ? DOMTimer::hiddenPageAlignmentInterval() : DOMTimer::defaultAlignmentInterval());
     
-    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNextWithWrap(false)) {
+    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
         if (frame->document())
             frame->document()->didChangeTimerAlignmentInterval();
     }
index afd5dc0..62a73a7 100644 (file)
@@ -454,11 +454,6 @@ private:
 
     MediaCanStartListener* takeAnyMediaCanStartListener();
 
-    void setMinimumTimerInterval(double);
-    double minimumTimerInterval() const;
-
-    double timerAlignmentInterval() const { return m_timerAlignmentInterval; }
-
     Vector<Ref<PluginViewBase>> pluginViews();
 
     void hiddenPageDOMTimerThrottlingStateChanged();
@@ -546,10 +541,7 @@ private:
     ViewMode m_viewMode;
 #endif // ENABLE(VIEW_MODE_CSS_MEDIA)
 
-    double m_minimumTimerInterval;
-
     bool m_timerThrottlingEnabled;
-    double m_timerAlignmentInterval;
 
     bool m_isEditable;
     bool m_isPrerender;
index ccfc7b9..abbf835 100644 (file)
@@ -69,10 +69,6 @@ static void invalidateAfterGenericFamilyChange(Page* page)
         page->setNeedsRecalcStyleInAllFrames();
 }
 
-double Settings::gDefaultMinDOMTimerInterval = 0.010; // 10 milliseconds
-double Settings::gDefaultDOMTimerAlignmentInterval = 0;
-double Settings::gHiddenPageDOMTimerAlignmentInterval = 1.0;
-
 #if USE(AVFOUNDATION)
 bool Settings::gAVFoundationEnabled = false;
 #endif
@@ -163,6 +159,8 @@ Settings::Settings(Page* page)
     , m_fontGenericFamilies(std::make_unique<FontGenericFamilies>())
     , m_storageBlockingPolicy(SecurityOrigin::AllowAllStorage)
     , m_layoutInterval(layoutScheduleThreshold)
+    , m_minimumDOMTimerInterval(DOMTimer::defaultMinimumInterval())
+    , m_domTimerAlignmentInterval(DOMTimer::defaultAlignmentInterval())
 #if ENABLE(TEXT_AUTOSIZING)
     , m_textAutosizingFontScaleFactor(1)
 #if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP
@@ -215,16 +213,6 @@ PassRefPtr<Settings> Settings::create(Page* page)
 
 SETTINGS_SETTER_BODIES
 
-void Settings::setHiddenPageDOMTimerAlignmentInterval(double hiddenPageDOMTimerAlignmentinterval)
-{
-    gHiddenPageDOMTimerAlignmentInterval = hiddenPageDOMTimerAlignmentinterval;
-}
-
-double Settings::hiddenPageDOMTimerAlignmentInterval()
-{
-    return gHiddenPageDOMTimerAlignmentInterval;
-}
-
 #if !PLATFORM(COCOA)
 void Settings::initializeDefaultFontFamilies()
 {
@@ -450,44 +438,23 @@ void Settings::setNeedsAdobeFrameReloadingQuirk(bool shouldNotReloadIFramesForUn
     m_needsAdobeFrameReloadingQuirk = shouldNotReloadIFramesForUnchangedSRC;
 }
 
-void Settings::setDefaultMinDOMTimerInterval(double interval)
-{
-    gDefaultMinDOMTimerInterval = interval;
-}
-
-double Settings::defaultMinDOMTimerInterval()
-{
-    return gDefaultMinDOMTimerInterval;
-}
-
-void Settings::setMinDOMTimerInterval(double interval)
+void Settings::setMinimumDOMTimerInterval(double interval)
 {
-    if (m_page)
-        m_page->setMinimumTimerInterval(interval);
-}
+    double oldTimerInterval = m_minimumDOMTimerInterval;
+    m_minimumDOMTimerInterval = interval;
 
-double Settings::minDOMTimerInterval()
-{
     if (!m_page)
-        return 0;
-    return m_page->minimumTimerInterval();
-}
-
-void Settings::setDefaultDOMTimerAlignmentInterval(double interval)
-{
-    gDefaultDOMTimerAlignmentInterval = interval;
-}
+        return;
 
-double Settings::defaultDOMTimerAlignmentInterval()
-{
-    return gDefaultDOMTimerAlignmentInterval;
+    for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        if (frame->document())
+            frame->document()->adjustMinimumTimerInterval(oldTimerInterval);
+    }
 }
 
-double Settings::domTimerAlignmentInterval() const
+void Settings::setDOMTimerAlignmentInterval(double alignmentInterval)
 {
-    if (!m_page)
-        return 0;
-    return m_page->timerAlignmentInterval();
+    m_domTimerAlignmentInterval = alignmentInterval;
 }
 
 void Settings::setLayoutInterval(std::chrono::milliseconds layoutInterval)
index 0443dc9..3bcef15 100644 (file)
@@ -163,19 +163,11 @@ public:
     WEBCORE_EXPORT void setNeedsAdobeFrameReloadingQuirk(bool);
     bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
 
-    WEBCORE_EXPORT static void setDefaultMinDOMTimerInterval(double); // Interval specified in seconds.
-    WEBCORE_EXPORT static double defaultMinDOMTimerInterval();
-        
-    static void setHiddenPageDOMTimerAlignmentInterval(double); // Interval specified in seconds.
-    static double hiddenPageDOMTimerAlignmentInterval();
-
-    WEBCORE_EXPORT void setMinDOMTimerInterval(double); // Per-page; initialized to default value.
-    WEBCORE_EXPORT double minDOMTimerInterval();
-
-    static void setDefaultDOMTimerAlignmentInterval(double);
-    WEBCORE_EXPORT static double defaultDOMTimerAlignmentInterval();
+    WEBCORE_EXPORT void setMinimumDOMTimerInterval(double); // Initialized to DOMTimer::defaultMinimumInterval().
+    WEBCORE_EXPORT double minimumDOMTimerInterval() const { return m_minimumDOMTimerInterval; }
 
-    double domTimerAlignmentInterval() const;
+    void setDOMTimerAlignmentInterval(double);
+    double domTimerAlignmentInterval() const { return m_domTimerAlignmentInterval; }
 
     WEBCORE_EXPORT void setLayoutInterval(std::chrono::milliseconds);
     std::chrono::milliseconds layoutInterval() const { return m_layoutInterval; }
@@ -283,6 +275,9 @@ private:
     const std::unique_ptr<FontGenericFamilies> m_fontGenericFamilies;
     SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy;
     std::chrono::milliseconds m_layoutInterval;
+    double m_minimumDOMTimerInterval;
+    double m_domTimerAlignmentInterval;
+
 #if ENABLE(TEXT_AUTOSIZING)
     float m_textAutosizingFontScaleFactor;
     IntSize m_textAutosizingWindowSizeOverride;
@@ -320,9 +315,6 @@ private:
     bool m_hiddenPageCSSAnimationSuspensionEnabled : 1;
     bool m_fontFallbackPrefersPictographs : 1;
 
-    static double gDefaultMinDOMTimerInterval;
-    static double gDefaultDOMTimerAlignmentInterval;
-
 #if USE(AVFOUNDATION)
     WEBCORE_EXPORT static bool gAVFoundationEnabled;
 #endif
@@ -349,8 +341,6 @@ private:
     String m_mediaKeysStorageDirectory;
 #endif
 
-    static double gHiddenPageDOMTimerAlignmentInterval;
-
     static bool gLowPowerVideoAudioBufferSizeEnabled;
 };
 
index 7477ad6..2b1a2a4 100644 (file)
@@ -78,7 +78,7 @@ InternalSettings::Backup::Backup(Settings& settings)
     , m_originalMockScrollbarsEnabled(settings.mockScrollbarsEnabled())
     , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::sharedFeatures().langAttributeAwareFormControlUIEnabled())
     , m_imagesEnabled(settings.areImagesEnabled())
-    , m_minimumTimerInterval(settings.minDOMTimerInterval())
+    , m_minimumTimerInterval(settings.minimumDOMTimerInterval())
 #if ENABLE(VIDEO_TRACK)
     , m_shouldDisplaySubtitles(settings.shouldDisplaySubtitles())
     , m_shouldDisplayCaptions(settings.shouldDisplayCaptions())
@@ -145,7 +145,7 @@ void InternalSettings::Backup::restoreTo(Settings& settings)
     settings.setCanvasUsesAcceleratedDrawing(m_originalCanvasUsesAcceleratedDrawing);
     RuntimeEnabledFeatures::sharedFeatures().setLangAttributeAwareFormControlUIEnabled(m_langAttributeAwareFormControlUIEnabled);
     settings.setImagesEnabled(m_imagesEnabled);
-    settings.setMinDOMTimerInterval(m_minimumTimerInterval);
+    settings.setMinimumDOMTimerInterval(m_minimumTimerInterval);
 #if ENABLE(VIDEO_TRACK)
     settings.setShouldDisplaySubtitles(m_shouldDisplaySubtitles);
     settings.setShouldDisplayCaptions(m_shouldDisplayCaptions);
@@ -450,7 +450,7 @@ void InternalSettings::setImagesEnabled(bool enabled, ExceptionCode& ec)
 void InternalSettings::setMinimumTimerInterval(double intervalInSeconds, ExceptionCode& ec)
 {
     InternalSettingsGuardForSettings();
-    settings()->setMinDOMTimerInterval(intervalInSeconds);
+    settings()->setMinimumDOMTimerInterval(intervalInSeconds);
 }
 
 void InternalSettings::setDefaultVideoPosterURL(const String& url, ExceptionCode& ec)
index 12f310b..ac958a8 100644 (file)
@@ -1,3 +1,16 @@
+2015-03-19  Chris Dumez  <cdumez@apple.com>
+
+        Clean up DOMTimer related settings
+        https://bugs.webkit.org/show_bug.cgi?id=142837
+
+        Reviewed by Darin Adler.
+
+        Stop setting the DOMTimers' default minimum interval to 4ms as this
+        is now the default.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
 
         Ignore some deprecation warnings
index dafb381..e5c5f1f 100644 (file)
@@ -926,8 +926,6 @@ static void WebKitInitializeGamepadProviderIfNecessary()
         WebKitInitializeGamepadProviderIfNecessary();
 #endif
         
-        Settings::setDefaultMinDOMTimerInterval(0.004);
-        
         Settings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters());
 
 #if PLATFORM(IOS)
index e36878d..b200c15 100644 (file)
@@ -1,3 +1,17 @@
+2015-03-19  Chris Dumez  <cdumez@apple.com>
+
+        Clean up DOMTimer related settings
+        https://bugs.webkit.org/show_bug.cgi?id=142837
+
+        Reviewed by Darin Adler.
+
+        Stop setting the DOMTimers' default minimum interval to 4ms as this
+        is now the default.
+
+        * WebView.cpp:
+        (WebView::initWithFrame):
+        (WebView::defaultMinimumTimerInterval):
+
 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
 
         Allow clients to selectively disable plug-ins
index e905f83..5a6f409 100644 (file)
@@ -2788,7 +2788,6 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
 
         WebKitInitializeWebDatabasesIfNecessary();
         WebKitSetApplicationCachePathIfNecessary();
-        Settings::setDefaultMinDOMTimerInterval(0.004);
 
         didOneTimeInitialization = true;
      }
@@ -6823,13 +6822,13 @@ HRESULT WebView::defaultMinimumTimerInterval(double* interval)
 {
     if (!interval)
         return E_POINTER;
-    *interval = Settings::defaultMinDOMTimerInterval();
+    *interval = DOMTimer::defaultMinimumInterval();
     return S_OK;
 }
 
 HRESULT WebView::setMinimumTimerInterval(double interval)
 {
-    page()->settings().setMinDOMTimerInterval(interval);
+    page()->settings().setMinimumDOMTimerInterval(interval);
     return S_OK;
 }
 
index 5d4f0ed..8182b28 100644 (file)
@@ -1,5 +1,18 @@
 2015-03-19  Chris Dumez  <cdumez@apple.com>
 
+        Clean up DOMTimer related settings
+        https://bugs.webkit.org/show_bug.cgi?id=142837
+
+        Reviewed by Darin Adler.
+
+        Stop setting the DOMTimers' default minimum interval to 4ms as this
+        is now the default.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+
+2015-03-19  Chris Dumez  <cdumez@apple.com>
+
         The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
         https://bugs.webkit.org/show_bug.cgi?id=142831
         <rdar://problem/20209957>
index 7661219..10873db 100644 (file)
@@ -343,9 +343,6 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     , m_shouldDispatchFakeMouseMoveEvents(true)
 {
     ASSERT(m_pageID);
-    // FIXME: This is a non-ideal location for this Setting and
-    // 4ms should be adopted project-wide now, https://bugs.webkit.org/show_bug.cgi?id=61214
-    Settings::setDefaultMinDOMTimerInterval(0.004);
 
     m_pageGroup = WebProcess::singleton().webPageGroup(parameters.pageGroupData);