| 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, 2009, 2013 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv
ed. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 175 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 176 public: | 176 public: |
| 177 RowStruct() | 177 RowStruct() |
| 178 : rowLayoutObject(nullptr) | 178 : rowLayoutObject(nullptr) |
| 179 , baseline(-1) | 179 , baseline(-1) |
| 180 { | 180 { |
| 181 } | 181 } |
| 182 | 182 |
| 183 Row row; | 183 Row row; |
| 184 LayoutTableRow* rowLayoutObject; | 184 LayoutTableRow* rowLayoutObject; |
| 185 LayoutUnit baseline; | 185 int baseline; |
| 186 Length logicalHeight; | 186 Length logicalHeight; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 struct SpanningRowsHeight { | 189 struct SpanningRowsHeight { |
| 190 STACK_ALLOCATED(); | 190 STACK_ALLOCATED(); |
| 191 WTF_MAKE_NONCOPYABLE(SpanningRowsHeight); | 191 WTF_MAKE_NONCOPYABLE(SpanningRowsHeight); |
| 192 | 192 |
| 193 public: | 193 public: |
| 194 SpanningRowsHeight() | 194 SpanningRowsHeight() |
| 195 : totalRowsHeight(0) | 195 : totalRowsHeight(0) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 void recalcCells(); | 267 void recalcCells(); |
| 268 void recalcCellsIfNeeded() | 268 void recalcCellsIfNeeded() |
| 269 { | 269 { |
| 270 if (m_needsCellRecalc) | 270 if (m_needsCellRecalc) |
| 271 recalcCells(); | 271 recalcCells(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 bool needsCellRecalc() const { return m_needsCellRecalc; } | 274 bool needsCellRecalc() const { return m_needsCellRecalc; } |
| 275 void setNeedsCellRecalc(); | 275 void setNeedsCellRecalc(); |
| 276 | 276 |
| 277 LayoutUnit rowBaseline(unsigned row) { return m_grid[row].baseline; } | 277 int rowBaseline(unsigned row) { return m_grid[row].baseline; } |
| 278 | 278 |
| 279 void rowLogicalHeightChanged(LayoutTableRow*); | 279 void rowLogicalHeightChanged(LayoutTableRow*); |
| 280 | 280 |
| 281 void removeCachedCollapsedBorders(const LayoutTableCell*); | 281 void removeCachedCollapsedBorders(const LayoutTableCell*); |
| 282 // Returns true if any collapsed borders of the cell changed. | 282 // Returns true if any collapsed borders of the cell changed. |
| 283 bool setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, c
onst CollapsedBorderValue&); | 283 bool setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, c
onst CollapsedBorderValue&); |
| 284 // Returns null if the border is not cached (there is no such collapsed bord
er or the border is invisible). | 284 // Returns null if the border is not cached (there is no such collapsed bord
er or the border is invisible). |
| 285 const CollapsedBorderValue* cachedCollapsedBorder(const LayoutTableCell*, Co
llapsedBorderSide) const; | 285 const CollapsedBorderValue* cachedCollapsedBorder(const LayoutTableCell*, Co
llapsedBorderSide) const; |
| 286 | 286 |
| 287 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo
gical height. | 287 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo
gical height. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&
, Vector<int>&); | 334 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&
, Vector<int>&); |
| 335 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float,
int&, Vector<int>&); | 335 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float,
int&, Vector<int>&); |
| 336 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec
tor<int>&); | 336 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec
tor<int>&); |
| 337 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int&
, Vector<int>&); | 337 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int&
, Vector<int>&); |
| 338 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells); | 338 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells); |
| 339 | 339 |
| 340 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int
totalPercent); | 340 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int
totalPercent); |
| 341 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne
d autoRowsCount); | 341 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne
d autoRowsCount); |
| 342 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight); | 342 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight); |
| 343 | 343 |
| 344 void updateBaselineForCell(LayoutTableCell*, unsigned row, LayoutUnit& basel
ineDescent); | 344 void updateBaselineForCell(LayoutTableCell*, unsigned row, int& baselineDesc
ent); |
| 345 | 345 |
| 346 bool hasOverflowingCell() const { return m_overflowingCells.size() || m_forc
eSlowPaintPathWithOverflowingCell; } | 346 bool hasOverflowingCell() const { return m_overflowingCells.size() || m_forc
eSlowPaintPathWithOverflowingCell; } |
| 347 | 347 |
| 348 void computeOverflowFromCells(unsigned totalRows, unsigned nEffCols); | 348 void computeOverflowFromCells(unsigned totalRows, unsigned nEffCols); |
| 349 | 349 |
| 350 CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); } | 350 CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); } |
| 351 CellSpan fullTableColumnSpan() const { return CellSpan(0, table()->columns()
.size()); } | 351 CellSpan fullTableColumnSpan() const { return CellSpan(0, table()->columns()
.size()); } |
| 352 | 352 |
| 353 // These two functions take a rectangle as input that has been flipped by lo
gicalRectForWritingModeAndDirection. | 353 // These two functions take a rectangle as input that has been flipped by lo
gicalRectForWritingModeAndDirection. |
| 354 // The returned span of rows or columns is end-exclusive, and empty if start
==end. | 354 // The returned span of rows or columns is end-exclusive, and empty if start
==end. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 // Invisible borders are never stored in this map. | 410 // Invisible borders are never stored in this map. |
| 411 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; | 411 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; |
| 412 CellsCollapsedBordersMap m_cellsCollapsedBorders; | 412 CellsCollapsedBordersMap m_cellsCollapsedBorders; |
| 413 }; | 413 }; |
| 414 | 414 |
| 415 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); | 415 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); |
| 416 | 416 |
| 417 } // namespace blink | 417 } // namespace blink |
| 418 | 418 |
| 419 #endif // LayoutTableSection_h | 419 #endif // LayoutTableSection_h |
| OLD | NEW |