Changeset 116230 in webkit
- Timestamp:
- May 5, 2012 2:38:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116221 r116230 1 2012-05-05 Dean Jackson <dino@apple.com> 2 3 Add new Setting/Preference to disable requestAnimationFrame 4 https://bugs.webkit.org/show_bug.cgi?id=85693 5 6 Reviewed by Simon Fraser. 7 8 A new test that exercises turning the requestAnimationFrame 9 preference off. Unfortunately this conflicts with the parallel 10 tests that expect the preference to be on (as it should by default), 11 so the test is skipped on all platforms. It can be run in isolation. 12 https://bugs.webkit.org/show_bug.cgi?id=85689 13 14 * fast/animation/request-animation-frame-disabled-expected.txt: Added. 15 * fast/animation/request-animation-frame-disabled.html: Added. 16 * fast/animation/script-tests/request-animation-frame-disabled.js: Added. 17 * platform/chromium/test_expectations.txt: 18 * platform/efl/test_expectations.txt: 19 * platform/gtk/test_expectations.txt: 20 * platform/mac/Skipped: 21 * platform/mac/test_expectations.txt: 22 * platform/qt/test_expectations.txt: 23 * platform/win/Skipped: 24 * platform/win/test_expectations.txt: 25 1 26 2012-05-05 Zhenyao Mo <zmo@google.com> 2 27 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r116197 r116230 3910 3910 BUGDPRANKE MAC : userscripts/user-style-all-frames.html = TEXT PASS 3911 3911 3912 // Interferes with the rAF tests that are enabled 3913 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT -
trunk/LayoutTests/platform/efl/test_expectations.txt
r116208 r116230 291 291 BUGWK85599 : http/tests/navigation/postredirect-basic.html = TEXT 292 292 BUGWK85599 : http/tests/navigation/postredirect-goback1.html = TEXT 293 294 // Interferes with the rAF tests that are enabled 295 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT -
trunk/LayoutTests/platform/gtk/test_expectations.txt
r116214 r116230 1344 1344 BUGWK85700 : fullscreen/non-ancestor-iframe.html = FAIL 1345 1345 1346 // Interferes with the rAF tests that are enabled 1347 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT 1348 1346 1349 ////////////////////////////////////////////////////////////////////////////////////////// 1347 1350 // End of Tests failing -
trunk/LayoutTests/platform/mac/test_expectations.txt
r116069 r116230 206 206 BUGWK85565 : fast/block/float/016.html = IMAGE 207 207 BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE 208 209 // Interferes with the tests that should pass 210 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT -
trunk/LayoutTests/platform/qt/test_expectations.txt
r116074 r116230 73 73 BUGWK85567 : fast/images/png-suite/test.html = IMAGE 74 74 75 // Interferes with the tests that should pass 76 BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT -
trunk/LayoutTests/platform/win/Skipped
r116009 r116230 1733 1733 # http://webkit.org/b/82886 1734 1734 inspector/styles/override-screen-size.html 1735 1736 # Interferes with the other requestAnimationFrame tests 1737 # https://bugs.webkit.org/show_bug.cgi?id=85689 1738 fast/animation/request-animation-frame-disabled.html -
trunk/Source/WebCore/ChangeLog
r116227 r116230 1 2012-05-05 Dean Jackson <dino@apple.com> 2 3 Add new Setting/Preference to disable requestAnimationFrame 4 https://bugs.webkit.org/show_bug.cgi?id=85693 5 6 Reviewed by Simon Fraser. 7 8 Hook up the new WebPreference for disabling requestAnimationFrame 9 to Settings. This isn't disabling the feature in the typical 10 WebKit ENABLE() way - it's still available in the DOM, it's 11 just that the animations will never be serviced. This allows a client 12 to disable the machinery without breaking content (other than the 13 animations). 14 15 The new test is currently skipped on all platforms because toggling 16 the preference interferes with the other tests that are running 17 at the same time (and expect a working requestAnimationFrame). 18 https://bugs.webkit.org/show_bug.cgi?id=85689 19 20 Test: fast/animation/request-animation-frame-disabled.html 21 22 * dom/ScriptedAnimationController.cpp: 23 (WebCore::ScriptedAnimationController::serviceScriptedAnimations): 24 (WebCore::ScriptedAnimationController::windowScreenDidChange): 25 (WebCore::ScriptedAnimationController::scheduleAnimation): 26 Check the setting before deciding to act. 27 * page/Settings.cpp: 28 (WebCore::Settings::Settings): 29 * page/Settings.h: 30 (WebCore::Settings::setRequestAnimationFrameEnabled): 31 (WebCore::Settings::requestAnimationFrameEnabled): 32 (Settings): 33 1 34 2012-05-05 Gustavo Noronha Silva <gns@gnome.org> 2 35 -
trunk/Source/WebCore/dom/ScriptedAnimationController.cpp
r115525 r116230 34 34 #include "InspectorInstrumentation.h" 35 35 #include "RequestAnimationFrameCallback.h" 36 #include "Settings.h" 36 37 37 38 #if USE(REQUEST_ANIMATION_FRAME_TIMER) … … 110 111 void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow) 111 112 { 112 if (!m_callbacks.size() || m_suspendCount )113 if (!m_callbacks.size() || m_suspendCount || (m_document->settings() && !m_document->settings()->requestAnimationFrameEnabled())) 113 114 return; 114 115 … … 119 120 CallbackList callbacks(m_callbacks); 120 121 121 // Invoking callbacks may detach elements from our document, which clear 's the document's122 // Invoking callbacks may detach elements from our document, which clears the document's 122 123 // reference to us, so take a defensive reference. 123 124 RefPtr<ScriptedAnimationController> protector(this); … … 147 148 void ScriptedAnimationController::windowScreenDidChange(PlatformDisplayID displayID) 148 149 { 150 if (m_document->settings() && !m_document->settings()->requestAnimationFrameEnabled()) 151 return; 149 152 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) 150 153 DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this); … … 156 159 void ScriptedAnimationController::scheduleAnimation() 157 160 { 158 if (!m_document )161 if (!m_document || (m_document->settings() && !m_document->settings()->requestAnimationFrameEnabled())) 159 162 return; 160 163 -
trunk/Source/WebCore/page/Settings.cpp
r115948 r116230 265 265 , m_shouldRespectImageOrientation(false) 266 266 , m_wantsBalancedSetDefersLoadingBehavior(false) 267 , m_requestAnimationFrameEnabled(true) 267 268 , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired) 268 269 , m_incrementalRenderingSuppressionTimeoutInSeconds(defaultIncrementalRenderingSuppressionTimeoutInSeconds) -
trunk/Source/WebCore/page/Settings.h
r115948 r116230 555 555 void setWantsBalancedSetDefersLoadingBehavior(bool flag) { m_wantsBalancedSetDefersLoadingBehavior = flag; } 556 556 bool wantsBalancedSetDefersLoadingBehavior() const { return m_wantsBalancedSetDefersLoadingBehavior; } 557 557 558 558 void setIncrementalRenderingSuppressionTimeoutInSeconds(double timeout) { m_incrementalRenderingSuppressionTimeoutInSeconds = timeout; } 559 559 double incrementalRenderingSuppressionTimeoutInSeconds() const { return m_incrementalRenderingSuppressionTimeoutInSeconds; } 560 560 561 void setRequestAnimationFrameEnabled(bool enabled) { m_requestAnimationFrameEnabled = enabled; } 562 bool requestAnimationFrameEnabled() const { return m_requestAnimationFrameEnabled; } 563 561 564 #if USE(JSC) 562 565 static void setShouldRespectPriorityInCSSAttributeSetters(bool); … … 722 725 bool m_shouldRespectImageOrientation : 1; 723 726 bool m_wantsBalancedSetDefersLoadingBehavior : 1; 727 bool m_requestAnimationFrameEnabled : 1; 724 728 725 729 Timer<Settings> m_loadsImagesAutomaticallyTimer; -
trunk/Source/WebKit/mac/ChangeLog
r116179 r116230 1 2012-05-05 Dean Jackson <dino@apple.com> 2 3 Add new Setting/Preference to disable requestAnimationFrame 4 https://bugs.webkit.org/show_bug.cgi?id=85693 5 6 Reviewed by Simon Fraser. 7 8 Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled. 9 The default value is true. The majority of applications will leave 10 it this way. 11 12 * WebView/WebPreferenceKeysPrivate.h: 13 * WebView/WebPreferences.mm: 14 (+[WebPreferences initialize]): 15 (-[WebPreferences requestAnimationFrameEnabled]): 16 (-[WebPreferences setRequestAnimationFrameEnabled:]): 17 * WebView/WebPreferencesPrivate.h: 18 * WebView/WebView.mm: 19 (-[WebView _preferencesChanged:]): 20 1 21 2012-05-04 Jer Noble <jer.noble@apple.com> 2 22 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r115925 r116230 122 122 #define WebKitRegionBasedColumnsEnabledKey @"WebKitRegionBasedColumnsEnabled" 123 123 #define WebKitShouldRespectImageOrientationKey @"WebKitShouldRespectImageOrientation" 124 #define WebKitRequestAnimationFrameEnabledPreferenceKey @"WebKitRequestAnimationFrameEnabled" 124 125 125 126 // These are private both because callers should be using the cover methods and because the -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r115925 r116230 398 398 [NSNumber numberWithBool:YES], WebKitNotificationsEnabledKey, 399 399 [NSNumber numberWithBool:NO], WebKitShouldRespectImageOrientationKey, 400 [NSNumber numberWithBool:YES], WebKitRequestAnimationFrameEnabledPreferenceKey, 400 401 [NSNumber numberWithBool:NO], WebKitWantsBalancedSetDefersLoadingBehaviorKey, 401 402 … … 403 404 [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota, 404 405 nil]; 406 405 407 406 408 // This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above … … 1688 1690 } 1689 1691 1692 - (BOOL)requestAnimationFrameEnabled 1693 { 1694 return [self _boolValueForKey:WebKitRequestAnimationFrameEnabledPreferenceKey]; 1695 } 1696 1697 - (void)setRequestAnimationFrameEnabled:(BOOL)enabled 1698 { 1699 [self _setBoolValue:enabled forKey:WebKitRequestAnimationFrameEnabledPreferenceKey]; 1700 } 1701 1690 1702 - (void)setIncrementalRenderingSuppressionTimeoutInSeconds:(NSTimeInterval)timeout 1691 1703 { -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r115925 r116230 299 299 - (BOOL)shouldRespectImageOrientation; 300 300 301 - (BOOL)requestAnimationFrameEnabled; 302 - (void)setRequestAnimationFrameEnabled:(BOOL)enabled; 303 301 304 - (void)setIncrementalRenderingSuppressionTimeoutInSeconds:(NSTimeInterval)timeout; 302 305 - (NSTimeInterval)incrementalRenderingSuppressionTimeoutInSeconds; -
trunk/Source/WebKit/mac/WebView/WebView.mm
r116179 r116230 1533 1533 settings->setShouldRespectImageOrientation([preferences shouldRespectImageOrientation]); 1534 1534 settings->setNeedsIsLoadingInAPISenseQuirk([self _needsIsLoadingInAPISenseQuirk]); 1535 settings->setRequestAnimationFrameEnabled([preferences requestAnimationFrameEnabled]); 1535 1536 1536 1537 NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds]; -
trunk/Source/WebKit/win/ChangeLog
r116121 r116230 1 2012-05-05 Dean Jackson <dino@apple.com> 2 3 Add new Setting/Preference to disable requestAnimationFrame 4 https://bugs.webkit.org/show_bug.cgi?id=85693 5 6 Reviewed by Simon Fraser. 7 8 Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled. 9 The default value is true. The majority of applications will leave 10 it this way. 11 12 * Interfaces/IWebPreferencesPrivate.idl: 13 * WebPreferenceKeysPrivate.h: 14 * WebPreferences.cpp: 15 (WebPreferences::initializeDefaultSettings): 16 (WebPreferences::setRequestAnimationFrameEnabled): 17 (WebPreferences::requestAnimationFrameEnabled): 18 * WebPreferences.h: 19 (WebPreferences): 20 * WebView.cpp: 21 (WebView::notifyPreferencesChanged): 22 1 23 2012-05-04 Nate Chapin <japhet@chromium.org> 2 24 -
trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
r107603 r116230 143 143 HRESULT setShouldInvertColors([in] BOOL); 144 144 HRESULT shouldInvertColors([out, retval] BOOL*); 145 146 HRESULT setRequestAnimationFrameEnabled([in] BOOL); 147 HRESULT requestAnimationFrameEnabled([out, retval] BOOL*); 145 148 } -
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
r107603 r116230 163 163 164 164 #define WebKitAVFoundationEnabledPreferenceKey "WebKitAVFoundationEnabled" 165 166 #define WebKitRequestAnimationFrameEnabledPreferenceKey "WebKitRequestAnimationFrameEnabled" 167 -
trunk/Source/WebKit/win/WebPreferences.cpp
r107689 r116230 274 274 CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackAllowsInlinePreferenceKey), kCFBooleanTrue); 275 275 276 CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanTrue); 277 276 278 defaultSettings = defaults; 277 279 } … … 1737 1739 #endif 1738 1740 } 1741 1742 HRESULT WebPreferences::setRequestAnimationFrameEnabled(BOOL enabled) 1743 { 1744 setBoolValue(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), enabled); 1745 return S_OK; 1746 } 1747 1748 HRESULT WebPreferences::requestAnimationFrameEnabled(BOOL* enabled) 1749 { 1750 *enabled = boolValueForKey(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey)); 1751 return S_OK; 1752 } 1753 -
trunk/Source/WebKit/win/WebPreferences.h
r107603 r116230 472 472 virtual HRESULT STDMETHODCALLTYPE setShouldInvertColors(BOOL); 473 473 474 virtual HRESULT STDMETHODCALLTYPE requestAnimationFrameEnabled(BOOL*); 475 virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL); 476 474 477 // WebPreferences 475 478 -
trunk/Source/WebKit/win/WebView.cpp
r115760 r116230 4948 4948 setShouldInvertColors(enabled); 4949 4949 4950 hr = prefsPrivate->requestAnimationFrameEnabled(&enabled); 4951 if (FAILED(hr)) 4952 return hr; 4953 settings->setRequestAnimationFrameEnabled(enabled); 4954 4950 4955 return S_OK; 4951 4956 } -
trunk/Source/WebKit2/ChangeLog
r116226 r116230 1 2012-05-05 Dean Jackson <dino@apple.com> 2 3 Add new Setting/Preference to disable requestAnimationFrame 4 https://bugs.webkit.org/show_bug.cgi?id=85693 5 6 Reviewed by Simon Fraser. 7 8 Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled. 9 The default value is true. The majority of applications will leave 10 it this way. 11 12 * Shared/WebPreferencesStore.h: 13 (WebKit): 14 * UIProcess/API/C/WKPreferences.cpp: 15 (WKPreferencesSetRequestAnimationFrameEnabled): 16 (WKPreferencesGetRequestAnimationFrameEnabled): 17 * UIProcess/API/C/WKPreferencesPrivate.h: 18 * WebProcess/WebPage/WebPage.cpp: 19 (WebKit::WebPage::updatePreferences): 20 1 21 2012-05-04 Jon Lee <jonlee@apple.com> 2 22 -
trunk/Source/WebKit2/Shared/WebPreferencesStore.h
r115948 r116230 112 112 macro(ShouldRespectImageOrientation, shouldRespectImageOrientation, Bool, bool, false) \ 113 113 macro(WantsBalancedSetDefersLoadingBehavior, wantsBalancedSetDefersLoadingBehavior, Bool, bool, false) \ 114 macro(RequestAnimationFrameEnabled, requestAnimationFrameEnabled, Bool, bool, true) \ 114 115 \ 115 116 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r113486 r116230 789 789 } 790 790 791 void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef, bool flag) 792 { 793 toImpl(preferencesRef)->setRequestAnimationFrameEnabled(flag); 794 } 795 796 bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef) 797 { 798 return toImpl(preferencesRef)->requestAnimationFrameEnabled(); 799 } 800 791 801 void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef) 792 802 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h
r112894 r116230 180 180 WK_EXPORT bool WKPreferencesGetJavaEnabledForLocalFiles(WKPreferencesRef preferences); 181 181 182 // Defaults to true. 183 WK_EXPORT void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef, bool); 184 WK_EXPORT bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef); 185 182 186 WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef); 183 187 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r116178 r116230 1967 1967 settings->setMockScrollbarsEnabled(store.getBoolValueForKey(WebPreferencesKey::mockScrollbarsEnabledKey())); 1968 1968 settings->setHyperlinkAuditingEnabled(store.getBoolValueForKey(WebPreferencesKey::hyperlinkAuditingEnabledKey())); 1969 settings->setRequestAnimationFrameEnabled(store.getBoolValueForKey(WebPreferencesKey::requestAnimationFrameEnabledKey())); 1969 1970 1970 1971 // <rdar://problem/10697417>: It is necessary to force compositing when accelerate drawing
Note: See TracChangeset
for help on using the changeset viewer.