https://bugs.webkit.org/show_bug.cgi?id=81858
Add a call to the InternalSettings that layout tests can use to
turn on scroll animation. Enable animation updates for the
Chromium platform DRT when scroll animation has been turned on in
a test. This should be a no-op for all current layout tests.
Patch by Scott Byer <scottbyer@chromium.org> on 2012-03-26
Reviewed by James Robinson.
Source/WebCore:
No new tests. Layout test results should be unchanged.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setEnableScrollAnimator):
(WebCore):
(WebCore::InternalSettings::scrollAnimatorEnabled):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
Source/WebKit/chromium:
* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::scrollAnimatorEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
Tools:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::serviceAnimation):
(WebViewHost::scheduleAnimation):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112196
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-26 Scott Byer <scottbyer@chromium.org>
+
+ Enable layout testing of the scroll animator.
+ https://bugs.webkit.org/show_bug.cgi?id=81858
+ Add a call to the InternalSettings that layout tests can use to
+ turn on scroll animation. Enable animation updates for the
+ Chromium platform DRT when scroll animation has been turned on in
+ a test. This should be a no-op for all current layout tests.
+
+ Reviewed by James Robinson.
+
+ No new tests. Layout test results should be unchanged.
+
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::setEnableScrollAnimator):
+ (WebCore):
+ (WebCore::InternalSettings::scrollAnimatorEnabled):
+ * testing/InternalSettings.h:
+ (InternalSettings):
+ * testing/InternalSettings.idl:
+
2012-03-26 Charles Wei <charles.wei@torchmobile.com.cn>
Fix minor spell error in DocumentLoader.h
setFontFamily(settings(), family, script, &Settings::setPictographFontFamily);
}
+void InternalSettings::setEnableScrollAnimator(bool enabled, ExceptionCode& ec)
+{
+#if ENABLE(SMOOTH_SCROLLING)
+ InternalSettingsGuardForSettings();
+ settings()->setEnableScrollAnimator(enabled);
+#else
+ UNUSED_PARAM(enabled);
+ UNUSED_PARAM(ec);
+#endif
+}
+
+bool InternalSettings::scrollAnimatorEnabled(ExceptionCode& ec)
+{
+#if ENABLE(SMOOTH_SCROLLING)
+ InternalSettingsGuardForSettingsReturn(false);
+ return settings()->scrollAnimatorEnabled();
+#else
+ UNUSED_PARAM(ec);
+ return false;
+#endif
+}
+
}
void setCursiveFontFamily(const String& family, const String& script, ExceptionCode&);
void setFantasyFontFamily(const String& family, const String& script, ExceptionCode&);
void setPictographFontFamily(const String& family, const String& script, ExceptionCode&);
+ void setEnableScrollAnimator(bool enabled, ExceptionCode&);
+ bool scrollAnimatorEnabled(ExceptionCode&);
void restoreTo(Settings*);
void setCursiveFontFamily(in DOMString family, in DOMString script) raises(DOMException);
void setFantasyFontFamily(in DOMString family, in DOMString script) raises(DOMException);
void setPictographFontFamily(in DOMString family, in DOMString script) raises(DOMException);
+ void setEnableScrollAnimator(in boolean enabled) raises(DOMException);
+ boolean scrollAnimatorEnabled() raises(DOMException);
};
}
+2012-03-26 Scott Byer <scottbyer@chromium.org>
+
+ Enable layout testing of the scroll animator.
+ https://bugs.webkit.org/show_bug.cgi?id=81858
+ Add a call to the InternalSettings that layout tests can use to
+ turn on scroll animation. Enable animation updates for the
+ Chromium platform DRT when scroll animation has been turned on in
+ a test. This should be a no-op for all current layout tests.
+
+ Reviewed by James Robinson.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::scrollAnimatorEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+
2012-03-26 Nat Duca <nduca@chromium.org>
[chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
virtual void setPasswordEchoDurationInSeconds(double) = 0;
virtual void setShouldPrintBackgrounds(bool) = 0;
virtual void setEnableScrollAnimator(bool) = 0;
+ virtual bool scrollAnimatorEnabled() const = 0;
virtual void setHixie76WebSocketProtocolEnabled(bool) = 0;
virtual void setVisualWordMovementEnabled(bool) = 0;
virtual void setAcceleratedPaintingEnabled(bool) = 0;
#endif
}
+bool WebSettingsImpl::scrollAnimatorEnabled() const
+{
+#if ENABLE(SMOOTH_SCROLLING)
+ return m_settings->scrollAnimatorEnabled();
+#else
+ return false;
+#endif
+}
+
void WebSettingsImpl::setHixie76WebSocketProtocolEnabled(bool enabled)
{
#if ENABLE(WEB_SOCKETS)
virtual void setPasswordEchoDurationInSeconds(double);
virtual void setShouldPrintBackgrounds(bool);
virtual void setEnableScrollAnimator(bool);
+ virtual bool scrollAnimatorEnabled() const;
virtual void setHixie76WebSocketProtocolEnabled(bool);
virtual void setVisualWordMovementEnabled(bool);
virtual void setShouldDisplaySubtitles(bool);
+2012-03-26 Scott Byer <scottbyer@chromium.org>
+
+ Enable layout testing of the scroll animator.
+ https://bugs.webkit.org/show_bug.cgi?id=81858
+ Add a call to the InternalSettings that layout tests can use to
+ turn on scroll animation. Enable animation updates for the
+ Chromium platform DRT when scroll animation has been turned on in
+ a test. This should be a no-op for all current layout tests.
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::serviceAnimation):
+ (WebViewHost::scheduleAnimation):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
2012-03-26 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Support multi-file upload
}
#if ENABLE(REQUEST_ANIMATION_FRAME)
+void WebViewHost::serviceAnimation()
+{
+ if (webView()->settings()->scrollAnimatorEnabled())
+ webView()->animate(0.0);
+ scheduleComposite();
+}
+
void WebViewHost::scheduleAnimation()
{
- postDelayedTask(new HostMethodTask(this, &WebViewHost::scheduleComposite), 0);
+ postDelayedTask(new HostMethodTask(this, &WebViewHost::serviceAnimation), 0);
}
#endif
virtual void didAutoResize(const WebKit::WebSize& newSize);
virtual void scheduleComposite();
#if ENABLE(REQUEST_ANIMATION_FRAME)
+ virtual void serviceAnimation();
virtual void scheduleAnimation();
#endif
virtual void didFocus();