| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 bool hasMultipleCellLevels() const { return m_hasMultipleCellLevels; } | 306 bool hasMultipleCellLevels() const { return m_hasMultipleCellLevels; } |
| 307 | 307 |
| 308 const char* name() const override { return "LayoutTableSection"; } | 308 const char* name() const override { return "LayoutTableSection"; } |
| 309 | 309 |
| 310 // Whether a section has opaque background depends on many factors, e.g. bor
der spacing, | 310 // Whether a section has opaque background depends on many factors, e.g. bor
der spacing, |
| 311 // border collapsing, missing cells, etc. | 311 // border collapsing, missing cells, etc. |
| 312 // For simplicity, just conservatively assume all table sections are not opa
que. | 312 // For simplicity, just conservatively assume all table sections are not opa
que. |
| 313 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov
erride { return false; } | 313 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov
erride { return false; } |
| 314 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r
eturn false; } | 314 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r
eturn false; } |
| 315 | 315 |
| 316 // Returns cell's position before any transformations are applied. |
| 317 LayoutRect getCellPosition(unsigned row, unsigned effectiveColumn) const; |
| 318 |
| 319 // Returns cell's position after transforms. |
| 320 LayoutRect getCellPhysicalPosition(unsigned row, unsigned effectiveColumn) c
onst; |
| 321 |
| 322 // Returns table-relative position of the entire section |
| 323 LayoutRect positionByCellSpan() const; |
| 324 |
| 316 protected: | 325 protected: |
| 317 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 326 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
| 318 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) override; | 327 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) override; |
| 319 | 328 |
| 320 private: | 329 private: |
| 321 LayoutObjectChildList* virtualChildren() override { return children(); } | 330 LayoutObjectChildList* virtualChildren() override { return children(); } |
| 322 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } | 331 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } |
| 323 | 332 |
| 324 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTableSection || LayoutBox::isOfType(type); } | 333 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTableSection || LayoutBox::isOfType(type); } |
| 325 | 334 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); } | 366 CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); } |
| 358 CellSpan fullTableEffectiveColumnSpan() const { return CellSpan(0, table()->
numEffectiveColumns()); } | 367 CellSpan fullTableEffectiveColumnSpan() const { return CellSpan(0, table()->
numEffectiveColumns()); } |
| 359 | 368 |
| 360 // These two functions take a rectangle as input that has been flipped by lo
gicalRectForWritingModeAndDirection. | 369 // These two functions take a rectangle as input that has been flipped by lo
gicalRectForWritingModeAndDirection. |
| 361 // The returned span of rows or columns is end-exclusive, and empty if start
==end. | 370 // The returned span of rows or columns is end-exclusive, and empty if start
==end. |
| 362 CellSpan spannedRows(const LayoutRect& flippedRect) const; | 371 CellSpan spannedRows(const LayoutRect& flippedRect) const; |
| 363 CellSpan spannedEffectiveColumns(const LayoutRect& flippedRect) const; | 372 CellSpan spannedEffectiveColumns(const LayoutRect& flippedRect) const; |
| 364 | 373 |
| 365 void setLogicalPositionForCell(LayoutTableCell*, unsigned effectiveColumn) c
onst; | 374 void setLogicalPositionForCell(LayoutTableCell*, unsigned effectiveColumn) c
onst; |
| 366 | 375 |
| 376 LayoutRect transformLogicalToPhysicalPosition(const LayoutRect& position) co
nst; |
| 377 |
| 367 LayoutObjectChildList m_children; | 378 LayoutObjectChildList m_children; |
| 368 | 379 |
| 369 // The representation of the rows and their cells (CellStruct). | 380 // The representation of the rows and their cells (CellStruct). |
| 370 Vector<RowStruct> m_grid; | 381 Vector<RowStruct> m_grid; |
| 371 | 382 |
| 372 // The logical offset of each row from the top of the section. | 383 // The logical offset of each row from the top of the section. |
| 373 // | 384 // |
| 374 // Note that this Vector has one more entry than the number of rows so that | 385 // Note that this Vector has one more entry than the number of rows so that |
| 375 // we can keep track of the final size of the section | 386 // we can keep track of the final size of the section |
| 376 // (m_rowPos[m_grid.size() + 1]). | 387 // (m_rowPos[m_grid.size() + 1]). |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // Invisible borders are never stored in this map. | 428 // Invisible borders are never stored in this map. |
| 418 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; | 429 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; |
| 419 CellsCollapsedBordersMap m_cellsCollapsedBorders; | 430 CellsCollapsedBordersMap m_cellsCollapsedBorders; |
| 420 }; | 431 }; |
| 421 | 432 |
| 422 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); | 433 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); |
| 423 | 434 |
| 424 } // namespace blink | 435 } // namespace blink |
| 425 | 436 |
| 426 #endif // LayoutTableSection_h | 437 #endif // LayoutTableSection_h |
| OLD | NEW |