Title: [125938] trunk/Source/WebCore
Revision
125938
Author
[email protected]
Date
2012-08-17 14:46:26 -0700 (Fri, 17 Aug 2012)

Log Message

Delete some dead code in RenderBox::computePercentageLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=94262

Reviewed by Tony Chang.

I'm pretty sure this is dead code. None of the layout tests hit this code,
including the ones added in the original patch http://trac.webkit.org/changeset/10983.
I spent a good while and could not concoct a test that hits this code.

The test-cases added in that file, as well as the test-cases I came up with that should
go through this codepath, instead go through computePositionedLogicalHeight and never
hit computePercentageLogicalHeight.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125937 => 125938)


--- trunk/Source/WebCore/ChangeLog	2012-08-17 21:38:51 UTC (rev 125937)
+++ trunk/Source/WebCore/ChangeLog	2012-08-17 21:46:26 UTC (rev 125938)
@@ -1,3 +1,20 @@
+2012-08-16  Ojan Vafai  <[email protected]>
+
+        Delete some dead code in RenderBox::computePercentageLogicalHeight
+        https://bugs.webkit.org/show_bug.cgi?id=94262
+
+        Reviewed by Tony Chang.
+
+        I'm pretty sure this is dead code. None of the layout tests hit this code,
+        including the ones added in the original patch http://trac.webkit.org/changeset/10983.
+        I spent a good while and could not concoct a test that hits this code.
+
+        The test-cases added in that file, as well as the test-cases I came up with that should
+        go through this codepath, instead go through computePositionedLogicalHeight and never 
+        hit computePercentageLogicalHeight.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+
 2012-08-17  Benjamin Poulain  <[email protected]>
 
         Make it easier to append a literal to StringBuilder

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (125937 => 125938)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2012-08-17 21:38:51 UTC (rev 125937)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2012-08-17 21:46:26 UTC (rev 125938)
@@ -2146,10 +2146,7 @@
         cb->computeLogicalHeight();
         result = cb->contentLogicalHeight();
         cb->setLogicalHeight(oldHeight);
-    } else if (cb->isRoot() && isOutOfFlowPositioned())
-        // Match the positioned objects behavior, which is that positioned objects will fill their viewport
-        // always.  Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block.
-        result = cb->computeContentBoxLogicalHeight(cb->availableLogicalHeight());
+    }
 
     if (result != -1) {
         result = valueForLength(height, result);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to