Bug 191067 - [GTK] Scrollbars not following gtk-primary-button-warps-slider setting
Summary: [GTK] Scrollbars not following gtk-primary-button-warps-slider setting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-30 07:47 PDT by Jim Mason
Modified: 2018-11-23 11:46 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.90 KB, patch)
2018-10-30 07:51 PDT, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (1.90 KB, patch)
2018-10-30 08:03 PDT, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (1.86 KB, patch)
2018-10-30 08:15 PDT, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (1.89 KB, patch)
2018-10-30 11:11 PDT, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (1.89 KB, patch)
2018-10-30 11:17 PDT, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (2.03 KB, patch)
2018-11-23 09:10 PST, Jim Mason
no flags Details | Formatted Diff | Diff
Patch (2.00 KB, patch)
2018-11-23 09:14 PST, Jim Mason
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Mason 2018-10-30 07:47:25 PDT
When you click in the scrollbar trough, WebKit GTK will always warp the slider to the clicked position, regardless of the setting 'gtk-primary-button-warps-slider'.

Expected behaviour:  If 'gtk-primary-button-warps-slider' is false, then a click in the trough should page forward or backward; if true, then it should warp.  Holding down the shift key or clicking the middle button reverses the sense of the setting.

Reference: https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-primary-button-warps-slider
Comment 1 Jim Mason 2018-10-30 07:51:59 PDT
Created attachment 353366 [details]
Patch
Comment 2 EWS Watchlist 2018-10-30 07:56:24 PDT
Attachment 353366 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:780:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:781:  Use nullptr instead of NULL.  [readability/null] [5]
ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:781:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:783:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:784:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Jim Mason 2018-10-30 08:03:16 PDT
Created attachment 353367 [details]
Patch
Comment 4 EWS Watchlist 2018-10-30 08:06:09 PDT
Attachment 353367 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:780:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:784:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jim Mason 2018-10-30 08:15:01 PDT
Created attachment 353369 [details]
Patch
Comment 6 Michael Catanzaro 2018-10-30 10:42:48 PDT
Did you close this accidentally?
Comment 7 Michael Catanzaro 2018-10-30 10:47:17 PDT
Comment on attachment 353369 [details]
Patch

Oooh, cool! Nice, especially if this is your first contribution.

I have two suggestions:

 (1) WebKit style is that the comment should be a complete sentence that starts with a capital and ends with a period.

 (2) The ^ is too clever for my taste; can you write it out with conditionals so that it's easier to read?

Thanks!
Comment 8 Jim Mason 2018-10-30 11:11:29 PDT
Created attachment 353387 [details]
Patch
Comment 9 Jim Mason 2018-10-30 11:13:31 PDT
(In reply to Michael Catanzaro from comment #7)
> Comment on attachment 353369 [details]
> Patch
> 
> Oooh, cool! Nice, especially if this is your first contribution.
> 
> I have two suggestions:
> 
>  (1) WebKit style is that the comment should be a complete sentence that
> starts with a capital and ends with a period.
> 
>  (2) The ^ is too clever for my taste; can you write it out with
> conditionals so that it's easier to read?
> 
> Thanks!

Good feedback, thanks!  The changes have been applied.
Comment 10 Michael Catanzaro 2018-10-30 11:16:04 PDT
Comment on attachment 353387 [details]
Patch

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

> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:785
> +        return warp_slider?

OK one last change: leave one space before the ?

warp_slider ?

Sorry. :P
Comment 11 Jim Mason 2018-10-30 11:17:30 PDT
Created attachment 353389 [details]
Patch
Comment 12 Jim Mason 2018-10-30 11:20:33 PDT
(In reply to Michael Catanzaro from comment #10)
> Comment on attachment 353387 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=353387&action=review
> 
> > Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:785
> > +        return warp_slider?
> 
> OK one last change: leave one space before the ?
> 
> warp_slider ?
> 
> Sorry. :P

No prob, 'tis done.
Comment 13 WebKit Commit Bot 2018-10-30 19:30:00 PDT
Comment on attachment 353389 [details]
Patch

Clearing flags on attachment: 353389

Committed r237617: <https://trac.webkit.org/changeset/237617>
Comment 14 WebKit Commit Bot 2018-10-30 19:30:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Carlos Garcia Campos 2018-11-22 00:42:20 PST
(In reply to Michael Catanzaro from comment #10)
> Comment on attachment 353387 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=353387&action=review
> 
> > Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:785
> > +        return warp_slider?
> 
> OK one last change: leave one space before the ?
> 
> warp_slider ?
> 
> Sorry. :P

warpSlider...
Comment 16 Michael Catanzaro 2018-11-23 08:59:18 PST
Sorry, I missed that. Will you rename it, or do you want me to?
Comment 17 Jim Mason 2018-11-23 09:10:22 PST
Reopening to attach new patch.
Comment 18 Jim Mason 2018-11-23 09:10:24 PST
Created attachment 355518 [details]
Patch
Comment 19 EWS Watchlist 2018-11-23 09:12:18 PST
Attachment 355518 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:10:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 20 Jim Mason 2018-11-23 09:14:45 PST
Created attachment 355519 [details]
Patch
Comment 21 Michael Catanzaro 2018-11-23 11:20:16 PST
Comment on attachment 355519 [details]
Patch

OK, thanks.
Comment 22 WebKit Commit Bot 2018-11-23 11:45:59 PST
Comment on attachment 355519 [details]
Patch

Clearing flags on attachment: 355519

Committed r238462: <https://trac.webkit.org/changeset/238462>
Comment 23 WebKit Commit Bot 2018-11-23 11:46:01 PST
All reviewed patches have been landed.  Closing bug.