Bug 485275. nsViewManger::RenderViews needs to forward to the correct view manager for the display root view. r=roc

This commit is contained in:
tn 2009-04-06 12:39:24 +12:00
parent 6391dce839
commit 8abb6cc458
5 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,7 @@
<html>
<body>
<iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E"
style="width: 100px; height: 100px; border:none; position:absolute;
top: 0px; left: 200px;"/>
</body>
</html>

View File

@ -0,0 +1,7 @@
<html>
<body>
<iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E"
style="width: 100px; height: 100px; border:none; position:absolute;
top: 0px; left: 0px; -moz-transform: translateX(200px)"/>
</body>
</html>

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<foreignObject transform="translate(200)" width="100" height="100">
<body xmlns="http://www.w3.org/1999/xhtml" style="margin: 0pt;">
<iframe src="data:text/html,%3Cbody%20bgcolor%3D'%230000ff'%3E" style="border: medium none ; width: 100px; height: 100px;"/>
</body>
</foreignObject>
</svg>

After

Width:  |  Height:  |  Size: 348 B

View File

@ -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

View File

@ -592,8 +592,14 @@ void nsViewManager::AddCoveringWidgetsToOpaqueRegion(nsRegion &aRgn, nsIDeviceCo
void nsViewManager::RenderViews(nsView *aView, nsIRenderingContext& aRC,
const nsRegion& aRegion)
{
if (mObserver) {
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) {
nsPoint offsetToRoot = aView->GetOffsetTo(displayRoot);
nsRegion damageRegion(aRegion);
damageRegion.MoveBy(offsetToRoot);