diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 119edfdfa68..703f10a0bf1 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -2123,7 +2123,8 @@ TextFrame::Reflow(nsIPresContext& aPresContext, #endif lineLayout.ForgetWordFrame(this); } - else { + + if (!lineLayout.InWord()) { // There is no currently active word. This frame may contain the // start of one. if (endsInWhitespace) { diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 119edfdfa68..703f10a0bf1 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -2123,7 +2123,8 @@ TextFrame::Reflow(nsIPresContext& aPresContext, #endif lineLayout.ForgetWordFrame(this); } - else { + + if (!lineLayout.InWord()) { // There is no currently active word. This frame may contain the // start of one. if (endsInWhitespace) {