Title: [122642] trunk/Source/WebCore
Revision
122642
Author
[email protected]
Date
2012-07-13 16:34:00 -0700 (Fri, 13 Jul 2012)

Log Message

Remove an always-failing table-wrapping check in RenderObject::addChild
https://bugs.webkit.org/show_bug.cgi?id=91286

Reviewed by Eric Seidel.

Due to the structure of the code, this test is always failing (newChild->isTableCell()
is true to get in the branch).

The changeset adding the code didn't add testing so I poundered adding the mentioned test,
which is passing. However the test would need to be blindly changed to be included in our
test harness. I would also expect this code to be exercised by other table tests anyway.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
Removed never-reached branch. While at it, removed a 'what' comment in the same file.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122641 => 122642)


--- trunk/Source/WebCore/ChangeLog	2012-07-13 23:23:40 UTC (rev 122641)
+++ trunk/Source/WebCore/ChangeLog	2012-07-13 23:34:00 UTC (rev 122642)
@@ -1,3 +1,21 @@
+2012-07-13  Julien Chaffraix  <[email protected]>
+
+        Remove an always-failing table-wrapping check in RenderObject::addChild
+        https://bugs.webkit.org/show_bug.cgi?id=91286
+
+        Reviewed by Eric Seidel.
+
+        Due to the structure of the code, this test is always failing (newChild->isTableCell()
+        is true to get in the branch).
+
+        The changeset adding the code didn't add testing so I poundered adding the mentioned test,
+        which is passing. However the test would need to be blindly changed to be included in our
+        test harness. I would also expect this code to be exercised by other table tests anyway.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::addChild):
+        Removed never-reached branch. While at it, removed a 'what' comment in the same file.
+
 2012-07-13  Emil A Eklund  <[email protected]>
 
         Use LayoutBoxExtent for image outsets

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (122641 => 122642)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2012-07-13 23:23:40 UTC (rev 122641)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2012-07-13 23:34:00 UTC (rev 122642)
@@ -282,15 +282,8 @@
         needsTable = !isTable();
     else if (newChild->isTableRow())
         needsTable = !isTableSection();
-    else if (newChild->isTableCell()) {
+    else if (newChild->isTableCell())
         needsTable = !isTableRow();
-        // I'm not 100% sure this is the best way to fix this, but without this
-        // change we recurse infinitely when trying to render the CSS2 test page:
-        // http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlbodyheadrendering2.html.
-        // See Radar 2925291.
-        if (needsTable && isTableCell() && !children->firstChild() && !newChild->isTableCell())
-            needsTable = false;
-    }
 
     if (needsTable) {
         RenderTable* table;
@@ -302,10 +295,8 @@
             addChild(table, beforeChild);
         }
         table->addChild(newChild);
-    } else {
-        // Just add it...
+    } else
         children->insertChildNode(this, newChild, beforeChild);
-    }
 
     if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE)
         toRenderText(newChild)->transformText();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to