OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TableSectionPainter_h | 5 #ifndef TableSectionPainter_h |
6 #define TableSectionPainter_h | 6 #define TableSectionPainter_h |
7 | 7 |
8 #include "core/paint/PaintPhase.h" | 8 #include "core/paint/PaintPhase.h" |
9 #include "core/style/ShadowData.h" | 9 #include "core/style/ShadowData.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class CellSpan; | 14 class CellSpan; |
15 class CollapsedBorderValue; | 15 class CollapsedBorderValue; |
16 class LayoutBox; | |
16 class LayoutPoint; | 17 class LayoutPoint; |
17 class LayoutTableCell; | 18 class LayoutTableCell; |
18 class LayoutTableSection; | 19 class LayoutTableSection; |
19 struct PaintInfo; | 20 struct PaintInfo; |
20 | 21 |
21 class TableSectionPainter { | 22 class TableSectionPainter { |
22 STACK_ALLOCATED(); | 23 STACK_ALLOCATED(); |
23 public: | 24 public: |
24 TableSectionPainter(const LayoutTableSection& layoutTableSection) : m_layout TableSection(layoutTableSection) { } | 25 TableSectionPainter(const LayoutTableSection& layoutTableSection) : m_layout TableSection(layoutTableSection) { } |
25 | 26 |
26 void paint(const PaintInfo&, const LayoutPoint&); | 27 void paint(const PaintInfo&, const LayoutPoint&); |
27 void paintCollapsedBorders(const PaintInfo&, const LayoutPoint&, const Colla psedBorderValue&); | 28 void paintCollapsedBorders(const PaintInfo&, const LayoutPoint&, const Colla psedBorderValue&); |
28 | 29 |
29 private: | 30 private: |
30 void paintObject(const PaintInfo&, const LayoutPoint&); | 31 void paintObject(const PaintInfo&, const LayoutPoint&); |
31 | 32 |
32 void paintBackgroundsBehindCell(const LayoutTableCell&, const PaintInfo&, co nst LayoutPoint&); | 33 void paintBackgroundsBehindCell(const LayoutTableCell&, const PaintInfo&, co nst LayoutPoint&); |
33 void paintCell(const LayoutTableCell&, const PaintInfo&, const LayoutPoint&) ; | 34 void paintCell(const LayoutTableCell&, const PaintInfo&, const LayoutPoint&) ; |
34 | 35 |
35 // Returns the primary cell that should be painted for the grid item at (row , column) | 36 // Returns the primary cell that should be painted for the grid item at (row , column) |
36 // intersecting dirtiedRows and dirtiedColumns. Returns nullptr if we have p ainted the grid item | 37 // intersecting dirtiedRows and dirtiedColumns. Returns nullptr if we have p ainted the grid item |
37 // when painting the grid item left to or above (row, column) when painting cells intersecting | 38 // when painting the grid item left to or above (row, column) when painting cells intersecting |
38 // dirtiedRows and dirtiedColumns. | 39 // dirtiedRows and dirtiedColumns. |
39 const LayoutTableCell* primaryCellToPaint(unsigned row, unsigned column, con st CellSpan& dirtiedRows, const CellSpan& dirtiedColumns) const; | 40 const LayoutTableCell* primaryCellToPaint(unsigned row, unsigned column, con st CellSpan& dirtiedRows, const CellSpan& dirtiedColumns) const; |
40 | 41 |
42 enum ItemToPaint { | |
43 PaintCollapsedBorders, | |
44 PaintChild | |
Xianzhu
2016/06/03 18:45:41
Nit: Also rename this to PaintSection.
| |
45 }; | |
46 void paintRepeatingHeaderGroup(const PaintInfo&, const LayoutPoint& paintOff set, const CollapsedBorderValue& currentBorderValue, ItemToPaint); | |
47 void paintSection(const PaintInfo&, const LayoutPoint&); | |
48 void paintCollapsedSectionBorders(const PaintInfo&, const LayoutPoint&, cons t CollapsedBorderValue&); | |
49 | |
41 const LayoutTableSection& m_layoutTableSection; | 50 const LayoutTableSection& m_layoutTableSection; |
42 }; | 51 }; |
43 | 52 |
44 } // namespace blink | 53 } // namespace blink |
45 | 54 |
46 #endif // TableSectionPainter_h | 55 #endif // TableSectionPainter_h |
OLD | NEW |