summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp')
-rw-r--r--WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp b/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp
index b8712d2..e85c570 100644
--- a/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp
+++ b/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp
@@ -89,9 +89,9 @@ WidgetRenderingContext::WidgetRenderingContext(GraphicsContext* graphicsContext,
// Fallback: We failed to create an RGBA colormap earlier, so we cannot properly paint
// to a temporary surface and preserve transparency. To ensure decent widget rendering, just
// paint directly to the target drawable. This will not render CSS rotational transforms properly.
- if (!theme->m_themePartsHaveRGBAColormap && graphicsContext->gdkDrawable()) {
+ if (!theme->m_themePartsHaveRGBAColormap && graphicsContext->gdkWindow()) {
m_paintRect = graphicsContext->getCTM().mapRect(targetRect);
- m_target = graphicsContext->gdkDrawable();
+ m_target = graphicsContext->gdkWindow();
return;
}
@@ -131,7 +131,7 @@ WidgetRenderingContext::~WidgetRenderingContext()
{
// We do not need to blit back to the target in the fallback case. See above.
RenderThemeGtk* theme = static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get());
- if (!theme->m_themePartsHaveRGBAColormap && m_graphicsContext->gdkDrawable())
+ if (!theme->m_themePartsHaveRGBAColormap && m_graphicsContext->gdkWindow())
return;
// Don't paint the results back if there was an error.
@@ -165,6 +165,27 @@ bool WidgetRenderingContext::paintMozillaWidget(GtkThemeWidgetType type, GtkWidg
return !m_hadError;
}
+void WidgetRenderingContext::gtkPaintBox(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, GtkShadowType shadowType, const gchar* detail)
+{
+ GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
+ gtk_paint_box(gtk_widget_get_style(widget), m_target, stateType, shadowType, &m_paintRect,
+ widget, detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height);
+}
+
+void WidgetRenderingContext::gtkPaintFocus(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, const gchar* detail)
+{
+ GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
+ gtk_paint_focus(gtk_widget_get_style(widget), m_target, stateType, &m_paintRect, widget,
+ detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height);
+}
+
+void WidgetRenderingContext::gtkPaintSlider(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, GtkShadowType shadowType, const gchar* detail, GtkOrientation orientation)
+{
+ GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
+ gtk_paint_slider(gtk_widget_get_style(widget), m_target, stateType, shadowType, &m_paintRect, widget,
+ detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height, orientation);
+}
+
}
#endif // GTK_API_VERSION_2