diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 17f11950eba..07b9b734fb3 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -43,7 +43,6 @@ RestyleManager::RestyleManager(nsPresContext* aPresContext) , mRebuildAllStyleData(false) , mObservingRefreshDriver(false) , mInStyleRefresh(false) - , mPromoteReflowsToReframeRoot(false) , mHoverGeneration(0) , mRebuildAllExtraHint(nsChangeHint(0)) , mAnimationGeneration(0) @@ -619,21 +618,6 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList) } } - if (mPromoteReflowsToReframeRoot && - (hint & (nsChangeHint_ReconstructFrame | nsChangeHint_NeedReflow))) { - nsIFrame* reflowRoot = FindReflowRootFor(frame); - if (!reflowRoot) { - // Reflow root is the viewport. Better reframe the document. - // We don't do this for elements which are inside a reflow root --- they - // should be OK. - nsIContent* root = mPresContext->Document()->GetRootElement(); - if (root) { - NS_UpdateHint(hint, nsChangeHint_ReconstructFrame); - content = root; - } - } - } - if ((hint & nsChangeHint_AddOrRemoveTransform) && frame && !(hint & nsChangeHint_ReconstructFrame)) { if (NeedToReframeForAddingOrRemovingTransform(frame)) { diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 437c6214d8f..0801c11ca2b 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -254,9 +254,6 @@ public: */ void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint); - void SetPromoteReflowsToReframeRoot(bool aPromote) - { mPromoteReflowsToReframeRoot = aPromote; } - private: /* aMinHint is the minimal change that should be made to the element */ // XXXbz do we really need the aPrimaryFrame argument here? @@ -281,9 +278,6 @@ private: bool mObservingRefreshDriver : 1; // True if we're in the middle of a nsRefreshDriver refresh bool mInStyleRefresh : 1; - // True if reflows/frame reconstruction should be promoted to reframe - // the root element - bool mPromoteReflowsToReframeRoot : 1; uint32_t mHoverGeneration; nsChangeHint mRebuildAllExtraHint; diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 2fa4cb85732..97e71961e95 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -114,7 +114,6 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" #include "nsIDocumentViewerPrint.h" -#include "nsCSSFrameConstructor.h" #include "nsFocusManager.h" #include "nsRange.h" @@ -1779,14 +1778,13 @@ nsPrintEngine::SetupToPrintContent() if (didReconstruction) { FirePrintPreviewUpdateEvent(); } - + DUMP_DOC_LIST(("\nAfter Reflow------------------------------------------")); PR_PL(("\n")); PR_PL(("-------------------------------------------------------\n")); PR_PL(("\n")); CalcNumPrintablePages(mPrt->mNumPrintablePages); - PromoteReflowsToReframeRoot(); PR_PL(("--- Printing %d pages\n", mPrt->mNumPrintablePages)); DUMP_DOC_TREELAYOUT; @@ -2352,18 +2350,6 @@ nsPrintEngine::CalcNumPrintablePages(int32_t& aNumPages) } } -void -nsPrintEngine::PromoteReflowsToReframeRoot() -{ - for (uint32_t i=0; imPrintDocList.Length(); i++) { - nsPrintObject* po = mPrt->mPrintDocList.ElementAt(i); - NS_ASSERTION(po, "nsPrintObject can't be null!"); - if (po->mPresContext) { - po->mPresContext->RestyleManager()->SetPromoteReflowsToReframeRoot(true); - } - } -} - //----------------------------------------------------------------- //-- Done: Reflow Methods //----------------------------------------------------------------- diff --git a/layout/printing/nsPrintEngine.h b/layout/printing/nsPrintEngine.h index 5900b032127..2a6b07746eb 100644 --- a/layout/printing/nsPrintEngine.h +++ b/layout/printing/nsPrintEngine.h @@ -127,7 +127,6 @@ public: void CheckForChildFrameSets(nsPrintObject* aPO); void CalcNumPrintablePages(int32_t& aNumPages); - void PromoteReflowsToReframeRoot(); void ShowPrintProgress(bool aIsForPrinting, bool& aDoNotify); nsresult CleanupOnFailure(nsresult aResult, bool aIsPrinting); // If FinishPrintPreview() fails, caller may need to reset the state of the