diff --git a/layout/reftests/invalidation/543681-1-ref.html b/layout/reftests/invalidation/543681-1-ref.html new file mode 100644 index 00000000000..8dd47d17a43 --- /dev/null +++ b/layout/reftests/invalidation/543681-1-ref.html @@ -0,0 +1,18 @@ + + + + + +
spacer
+ +
div two
+
spacer
+ + diff --git a/layout/reftests/invalidation/543681-1.html b/layout/reftests/invalidation/543681-1.html new file mode 100644 index 00000000000..1ba94b1cc85 --- /dev/null +++ b/layout/reftests/invalidation/543681-1.html @@ -0,0 +1,22 @@ + + + + + +
spacer
+
div one
+ +
spacer
+ + diff --git a/layout/reftests/invalidation/reftest.list b/layout/reftests/invalidation/reftest.list index e9c257ec1cc..1c195a53e50 100644 --- a/layout/reftests/invalidation/reftest.list +++ b/layout/reftests/invalidation/reftest.list @@ -3,3 +3,4 @@ == table-repaint-c.html table-repaint-c-ref.html == table-repaint-d.html table-repaint-d-ref.html == 540247-1.xul 540247-1-ref.xul +== 543681-1.html 543681-1-ref.html diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 84b7d9a85e6..ba9b891e3a9 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -582,13 +582,11 @@ nsViewManager::WillBitBlit(nsIView* aView, const nsRect& aRect, ++mScrollCnt; nsView* v = static_cast(aView); - - // Since the view is actually moving the widget by -aScrollAmount, that's the - // offset we want to use when accumulating dirty rects. if (v->HasNonEmptyDirtyRegion()) { nsRegion* dirty = v->GetDirtyRegion(); - nsRegion intersection; - intersection.And(*dirty, aRect); + nsRegion intersection = *dirty; + intersection.MoveBy(-aCopyDelta); + intersection.And(intersection, aRect); if (!intersection.IsEmpty()) { dirty->Or(*dirty, intersection); // Random simplification number...