Title: [135563] trunk
Revision
135563
Author
[email protected]
Date
2012-11-22 23:54:34 -0800 (Thu, 22 Nov 2012)

Log Message

Unreviewed, rolling out r135549.
http://trac.webkit.org/changeset/135549
https://bugs.webkit.org/show_bug.cgi?id=103102

Multiple layout test crashes (Requested by yurys on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-11-22

Source/WebCore:

* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTable.h:
(RenderTable):

LayoutTests:

* fast/table/css-table-max-height-expected.txt: Removed.
* fast/table/css-table-max-height.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135562 => 135563)


--- trunk/LayoutTests/ChangeLog	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/LayoutTests/ChangeLog	2012-11-23 07:54:34 UTC (rev 135563)
@@ -1,3 +1,14 @@
+2012-11-22  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r135549.
+        http://trac.webkit.org/changeset/135549
+        https://bugs.webkit.org/show_bug.cgi?id=103102
+
+        Multiple layout test crashes (Requested by yurys on #webkit).
+
+        * fast/table/css-table-max-height-expected.txt: Removed.
+        * fast/table/css-table-max-height.html: Removed.
+
 2012-11-22  Rick Byers <[email protected]>
 
         window is missing Touch and TouchList - touch event conformance test failure

Deleted: trunk/LayoutTests/fast/table/css-table-max-height-expected.txt (135562 => 135563)


--- trunk/LayoutTests/fast/table/css-table-max-height-expected.txt	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/LayoutTests/fast/table/css-table-max-height-expected.txt	2012-11-23 07:54:34 UTC (rev 135563)
@@ -1,34 +0,0 @@
-Testcase for Bug http://wkbug.com/98633. The testcase checks if the height of a css table does not exceed the max-height value. The height of the table can be greater than max-height value when either min-height is greater than max-height or computed height of the content is greater than the max-height.
-
-This sub-test checks that when min-height is lesser than max-height, max-height is applied to a table with auto layout.
-PASS
-This sub-test checks that when min-height is greater than max-height, min-height is applied to a table with auto layout.
-PASS
-This sub-test checks that max-height with fixed value is applied to a table with auto layout.
-PASS
-This sub-test checks that max-height with percent value is applied to a table with auto layout.
-PASS
-This sub-test checks that max-height with viewport percent height value is applied to a table with auto layout.
-PASS
-This sub-test checks that max-height with viewport percent width value is applied to a table with auto layout.
-PASS
-This sub-test checks that when content height is greater than max-height, content height is applied to the table with auto layout. 
-
-FILLER TEXT TO INCREASE CONTENT HEIGHT.
-PASS
-This sub-test checks that when min-height is lesser than max-height, max-height is applied to a table with fixed layout.
-PASS
-This sub-test checks that when min-height is greater than max-height, min-height is applied to a table with fixed layout.
-PASS
-This sub-test checks that max-height with fixed value is applied to a table with fixed layout.
-PASS
-This sub-test checks that max-height with percent value is applied to a table with fixed layout.
-PASS
-This sub-test checks that max-height with viewport percent height value is applied to a table with fixed layout.
-PASS
-This sub-test checks that max-height with viewport percent width value is applied to a table with fixed layout.
-PASS
-This sub-test checks that when content height is greater than max-height, content height is applied to a table with fixed layout. 
-
-FILLER TEXT TO INCREASE CONTENT HEIGHT.
-PASS

Deleted: trunk/LayoutTests/fast/table/css-table-max-height.html (135562 => 135563)


--- trunk/LayoutTests/fast/table/css-table-max-height.html	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/LayoutTests/fast/table/css-table-max-height.html	2012-11-23 07:54:34 UTC (rev 135563)
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-.container
-{
-    width:300px;
-    height:400px;
-    font-family:ahem;
-    background-color:#999999;
-}
-
-.child
-{
-    display:table;
-    height:100%;
-    background-color:green;
-}
-.fixed-table
-{
-    table-layout:fixed;
-}
-</style>
-<script src=""
-</head>
-<body _onload_="checkLayout('.child')">
-<div> Testcase for Bug <a href="" The testcase checks if the height of a 
-css table does not exceed the max-height value. The height of the table can be greater than max-height value when either
-min-height is greater than max-height or computed height of the content is greater than the max-height.
-</div>
-<br>
-<div class="container">
-    <div id="maxGreatThanMinHeightAutoLayout" class="child" style="min-height:100px; max-height:200px;" data-expected-height=200>
-        This sub-test checks that when min-height is lesser than max-height, max-height is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="min-height:200px; max-height:100px;" data-expected-height=200>
-        This sub-test checks that when min-height is greater than max-height, min-height is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="max-height:200px;" data-expected-height=200>
-        This sub-test checks that max-height with fixed value is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="max-height:50%;" data-expected-height=200>
-        This sub-test checks that max-height with percent value is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="max-height:50vh;" data-expected-height=300>
-        This sub-test checks that max-height with viewport percent height value is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="max-height:25vw;" data-expected-height=200>
-        This sub-test checks that max-height with viewport percent width value is applied to a table with auto layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child" style="max-height:100px;" data-expected-height=192>
-        This sub-test checks that when content height is greater than max-height, content height is applied to the table with auto layout.
-        <br><br>FILLER TEXT TO INCREASE CONTENT HEIGHT.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="min-height:100px; max-height:200px;" data-expected-height=200>
-        This sub-test checks that when min-height is lesser than max-height, max-height is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="min-height:200px; max-height:100px;" data-expected-height=200>
-        This sub-test checks that when min-height is greater than max-height, min-height is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="max-height:200px;" data-expected-height=200>
-        This sub-test checks that max-height with fixed value is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="max-height:50%;" data-expected-height=200>
-        This sub-test checks that max-height with percent value is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="max-height:50vh;" data-expected-height=300>
-        This sub-test checks that max-height with viewport percent height value is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="max-height:25vw;" data-expected-height=200>
-        This sub-test checks that max-height with viewport percent width value is applied to a table with fixed layout.
-    </div>
-</div>
-<div class="container">
-    <div class="child fixed-table" style="max-height:100px;" data-expected-height=192>
-        This sub-test checks that when content height is greater than max-height, content height is applied to a table with fixed layout.
-        <br><br>FILLER TEXT TO INCREASE CONTENT HEIGHT.
-    </div>
-</div>
-<body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (135562 => 135563)


--- trunk/Source/WebCore/ChangeLog	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/Source/WebCore/ChangeLog	2012-11-23 07:54:34 UTC (rev 135563)
@@ -1,3 +1,16 @@
+2012-11-22  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r135549.
+        http://trac.webkit.org/changeset/135549
+        https://bugs.webkit.org/show_bug.cgi?id=103102
+
+        Multiple layout test crashes (Requested by yurys on #webkit).
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::layout):
+        * rendering/RenderTable.h:
+        (RenderTable):
+
 2012-11-22  Rick Byers  <[email protected]>
 
         window is missing Touch and TouchList - touch event conformance test failure

Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (135562 => 135563)


--- trunk/Source/WebCore/rendering/RenderTable.cpp	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2012-11-23 07:54:34 UTC (rev 135563)
@@ -326,28 +326,6 @@
     return minimumValueForLength(styleLogicalWidth, availableWidth, view()) + borders;
 }
 
-LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length& styleLogicalHeight)
-{
-    LayoutUnit computedLogicalHeight = 0;
-    if (styleLogicalHeight.isFixed()) {
-        // HTML tables size as though CSS height includes border/padding, CSS tables do not.
-        LayoutUnit borders = LayoutUnit();
-        // FIXME: We cannot apply box-sizing: content-box on <table> which other browsers allow.
-        if ((node() && node()->hasTagName(tableTag)) || style()->boxSizing() == BORDER_BOX) {
-            LayoutUnit borderAndPaddingBefore = borderBefore() + (collapseBorders() ? LayoutUnit() : paddingBefore());
-            LayoutUnit borderAndPaddingAfter = borderAfter() + (collapseBorders() ? LayoutUnit() : paddingAfter());
-            borders = borderAndPaddingBefore + borderAndPaddingAfter;
-        }
-        computedLogicalHeight = styleLogicalHeight.value() - borders;
-    } else if (styleLogicalHeight.isPercent())
-        computedLogicalHeight = computePercentageLogicalHeight(styleLogicalHeight);
-    else if (styleLogicalHeight.isViewportPercentage())
-        computedLogicalHeight = minimumValueForLength(styleLogicalHeight, 0, view());
-    else
-        ASSERT_NOT_REACHED();
-    return max<LayoutUnit>(0, computedLogicalHeight);
-}
-
 void RenderTable::layoutCaption(RenderTableCaption* caption)
 {
     LayoutRect captionRect(caption->frameRect());
@@ -465,20 +443,18 @@
         updateLogicalHeight();
 
     Length logicalHeightLength = style()->logicalHeight();
-    LayoutUnit computedLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
-    
-    Length logicalMaxHeightLength = style()->logicalMaxHeight();
-    if (logicalMaxHeightLength.isSpecified() && !logicalMaxHeightLength.isNegative()) {
-        LayoutUnit computedMaxLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMaxHeightLength);
-        computedLogicalHeight = min(computedLogicalHeight, computedMaxLogicalHeight);
-    }
+    LayoutUnit computedLogicalHeight = 0;
+    if (logicalHeightLength.isFixed()) {
+        // HTML tables size as though CSS height includes border/padding, CSS tables do not.
+        LayoutUnit borders = 0;
+        // FIXME: We cannot apply box-sizing: content-box on <table> which other browsers allow.
+        if ((node() && node()->hasTagName(tableTag)) || style()->boxSizing() == BORDER_BOX)
+            borders = borderAndPaddingBefore + borderAndPaddingAfter;
+        computedLogicalHeight = logicalHeightLength.value() - borders;
+    } else if (logicalHeightLength.isPercent())
+        computedLogicalHeight = computePercentageLogicalHeight(logicalHeightLength);
+    computedLogicalHeight = max<LayoutUnit>(0, computedLogicalHeight);
 
-    Length logicalMinHeightLength = style()->logicalMinHeight();
-    if (logicalMinHeightLength.isSpecified() && !logicalMinHeightLength.isNegative()) {
-        LayoutUnit computedMinLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMinHeightLength);
-        computedLogicalHeight = max(computedLogicalHeight, computedMinLogicalHeight);
-    }
-
     distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSectionLogicalHeight));
 
     for (RenderTableSection* section = topSection(); section; section = sectionBelow(section))

Modified: trunk/Source/WebCore/rendering/RenderTable.h (135562 => 135563)


--- trunk/Source/WebCore/rendering/RenderTable.h	2012-11-23 07:44:43 UTC (rev 135562)
+++ trunk/Source/WebCore/rendering/RenderTable.h	2012-11-23 07:54:34 UTC (rev 135563)
@@ -291,7 +291,6 @@
     virtual void updateLogicalWidth() OVERRIDE;
 
     LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogicalWidth, LayoutUnit availableWidth);
-    LayoutUnit convertStyleLogicalHeightToComputedHeight(const Length& styleLogicalHeight);
 
     virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegion*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to