[LFC][TFC] Introduce TableGrid
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 17:05:20 +0000 (17:05 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 17:05:20 +0000 (17:05 +0000)
commit26a7faea7792db8108b1f8c55abcd28dac2caa61
tree9889192475f9952e74c9f24f4036d7bb3cf0f36a
parent3cac6b4d827c8937ab9502dde13da59814fee40c
[LFC][TFC] Introduce TableGrid
https://bugs.webkit.org/show_bug.cgi?id=200656
<rdar://problem/54240833>

Reviewed by Antti Koivisto.

table grid:
A matrix containing as many rows and columns as needed to describe the position of all the table-rows
and table-cells of a table-root, as determined by the grid-dimensioning algorithm.
Each row of the grid might correspond to a table-row, and each column to a table-column.

slot of the table grid:
A slot (r,c) is an available space created by the intersection of a row r and a column c in the table grid.

https://www.w3.org/TR/css-tables-3/#terminology

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isTableHeader const):
(WebCore::Layout::Box::isTableBody const):
(WebCore::Layout::Box::isTableFooter const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutBox):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::layout const):
(WebCore::Layout::TableFormattingContext::ensureTableGrid const):
(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
(WebCore::Layout::TableFormattingContext::computeTableWidth const):
(WebCore::Layout::TableFormattingContext::distributeAvailabeWidth const):
(WebCore::Layout::TableFormattingContext::computeTableHeight const):
(WebCore::Layout::TableFormattingContext::distributeAvailableHeight const):
* layout/tableformatting/TableFormattingContext.h:
(WebCore::Layout::TableFormattingContext::formattingState const):
* layout/tableformatting/TableFormattingState.h:
(WebCore::Layout::TableFormattingState::tableGrid):
* layout/tableformatting/TableGrid.cpp: Added.
(WebCore::Layout::TableGrid::CellInfo::CellInfo):
(WebCore::Layout::TableGrid::SlotInfo::SlotInfo):
(WebCore::Layout::TableGrid::TableGrid):
(WebCore::Layout::TableGrid::appendCell):
(WebCore::Layout::TableGrid::insertCell):
(WebCore::Layout::TableGrid::removeCell):
* layout/tableformatting/TableGrid.h: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/layout/layouttree/LayoutBox.h
Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
Source/WebCore/layout/tableformatting/TableFormattingContext.cpp
Source/WebCore/layout/tableformatting/TableFormattingContext.h
Source/WebCore/layout/tableformatting/TableFormattingState.h
Source/WebCore/layout/tableformatting/TableGrid.cpp [new file with mode: 0644]
Source/WebCore/layout/tableformatting/TableGrid.h [new file with mode: 0644]