Reviewed by Sam Weinig.

        - minor cleanup

        * rendering/bidi.cpp:
        (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
        true for RenderLineBreak.
        (WebCore::bidiFirst): Ditto.
        (WebCore::shouldSkipWhitespaceAfterStartObject):
        (WebCore::RenderBlock::findNextLineBreak):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index a868069..9acf79d 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -273,7 +273,7 @@
         if (!next)
             break;
 
-        if (next->isText() || next->isBR() || next->isFloating() || next->isReplaced() || next->isPositioned()
+        if (next->isText() || next->isFloating() || next->isReplaced() || next->isPositioned()
             || ((!skipInlines || !next->firstChild()) // Always return EMPTY inlines.
                 && next->isInlineFlow()))
             break;
@@ -305,7 +305,7 @@
             return o; // Never skip empty inlines.
     }
 
-    if (o && !o->isText() && !o->isBR() && !o->isReplaced() && !o->isFloating() && !o->isPositioned())
+    if (o && !o->isText() && !o->isReplaced() && !o->isFloating() && !o->isPositioned())
         o = bidiNext(block, o, bidi, skipInlines);
     return o;
 }
@@ -1341,8 +1341,7 @@
         RenderText* nextText = static_cast<RenderText*>(next);
         UChar nextChar = nextText->characters()[0];
         if (nextText->style()->isCollapsibleWhiteSpace(nextChar)) {
-            BidiIterator endMid(0, o, 0);
-            addMidpoint(endMid);
+            addMidpoint(BidiIterator(0, o, 0));
             return true;
         }
     }
@@ -1517,10 +1516,9 @@
                 lBreak.pos = 0;
             }
 
-            if (ignoringSpaces) {
-                BidiIterator startMid( 0, o, 0 );
-                addMidpoint(startMid);
-            }
+            if (ignoringSpaces)
+                addMidpoint(BidiIterator(0, o, 0));
+
             isLineEmpty = false;
             ignoringSpaces = false;
             currentCharacterIsSpace = false;
@@ -1604,8 +1602,7 @@
                         if (autoWrap)
                             tmpW += t->width(pos, 1, f, w + tmpW);
                         
-                        BidiIterator startMid(0, o, pos + 1);
-                        addMidpoint(startMid);
+                        addMidpoint(BidiIterator(0, o, pos + 1));
                     }
                     
                     pos++;
@@ -1636,8 +1633,7 @@
                             ignoringSpaces = false;
                             lastSpaceWordSpacing = 0;
                             lastSpace = pos; // e.g., "Foo    goo", don't add in any of the ignored spaces.
-                            BidiIterator startMid(0, o, pos);
-                            addMidpoint(startMid);
+                            addMidpoint(BidiIterator(0, o, pos));
                             stoppedIgnoringSpaces = true;
                         } else {
                             // Just keep ignoring these spaces.
@@ -1692,8 +1688,7 @@
                                 if (pos > 0) {
                                     // Separate the trailing space into its own box, which we will
                                     // resize to fit on the line in computeHorizontalPositionsForLine().
-                                    BidiIterator midpoint(0, o, pos);
-                                    addMidpoint(BidiIterator(0, o, pos-1)); // Stop
+                                    addMidpoint(BidiIterator(0, o, pos - 1)); // Stop
                                     addMidpoint(BidiIterator(0, o, pos)); // Start
                                 }
                                 skipWhitespace(lBreak, bidi);
@@ -1703,8 +1698,7 @@
                             if (lBreak.obj && shouldPreserveNewline(lBreak.obj) && lBreak.obj->isText() && !static_cast<RenderText*>(lBreak.obj)->isWordBreak() && static_cast<RenderText*>(lBreak.obj)->characters()[lBreak.pos] == '\n') {
                                 if (!stoppedIgnoringSpaces && pos > 0) {
                                     // We need to stop right before the newline and then start up again.
-                                    BidiIterator midpoint(0, o, pos);
-                                    addMidpoint(BidiIterator(0, o, pos-1)); // Stop
+                                    addMidpoint(BidiIterator(0, o, pos - 1)); // Stop
                                     addMidpoint(BidiIterator(0, o, pos)); // Start
                                 }
                                 lBreak.increment(bidi);
@@ -1723,8 +1717,7 @@
                     if (c == '\n' && preserveNewline) {
                         if (!stoppedIgnoringSpaces && pos > 0) {
                             // We need to stop right before the newline and then start up again.
-                            BidiIterator midpoint(0, o, pos);
-                            addMidpoint(BidiIterator(0, o, pos-1)); // Stop
+                            addMidpoint(BidiIterator(0, o, pos - 1)); // Stop
                             addMidpoint(BidiIterator(0, o, pos)); // Start
                         }
                         lBreak.obj = o;
@@ -1777,8 +1770,7 @@
                     ignoringSpaces = false;
                     lastSpaceWordSpacing = applyWordSpacing ? wordSpacing : 0;
                     lastSpace = pos; // e.g., "Foo    goo", don't add in any of the ignored spaces.
-                    BidiIterator startMid(0, o, pos);
-                    addMidpoint(startMid);
+                    addMidpoint(BidiIterator(0, o, pos));
                 }
 
                 if (currentCharacterIsSpace && !previousCharacterIsSpace) {