mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886295. Backout fix for bug 880854 to fix regression. r=mats
--HG-- extra : rebase_source : 66bc089c3ece4dbe4f6533fce97a902abdd4871a
This commit is contained in:
parent
becb75f164
commit
53a01fa207
@ -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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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; i<mPrt->mPrintDocList.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
|
||||
//-----------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user