+
+
+
diff --git a/layout/reftests/native-theme/reftest.list b/layout/reftests/native-theme/reftest.list
index 700a2281b0b1..d9e98161f510 100644
--- a/layout/reftests/native-theme/reftest.list
+++ b/layout/reftests/native-theme/reftest.list
@@ -57,3 +57,5 @@ skip-if(MOZ_WIDGET_TOOLKIT=="gtk2") == resizer-bottomend-rtl.xul resizer-bottome
# Windows-only, depends on native scrollbar metrics
skip-if(MOZ_WIDGET_TOOLKIT!="windows") == scroll-thumb-minimum-size-notheme.html scroll-thumb-minimum-size-notheme-ref.html
# skip-if(MOZ_WIDGET_TOOLKIT!="windows") == scroll-thumb-minimum-size-theme.html scroll-thumb-minimum-size-theme-ref.html # Bug 512206
+
+== checkbox-dynamic-1.html checkbox-dynamic-1-ref.html
diff --git a/widget/src/gtk2/nsNativeThemeGTK.cpp b/widget/src/gtk2/nsNativeThemeGTK.cpp
index c044826c03d4..231fc926019d 100644
--- a/widget/src/gtk2/nsNativeThemeGTK.cpp
+++ b/widget/src/gtk2/nsNativeThemeGTK.cpp
@@ -748,23 +748,21 @@ nsNativeThemeGTK::DrawWidgetBackground(nsIRenderingContext* aContext,
// GTK themes can only draw an integer number of pixels
// (even when not snapped).
nsIntRect widgetRect(0, 0, NS_lround(rect.Width()), NS_lround(rect.Height()));
+ nsIntRect overflowRect(widgetRect);
+ nsIntMargin extraSize;
+ if (GetExtraSizeForWidget(aWidgetType, state.isDefault, &extraSize)) {
+ overflowRect.Inflate(extraSize);
+ }
// This is the rectangle that will actually be drawn, in gdk pixels
nsIntRect drawingRect(PRInt32(dirtyRect.X()),
PRInt32(dirtyRect.Y()),
PRInt32(dirtyRect.Width()),
PRInt32(dirtyRect.Height()));
- if (!drawingRect.IntersectRect(widgetRect, drawingRect))
+ if (widgetRect.IsEmpty()
+ || !drawingRect.IntersectRect(overflowRect, drawingRect))
return NS_OK;
- nsIntMargin extraSize;
- // The margin should be applied to the widget rect rather than the dirty
- // rect but nsCSSRendering::PaintBackgroundWithSC has already intersected
- // the dirty rect with the uninflated widget rect.
- if (GetExtraSizeForWidget(aWidgetType, state.isDefault, &extraSize)) {
- drawingRect.Inflate(extraSize);
- }
-
// gdk rectangles are wrt the drawing rect.
// The gdk_clip is just advisory here, meaning "you don't
diff --git a/widget/src/windows/nsNativeThemeWin.cpp b/widget/src/windows/nsNativeThemeWin.cpp
index 3aa10fdb36da..d5fe2167f61d 100644
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -1485,7 +1485,7 @@ nsNativeThemeWin::GetWidgetOverflow(nsIDeviceContext* aContext,
nsRect* aResult)
{
/* This is disabled for now, because it causes invalidation problems --
- * see bug 402381. The effect of not updating the overflow area is that
+ * see bug 420381. The effect of not updating the overflow area is that
* for dropdown buttons in content areas, there is a 1px border on 3 sides
* where, if invalidated, the dropdown control probably won't be repainted.
* This is fairly minor, as by default there is nothing in that area, and