WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
161735
[GTK] Scrollbar too large
https://bugs.webkit.org/show_bug.cgi?id=161735
Summary
[GTK] Scrollbar too large
Milan Crha
Reported
2016-09-08 01:58:02 PDT
I'm going to attach two screenshots which show that the WebKit2 scrollbars are drown too large for me.
Attachments
devhelp.png
(43.29 KB, image/png)
2016-09-08 01:58 PDT
,
Milan Crha
no flags
Details
evo.png
(124.63 KB, image/png)
2016-09-08 02:00 PDT
,
Milan Crha
no flags
Details
frg.png
(14.79 KB, image/png)
2016-09-08 03:09 PDT
,
Milan Crha
no flags
Details
Patch
(6.83 KB, patch)
2016-09-12 05:14 PDT
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
patched.png
(10.93 KB, image/png)
2016-09-12 06:18 PDT
,
Milan Crha
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Milan Crha
Comment 1
2016-09-08 01:58:42 PDT
Created
attachment 288257
[details]
devhelp.png This is from DevHelp, which uses stock webkitgtk4-2.12.2-2.fc24.x86_64
Milan Crha
Comment 2
2016-09-08 02:00:57 PDT
Created
attachment 288258
[details]
evo.png This is from the evolution, the message content uses WebKit2. It's self-build git master evolution linking to 2.13.90 WebKitGTK+ release with only one applied patch, from
bug #161605 comment #10
.
Carlos Garcia Campos
Comment 3
2016-09-08 02:05:33 PDT
What theme is that? Does the same happen in foreign drawing gtk demo?
Milan Crha
Comment 4
2016-09-08 02:38:39 PDT
It's BlueMenta. Clearlooks and Adwaita draw it correctly. I do not know what you mean with "foreign drawing gtk demo", but when you look on both screenshots, then they also contain gtk+ widgets with gtk+ scrollbars, which has correct width (in devhelp the vertical scrollbar in the middle of the screenshot).
Carlos Garcia Campos
Comment 5
2016-09-08 02:48:44 PDT
I mean run gtk3-demo and load the foreign drawing one from the tree view list. The way widgets are rendered in WebKit (and foreign drawing demo) is different to how real widget are drawn.
Milan Crha
Comment 6
2016-09-08 03:09:04 PDT
Created
attachment 288259
[details]
frg.png Here's how it looks like in the gtk3-demo->Foreign drawing
Carlos Garcia Campos
Comment 7
2016-09-12 05:14:17 PDT
Created
attachment 288568
[details]
Patch
Milan Crha
Comment 8
2016-09-12 06:18:31 PDT
Created
attachment 288570
[details]
patched.png The patch makes it better, though not pixel precise (see the width is slightly bigger that the native scrollbar's above it). Also note of the different colors of the buttons with the arrows. While the native scrollbar uses black color for the triangle, WebKitGTK+ uses white color. The disabled scrollbar button looks the same, color speaking.
Carlos Garcia Campos
Comment 9
2016-09-12 06:26:49 PDT
It's very difficult to match every single theme pixel by pixel. This is the best I can do.
Milan Crha
Comment 10
2016-09-12 08:08:20 PDT
(In reply to
comment #9
)
> It's very difficult to match every single theme pixel by pixel. This is the > best I can do.
That's okay, I mentioned it only because noticed it. To be honest, I think it's more a problem of the theme, not providing proper numbers. Similar problem can apply for the colors, though it's odd, if you use the gtk+ paint functions, where I would expect doing gtk+ the right thing for you (unless you'd be dependent on GtkCSSNode, which is not going to be publicized).
Carlos Garcia Campos
Comment 11
2016-09-12 08:58:57 PDT
(In reply to
comment #10
)
> (In reply to
comment #9
) > > It's very difficult to match every single theme pixel by pixel. This is the > > best I can do. > > That's okay, I mentioned it only because noticed it. To be honest, I think > it's more a problem of the theme, not providing proper numbers.
I'm sorry if I sounded rude, it was not my intention.
> Similar problem can apply for the colors, though it's odd, if you use the > gtk+ paint functions, where I would expect doing gtk+ the right thing for > you (unless you'd be dependent on GtkCSSNode, which is not going to be > publicized).
We use all the GTK+ CSS nodes machinery, but not exactly the same way than GTK+, we would need to write GTK+ inside WebKit to get the same. The buttons color is probably because we are using gtk_render_arrow to render the arrows, instead of using an image CSS node. I'll look at it, but in a different bugs, because it's a different issue.
Milan Crha
Comment 12
2016-09-12 09:15:36 PDT
(In reply to
comment #11
)
> I'm sorry if I sounded rude, it was not my intention.
No problem.
> I'll look at it, but in a different bugs, because it's a different issue.
Okay, thanks.
Michael Catanzaro
Comment 13
2016-09-12 09:18:02 PDT
Comment on
attachment 288568
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=288568&action=review
> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:531 > + static std::unique_ptr<RenderThemeGadget> sliderGadget;
You overwrite it each time you use it, so it doesn't make sense for it to be static, right? Fix this please.
Carlos Garcia Campos
Comment 14
2016-09-12 09:46:53 PDT
Comment on
attachment 288568
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=288568&action=review
>> Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:531 >> + static std::unique_ptr<RenderThemeGadget> sliderGadget; > > You overwrite it each time you use it, so it doesn't make sense for it to be static, right? Fix this please.
Good catch! this is just wrong, I wanted to copy paste the type from the create method in RenderThemeGadget.h but included the static in the selection, thanks!
Carlos Garcia Campos
Comment 15
2016-09-12 23:17:25 PDT
Committed
r205853
: <
http://trac.webkit.org/changeset/205853
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug