Changeset 249297 in webkit
- Timestamp:
- Aug 29, 2019 3:32:43 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249295 r249297 1 2019-08-29 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][TFC] Initialize <tr> display boxes. 4 https://bugs.webkit.org/show_bug.cgi?id=201232 5 <rdar://problem/54806789> 6 7 Reviewed by Antti Koivisto. 8 9 Set them as blank for now. 10 11 * layout/tableformatting/TableFormattingContext.cpp: 12 (WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const): 13 (WebCore::Layout::TableFormattingContext::layout const): 14 * layout/tableformatting/TableFormattingContext.h: 15 * layout/tableformatting/TableGrid.cpp: 16 (WebCore::Layout::TableGrid::Row::Row): 17 (WebCore::Layout::TableGrid::appendCell): 18 * layout/tableformatting/TableGrid.h: 19 (WebCore::Layout::TableGrid::Row::box const): 20 1 21 2019-08-29 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp
r249177 r249297 30 30 31 31 #include "LayoutBox.h" 32 #include "LayoutChildIterator.h" 32 33 #include "TableFormattingState.h" 33 34 #include <wtf/IsoMallocInlines.h> … … 37 38 38 39 WTF_MAKE_ISO_ALLOCATED_IMPL(TableFormattingContext); 40 41 // FIXME: This is temporary. Remove this function when table formatting is complete. 42 void TableFormattingContext::initializeDisplayBoxToBlank(Display::Box& displayBox) const 43 { 44 displayBox.setBorder({ }); 45 displayBox.setPadding({ }); 46 displayBox.setHorizontalMargin({ }); 47 displayBox.setHorizontalComputedMargin({ }); 48 displayBox.setVerticalMargin({ { }, { } }); 49 displayBox.setTopLeft({ }); 50 displayBox.setContentBoxWidth({ }); 51 displayBox.setContentBoxHeight({ }); 52 } 39 53 40 54 // https://www.w3.org/TR/css-tables-3/#table-layout-algorithm … … 53 67 auto& columnList = grid.columnsContext().columns(); 54 68 auto& rowList = grid.rows(); 69 // First row. 70 auto& row = rowList.first(); 71 row.setLogicalTop({ }); 72 initializeDisplayBoxToBlank(layoutState.displayBoxForLayoutBox(row.box())); 73 55 74 for (auto& cell : cellList) { 56 75 auto& cellLayoutBox = cell->tableCellBox; … … 62 81 auto& row = rowList.at(cellPosition.y()); 63 82 auto& column = columnList.at(cellPosition.x()); 83 84 initializeDisplayBoxToBlank(cellDisplayBox); 64 85 cellDisplayBox.setContentBoxWidth(column.logicalWidth()); 65 // FIXME: Do not use blanks.66 cellDisplayBox.setBorder({ });67 cellDisplayBox.setPadding({ });68 cellDisplayBox.setHorizontalMargin({ });69 cellDisplayBox.setHorizontalComputedMargin({ });70 71 86 cellDisplayBox.setTopLeft({ column.logicalLeft(), row.logicalTop() }); 72 87 … … 83 98 auto& previousRow = rowList.at(cellPosition.y() - 1); 84 99 row.setLogicalTop(previousRow.logicalBottom()); 100 initializeDisplayBoxToBlank(layoutState.displayBoxForLayoutBox(row.box())); 85 101 } 86 102 } -
trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.h
r249177 r249297 56 56 void distributeAvailableWidth(LayoutUnit extraHorizontalSpace) const; 57 57 58 void initializeDisplayBoxToBlank(Display::Box&) const; 59 58 60 TableFormattingState& formattingState() const { return downcast<TableFormattingState>(FormattingContext::formattingState()); } 59 61 }; -
trunk/Source/WebCore/layout/tableformatting/TableGrid.cpp
r249177 r249297 89 89 } 90 90 91 TableGrid::Row::Row(const Box& rowBox) 92 : m_layoutBox(rowBox) 93 { 94 } 95 91 96 TableGrid::CellInfo::CellInfo(const Box& tableCellBox, SlotPosition position, CellSize size) 92 97 : tableCellBox(tableCellBox) … … 148 153 149 154 if (isInNewRow) 150 m_rows.append({ });155 m_rows.append({ *tableCellBox.parent() }); 151 156 152 157 m_cellList.add(WTFMove(cellInfo)); -
trunk/Source/WebCore/layout/tableformatting/TableGrid.h
r249177 r249297 110 110 struct Row { 111 111 public: 112 Row(const Box&); 113 114 const Box& box() const { return m_layoutBox; } 115 112 116 void setLogicalTop(LayoutUnit logicalTop) { m_logicalTop = logicalTop; } 113 117 LayoutUnit logicalTop() const { return m_logicalTop; } … … 121 125 LayoutUnit m_logicalTop; 122 126 LayoutUnit m_logicalHeight; 127 const Box& m_layoutBox; 123 128 }; 124 129 using RowList = WTF::Vector<Row>;
Note: See TracChangeset
for help on using the changeset viewer.