WebCore:

        Not reviewed: rolling out a previous patch.
        
        Fixed <rdar://problem/5695439> Crash during GCController destructor on
        quitting browser

        Used svn merge to roll out r29603 because it introduced some crashes
        on quit.
        
        GC relies on static hash tables, so it's not safe to GC from a static
        destructor, which might run after the static hash tables' destructors.

        * bindings/js/GCController.cpp:
        (WebCore::GCController::garbageCollectNow):
        * bindings/js/GCController.h:

LayoutTests:

        Fix for http://bugs.webkit.org/show_bug.cgi?id=15665

        Reviewed by Beth

        * fast/inline/inline-padding-disables-text-quirk.html: Added.
        * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.checksum: Added.
        * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.png: Added.
        * platform/mac/fast/inline/inline-padding-disables-text-quirk-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 56e63d8..d926228 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -1247,19 +1247,9 @@
 static bool inlineFlowRequiresLineBox(RenderObject* flow)
 {
     // FIXME: Right now, we only allow line boxes for inlines that are truly empty.
-    // We need to fix this, though, because at the very least, inlines with only text
-    // children that is all whitespace should should also have line boxes. 
-    if (!flow->isInlineFlow() || flow->firstChild())
-        return false;
-
-    bool hasPaddingOrMargin = !(flow->paddingLeft() == 0 && flow->paddingRight() == 0
-        && flow->paddingTop() == 0 && flow->paddingBottom() == 0 
-        && flow->marginLeft() == 0 && flow->marginRight() == 0
-        && flow->marginTop() == 0 && flow->marginBottom() == 0);
-    if (flow->hasBoxDecorations() || hasPaddingOrMargin)
-        return true;
-
-    return false;
+    // We need to fix this, though, because at the very least, inlines containing only
+    // ignorable whitespace should should also have line boxes. 
+    return flow->isInlineFlow() && !flow->firstChild() && flow->hasBordersPaddingOrMargin();
 }
 
 static inline bool requiresLineBox(BidiIterator& it)
@@ -1501,6 +1491,7 @@
             // If this object is at the start of the line, we need to behave like list markers and 
             // start ignoring spaces.
             if (inlineFlowRequiresLineBox(o)) {
+                isLineEmpty = false;
                 if (ignoringSpaces) {
                     trailingSpaceObject = 0;
                     addMidpoint(BidiIterator(0, o, 0)); // Stop ignoring spaces.