Bug 54826 - [GTK] Add a setting to change the pixels per line used for scrolling
Summary: [GTK] Add a setting to change the pixels per line used for scrolling
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-20 08:45 PST by Alejandro G. Castro
Modified: 2014-04-08 18:45 PDT (History)
5 users (show)

See Also:


Attachments
Setting to change the pixels per line added. (7.95 KB, patch)
2011-04-29 07:00 PDT, Peter Hatina
mrobinson: review-
Details | Formatted Diff | Diff
Setting to change the pixels per line added. (10.71 KB, patch)
2011-05-05 02:18 PDT, Peter Hatina
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2011-02-20 08:45:17 PST
This will allow to change the scrolling distance per event. We have to add the setting and use it in PlatformMouseEvent and WebEventFactory.
Comment 1 Alejandro G. Castro 2011-02-20 08:48:51 PST
(In reply to comment #0)
> This will allow to change the scrolling distance per event. We have to add the setting and use it in PlatformMouseEvent and WebEventFactory.

Actually the list of files using it is:

   - WheelEventGtk.cpp
   - ScrollViewGtk.cpp
   - WebEventFactory.cpp
Comment 2 Peter Hatina 2011-04-29 07:00:05 PDT
Created attachment 91675 [details]
Setting to change the pixels per line added.

The setting should be now available. I suggest to have one global object of the Settings class, as the Qt does, which gives us the ability to have application-wide settings accessible at any point. The default setting uses the value of Scrollbar::pixelsPerLineStep(), which is now free to change by void setScrollPixelCount(float count).
Comment 3 Peter Hatina 2011-05-05 02:18:26 PDT
Created attachment 92395 [details]
Setting to change the pixels per line added.

I forgot to append the ChangeLogs into the patch, now it should be fine.
Comment 4 Eric Seidel (no email) 2011-05-26 18:01:06 PDT
Seems like a relatively simple patch which hasn't been touched in 3 weeks.  Bueller?
Comment 5 Martin Robinson 2011-05-27 10:37:57 PDT
Comment on attachment 92395 [details]
Setting to change the pixels per line added.

View in context: https://bugs.webkit.org/attachment.cgi?id=92395&action=review

> Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp:75
> -    // FIXME: retrieve the user setting for the number of lines to scroll on each wheel event
> -    m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep());
> -    m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
> +    Settings* settings = Settings::globalSettings();
> +    m_deltaX *= settings->scrollPixelCount();
> +    m_deltaY *= settings->scrollPixelCount();

I think this comment actually refers to retrieving the setting from GTK+.  I do not think it is worth exposing this kind of low-level option through the API. If there is a default GTK+ value for this though, we should be sure to use it so that scrollbars move in a more native way.

Personally I do not find anything wrong with the current scrollbar behavior and feel we can probably just remove the comments and close the bug. I could be wrong though and perhaps our scrollbars could move more natively during wheel events.
Comment 6 Peter Hatina 2011-06-16 00:06:42 PDT
As far as I know, Gtk does not provide a way, how to determine the default value for scrolling step. But in my opinion, the ability to set the scrolling pixel count can be useful. In comparision with other browsers, some of them allow to do this.
Comment 7 Martin Robinson 2014-04-08 18:45:07 PDT
Let's skip this feature for now and determine if we need it later.