From 66839d6abc2cd4eb2e669ad709526bd30e9eea3d Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Sun, 18 Jan 2004 19:35:19 +0000 Subject: [PATCH] Bug 229052. Treat pre-formatted newlines like BRs, preserving the break type in nsBlockFrame::ReflowInlineFrame. r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@151513 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsTextFrame.cpp | 1 + mozilla/layout/html/base/src/nsTextFrame.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 7d3b36d2fbf..5f846f50355 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/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/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 7d3b36d2fbf..5f846f50355 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/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