Autogenerate the scrollAnimatorEnabled setting in Settings.in
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2013 20:29:44 +0000 (20:29 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2013 20:29:44 +0000 (20:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113253

Reviewed by James Robinson.

Source/WebCore:

Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
updating the callers. I didn't change any WebKit API methods.

Also remove the code in InternalSettings since it's never used and will now be
autogenerated with proper resetting code.

No new tests, this is a refactor and should compile.

* page/Settings.cpp:
(WebCore::Settings::Settings): Remove code that is now autogenerated.
* page/Settings.h:
(Settings): Remove code that is now autogenerated.
* page/Settings.in: Add entry for scrollAnimatorEnabled.
* testing/InternalSettings.cpp: Remove unused code.
* testing/InternalSettings.h: Remove unused code.
* testing/InternalSettings.idl: Remove unused code.

Source/WebKit/chromium:

* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setEnableScrollAnimator): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings): Update call to WebCore to use setScrollAnimatorEnabled(bool).
(webkit_web_view_settings_notify): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit/qt:

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
(WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).

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

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/Settings.in
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/qt/Api/qwebsettings.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index bb55008..260f9c0 100644 (file)
@@ -1,3 +1,28 @@
+2013-03-26  Tony Chang  <tony@chromium.org>
+
+        Autogenerate the scrollAnimatorEnabled setting in Settings.in
+        https://bugs.webkit.org/show_bug.cgi?id=113253
+
+        Reviewed by James Robinson.
+
+        Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
+        the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
+        updating the callers. I didn't change any WebKit API methods.
+
+        Also remove the code in InternalSettings since it's never used and will now be
+        autogenerated with proper resetting code.
+
+        No new tests, this is a refactor and should compile.
+
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings): Remove code that is now autogenerated.
+        * page/Settings.h:
+        (Settings): Remove code that is now autogenerated.
+        * page/Settings.in: Add entry for scrollAnimatorEnabled.
+        * testing/InternalSettings.cpp: Remove unused code.
+        * testing/InternalSettings.h: Remove unused code.
+        * testing/InternalSettings.idl: Remove unused code.
+
 2013-03-26  Joe Mason  <jmason@blackberry.com>
 
         [BlackBerry] In RSSFilterStream, don't swallow headers when there's no body
index a28bf00..0520cfa 100644 (file)
@@ -191,9 +191,6 @@ Settings::Settings(Page* page)
     , m_showTiledScrollingIndicator(false)
     , m_tiledBackingStoreEnabled(false)
     , m_dnsPrefetchingEnabled(false)
-#if ENABLE(SMOOTH_SCROLLING)
-    , m_scrollAnimatorEnabled(true)
-#endif
 #if ENABLE(TOUCH_EVENTS)
     , m_touchEventEmulationEnabled(false)
 #endif
index 4a7710e..2adaead 100644 (file)
@@ -233,11 +233,6 @@ namespace WebCore {
 
         static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
 
-#if ENABLE(SMOOTH_SCROLLING)
-        void setEnableScrollAnimator(bool flag) { m_scrollAnimatorEnabled = flag; }
-        bool scrollAnimatorEnabled() const { return m_scrollAnimatorEnabled; }
-#endif
-
 #if USE(SAFARI_THEME)
         // Windows debugging pref (global) for switching between the Aqua look and a native windows look.
         static void setShouldPaintNativeControls(bool);
@@ -323,9 +318,6 @@ namespace WebCore {
         bool m_showTiledScrollingIndicator : 1;
         bool m_tiledBackingStoreEnabled : 1;
         bool m_dnsPrefetchingEnabled : 1;
-#if ENABLE(SMOOTH_SCROLLING)
-        bool m_scrollAnimatorEnabled : 1;
-#endif
 
 #if ENABLE(TOUCH_EVENTS)
         bool m_touchEventEmulationEnabled : 1;
index 89f1e1e..e29cac2 100644 (file)
@@ -145,6 +145,7 @@ shouldDisplaySubtitles initial=false, conditional=VIDEO_TRACK
 shouldDisplayCaptions initial=false, conditional=VIDEO_TRACK
 shouldDisplayTextDescriptions initial=false, conditional=VIDEO_TRACK
 scrollingCoordinatorEnabled initial=false
+scrollAnimatorEnabled initial=true, conditional=SMOOTH_SCROLLING
 notificationsEnabled initial=true
 
 # Some apps needs isLoadingInAPISense to account for active subresource loaders.
index a9eb627..38173e5 100644 (file)
@@ -352,28 +352,6 @@ void InternalSettings::setTextAutosizingFontScaleFactor(float fontScaleFactor, E
 #endif
 }
 
-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 InternalSettings::setCSSExclusionsEnabled(bool enabled, ExceptionCode& ec)
 {
     UNUSED_PARAM(ec);
index 18742e2..5a6c89a 100644 (file)
@@ -113,8 +113,6 @@ public:
     void setTextAutosizingFontScaleFactor(float fontScaleFactor, ExceptionCode&);
     void setResolutionOverride(int dotsPerCSSInchHorizontally, int dotsPerCSSInchVertically, ExceptionCode&);
     void setMediaTypeOverride(const String& mediaType, ExceptionCode&);
-    void setEnableScrollAnimator(bool enabled, ExceptionCode&);
-    bool scrollAnimatorEnabled(ExceptionCode&);
     void setCSSExclusionsEnabled(bool enabled, ExceptionCode&);
     void setCSSVariablesEnabled(bool enabled, ExceptionCode&);
     bool cssVariablesEnabled(ExceptionCode&);
index cde8df6..d1fa196 100644 (file)
@@ -44,8 +44,6 @@
     void setTextAutosizingFontScaleFactor(in float fontScaleFactor) raises(DOMException);
     void setResolutionOverride(in long dotsPerCSSInchHorizontally, in long dotsPerCSSInchVertically) raises(DOMException);
     void setMediaTypeOverride(in DOMString mediaTypeOverride) raises(DOMException);
-    void setEnableScrollAnimator(in boolean enabled) raises(DOMException);
-    boolean scrollAnimatorEnabled() raises(DOMException);
     void setCSSExclusionsEnabled(in boolean enabled) raises(DOMException);
     void setCSSVariablesEnabled(in boolean enabled) raises(DOMException);
     boolean cssVariablesEnabled() raises(DOMException);
index 5c0eb5a..bc121e8 100644 (file)
@@ -1,5 +1,15 @@
 2013-03-26  Tony Chang  <tony@chromium.org>
 
+        Autogenerate the scrollAnimatorEnabled setting in Settings.in
+        https://bugs.webkit.org/show_bug.cgi?id=113253
+
+        Reviewed by James Robinson.
+
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setEnableScrollAnimator): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+
+2013-03-26  Tony Chang  <tony@chromium.org>
+
         [chromium] Expose setSelectionIncludesAltImageText in WebSettings
         https://bugs.webkit.org/show_bug.cgi?id=113316
 
index 3ef344b..bed0c33 100644 (file)
@@ -619,7 +619,7 @@ void WebSettingsImpl::setShouldPrintBackgrounds(bool enabled)
 void WebSettingsImpl::setEnableScrollAnimator(bool enabled)
 {
 #if ENABLE(SMOOTH_SCROLLING)
-    m_settings->setEnableScrollAnimator(enabled);
+    m_settings->setScrollAnimatorEnabled(enabled);
 #else
     UNUSED_PARAM(enabled);
 #endif
index 8ac1e6a..1b25f34 100644 (file)
@@ -1,3 +1,14 @@
+2013-03-26  Tony Chang  <tony@chromium.org>
+
+        Autogenerate the scrollAnimatorEnabled setting in Settings.in
+        https://bugs.webkit.org/show_bug.cgi?id=113253
+
+        Reviewed by James Robinson.
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_update_settings): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+        (webkit_web_view_settings_notify): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+
 2013-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][Regression] webkit_dom_html_table_element_insert_row returns value that doesn't pass WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT macro
index 6403ad7..5272a68 100644 (file)
@@ -3576,7 +3576,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
 #endif
 
 #if ENABLE(SMOOTH_SCROLLING)
-    coreSettings->setEnableScrollAnimator(settingsPrivate->enableSmoothScrolling);
+    coreSettings->setScrollAnimatorEnabled(settingsPrivate->enableSmoothScrolling);
 #endif
 
 #if ENABLE(CSS_SHADERS)
@@ -3723,7 +3723,7 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
 
 #if ENABLE(SMOOTH_SCROLLING)
     else if (name == g_intern_string("enable-smooth-scrolling"))
-        settings->setEnableScrollAnimator(g_value_get_boolean(&value));
+        settings->setScrollAnimatorEnabled(g_value_get_boolean(&value));
 #endif
 
 #if ENABLE(CSS_SHADERS)
index c1f8896..620d1fe 100644 (file)
@@ -277,7 +277,7 @@ void QWebSettingsPrivate::apply()
 #if ENABLE(SMOOTH_SCROLLING)
         value = attributes.value(QWebSettings::ScrollAnimatorEnabled,
                                       global->attributes.value(QWebSettings::ScrollAnimatorEnabled));
-        settings->setEnableScrollAnimator(value);
+        settings->setScrollAnimatorEnabled(value);
 #endif
 
         value = attributes.value(QWebSettings::CaretBrowsingEnabled,
index 63d6fdb..c3f184f 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-26  Tony Chang  <tony@chromium.org>
+
+        Autogenerate the scrollAnimatorEnabled setting in Settings.in
+        https://bugs.webkit.org/show_bug.cgi?id=113253
+
+        Reviewed by James Robinson.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+
 2013-03-26  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         [Qt] Fix tst_QWebElement::render() API test
index fc8734b..6d148dc 100644 (file)
@@ -1,3 +1,14 @@
+2013-03-26  Tony Chang  <tony@chromium.org>
+
+        Autogenerate the scrollAnimatorEnabled setting in Settings.in
+        https://bugs.webkit.org/show_bug.cgi?id=113253
+
+        Reviewed by James Robinson.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+        (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).
+
 2013-03-26  Andras Becsi  <andras.becsi@digia.com>
 
         [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
index 4c06f20..7f5b1f2 100644 (file)
@@ -1254,7 +1254,7 @@ void WebPage::setUseFixedLayout(bool fixed)
 #if USE(TILED_BACKING_STORE) && ENABLE(SMOOTH_SCROLLING)
     // Delegated scrolling will be enabled when the FrameView is created if fixed layout is enabled.
     // Ensure we don't do animated scrolling in the WebProcess in that case.
-    m_page->settings()->setEnableScrollAnimator(!fixed);
+    m_page->settings()->setScrollAnimatorEnabled(!fixed);
 #endif
 
     FrameView* view = mainFrameView();
@@ -2342,7 +2342,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings->setHyperlinkAuditingEnabled(store.getBoolValueForKey(WebPreferencesKey::hyperlinkAuditingEnabledKey()));
     settings->setRequestAnimationFrameEnabled(store.getBoolValueForKey(WebPreferencesKey::requestAnimationFrameEnabledKey()));
 #if ENABLE(SMOOTH_SCROLLING)
-    settings->setEnableScrollAnimator(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
+    settings->setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
 #endif
     settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));