nscoord ox, oy; mSpaceManager->GetTranslation(ox, oy); nscoord dx = ox - mSpaceManagerX; nscoord dy = oy - mSpaceManagerY; mSpaceManager->Translate(-dx, -dy);
nsBlockReflowState::AddFloater(nsLineLayout& aLineLayout,                               nsPlaceholderFrame* aPlaceholder,                               PRBool aInitialReflow){  NS_PRECONDITION(nsnull != mCurrentLine, "null ptr");  // Update the current line's floater array  if (nsnull == mCurrentLine->mFloaters) {    mCurrentLine->mFloaters = new nsVoidArray();  }  mCurrentLine->mFloaters->AppendElement(aPlaceholder);  // Now place the floater immediately if possible. Otherwise stash it  // away in mPendingFloaters and place it later.  if (aLineLayout.CanPlaceFloaterNow()) {    nsRect combinedArea;    nsMargin floaterMargins;    nsMargin floaterOffsets;    mBlock->ReflowFloater(*this, aPlaceholder, combinedArea, floaterMargins,                          floaterOffsets);    // Because we are in the middle of reflowing a placeholder frame    // within a line (and possibly nested in an inline frame or two    // that's a child of our block) we need to restore the space    // manager's translation to the space that the block resides in    // before placing the floater.    PRBool isLeftFloater;    nscoord ox, oy;    mSpaceManager->GetTranslation(ox, oy);    nscoord dx = ox - mSpaceManagerX;    nscoord dy = oy - mSpaceManagerY;    mSpaceManager->Translate(-dx, -dy);    nsPoint origin;    PlaceFloater(aPlaceholder, floaterMargins, floaterOffsets,                 &isLeftFloater, &origin);    // Update the floater combined-area    combinedArea.x += origin.x;    combinedArea.y += origin.y;    CombineRects(combinedArea, mFloaterCombinedArea);    // Pass on updated available space to the current inline reflow engine    GetAvailableSpace();    aLineLayout.UpdateBand(mAvailSpaceRect.x + BorderPadding().left, mY,                           mAvailSpaceRect.width,                           mAvailSpaceRect.height,                           isLeftFloater);    // Restore coordinate system    mSpaceManager->Translate(dx, dy);  }  else {    // This floater will be placed after the line is done (it is a    // below current line floater).    mPendingFloaters.AppendElement(aPlaceholder);  }}