Changeset 278403 in webkit
- Timestamp:
- Jun 3, 2021, 6:02:37 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html (modified) (1 diff)
-
LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html (modified) (1 diff)
-
LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-simple-expected.html (added)
-
LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-simple.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp (modified) (4 diffs)
-
Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h (modified) (1 diff)
-
Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.cpp (modified) (1 diff)
-
Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r278402 r278403 1 2021-06-03 Alan Bujtas <zalan@apple.com> 2 3 [LFC][TFC] Use the fixed table height value to resolve percent column height values 4 https://bugs.webkit.org/show_bug.cgi?id=226566 5 6 Reviewed by Antti Koivisto. 7 8 * fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html: 9 * fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html: 10 * fast/layoutformattingcontext/table-with-percent-columns-simple-expected.html: Added. 11 * fast/layoutformattingcontext/table-with-percent-columns-simple.html: Added. 12 1 13 2021-06-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html
r278239 r278403 1 <!-- webkit-test-runner [ LayoutFormattingContextEnabled=true LayoutFormattingContextIntegrationEnabled=false ] --> 1 2 <style> 2 3 div { -
trunk/LayoutTests/fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html
r278239 r278403 1 <!-- webkit-test-runner [ LayoutFormattingContextEnabled=true LayoutFormattingContextIntegrationEnabled=false ] --> 1 2 <style> 2 3 td { -
trunk/Source/WebCore/ChangeLog
r278398 r278403 1 2021-06-03 Alan Bujtas <zalan@apple.com> 2 3 [LFC][TFC] Use the fixed table height value to resolve percent column height values 4 https://bugs.webkit.org/show_bug.cgi?id=226566 5 6 Reviewed by Antti Koivisto. 7 8 Test: fast/layoutformattingcontext/table-with-percent-columns-simple.html 9 10 * layout/formattingContexts/table/TableFormattingContext.cpp: 11 (WebCore::Layout::TableFormattingContext::layoutInFlowContent): 12 (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): 13 (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace): 14 * layout/formattingContexts/table/TableFormattingContext.h: 15 * layout/formattingContexts/table/TableFormattingGeometry.cpp: 16 (WebCore::Layout::TableFormattingGeometry::verticalSpaceForCellContent const): 17 * layout/formattingContexts/table/TableFormattingGeometry.h: 18 1 19 2021-06-03 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 20 -
trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.cpp
r278294 r278403 62 62 computeAndDistributeExtraSpace(availableHorizontalSpace, availableVerticalSpace); 63 63 // 2. Finalize cells. 64 setUsedGeometryForCells(availableHorizontalSpace );64 setUsedGeometryForCells(availableHorizontalSpace, availableVerticalSpace); 65 65 // 3. Finalize rows. 66 66 setUsedGeometryForRows(availableHorizontalSpace); … … 77 77 } 78 78 79 void TableFormattingContext::setUsedGeometryForCells(LayoutUnit availableHorizontalSpace )79 void TableFormattingContext::setUsedGeometryForCells(LayoutUnit availableHorizontalSpace, std::optional<LayoutUnit> availableVerticalSpace) 80 80 { 81 81 auto& grid = formattingState().tableGrid(); … … 112 112 LayoutContext::createFormattingContext(cellBox, layoutState())->layoutInFlowContent(invalidationState, formattingGeometry.constraintsForInFlowContent(cellBox)); 113 113 } 114 cellBoxGeometry.setContentBoxHeight(formattingGeometry.verticalSpaceForCellContent(*cell ));114 cellBoxGeometry.setContentBoxHeight(formattingGeometry.verticalSpaceForCellContent(*cell, availableVerticalSpace)); 115 115 116 116 auto computeIntrinsicVerticalPaddingForCell = [&] { … … 445 445 LayoutContext::createFormattingContext(cellBox, layoutState())->layoutInFlowContent(invalidationState, formattingGeometry.constraintsForInFlowContent(cellBox)); 446 446 } 447 cellBoxGeometry.setContentBoxHeight(formattingGeometry.verticalSpaceForCellContent(cell ));447 cellBoxGeometry.setContentBoxHeight(formattingGeometry.verticalSpaceForCellContent(cell, availableVerticalSpace)); 448 448 }; 449 449 layoutCellContent(slot.cell()); -
trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingContext.h
r278294 r278403 73 73 74 74 IntrinsicWidthConstraints computedIntrinsicWidthConstraints() override; 75 void setUsedGeometryForCells(LayoutUnit availableHorizontalSpace );75 void setUsedGeometryForCells(LayoutUnit availableHorizontalSpace, std::optional<LayoutUnit> availableVerticalSpace); 76 76 void setUsedGeometryForRows(LayoutUnit availableHorizontalSpace); 77 77 void setUsedGeometryForSections(const ConstraintsForInFlowContent&); -
trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.cpp
r278294 r278403 181 181 } 182 182 183 LayoutUnit TableFormattingGeometry::verticalSpaceForCellContent(const TableGrid::Cell& cell ) const183 LayoutUnit TableFormattingGeometry::verticalSpaceForCellContent(const TableGrid::Cell& cell, std::optional<LayoutUnit> availableVerticalSpace) const 184 184 { 185 185 auto& cellBox = cell.box(); 186 186 auto contentHeight = cellBoxContentHeight(cellBox); 187 auto computedHeight = this->computedHeight(cellBox );187 auto computedHeight = this->computedHeight(cellBox, availableVerticalSpace); 188 188 if (!computedHeight) 189 189 return contentHeight; -
trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingGeometry.h
r278294 r278403 46 46 InlineLayoutUnit usedBaselineForCell(const ContainerBox& cellBox) const; 47 47 LayoutUnit horizontalSpaceForCellContent(const TableGrid::Cell&) const; 48 LayoutUnit verticalSpaceForCellContent(const TableGrid::Cell& ) const;48 LayoutUnit verticalSpaceForCellContent(const TableGrid::Cell&, std::optional<LayoutUnit> availableVerticalSpace) const; 49 49 50 50 private:
Note:
See TracChangeset
for help on using the changeset viewer.