2006-05-13 Mitz Pettel <opendarwin.org@mitzpettel.com>
[WebKit-https.git] / WebCore / rendering / bidi.cpp
index ab13aca20e42beaea3788d22ee83899411eabcfa..840501b440283402490fb0d49456c4ac0910102c 100644 (file)
@@ -2258,10 +2258,10 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                     if (o->style()->autoWrap() || breakWords) {
                         // If we break only after white-space, consider the current character
                         // as candidate width for this line.
-                        int charWidth = o->style()->breakOnlyAfterWhiteSpace() ?
+                        int charWidth = o->style()->breakOnlyAfterWhiteSpace() && !midWordBreak ?
                                             t->width(pos, 1, f, w + tmpW) + (applyWordSpacing ? wordSpacing : 0) : 0;
                         if (w + tmpW + charWidth > width) {
-                            if (o->style()->breakOnlyAfterWhiteSpace()) {
+                            if (o->style()->breakOnlyAfterWhiteSpace() && !midWordBreak) {
                                 // Check if line is too big even without the extra space
                                 // at the end of the line. If it is not, do nothing. 
                                 // If the line needs the extra whitespace to be too long,