diff --git a/layout/generic/nsBlockReflowContext.cpp b/layout/generic/nsBlockReflowContext.cpp index f79088f43913..2839b6917d7e 100644 --- a/layout/generic/nsBlockReflowContext.cpp +++ b/layout/generic/nsBlockReflowContext.cpp @@ -175,7 +175,7 @@ nsBlockReflowContext::AlignBlockHorizontally(nscoord aWidth, // computations are no longer valid. if (aWidth != mComputedWidth) { if (eStyleUnit_Auto == leftUnit) { - aAlign.mXOffset = 0; + aAlign.mXOffset = mSpace.x; aAlign.mLeftMargin = 0; } if (eStyleUnit_Auto == rightUnit) { diff --git a/layout/html/base/src/nsBlockReflowContext.cpp b/layout/html/base/src/nsBlockReflowContext.cpp index f79088f43913..2839b6917d7e 100644 --- a/layout/html/base/src/nsBlockReflowContext.cpp +++ b/layout/html/base/src/nsBlockReflowContext.cpp @@ -175,7 +175,7 @@ nsBlockReflowContext::AlignBlockHorizontally(nscoord aWidth, // computations are no longer valid. if (aWidth != mComputedWidth) { if (eStyleUnit_Auto == leftUnit) { - aAlign.mXOffset = 0; + aAlign.mXOffset = mSpace.x; aAlign.mLeftMargin = 0; } if (eStyleUnit_Auto == rightUnit) {