Backed out changeset 6849ce51dfef (patch 3 from bug 468645) to fix bug 472353.
authorL. David Baron <dbaron@dbaron.org>
Tue, 20 Jan 2009 13:45:23 -0800
changeset 23979 6f2d2ef53d758d199d16ddb88ca982ecd6e67845
parent 23167 6849ce51dfef0df9838e72af1acdd8a9f407a373
child 23980 2a1f132469391d9d7454107c14a585b7f34e6571
push idunknown
push userunknown
push dateunknown
bugs468645, 472353
milestone1.9.2a1pre
backs out6849ce51dfef0df9838e72af1acdd8a9f407a373
Backed out changeset 6849ce51dfef (patch 3 from bug 468645) to fix bug 472353.
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsPresContext.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -13393,23 +13393,16 @@ nsCSSFrameConstructor::RebuildAllStyleDa
 
   mRebuildAllStyleData = PR_FALSE;
   NS_UpdateHint(aExtraHint, mRebuildAllExtraHint);
   mRebuildAllExtraHint = nsChangeHint(0);
 
   if (!mPresShell || !mPresShell->GetRootFrame())
     return;
 
-  if (mPresShell->GetPresContext()->IsPaginated()) {
-    // We don't support doing this because of bug 470929 and probably
-    // other issues.
-    NS_NOTREACHED("not allowed to rebuild all style data when paginated");
-    return;
-  }
-
   // Processing the style changes could cause a flush that propagates to
   // the parent frame and thus destroys the pres shell.
   nsCOMPtr<nsIPresShell> kungFuDeathGrip(mPresShell);
 
   // Tell the style set to get the old rule tree out of the way
   // so we can recalculate while maintaining rule tree immutability
   nsresult rv = mPresShell->StyleSet()->BeginReconstruct();
   if (NS_FAILED(rv))
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -728,23 +728,16 @@ nsPresContext::GetUserPreferences()
   // prescontext or we are being called from UpdateAfterPreferencesChanged()
   // which triggers a reflow anyway.
   SetBidi(bidiOptions, PR_FALSE);
 }
 
 void
 nsPresContext::PreferenceChanged(const char* aPrefName)
 {
-  if (IsPaginated()) {
-    // Until we fix things so that we can do multiple reflows and style
-    // rebuilds (see, e.g., bug 470929) in paginated mode, we should
-    // ignore preference changes when paginated.
-    return;
-  }
-
   nsDependentCString prefName(aPrefName);
   if (prefName.EqualsLiteral("layout.css.dpi")) {
     PRInt32 oldAppUnitsPerDevPixel = AppUnitsPerDevPixel();
     if (mDeviceContext->CheckDPIChange() && mShell) {
       mDeviceContext->FlushFontCache();
 
       // Re-fetch the view manager's window dimensions in case there's a deferred
       // resize which hasn't affected our mVisibleArea yet