summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 01:44:00 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 01:44:00 +0000
commit52880fc229d73e1d9c54a79679288ff199f29519 (patch)
tree92c73a0626e98b51b07312076ad8b0ed1b6319c4
parent2f8c8a18743bfb0e1f74c9fc2dfbd9e0fcf2cfd6 (diff)
downloadchromium_src-52880fc229d73e1d9c54a79679288ff199f29519.zip
chromium_src-52880fc229d73e1d9c54a79679288ff199f29519.tar.gz
chromium_src-52880fc229d73e1d9c54a79679288ff199f29519.tar.bz2
Be stricter when clipping gtk widgets.
This fixes a layout test on linux but we still hve to rebaseline the image. Review URL: http://codereview.chromium.org/13801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6685 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.pngbin0 -> 3753 bytes
-rw-r--r--webkit/port/platform/chromium/RenderThemeGtk.cpp3
3 files changed, 4 insertions, 0 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.checksum
new file mode 100644
index 0000000..28c70c8
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.checksum
@@ -0,0 +1 @@
+2fda483344f12f99f44e600a82ed3b36 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.png
new file mode 100644
index 0000000..f2a1ac5
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/forms/menulist-narrow-width-expected.png
Binary files differ
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;