summaryrefslogtreecommitdiffstats
path: root/webkit/port/platform
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/port/platform')
-rw-r--r--webkit/port/platform/chromium/RenderThemeGtk.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/port/platform/chromium/RenderThemeGtk.cpp b/webkit/port/platform/chromium/RenderThemeGtk.cpp
index 4e74de9..c9f00ed 100644
--- a/webkit/port/platform/chromium/RenderThemeGtk.cpp
+++ b/webkit/port/platform/chromium/RenderThemeGtk.cpp
@@ -194,6 +194,9 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
gdkClipRect.width = SkScalarRound(clip_region.width());
gdkClipRect.height = SkScalarRound(clip_region.height());
+ // moz_gtk_widget_paint will paint outside the bounds of gdkRect unless we further restrict |gdkClipRect|.
+ gdk_rectangle_intersect(&gdkRect, &gdkClipRect, &gdkClipRect);
+
GtkTextDirection direction = gtkTextDirection(o->style()->direction());
return moz_gtk_widget_paint(type, pcs->gdk_skia(), &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;