Title: [205384] trunk
Revision
205384
Author
[email protected]
Date
2016-09-02 16:35:13 -0700 (Fri, 02 Sep 2016)

Log Message

ASSERT_NOT_REACHED() is touched in WebCore::valueForLength
https://bugs.webkit.org/show_bug.cgi?id=123337
<rdar://problem/27684121>

Reviewed by Simon Fraser.

Source/WebCore:

Do not try to use unspecified height value while resolving logical height for table row.

Test: fast/table/assert-on-non-resolvable-row-dimension.html

* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::logicalHeightForRowSizing):

LayoutTests:

* fast/table/assert-on-non-resolvable-row-dimension-expected.txt: Added.
* fast/table/assert-on-non-resolvable-row-dimension.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205383 => 205384)


--- trunk/LayoutTests/ChangeLog	2016-09-02 23:25:00 UTC (rev 205383)
+++ trunk/LayoutTests/ChangeLog	2016-09-02 23:35:13 UTC (rev 205384)
@@ -1,3 +1,14 @@
+2016-09-02  Zalan Bujtas  <[email protected]>
+
+        ASSERT_NOT_REACHED() is touched in WebCore::valueForLength
+        https://bugs.webkit.org/show_bug.cgi?id=123337
+        <rdar://problem/27684121>
+
+        Reviewed by Simon Fraser.
+
+        * fast/table/assert-on-non-resolvable-row-dimension-expected.txt: Added.
+        * fast/table/assert-on-non-resolvable-row-dimension.html: Added.
+
 2016-09-02  Ryosuke Niwa  <[email protected]>
 
         Temporarily break customElements.whenDefined to remove flaky crashes

Added: trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension-expected.txt (0 => 205384)


--- trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension-expected.txt	2016-09-02 23:35:13 UTC (rev 205384)
@@ -0,0 +1,2 @@
+PASS if no assert in debug.
+foobar	foobar	foobar	foobar	foobar	foobar	foobar

Added: trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension.html (0 => 205384)


--- trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/assert-on-non-resolvable-row-dimension.html	2016-09-02 23:35:13 UTC (rev 205384)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we don't assert on non-resolvable values.</title>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</head>
+<body style="-webkit-writing-mode: vertical-rl;">
+PASS if no assert in debug.
+<table> 
+  <tr>
+    <td style="width: max-content;">foobar</td>
+    <td style="width: min-content;">foobar</td>
+    <td style="width: fit-content;">foobar</td>
+    <td style="width: intrinsic;">foobar</td>
+    <td style="width: min-intrinsic;">foobar</td>
+    <td style="width: relative;">foobar</td>
+    <td style="width: undefined;">foobar</td>
+  </tr>
+</table>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (205383 => 205384)


--- trunk/Source/WebCore/ChangeLog	2016-09-02 23:25:00 UTC (rev 205383)
+++ trunk/Source/WebCore/ChangeLog	2016-09-02 23:35:13 UTC (rev 205384)
@@ -1,3 +1,18 @@
+2016-09-02  Zalan Bujtas  <[email protected]>
+
+        ASSERT_NOT_REACHED() is touched in WebCore::valueForLength
+        https://bugs.webkit.org/show_bug.cgi?id=123337
+        <rdar://problem/27684121>
+
+        Reviewed by Simon Fraser.
+
+        Do not try to use unspecified height value while resolving logical height for table row.
+
+        Test: fast/table/assert-on-non-resolvable-row-dimension.html
+
+        * rendering/RenderTableCell.h:
+        (WebCore::RenderTableCell::logicalHeightForRowSizing):
+
 2016-09-02  Ryosuke Niwa  <[email protected]>
 
         Temporarily break customElements.whenDefined to remove flaky crashes

Modified: trunk/Source/WebCore/rendering/RenderTableCell.h (205383 => 205384)


--- trunk/Source/WebCore/rendering/RenderTableCell.h	2016-09-02 23:25:00 UTC (rev 205383)
+++ trunk/Source/WebCore/rendering/RenderTableCell.h	2016-09-02 23:35:13 UTC (rev 205384)
@@ -286,6 +286,8 @@
 {
     // FIXME: This function does too much work, and is very hot during table layout!
     LayoutUnit adjustedLogicalHeight = logicalHeight() - (intrinsicPaddingBefore() + intrinsicPaddingAfter());
+    if (!style().logicalHeight().isSpecified())
+        return adjustedLogicalHeight;
     LayoutUnit styleLogicalHeight = valueForLength(style().logicalHeight(), 0);
     // In strict mode, box-sizing: content-box do the right thing and actually add in the border and padding.
     // Call computedCSSPadding* directly to avoid including implicitPadding.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to