Title: [261782] trunk
- Revision
- 261782
- Author
- [email protected]
- Date
- 2020-05-16 08:27:52 -0700 (Sat, 16 May 2020)
Log Message
[LFC][TFC] Take vertical spacing into account when setting the height of a cell with rowspan
https://bugs.webkit.org/show_bug.cgi?id=211976
Reviewed by Antti Koivisto.
Source/WebCore:
When a cell spans over multiple rows, the height of the cell includes the vertical spacing between those spanned rows as well.
Test: fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
LayoutTests:
* fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html: Added.
* fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (261781 => 261782)
--- trunk/LayoutTests/ChangeLog 2020-05-16 09:21:33 UTC (rev 261781)
+++ trunk/LayoutTests/ChangeLog 2020-05-16 15:27:52 UTC (rev 261782)
@@ -1,3 +1,13 @@
+2020-05-16 Zalan Bujtas <[email protected]>
+
+ [LFC][TFC] Take vertical spacing into account when setting the height of a cell with rowspan
+ https://bugs.webkit.org/show_bug.cgi?id=211976
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html: Added.
+ * fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html: Added.
+
2020-05-16 Yusuke Suzuki <[email protected]>
[JSC] Make OutOfMemory error as instance of RangeError
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html (0 => 261782)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing-expected.html 2020-05-16 15:27:52 UTC (rev 261782)
@@ -0,0 +1,20 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ border: 1px solid red;
+ position: absolute;
+}
+
+.container {
+ border: 10px solid green;
+ width: 524px;
+ height: 384px;
+}
+</style>
+<div class=container>
+<style>
+</style>
+<div style="width: 82px; height: 124px; left: 129px; top: 129px;"></div>
+<div style="width: 82px; height: 12px; left: 311px; top: 129px;"></div>
+<div style="width: 82px; height: 12px; left: 311px; top: 241px;"></div>
+</div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html (0 => 261782)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html 2020-05-16 15:27:52 UTC (rev 261782)
@@ -0,0 +1,19 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+table {
+ font-size: 10px;
+ font-family: ahem;
+ border-spacing: 100px;
+ padding: 30px;
+ border: 10px solid green;
+ color: white;
+}
+
+td {
+ outline: 1px solid red;
+}
+</style>
+<table>
+<tr><td rowspan=2>iiiiiiii</td><td style="">iiiiiiii</td></tr>
+<tr><td style="">iiiiiiii</td></tr>
+</table>
Modified: trunk/Source/WebCore/ChangeLog (261781 => 261782)
--- trunk/Source/WebCore/ChangeLog 2020-05-16 09:21:33 UTC (rev 261781)
+++ trunk/Source/WebCore/ChangeLog 2020-05-16 15:27:52 UTC (rev 261782)
@@ -1,3 +1,17 @@
+2020-05-16 Zalan Bujtas <[email protected]>
+
+ [LFC][TFC] Take vertical spacing into account when setting the height of a cell with rowspan
+ https://bugs.webkit.org/show_bug.cgi?id=211976
+
+ Reviewed by Antti Koivisto.
+
+ When a cell spans over multiple rows, the height of the cell includes the vertical spacing between those spanned rows as well.
+
+ Test: fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html
+
+ * layout/tableformatting/TableFormattingContext.cpp:
+ (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
+
2020-05-15 Antti Koivisto <[email protected]>
Nullptr crash in MediaQueryMatcher::evaluateAll
Modified: trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp (261781 => 261782)
--- trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp 2020-05-16 09:21:33 UTC (rev 261781)
+++ trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp 2020-05-16 15:27:52 UTC (rev 261782)
@@ -76,6 +76,7 @@
auto availableVerticalSpace = rowList[cell->startRow()].logicalHeight();
for (size_t rowIndex = cell->startRow() + 1; rowIndex < cell->endRow(); ++rowIndex)
availableVerticalSpace += rowList[rowIndex].logicalHeight();
+ availableVerticalSpace += (cell->rowSpan() - 1) * grid.verticalSpacing();
layoutCell(*cell, availableHorizontalSpace, availableVerticalSpace);
// FIXME: Find out if it is ok to use the regular padding here to align the content box inside a tall cell or we need to
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes