[GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 07:42:56 +0000 (07:42 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 07:42:56 +0000 (07:42 +0000)
commit8adf54577c17ceb2818610456535d2808731e350
treeba6fcda9b7b4a819fd012685bfb84b8755fe7faf
parent5fddd957360284f9792416bec414103440aa3bef
[GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=136338

Reviewed by Philippe Normand.

Remove the dependency by creating the GtkStyleContext for the
scrollbars in ScrollbarThemeGtk.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
(WebCore::getStyleContext): Remove the scrollbar style context support.
* platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
class to create the global GtkStyleContext for scrollbars.
(WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
(WebCore::ScrollbarStyleContext::context):
(WebCore::gtkScrollbarStyleContext):
(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
(WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
GtkStylecontext and call updateThemeProperties().
(WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
global style context.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
(WebCore::ScrollbarThemeGtk::paintButton): Ditto.
* platform/gtk/ScrollbarThemeGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.h
Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
Source/WebCore/platform/gtk/ScrollbarThemeGtk.h