Changeset 109584 in webkit


Ignore:
Timestamp:
Mar 2, 2012 10:03:59 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Smooth scrolling support
https://bugs.webkit.org/show_bug.cgi?id=16123

Patch by Zan Dobersek <zandobersek@gmail.com> on 2012-03-02
Reviewed by Martin Robinson.

Source/WebCore:

No new tests - no new functionality.

Add the ScrollAnimatorNone class to compilation and enable
the smooth scrolling feature by default at compilation time.

  • GNUmakefile.am:
  • GNUmakefile.list.am:

Source/WebKit/gtk:

Add a new settings option to enable smooth scrolling.

  • webkit/webkitwebsettings.cpp:

(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):

  • webkit/webkitwebsettingsprivate.h:
  • webkit/webkitwebview.cpp:

(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109580 r109584  
     12012-03-02  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [GTK] Smooth scrolling support
     4        https://bugs.webkit.org/show_bug.cgi?id=16123
     5
     6        Reviewed by Martin Robinson.
     7
     8        No new tests - no new functionality.
     9
     10        Add the ScrollAnimatorNone class to compilation and enable
     11        the smooth scrolling feature by default at compilation time.
     12
     13        * GNUmakefile.am:
     14        * GNUmakefile.list.am:
     15
    1162012-03-02  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/Source/WebCore/GNUmakefile.am

    r109493 r109584  
    111111        -I$(srcdir)/Source/WebCore/platform/gtk \
    112112        -I$(srcdir)/Source/WebCore/platform/network/soup
     113
     114# ---
     115# Features enabled by default at compilation time
     116# ---
     117FEATURE_DEFINES += ENABLE_SMOOTH_SCROLLING=1
     118webcore_cppflags += -DENABLE_SMOOTH_SCROLLING=1
    113119
    114120# ---
  • trunk/Source/WebCore/GNUmakefile.list.am

    r109556 r109584  
    33913391        Source/WebCore/platform/ScrollAnimator.cpp \
    33923392        Source/WebCore/platform/ScrollAnimator.h \
     3393        Source/WebCore/platform/ScrollAnimatorNone.cpp \
     3394        Source/WebCore/platform/ScrollAnimatorNone.h \
    33933395        Source/WebCore/platform/ScrollableArea.cpp \
    33943396        Source/WebCore/platform/ScrollableArea.h \
  • trunk/Source/WebKit/gtk/ChangeLog

    r109517 r109584  
     12012-03-02  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [GTK] Smooth scrolling support
     4        https://bugs.webkit.org/show_bug.cgi?id=16123
     5
     6        Reviewed by Martin Robinson.
     7
     8        Add a new settings option to enable smooth scrolling.
     9
     10        * webkit/webkitwebsettings.cpp:
     11        (webkit_web_settings_class_init):
     12        (webkit_web_settings_set_property):
     13        (webkit_web_settings_get_property):
     14        * webkit/webkitwebsettingsprivate.h:
     15        * webkit/webkitwebview.cpp:
     16        (webkit_web_view_update_settings):
     17        (webkit_web_view_settings_notify):
     18
    1192012-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
    220
  • trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp

    r108264 r109584  
    121121    PROP_ENABLE_WEBGL,
    122122    PROP_ENABLE_WEB_AUDIO,
    123     PROP_ENABLE_ACCELERATED_COMPOSITING
     123    PROP_ENABLE_ACCELERATED_COMPOSITING,
     124    PROP_ENABLE_SMOOTH_SCROLLING
    124125};
    125126
     
    954955                                                         TRUE,
    955956                                                         flags));
     957
     958    /**
     959    * WebKitWebSettings:enable-smooth-scrolling
     960    *
     961    * Enable or disable support for smooth scrolling. The current implementation relies upon
     962    * CPU work to produce a smooth scrolling experience.
     963    *
     964    * Since: 1.9.0
     965    */
     966    g_object_class_install_property(gobject_class,
     967                                    PROP_ENABLE_SMOOTH_SCROLLING,
     968                                    g_param_spec_boolean("enable-smooth-scrolling",
     969                                                         _("Enable smooth scrolling"),
     970                                                         _("Whether to enable smooth scrolling"),
     971                                                         FALSE,
     972                                                         flags));
    956973}
    957974
     
    11291146        priv->enableAcceleratedCompositing = g_value_get_boolean(value);
    11301147        break;
     1148    case PROP_ENABLE_SMOOTH_SCROLLING:
     1149        priv->enableSmoothScrolling = g_value_get_boolean(value);
     1150        break;
    11311151    default:
    11321152        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
     
    12931313    case PROP_ENABLE_ACCELERATED_COMPOSITING:
    12941314        g_value_set_boolean(value, priv->enableAcceleratedCompositing);
     1315        break;
     1316    case PROP_ENABLE_SMOOTH_SCROLLING:
     1317        g_value_set_boolean(value, priv->enableSmoothScrolling);
    12951318        break;
    12961319    default:
  • trunk/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h

    r106901 r109584  
    8181    gboolean enableWebAudio;
    8282    gboolean enableAcceleratedCompositing;
     83    gboolean enableSmoothScrolling;
    8384};
    8485
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r109517 r109584  
    33403340#if ENABLE(WEB_SOCKETS)
    33413341    coreSettings->setUseHixie76WebSocketProtocol(false);
     3342#endif
     3343
     3344#if ENABLE(SMOOTH_SCROLLING)
     3345    coreSettings->setEnableScrollAnimator(settingsPrivate->enableSmoothScrolling);
    33423346#endif
    33433347
     
    34713475#endif
    34723476
     3477#if ENABLE(SMOOTH_SCROLLING)
     3478    else if (name == g_intern_string("enable-smooth-scrolling"))
     3479        settings->setEnableScrollAnimator(g_value_get_boolean(&value));
     3480#endif
     3481
    34733482    else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
    34743483        g_warning("Unexpected setting '%s'", name);
Note: See TracChangeset for help on using the changeset viewer.