Title: [205440] releases/WebKitGTK/webkit-2.12
Revision
205440
Author
carlo...@webkit.org
Date
2016-09-05 02:18:47 -0700 (Mon, 05 Sep 2016)

Log Message

Merge r205056 - ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
https://bugs.webkit.org/show_bug.cgi?id=125781
<rdar://problem/27684457>

Reviewed by Simon Fraser.

Source/WebCore:

RenderTableSection::calcRowLogicalHeight misused minimumValueForLength to fallback to 0 for non-fixed values.
While this patch fixes the assertion, the table section code needs works to support calc values. See webkit.org/b/161273.

Test: fast/table/assert-on-min-max-content-values.html

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):

LayoutTests:

* fast/table/assert-on-min-max-content-values-expected.txt: Added.
* fast/table/assert-on-min-max-content-values.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (205439 => 205440)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-09-05 09:17:09 UTC (rev 205439)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-09-05 09:18:47 UTC (rev 205440)
@@ -1,3 +1,14 @@
+2016-08-26  Zalan Bujtas  <za...@apple.com>
+
+        ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
+        https://bugs.webkit.org/show_bug.cgi?id=125781
+        <rdar://problem/27684457>
+
+        Reviewed by Simon Fraser.
+
+        * fast/table/assert-on-min-max-content-values-expected.txt: Added.
+        * fast/table/assert-on-min-max-content-values.html: Added.
+
 2016-08-24  Zalan Bujtas  <za...@apple.com>
 
         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values-expected.txt (0 => 205440)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values-expected.txt	2016-09-05 09:18:47 UTC (rev 205440)
@@ -0,0 +1,2 @@
+PASS if no assert in debug.
+

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values.html (0 => 205440)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/table/assert-on-min-max-content-values.html	2016-09-05 09:18:47 UTC (rev 205440)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we don't assert on tables with min/max-content values.</title>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</head>
+<body>
+PASS if no assert in debug.
+<table style="-webkit-writing-mode: vertical-rl;">
+<tbody>
+	<tr style="width: -webkit-min-content;"></tr> 
+	<tr style="width: -webkit-max-content;"></tr> 
+	<tr style="width: calc(50px - 10%);"></tr> 
+</tbody>
+</table>
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (205439 => 205440)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-09-05 09:17:09 UTC (rev 205439)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-09-05 09:18:47 UTC (rev 205440)
@@ -1,3 +1,19 @@
+2016-08-26  Zalan Bujtas  <za...@apple.com>
+
+        ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
+        https://bugs.webkit.org/show_bug.cgi?id=125781
+        <rdar://problem/27684457>
+
+        Reviewed by Simon Fraser.
+
+        RenderTableSection::calcRowLogicalHeight misused minimumValueForLength to fallback to 0 for non-fixed values.
+        While this patch fixes the assertion, the table section code needs works to support calc values. See webkit.org/b/161273.   
+
+        Test: fast/table/assert-on-min-max-content-values.html
+
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::calcRowLogicalHeight):
+
 2016-08-24  Zalan Bujtas  <za...@apple.com>
 
         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderTableSection.cpp (205439 => 205440)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderTableSection.cpp	2016-09-05 09:17:09 UTC (rev 205439)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderTableSection.cpp	2016-09-05 09:18:47 UTC (rev 205440)
@@ -251,6 +251,15 @@
     cell->setCol(table()->effColToCol(col));
 }
 
+static LayoutUnit resolveLogicalHeightForRow(const Length& rowLogicalHeight)
+{
+    if (rowLogicalHeight.isFixed())
+        return rowLogicalHeight.value();
+    if (rowLogicalHeight.isCalculated())
+        return rowLogicalHeight.nonNanCalculatedValue(0);
+    return 0;
+}
+
 LayoutUnit RenderTableSection::calcRowLogicalHeight()
 {
 #ifndef NDEBUG
@@ -278,7 +287,7 @@
         LayoutUnit baselineDescent = 0;
 
         // Our base size is the biggest logical height from our cells' styles (excluding row spanning cells).
-        m_rowPos[r + 1] = std::max(m_rowPos[r] + minimumValueForLength(m_grid[r].logicalHeight, 0), LayoutUnit::fromPixel(0));
+        m_rowPos[r + 1] = std::max(m_rowPos[r] + resolveLogicalHeightForRow(m_grid[r].logicalHeight), LayoutUnit::fromPixel(0));
 
         Row& row = m_grid[r].row;
         unsigned totalCols = row.size();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to