Be more careful about returning break-before status

git-svn-id: svn://10.0.0.236/trunk@20665 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com 1999-02-13 19:18:45 +00:00
parent b60d07ed69
commit 7296f89a76
2 changed files with 4 additions and 2 deletions

View File

@ -2154,7 +2154,8 @@ TextFrame::Reflow(nsIPresContext& aPresContext,
if (endsInNewline) {
rs = NS_INLINE_LINE_BREAK_AFTER(rs);
}
else if (offset == startingOffset) {
else if ((offset != contentLength) && (offset == startingOffset)) {
// Break-before a long-word that doesn't fit here
rs = NS_INLINE_LINE_BREAK_BEFORE();
}
aStatus = rs;

View File

@ -2154,7 +2154,8 @@ TextFrame::Reflow(nsIPresContext& aPresContext,
if (endsInNewline) {
rs = NS_INLINE_LINE_BREAK_AFTER(rs);
}
else if (offset == startingOffset) {
else if ((offset != contentLength) && (offset == startingOffset)) {
// Break-before a long-word that doesn't fit here
rs = NS_INLINE_LINE_BREAK_BEFORE();
}
aStatus = rs;