Backed out changeset 6849ce51dfef (patch 3 from
bug 468645) to fix
bug 472353.
--- 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