diff --git a/layout/reftests/bugs/485275-1-ref.html b/layout/reftests/bugs/485275-1-ref.html new file mode 100644 index 00000000000..b31ac81b5c5 --- /dev/null +++ b/layout/reftests/bugs/485275-1-ref.html @@ -0,0 +1,7 @@ + +
+ + + diff --git a/layout/reftests/bugs/485275-1.html b/layout/reftests/bugs/485275-1.html new file mode 100644 index 00000000000..f68c0172c56 --- /dev/null +++ b/layout/reftests/bugs/485275-1.html @@ -0,0 +1,7 @@ + + + + + diff --git a/layout/reftests/bugs/485275-1.svg b/layout/reftests/bugs/485275-1.svg new file mode 100644 index 00000000000..9f3f5eb1c66 --- /dev/null +++ b/layout/reftests/bugs/485275-1.svg @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 33e00415d37..3f646645f4f 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1121,6 +1121,8 @@ fails == 461512-1.html 461512-1-ref.html # Bug 461512 == 482659-1b.html 482659-1-ref.html == 482659-1c.html 482659-1-ref.html == 482659-1d.html 482659-1-ref.html +== 485275-1.html 485275-1-ref.html +== 485275-1.svg 485275-1-ref.html == 486052-1.html 486052-1-ref.html == 486052-2a.html 486052-2-ref.html == 486052-2b.html 486052-2-ref.html diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 75d1d3a4f70..61bf2e3181f 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -592,9 +592,15 @@ void nsViewManager::AddCoveringWidgetsToOpaqueRegion(nsRegion &aRgn, nsIDeviceCo void nsViewManager::RenderViews(nsView *aView, nsIRenderingContext& aRC, const nsRegion& aRegion) { + nsView* displayRoot = GetDisplayRootFor(aView); + // Make sure we call Paint from the view manager that owns displayRoot. + // (Bug 485275) + nsViewManager* displayRootVM = displayRoot->GetViewManager(); + if (displayRootVM && displayRootVM != this) + return displayRootVM->RenderViews(aView, aRC, aRegion); + if (mObserver) { - nsView* displayRoot = GetDisplayRootFor(aView); - nsPoint offsetToRoot = aView->GetOffsetTo(displayRoot); + nsPoint offsetToRoot = aView->GetOffsetTo(displayRoot); nsRegion damageRegion(aRegion); damageRegion.MoveBy(offsetToRoot);