Commit df892039 authored by tn's avatar tn
Browse files

Bug 485275. nsViewManger::RenderViews needs to forward to the correct view...

Bug 485275. nsViewManger::RenderViews needs to forward to the correct view manager for the display root view. r=roc
parent 9d5b0443
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
<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>
+7 −0
Original line number Diff line number Diff line
<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>
+7 −0
Original line number Diff line number Diff line
<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>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -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
+8 −2
Original line number Diff line number Diff line
@@ -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);