Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
[LFC][TFC] Take vertical spacing into account when setting the height…
Browse files Browse the repository at this point in the history
… 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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@261782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zalan@apple.com committed May 16, 2020
1 parent 9fa57e4 commit dbae081
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
10 changes: 10 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
2020-05-16 Zalan Bujtas <zalan@apple.com>

[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 <ysuzuki@apple.com>

[JSC] Make OutOfMemory error as instance of RangeError
Expand Down
@@ -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>
@@ -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>
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2020-05-16 Zalan Bujtas <zalan@apple.com>

[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 <antti@apple.com>

Nullptr crash in MediaQueryMatcher::evaluateAll
Expand Down
Expand Up @@ -76,6 +76,7 @@ void TableFormattingContext::setUsedGeometryForCells(LayoutUnit availableHorizon
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
Expand Down

0 comments on commit dbae081

Please sign in to comment.