diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin; diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin; diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin; diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin; diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 1e3e90ac521..6b9321b2817 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -2780,7 +2780,8 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState, // XXX This approach doesn't work when floaters are involved in which case // we'll either need to recover the floater state that applies to the // unconstrained reflow or keep it around in a separate space manager... - if (aState.mComputeMaximumWidth && aState.mPrevLine && !aState.mPrevLine->IsLineWrapped()) { + PRBool isBeginningLine = !aState.mPrevLine || !aState.mPrevLine->IsLineWrapped(); + if (aState.mComputeMaximumWidth && isBeginningLine) { nscoord oldY = aState.mY; nscoord oldPrevBottomMargin = aState.mPrevBottomMargin;