haikuwebkit/LayoutTests/fast/sub-pixel/table-with-subpixel-cell-si...

24 lines
517 B
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<style>
td {
Subpixel layout: Convert RenderTable* and AutoTableLayout to use LayoutUnit. https://bugs.webkit.org/show_bug.cgi?id=149366 Reviewed by David Hyatt. Source/WebCore: This patch enables non-integral cell space distribution for both auto and fixed table layout. Due to the tight layout, float is used to calculate each cell's dimension/position and we convert them to LayoutUnits while said values are set on the renderer. Due to the (lack of) LayoutUnit precision, a fudge factor is applied on table cell's minimum width. Collapsed table borders are still integral based, tracked here: webkit.org/b/150383 Covered by existing tests. (WebCore::RenderTableSection::firstLineBaseline): Baseline is still integral (same as normal line layout) * rendering/RenderTreeAsText.cpp: flooring produces the least amount of rebaseline diff (still over 1200 tests). It doesn't really matter which direction we round as long as it is consistent. (WebCore::writeTextRun): (WebCore::writeSimpleLine): * platform/graphics/LayoutRect.h: (WebCore::LayoutRect::LayoutRect): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks): (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): (WebCore::AutoTableLayout::layout): * rendering/AutoTableLayout.h: * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks): (WebCore::FixedTableLayout::layout): * rendering/FixedTableLayout.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computePreferredLogicalWidths): * rendering/RenderTable.cpp: (WebCore::RenderTable::updateLogicalWidth): (WebCore::RenderTable::distributeExtraLogicalHeight): (WebCore::RenderTable::layout): (WebCore::RenderTable::addOverflowFromChildren): (WebCore::RenderTable::computePreferredLogicalWidths): (WebCore::RenderTable::offsetWidthForColumn): (WebCore::RenderTable::calcBorderStart): (WebCore::RenderTable::calcBorderEnd): (WebCore::RenderTable::outerBorderBefore): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::outerBorderStart): (WebCore::RenderTable::outerBorderEnd): * rendering/RenderTable.h: (WebCore::RenderTable::hBorderSpacing): (WebCore::RenderTable::vBorderSpacing): (WebCore::RenderTable::outerBorderLeft): (WebCore::RenderTable::outerBorderRight): (WebCore::RenderTable::outerBorderTop): (WebCore::RenderTable::outerBorderBottom): (WebCore::RenderTable::columnPositions): (WebCore::RenderTable::setColumnPosition): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::logicalWidthFromColumns): (WebCore::RenderTableCell::computeIntrinsicPadding): (WebCore::RenderTableCell::setCellLogicalWidth): (WebCore::RenderTableCell::layout): (WebCore::RenderTableCell::paddingTop): (WebCore::RenderTableCell::paddingBottom): (WebCore::RenderTableCell::paddingLeft): (WebCore::RenderTableCell::paddingRight): (WebCore::RenderTableCell::paddingBefore): (WebCore::RenderTableCell::paddingAfter): (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::borderLeft): (WebCore::RenderTableCell::borderRight): (WebCore::RenderTableCell::borderTop): (WebCore::RenderTableCell::borderBottom): (WebCore::RenderTableCell::borderStart): (WebCore::RenderTableCell::borderEnd): (WebCore::RenderTableCell::borderBefore): (WebCore::RenderTableCell::borderAfter): (WebCore::RenderTableCell::borderHalfLeft): (WebCore::RenderTableCell::borderHalfRight): (WebCore::RenderTableCell::borderHalfTop): (WebCore::RenderTableCell::borderHalfBottom): (WebCore::RenderTableCell::borderHalfStart): (WebCore::RenderTableCell::borderHalfEnd): (WebCore::RenderTableCell::borderHalfBefore): (WebCore::RenderTableCell::borderHalfAfter): (WebCore::CollapsedBorders::addBorder): (WebCore::RenderTableCell::paintCollapsedBorders): (WebCore::RenderTableCell::paintBackgroundsBehindCell): (WebCore::RenderTableCell::paintBoxDecorations): (WebCore::RenderTableCell::paintMask): * rendering/RenderTableCell.h: (WebCore::RenderTableCell::logicalHeightForRowSizing): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layout): (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows): (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows): (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight): (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows): (WebCore::RenderTableSection::layoutRows): (WebCore::RenderTableSection::calcOuterBorderBefore): (WebCore::RenderTableSection::calcOuterBorderAfter): (WebCore::RenderTableSection::calcOuterBorderStart): (WebCore::RenderTableSection::calcOuterBorderEnd): (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection): (WebCore::RenderTableSection::dirtiedColumns): (WebCore::RenderTableSection::spannedColumns): (WebCore::RenderTableSection::offsetLeftForRowGroupBorder): (WebCore::RenderTableSection::offsetTopForRowGroupBorder): (WebCore::RenderTableSection::verticalRowGroupBorderHeight): (WebCore::RenderTableSection::horizontalRowGroupBorderWidth): (WebCore::RenderTableSection::paintRowGroupBorderIfRequired): (WebCore::RenderTableSection::setLogicalPositionForCell): * rendering/RenderTableSection.h: (WebCore::RenderTableSection::outerBorderLeft): (WebCore::RenderTableSection::outerBorderRight): (WebCore::RenderTableSection::outerBorderTop): (WebCore::RenderTableSection::outerBorderBottom): * rendering/style/CollapsedBorderValue.h: (WebCore::CollapsedBorderValue::CollapsedBorderValue): (WebCore::CollapsedBorderValue::width): LayoutTests: Changeset (due to the massive rebaselining) is too long to list. Canonical link: https://commits.webkit.org/168742@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-10-27 16:38:10 +00:00
width: 50.9px;
border: 1px solid black;
}
</style>
</head>
<body>
<table border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</body>
</html>