From fe02891c04d276eb6eb6af003f0d93386945ff33 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Tue, 9 May 2000 19:28:20 +0000 Subject: [PATCH] fixed bug 36022 r=troy (been holding this in my tree for a while) --- layout/generic/nsBlockReflowContext.cpp | 10 ++++++++-- layout/html/base/src/nsBlockReflowContext.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsBlockReflowContext.cpp b/layout/generic/nsBlockReflowContext.cpp index 1c3ce6eefa2a..4af0bc6ece01 100644 --- a/layout/generic/nsBlockReflowContext.cpp +++ b/layout/generic/nsBlockReflowContext.cpp @@ -205,8 +205,14 @@ nsBlockReflowContext::AlignBlockHorizontally(nscoord aWidth, break; case NS_STYLE_TEXT_ALIGN_MOZ_CENTER: case NS_STYLE_TEXT_ALIGN_CENTER: - aAlign.mXOffset += remainingSpace / 2; - doCSS = PR_FALSE; + { + nsCompatibility mode; + mPresContext->GetCompatibilityMode(&mode); + if (eCompatibility_NavQuirks == mode) { + aAlign.mXOffset += remainingSpace / 2; + doCSS = PR_FALSE; + } + } break; } } diff --git a/layout/html/base/src/nsBlockReflowContext.cpp b/layout/html/base/src/nsBlockReflowContext.cpp index 1c3ce6eefa2a..4af0bc6ece01 100644 --- a/layout/html/base/src/nsBlockReflowContext.cpp +++ b/layout/html/base/src/nsBlockReflowContext.cpp @@ -205,8 +205,14 @@ nsBlockReflowContext::AlignBlockHorizontally(nscoord aWidth, break; case NS_STYLE_TEXT_ALIGN_MOZ_CENTER: case NS_STYLE_TEXT_ALIGN_CENTER: - aAlign.mXOffset += remainingSpace / 2; - doCSS = PR_FALSE; + { + nsCompatibility mode; + mPresContext->GetCompatibilityMode(&mode); + if (eCompatibility_NavQuirks == mode) { + aAlign.mXOffset += remainingSpace / 2; + doCSS = PR_FALSE; + } + } break; } }