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)
commit3b0a375b589210b74d2ce4b3e4697f1a82bd104e
treeff5ac2ee5a2ac45f1d01b2620f9599bc4fd244de
parenta60fccbae191ec0915798f38a7f609847a90f350
Clean up DOMTimer related settings
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