2010-09-17 Matthew Delaney <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Reduce minimum DOMTimer interval
        https://bugs.webkit.org/show_bug.cgi?id=45362

        Reduced the minimum allowed DOMTimer interval to 4ms. This has us matching Chrome,
        which hasn't had any problem with 4ms in the past 2 years, as well as increasing our
        performance on perf tests that have tight frequent loops such as canvas "animation"
        performance tests.

        No new tests added. Can't reliably instrument a test in javascript to verify that
        the minimum clamped interval time is in fact 4ms.

        * WebCore.exp.in:
        * page/DOMTimer.cpp: Removed old comments.
        * page/DOMTimer.h: Removed old comments.
        * page/Settings.cpp: Exposted new method to set minimum DOMTimer interval.
        * page/Settings.h:
2010-09-17  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Reduce minimum DOMTimer interval
        https://bugs.webkit.org/show_bug.cgi?id=45362

        * WebView/WebView.mm: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2010-09-17  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Reduce minimum DOMTimer interval
        https://bugs.webkit.org/show_bug.cgi?id=45362

        * WebView.cpp: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2010-09-17  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Reduce minimum DOMTimer interval
        https://bugs.webkit.org/show_bug.cgi?id=45362

        * WebProcess/WebPage/WebPage.cpp: Added in a call to set the mimimum allowed DOMTimer to 4ms.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2f6c1609
2010-09-17 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Reduce minimum DOMTimer interval
https://bugs.webkit.org/show_bug.cgi?id=45362
Reduced the minimum allowed DOMTimer interval to 4ms. This has us matching Chrome,
which hasn't had any problem with 4ms in the past 2 years, as well as increasing our
performance on perf tests that have tight frequent loops such as canvas "animation"
performance tests.
No new tests added. Can't reliably instrument a test in javascript to verify that
the minimum clamped interval time is in fact 4ms.
* WebCore.exp.in:
* page/DOMTimer.cpp: Removed old comments.
* page/DOMTimer.h: Removed old comments.
* page/Settings.cpp: Exposted new method to set minimum DOMTimer interval.
* page/Settings.h:
2010-09-17 Marc-Antoine Ruel <maruel@chromium.org>
Reviewed by Dimitri Glazkov.
......@@ -701,6 +701,7 @@ __ZN7WebCore8Settings21setShowRepaintCounterEb
__ZN7WebCore8Settings21setStandardFontFamilyERKN3WTF12AtomicStringE
__ZN7WebCore8Settings21setWebSecurityEnabledEb
__ZN7WebCore8Settings22setLocalStorageEnabledEb
__ZN7WebCore8Settings22setMinDOMTimerIntervalEd
__ZN7WebCore8Settings22setSansSerifFontFamilyERKN3WTF12AtomicStringE
__ZN7WebCore8Settings22setSessionStorageQuotaEj
__ZN7WebCore8Settings22setShowsURLsInToolTipsEb
......
......@@ -60,9 +60,6 @@ DOMTimer::DOMTimer(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction>
double intervalMilliseconds = max(oneMillisecond, timeout * oneMillisecond);
// Use a minimum interval of 10 ms to match other browsers, but only once we've
// nested enough to notice that we're repeating.
// Faster timers might be "better", but they're incompatible.
if (intervalMilliseconds < s_minTimerInterval && m_nestingLevel >= maxTimerNestingLevel)
intervalMilliseconds = s_minTimerInterval;
if (singleShot)
......
......@@ -49,8 +49,6 @@ namespace WebCore {
virtual void stop();
// The lowest allowable timer setting (in seconds, 0.001 == 1 ms).
// Default is 10ms.
// Chromium uses a non-default timeout.
static double minTimerInterval() { return s_minTimerInterval; }
static void setMinTimerInterval(double value) { s_minTimerInterval = value; }
......
......@@ -27,8 +27,9 @@
#include "Settings.h"
#include "BackForwardList.h"
#include "Database.h"
#include "CachedResourceLoader.h"
#include "DOMTimer.h"
#include "Database.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
......@@ -404,6 +405,11 @@ void Settings::setDOMPasteAllowed(bool DOMPasteAllowed)
m_isDOMPasteAllowed = DOMPasteAllowed;
}
void Settings::setMinDOMTimerInterval(double interval)
{
DOMTimer::setMinTimerInterval(interval);
}
void Settings::setUsesPageCache(bool usesPageCache)
{
if (m_usesPageCache == usesPageCache)
......
......@@ -200,6 +200,8 @@ namespace WebCore {
void setDOMPasteAllowed(bool);
bool isDOMPasteAllowed() const { return m_isDOMPasteAllowed; }
void setMinDOMTimerInterval(double); // Interval specified in seconds.
void setUsesPageCache(bool);
bool usesPageCache() const { return m_usesPageCache; }
......
2010-09-17 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Reduce minimum DOMTimer interval
https://bugs.webkit.org/show_bug.cgi?id=45362
* WebView/WebView.mm: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2010-09-17 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
......
......@@ -696,6 +696,7 @@ static bool shouldEnableLoadDeferring()
_private->page->setCanStartMedia([self window]);
_private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
_private->page->settings()->setMinDOMTimerInterval(0.004);
[WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView];
......
2010-09-17 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Reduce minimum DOMTimer interval
https://bugs.webkit.org/show_bug.cgi?id=45362
* WebView.cpp: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2010-09-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Chris Marrin.
......
......@@ -2567,7 +2567,7 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
#endif
WebKitSetApplicationCachePathIfNecessary();
WebPlatformStrategies::initialize();
#if USE(SAFARI_THEME)
BOOL shouldPaintNativeControls;
if (SUCCEEDED(m_preferences->shouldPaintNativeControls(&shouldPaintNativeControls)))
......@@ -2589,6 +2589,7 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
pageClients.geolocationControllerClient = new WebGeolocationControllerClient(this);
#endif
m_page = new Page(pageClients);
m_page->settings()->setMinDOMTimerInterval(0.004);
BSTR localStoragePath;
if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {
......
2010-09-17 Matthew Delaney <mdelaney@apple.com>
Reviewed by Simon Fraser.
Reduce minimum DOMTimer interval
https://bugs.webkit.org/show_bug.cgi?id=45362
* WebProcess/WebPage/WebPage.cpp: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2010-09-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -116,6 +116,7 @@ WebPage::WebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesS
m_page->settings()->setSansSerifFontFamily(store.sansSerifFontFamily);
m_page->settings()->setSerifFontFamily(store.serifFontFamily);
m_page->settings()->setJavaScriptCanOpenWindowsAutomatically(true);
m_page->settings()->setMinDOMTimerInterval(0.004);
m_page->setGroupName("WebKit2Group");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment