diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 7d3b36d2fbf5..5f846f503559 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -5165,6 +5165,7 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, : NS_FRAME_NOT_COMPLETE; if (endsInNewline) { rs = NS_INLINE_LINE_BREAK_AFTER(rs); + lineLayout.SetLineEndsInBR(PR_TRUE); } else if ((aTextData.mOffset != contentLength) && (aTextData.mOffset == startingOffset)) { // Break-before a long-word that doesn't fit here diff --git a/layout/html/base/src/nsTextFrame.cpp b/layout/html/base/src/nsTextFrame.cpp index 7d3b36d2fbf5..5f846f503559 100644 --- a/layout/html/base/src/nsTextFrame.cpp +++ b/layout/html/base/src/nsTextFrame.cpp @@ -5165,6 +5165,7 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, : NS_FRAME_NOT_COMPLETE; if (endsInNewline) { rs = NS_INLINE_LINE_BREAK_AFTER(rs); + lineLayout.SetLineEndsInBR(PR_TRUE); } else if ((aTextData.mOffset != contentLength) && (aTextData.mOffset == startingOffset)) { // Break-before a long-word that doesn't fit here