Bug 52051 - [GTK] Port scrollbar painting to GtkStyleContext
Summary: [GTK] Port scrollbar painting to GtkStyleContext
Status: RESOLVED FIXED
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: 50820
  Show dependency treegraph
 
Reported: 2011-01-07 03:06 PST by Carlos Garcia Campos
Modified: 2011-01-07 13:35 PST (History)
4 users (show)

See Also:


Attachments
Use GtkStyleContext API to paint scrollbars (16.44 KB, patch)
2011-01-07 03:12 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.
ScrollbarThemeGtk::ScrollbarThemeGtk()
    : 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