Fix for Radar 4981605, regression where button grows randomly when a select is
        opened.  With the new form controls, the WinIE quirk for using line width
        ended up being used for them more.

        This patch removes the quirk after verifying that Firefox doesn't implement
        the quirk at all.  usesLineWidth is being renamed to shrinksToAvoidFloats to
        make it clear that the new method only applies to block objects that avoid floats
        and that have auto width.

        Also fixed a regression where whitespace after a floating <select> at the start
        of a block got incorrectly rendered.  Make sure skipWhitespace always skips
        through floating/positioned elements regardless of the whitespace setting (this
        way the white-space:pre value on floating <select>s doesn't cause trouble).

        Reviewed by darin

        fast/block/float/float-avoidance.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::collapseMargins):
        (WebCore::RenderBlock::clearFloatsIfNeeded):
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::containingBlockWidth):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::shrinkToAvoidFloats):
        * rendering/RenderObject.h:
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::skipWhitespace):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 514fce7..be495c5 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -1995,9 +1995,10 @@
     // elements quite right.  In other words, we need to build this function's work into the normal line
     // object iteration process.
     int w = lineWidth(m_height);
-    while (!it.atEnd() && (it.obj->isInlineFlow() || (shouldCollapseWhiteSpace(it.obj->style()) && !it.obj->isBR() &&
-          (it.current() == ' ' || it.current() == '\t' || (!shouldPreserveNewline(it.obj) && it.current() == '\n') ||
-          it.current() == softHyphen || skipNonBreakingSpace(it) || it.obj->isFloatingOrPositioned())))) {
+    while (!it.atEnd() && (it.obj->isFloatingOrPositioned() || it.obj->isInlineFlow() || 
+           (shouldCollapseWhiteSpace(it.obj->style()) && !it.obj->isBR() &&
+            (it.current() == ' ' || it.current() == '\t' || (!shouldPreserveNewline(it.obj) && it.current() == '\n') ||
+             it.current() == softHyphen || skipNonBreakingSpace(it))))) {
         if (it.obj->isFloatingOrPositioned()) {
             RenderObject *o = it.obj;
             // add to special objects...