Test: fast/table/add-before-anonymous-child.html

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5868
          Crash on HP.com with ToT and Safari 2.0.2 in khtml::RenderContainer::detach()

        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::addChild): If beforeChild is inside an anonymous
        cell, insert into the cell.
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::addChild): Changed comment.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index 8266cc2..92df6bf 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -90,8 +90,8 @@
             return;
         }
 
-        // FIXME: Not sure why this code is needed to pop back up out of the table.
-        // It doesn't affect any of our layout tests, but I'm going to leave it in for now.
+        // If beforeChild is inside an anonymous cell/row, insert into the cell or into
+        // the anonymous row containing it, if there is one.
         RenderObject* lastBox = last;
         while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableRow())
             lastBox = lastBox->parent();