haikuwebkit/LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-...

12 lines
299 B
HTML
Raw Permalink Normal View History

<!-- webkit-test-runner [ LayoutFormattingContextEnabled=true LayoutFormattingContextIntegrationEnabled=false ] -->
[LFC][TFC] Do not include vertical spacing when resolving percent height for table content https://bugs.webkit.org/show_bug.cgi?id=226365 Source/WebCore: Reviewed by Antti Koivisto. <table style="height: 100px; border-spacing: 10px;"><tr><td style="height: 100%"></td></tr></table> The <td>'s 100% height is resolved against 100px - (2 * 10px) -> 80px; Test: fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html * layout/formattingContexts/table/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::TableFormattingContext): * layout/formattingContexts/table/TableFormattingContext.h: * layout/formattingContexts/table/TableFormattingGeometry.cpp: (WebCore::Layout::TableFormattingGeometry::TableFormattingGeometry): (WebCore::Layout::TableFormattingGeometry::computedCellBorder const): * layout/formattingContexts/table/TableFormattingGeometry.h: (WebCore::Layout::TableFormattingGeometry::formattingContext const): * layout/formattingContexts/table/TableFormattingQuirks.cpp: (WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const): * layout/formattingContexts/table/TableFormattingQuirks.h: (WebCore::Layout::TableFormattingQuirks::formattingContext const): LayoutTests: Reviewed by Antti Koivisto. * TestExpectations: WebKit table layout don't resolve the height percent properly when border spacing is present. * fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html: Added. * fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html: Added. Canonical link: https://commits.webkit.org/238276@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-29 13:38:58 +00:00
<style>
td {
background-color: green;
width: 100px;
}
</style>
<table height=500 style="border-spacing: 10px;">
<tr><td height=50%></td></tr>
<tr><td height=50%></td></tr>
</table>