Bug 52051

Summary: [GTK] Port scrollbar painting to GtkStyleContext
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: abarth, eric, mrobinson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 50820    
Description Flags
Use GtkStyleContext API to paint scrollbars none

Description Carlos Garcia Campos 2011-01-07 03:06:53 PST
We should use GtkStyleContext API to paint the scrollbars when using gtk3
Comment 1 Carlos Garcia Campos 2011-01-07 03:12:18 PST
Created attachment 78218 [details]
Use GtkStyleContext API to paint scrollbars
Comment 2 WebKit Review Bot 2011-01-07 03:14:32 PST
Attachment 78218 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/wtf/gobject/GTypedefs.h', u'WebCore/ChangeLog', u'WebCore/platform/gtk/RenderThemeGtk.h', u'WebCore/platform/gtk/RenderThemeGtk3.cpp', u'WebCore/platform/gtk/ScrollbarThemeGtk.cpp', u'WebCore/platform/gtk/ScrollbarThemeGtk.h', u'WebCore/platform/gtk/ScrollbarThemeGtk2.cpp', u'WebCore/platform/gtk/ScrollbarThemeGtk3.cpp']" exit_code: 1
WebCore/platform/gtk/ScrollbarThemeGtk3.cpp:62:  Use 0 instead of NULL.  [readability/null] [5]
WebCore/platform/gtk/ScrollbarThemeGtk3.cpp:166:  Use 0 instead of NULL.  [readability/null] [5]
WebCore/platform/gtk/ScrollbarThemeGtk3.cpp:178:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 3 in 8 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Martin Robinson 2011-01-07 10:40:37 PST
Comment on attachment 78218 [details]
Use GtkStyleContext API to paint scrollbars

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

Great. Please fix the two minor issues before landing this.

> WebCore/platform/gtk/ScrollbarThemeGtk3.cpp:46
> +    m_context = static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->gtkScrollbarStyle();

You should use a an initialization field here.
    : m_context(static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->gtkScrollbarStyle())

> WebCore/platform/gtk/ScrollbarThemeGtk3.cpp:53
> +    gtk_style_context_get_style(m_context,

I think we should ASSERT(m_context) before here.
Comment 4 Carlos Garcia Campos 2011-01-07 11:33:21 PST
Committed r75259: <http://trac.webkit.org/changeset/75259>
Comment 5 WebKit Review Bot 2011-01-07 13:35:55 PST
http://trac.webkit.org/changeset/75259 might have broken GTK Linux 64-bit Debug