Title: [263845] trunk
Revision
263845
Author
za...@apple.com
Date
2020-07-02 07:52:20 -0700 (Thu, 02 Jul 2020)

Log Message

[LFC][IFC] Use <tr> computed height as minimum height for the row
https://bugs.webkit.org/show_bug.cgi?id=213880

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-fixed-row-height-simple.html

* layout/tableformatting/TableLayout.cpp:
(WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):

LayoutTests:

* fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html: Added.
* fast/layoutformattingcontext/table-fixed-row-height-simple.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (263844 => 263845)


--- trunk/LayoutTests/ChangeLog	2020-07-02 14:05:28 UTC (rev 263844)
+++ trunk/LayoutTests/ChangeLog	2020-07-02 14:52:20 UTC (rev 263845)
@@ -1,3 +1,13 @@
+2020-07-02  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][IFC] Use <tr> computed height as minimum height for the row
+        https://bugs.webkit.org/show_bug.cgi?id=213880
+
+        Reviewed by Antti Koivisto.
+
+        * fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html: Added.
+        * fast/layoutformattingcontext/table-fixed-row-height-simple.html: Added.
+
 2020-07-02  Youenn Fablet  <you...@apple.com>
 
         getUserMedia returns OverConstrained on Jitsi

Added: trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html (0 => 263845)


--- trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple-expected.html	2020-07-02 14:52:20 UTC (rev 263845)
@@ -0,0 +1,16 @@
+<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+.first {
+    width: 100px;
+    height: 50px;
+    background-color: blue;
+}
+
+.second {
+    width: 100px;
+    height: 50px;
+    background-color: green;
+}
+</style>
+<div class=first></div>
+<div class=second></div>
\ No newline at end of file

Added: trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple.html (0 => 263845)


--- trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-fixed-row-height-simple.html	2020-07-02 14:52:20 UTC (rev 263845)
@@ -0,0 +1,16 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+table {
+    width: 100px;
+    font-size: 20px;
+    border-spacing: 0px;
+}
+
+td {
+    padding: 0px;
+}
+</style>
+<table>
+<tr style="height:50px; background-color: blue; color: blue"><td>XXX</td></tr>
+<tr><td style="height: 50px; background-color: green; color: green;">XXX</td></tr>
+</table>

Modified: trunk/Source/WebCore/ChangeLog (263844 => 263845)


--- trunk/Source/WebCore/ChangeLog	2020-07-02 14:05:28 UTC (rev 263844)
+++ trunk/Source/WebCore/ChangeLog	2020-07-02 14:52:20 UTC (rev 263845)
@@ -1,3 +1,15 @@
+2020-07-02  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][IFC] Use <tr> computed height as minimum height for the row
+        https://bugs.webkit.org/show_bug.cgi?id=213880
+
+        Reviewed by Antti Koivisto.
+
+        Test: fast/layoutformattingcontext/table-fixed-row-height-simple.html
+
+        * layout/tableformatting/TableLayout.cpp:
+        (WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):
+
 2020-07-02  Youenn Fablet  <you...@apple.com>
 
         getUserMedia returns OverConstrained on Jitsi

Modified: trunk/Source/WebCore/layout/tableformatting/TableLayout.cpp (263844 => 263845)


--- trunk/Source/WebCore/layout/tableformatting/TableLayout.cpp	2020-07-02 14:05:28 UTC (rev 263844)
+++ trunk/Source/WebCore/layout/tableformatting/TableLayout.cpp	2020-07-02 14:52:20 UTC (rev 263845)
@@ -267,6 +267,8 @@
     for (size_t rowIndex = 0; rowIndex < rows.size(); ++rowIndex) {
         auto maximumColumnAscent = InlineLayoutUnit { };
         auto maximumColumnDescent = InlineLayoutUnit { };
+        // Initial minimum height is the computed height if available <tr style="height: 100px"><td></td></tr>
+        rowHeight[rowIndex] = formattingContext().geometry().computedHeight(rows.list()[rowIndex].box(), availableVerticalSpace).valueOr(0_lu);
         for (size_t columnIndex = 0; columnIndex < columns.size(); ++columnIndex) {
             auto& slot = *m_grid.slot({ columnIndex, rowIndex });
             if (slot.isRowSpanned())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to