OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. |
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 // init LayoutObject attributes | 112 // init LayoutObject attributes |
113 setInline(false); // our object is not Inline | 113 setInline(false); // our object is not Inline |
114 } | 114 } |
115 | 115 |
116 LayoutTableSection::~LayoutTableSection() | 116 LayoutTableSection::~LayoutTableSection() |
117 { | 117 { |
118 } | 118 } |
119 | 119 |
120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl e* oldStyle) | 120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl e* oldStyle) |
121 { | 121 { |
122 DCHECK(style()->display() == TABLE_FOOTER_GROUP || style()->display() == TAB LE_ROW_GROUP || style()->display() == TABLE_HEADER_GROUP); | 122 DCHECK(style()->display() == EDisplay::TableFooterGroup || style()->display( ) == EDisplay::TableRowGroup || style()->display() == EDisplay::TableHeaderGroup ); |
123 | 123 |
124 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); | 124 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); |
125 propagateStyleToAnonymousChildren(); | 125 propagateStyleToAnonymousChildren(); |
126 | 126 |
127 if (!oldStyle) | 127 if (!oldStyle) |
128 return; | 128 return; |
129 | 129 |
130 LayoutTable* table = this->table(); | 130 LayoutTable* table = this->table(); |
131 if (!table) | 131 if (!table) |
132 return; | 132 return; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 return; | 255 return; |
256 | 256 |
257 unsigned rSpan = cell->rowSpan(); | 257 unsigned rSpan = cell->rowSpan(); |
258 unsigned cSpan = cell->colSpan(); | 258 unsigned cSpan = cell->colSpan(); |
259 const Vector<LayoutTable::ColumnStruct>& columns = table()->effectiveColumns (); | 259 const Vector<LayoutTable::ColumnStruct>& columns = table()->effectiveColumns (); |
260 unsigned nCols = columns.size(); | 260 unsigned nCols = columns.size(); |
261 unsigned insertionRow = row->rowIndex(); | 261 unsigned insertionRow = row->rowIndex(); |
262 | 262 |
263 // ### mozilla still seems to do the old HTML way, even for strict DTD | 263 // ### mozilla still seems to do the old HTML way, even for strict DTD |
264 // (see the annotation on table cell layouting in the CSS specs and the test case below: | 264 // (see the annotation on table cell layouting in the CSS specs and the test case below: |
265 // <TABLE border> | 265 // <EDisplay::Table border> |
266 // <TR><TD>1 <TD rowspan="2">2 <TD>3 <TD>4 | 266 // <TR><TD>1 <TD rowspan="2">2 <TD>3 <TD>4 |
267 // <TR><TD colspan="2">5 | 267 // <TR><TD colspan="2">5 |
268 // </TABLE> | 268 // </EDisplay::Table> |
alancutter (OOO until 2018)
2016/09/26 04:23:47
This should not change.
sashab
2016/09/26 04:48:39
Ahahah this has to be my favourite accidental chan
| |
269 while (m_cCol < nCols && (cellAt(insertionRow, m_cCol).hasCells() || cellAt( insertionRow, m_cCol).inColSpan)) | 269 while (m_cCol < nCols && (cellAt(insertionRow, m_cCol).hasCells() || cellAt( insertionRow, m_cCol).inColSpan)) |
270 m_cCol++; | 270 m_cCol++; |
271 | 271 |
272 updateLogicalHeightForCell(m_grid[insertionRow], cell); | 272 updateLogicalHeightForCell(m_grid[insertionRow], cell); |
273 | 273 |
274 ensureRows(insertionRow + rSpan); | 274 ensureRows(insertionRow + rSpan); |
275 | 275 |
276 m_grid[insertionRow].rowLayoutObject = row; | 276 m_grid[insertionRow].rowLayoutObject = row; |
277 | 277 |
278 unsigned col = m_cCol; | 278 unsigned col = m_cCol; |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1689 } | 1689 } |
1690 if (!result.hitTestRequest().listBased()) | 1690 if (!result.hitTestRequest().listBased()) |
1691 break; | 1691 break; |
1692 } | 1692 } |
1693 | 1693 |
1694 return false; | 1694 return false; |
1695 } | 1695 } |
1696 | 1696 |
1697 LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutOb ject* parent) | 1697 LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutOb ject* parent) |
1698 { | 1698 { |
1699 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_ROW_GROUP); | 1699 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), EDisplay::TableRowGroup); |
1700 LayoutTableSection* newSection = new LayoutTableSection(nullptr); | 1700 LayoutTableSection* newSection = new LayoutTableSection(nullptr); |
1701 newSection->setDocumentForAnonymous(&parent->document()); | 1701 newSection->setDocumentForAnonymous(&parent->document()); |
1702 newSection->setStyle(newStyle.release()); | 1702 newSection->setStyle(newStyle.release()); |
1703 return newSection; | 1703 return newSection; |
1704 } | 1704 } |
1705 | 1705 |
1706 void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign ed effectiveColumn) const | 1706 void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign ed effectiveColumn) const |
1707 { | 1707 { |
1708 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]); | 1708 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]); |
1709 int horizontalBorderSpacing = table()->hBorderSpacing(); | 1709 int horizontalBorderSpacing = table()->hBorderSpacing(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1747 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, | 1747 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, |
1748 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. | 1748 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. |
1749 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. | 1749 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. |
1750 if (table()->header() == this && isRepeatingHeaderGroup()) | 1750 if (table()->header() == this && isRepeatingHeaderGroup()) |
1751 rect.setHeight(table()->logicalHeight()); | 1751 rect.setHeight(table()->logicalHeight()); |
1752 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); | 1752 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); |
1753 } | 1753 } |
1754 | 1754 |
1755 | 1755 |
1756 } // namespace blink | 1756 } // namespace blink |
OLD | NEW |