Changeset 146924 in webkit


Ignore:
Timestamp:
Mar 26, 2013 1:29:44 PM (11 years ago)
Author:
tony@chromium.org
Message:

Autogenerate the scrollAnimatorEnabled setting in Settings.in
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).

Location:
trunk/Source
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146922 r146924  
     12013-03-26  Tony Chang  <tony@chromium.org>
     2
     3        Autogenerate the scrollAnimatorEnabled setting in Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=113253
     5
     6        Reviewed by James Robinson.
     7
     8        Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
     9        the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
     10        updating the callers. I didn't change any WebKit API methods.
     11
     12        Also remove the code in InternalSettings since it's never used and will now be
     13        autogenerated with proper resetting code.
     14
     15        No new tests, this is a refactor and should compile.
     16
     17        * page/Settings.cpp:
     18        (WebCore::Settings::Settings): Remove code that is now autogenerated.
     19        * page/Settings.h:
     20        (Settings): Remove code that is now autogenerated.
     21        * page/Settings.in: Add entry for scrollAnimatorEnabled.
     22        * testing/InternalSettings.cpp: Remove unused code.
     23        * testing/InternalSettings.h: Remove unused code.
     24        * testing/InternalSettings.idl: Remove unused code.
     25
    1262013-03-26  Joe Mason  <jmason@blackberry.com>
    227
  • trunk/Source/WebCore/page/Settings.cpp

    r146704 r146924  
    192192    , m_tiledBackingStoreEnabled(false)
    193193    , m_dnsPrefetchingEnabled(false)
    194 #if ENABLE(SMOOTH_SCROLLING)
    195     , m_scrollAnimatorEnabled(true)
    196 #endif
    197194#if ENABLE(TOUCH_EVENTS)
    198195    , m_touchEventEmulationEnabled(false)
  • trunk/Source/WebCore/page/Settings.h

    r146704 r146924  
    234234        static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
    235235
    236 #if ENABLE(SMOOTH_SCROLLING)
    237         void setEnableScrollAnimator(bool flag) { m_scrollAnimatorEnabled = flag; }
    238         bool scrollAnimatorEnabled() const { return m_scrollAnimatorEnabled; }
    239 #endif
    240 
    241236#if USE(SAFARI_THEME)
    242237        // Windows debugging pref (global) for switching between the Aqua look and a native windows look.
     
    324319        bool m_tiledBackingStoreEnabled : 1;
    325320        bool m_dnsPrefetchingEnabled : 1;
    326 #if ENABLE(SMOOTH_SCROLLING)
    327         bool m_scrollAnimatorEnabled : 1;
    328 #endif
    329321
    330322#if ENABLE(TOUCH_EVENTS)
  • trunk/Source/WebCore/page/Settings.in

    r146835 r146924  
    146146shouldDisplayTextDescriptions initial=false, conditional=VIDEO_TRACK
    147147scrollingCoordinatorEnabled initial=false
     148scrollAnimatorEnabled initial=true, conditional=SMOOTH_SCROLLING
    148149notificationsEnabled initial=true
    149150
  • trunk/Source/WebCore/testing/InternalSettings.cpp

    r146380 r146924  
    353353}
    354354
    355 void InternalSettings::setEnableScrollAnimator(bool enabled, ExceptionCode& ec)
    356 {
    357 #if ENABLE(SMOOTH_SCROLLING)
    358     InternalSettingsGuardForSettings();
    359     settings()->setEnableScrollAnimator(enabled);
    360 #else
    361     UNUSED_PARAM(enabled);
    362     UNUSED_PARAM(ec);
    363 #endif
    364 }
    365 
    366 bool InternalSettings::scrollAnimatorEnabled(ExceptionCode& ec)
    367 {
    368 #if ENABLE(SMOOTH_SCROLLING)
    369     InternalSettingsGuardForSettingsReturn(false);
    370     return settings()->scrollAnimatorEnabled();
    371 #else
    372     UNUSED_PARAM(ec);
    373     return false;
    374 #endif
    375 }
    376 
    377355void InternalSettings::setCSSExclusionsEnabled(bool enabled, ExceptionCode& ec)
    378356{
  • trunk/Source/WebCore/testing/InternalSettings.h

    r145940 r146924  
    114114    void setResolutionOverride(int dotsPerCSSInchHorizontally, int dotsPerCSSInchVertically, ExceptionCode&);
    115115    void setMediaTypeOverride(const String& mediaType, ExceptionCode&);
    116     void setEnableScrollAnimator(bool enabled, ExceptionCode&);
    117     bool scrollAnimatorEnabled(ExceptionCode&);
    118116    void setCSSExclusionsEnabled(bool enabled, ExceptionCode&);
    119117    void setCSSVariablesEnabled(bool enabled, ExceptionCode&);
  • trunk/Source/WebCore/testing/InternalSettings.idl

    r145750 r146924  
    4545    void setResolutionOverride(in long dotsPerCSSInchHorizontally, in long dotsPerCSSInchVertically) raises(DOMException);
    4646    void setMediaTypeOverride(in DOMString mediaTypeOverride) raises(DOMException);
    47     void setEnableScrollAnimator(in boolean enabled) raises(DOMException);
    48     boolean scrollAnimatorEnabled() raises(DOMException);
    4947    void setCSSExclusionsEnabled(in boolean enabled) raises(DOMException);
    5048    void setCSSVariablesEnabled(in boolean enabled) raises(DOMException);
  • trunk/Source/WebKit/chromium/ChangeLog

    r146917 r146924  
     12013-03-26  Tony Chang  <tony@chromium.org>
     2
     3        Autogenerate the scrollAnimatorEnabled setting in Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=113253
     5
     6        Reviewed by James Robinson.
     7
     8        * src/WebSettingsImpl.cpp:
     9        (WebKit::WebSettingsImpl::setEnableScrollAnimator): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     10
    1112013-03-26  Tony Chang  <tony@chromium.org>
    212
  • trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp

    r146917 r146924  
    620620{
    621621#if ENABLE(SMOOTH_SCROLLING)
    622     m_settings->setEnableScrollAnimator(enabled);
     622    m_settings->setScrollAnimatorEnabled(enabled);
    623623#else
    624624    UNUSED_PARAM(enabled);
  • trunk/Source/WebKit/gtk/ChangeLog

    r146721 r146924  
     12013-03-26  Tony Chang  <tony@chromium.org>
     2
     3        Autogenerate the scrollAnimatorEnabled setting in Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=113253
     5
     6        Reviewed by James Robinson.
     7
     8        * webkit/webkitwebview.cpp:
     9        (webkit_web_view_update_settings): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     10        (webkit_web_view_settings_notify): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     11
    1122013-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r145818 r146924  
    35773577
    35783578#if ENABLE(SMOOTH_SCROLLING)
    3579     coreSettings->setEnableScrollAnimator(settingsPrivate->enableSmoothScrolling);
     3579    coreSettings->setScrollAnimatorEnabled(settingsPrivate->enableSmoothScrolling);
    35803580#endif
    35813581
     
    37243724#if ENABLE(SMOOTH_SCROLLING)
    37253725    else if (name == g_intern_string("enable-smooth-scrolling"))
    3726         settings->setEnableScrollAnimator(g_value_get_boolean(&value));
     3726        settings->setScrollAnimatorEnabled(g_value_get_boolean(&value));
    37273727#endif
    37283728
  • trunk/Source/WebKit/qt/Api/qwebsettings.cpp

    r145833 r146924  
    278278        value = attributes.value(QWebSettings::ScrollAnimatorEnabled,
    279279                                      global->attributes.value(QWebSettings::ScrollAnimatorEnabled));
    280         settings->setEnableScrollAnimator(value);
     280        settings->setScrollAnimatorEnabled(value);
    281281#endif
    282282
  • trunk/Source/WebKit/qt/ChangeLog

    r146872 r146924  
     12013-03-26  Tony Chang  <tony@chromium.org>
     2
     3        Autogenerate the scrollAnimatorEnabled setting in Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=113253
     5
     6        Reviewed by James Robinson.
     7
     8        * Api/qwebsettings.cpp:
     9        (QWebSettingsPrivate::apply): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     10
    1112013-03-26  Csaba Osztrogonác  <ossy@webkit.org>
    212
  • trunk/Source/WebKit2/ChangeLog

    r146915 r146924  
     12013-03-26  Tony Chang  <tony@chromium.org>
     2
     3        Autogenerate the scrollAnimatorEnabled setting in Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=113253
     5
     6        Reviewed by James Robinson.
     7
     8        * WebProcess/WebPage/WebPage.cpp:
     9        (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     10        (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).
     11
    1122013-03-26  Andras Becsi  <andras.becsi@digia.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r146704 r146924  
    12551255    // Delegated scrolling will be enabled when the FrameView is created if fixed layout is enabled.
    12561256    // Ensure we don't do animated scrolling in the WebProcess in that case.
    1257     m_page->settings()->setEnableScrollAnimator(!fixed);
     1257    m_page->settings()->setScrollAnimatorEnabled(!fixed);
    12581258#endif
    12591259
     
    23432343    settings->setRequestAnimationFrameEnabled(store.getBoolValueForKey(WebPreferencesKey::requestAnimationFrameEnabledKey()));
    23442344#if ENABLE(SMOOTH_SCROLLING)
    2345     settings->setEnableScrollAnimator(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
     2345    settings->setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
    23462346#endif
    23472347    settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
Note: See TracChangeset for help on using the changeset viewer.