Title: [218721] trunk
Revision
218721
Author
[email protected]
Date
2017-06-22 14:55:38 -0700 (Thu, 22 Jun 2017)

Log Message

REGRESSION(r214712): Infinite recursion in RenderTable::layout in paginated mode
https://bugs.webkit.org/show_bug.cgi?id=173731
<rdar://problem/32237775>

Reviewed by Antti Koivisto.

Source/WebCore:

We should just skip bottom captions to check if section is moved, since they don't affect
the section position (bottom <caption> is preceded by <tfoot>).

Test: fast/table/caption-bottom-with-pagination.html

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

LayoutTests:

* fast/table/caption-bottom-with-pagination-expected.txt: Added.
* fast/table/caption-bottom-with-pagination.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (218720 => 218721)


--- trunk/LayoutTests/ChangeLog	2017-06-22 21:46:03 UTC (rev 218720)
+++ trunk/LayoutTests/ChangeLog	2017-06-22 21:55:38 UTC (rev 218721)
@@ -1,3 +1,14 @@
+2017-06-22  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r214712): Infinite recursion in RenderTable::layout in paginated mode
+        https://bugs.webkit.org/show_bug.cgi?id=173731
+        <rdar://problem/32237775>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/table/caption-bottom-with-pagination-expected.txt: Added.
+        * fast/table/caption-bottom-with-pagination.html: Added.
+
 2017-06-22  Ryan Haddad  <[email protected]>
 
         Mark media/modern-media-controls/forward-button/forward-button.html as flaky on mac-wk1.

Added: trunk/LayoutTests/fast/table/caption-bottom-with-pagination-expected.txt (0 => 218721)


--- trunk/LayoutTests/fast/table/caption-bottom-with-pagination-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/table/caption-bottom-with-pagination-expected.txt	2017-06-22 21:55:38 UTC (rev 218721)
@@ -0,0 +1,2 @@
+PASS if no crash.
+caption

Added: trunk/LayoutTests/fast/table/caption-bottom-with-pagination.html (0 => 218721)


--- trunk/LayoutTests/fast/table/caption-bottom-with-pagination.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/caption-bottom-with-pagination.html	2017-06-22 21:55:38 UTC (rev 218721)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests bottom caption with paginated content.</title>
+<script>
+    if (window.internals)
+        internals.setPagination("LeftToRightPaginated", 0);
+    if (window.testRunner)
+        testRunner.dumpAsText();
+</script>
+<style>
+  caption {
+    caption-side: bottom;
+  }
+</style>
+</head>
+<body>
+PASS if no crash.
+<table><caption>caption</caption></table>
+</body></html>

Modified: trunk/Source/WebCore/ChangeLog (218720 => 218721)


--- trunk/Source/WebCore/ChangeLog	2017-06-22 21:46:03 UTC (rev 218720)
+++ trunk/Source/WebCore/ChangeLog	2017-06-22 21:55:38 UTC (rev 218721)
@@ -1,3 +1,19 @@
+2017-06-22  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r214712): Infinite recursion in RenderTable::layout in paginated mode
+        https://bugs.webkit.org/show_bug.cgi?id=173731
+        <rdar://problem/32237775>
+
+        Reviewed by Antti Koivisto.
+
+        We should just skip bottom captions to check if section is moved, since they don't affect
+        the section position (bottom <caption> is preceded by <tfoot>).
+
+        Test: fast/table/caption-bottom-with-pagination.html
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::layout):
+
 2017-06-22  Dean Jackson  <[email protected]>
 
         REGRESSION (r215809): 50% regression 14E305 -> 15A293a in MotionMark Suits test

Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (218720 => 218721)


--- trunk/Source/WebCore/rendering/RenderTable.cpp	2017-06-22 21:46:03 UTC (rev 218720)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2017-06-22 21:55:38 UTC (rev 218721)
@@ -474,8 +474,11 @@
 
     LayoutUnit totalSectionLogicalHeight = 0;
     LayoutUnit oldTableLogicalTop = 0;
-    for (unsigned i = 0; i < m_captions.size(); i++)
+    for (unsigned i = 0; i < m_captions.size(); i++) {
+        if (m_captions[i]->style().captionSide() == CAPBOTTOM)
+            continue;
         oldTableLogicalTop += m_captions[i]->logicalHeight() + m_captions[i]->marginBefore() + m_captions[i]->marginAfter();
+    }
 
     bool collapsing = collapseBorders();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to