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 "platform/wtf/Allocator.h" | 10 #include "platform/wtf/Allocator.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class CellSpan; | 14 class CellSpan; |
15 class CollapsedBorderValue; | |
16 class LayoutPoint; | 15 class LayoutPoint; |
17 class LayoutTableCell; | 16 class LayoutTableCell; |
18 class LayoutTableSection; | 17 class LayoutTableSection; |
| 18 class TableCollapsedBorderPainter; |
19 struct PaintInfo; | 19 struct PaintInfo; |
20 | 20 |
21 class TableSectionPainter { | 21 class TableSectionPainter { |
22 STACK_ALLOCATED(); | 22 STACK_ALLOCATED(); |
23 | 23 |
24 public: | 24 public: |
25 TableSectionPainter(const LayoutTableSection& layout_table_section) | 25 TableSectionPainter(const LayoutTableSection& layout_table_section) |
26 : layout_table_section_(layout_table_section) {} | 26 : layout_table_section_(layout_table_section) {} |
27 | 27 |
28 void Paint(const PaintInfo&, const LayoutPoint&); | 28 void Paint(const PaintInfo&, const LayoutPoint&); |
29 void PaintCollapsedBorders(const PaintInfo&, | 29 void PaintCollapsedBorders(const PaintInfo&, |
30 const LayoutPoint&, | 30 const LayoutPoint&, |
31 const CollapsedBorderValue&); | 31 TableCollapsedBorderPainter&); |
32 | 32 |
33 private: | 33 private: |
34 void PaintObject(const PaintInfo&, const LayoutPoint&); | 34 void PaintObject(const PaintInfo&, const LayoutPoint&); |
35 | 35 |
36 void PaintBoxDecorationBackground(const PaintInfo&, | 36 void PaintBoxDecorationBackground(const PaintInfo&, |
37 const LayoutPoint&, | 37 const LayoutPoint&, |
38 const CellSpan& dirtied_rows, | 38 const CellSpan& dirtied_rows, |
39 const CellSpan& dirtied_columns); | 39 const CellSpan& dirtied_columns); |
40 void PaintBackgroundsBehindCell(const LayoutTableCell&, | 40 void PaintBackgroundsBehindCell(const LayoutTableCell&, |
41 const PaintInfo&, | 41 const PaintInfo&, |
42 const LayoutPoint&); | 42 const LayoutPoint&); |
43 void PaintCell(const LayoutTableCell&, const PaintInfo&, const LayoutPoint&); | 43 void PaintCell(const LayoutTableCell&, const PaintInfo&, const LayoutPoint&); |
44 | 44 |
45 enum ItemToPaint { kPaintCollapsedBorders, kPaintSection }; | 45 enum ItemToPaint { kPaintCollapsedBorders, kPaintSection }; |
46 void PaintRepeatingHeaderGroup( | 46 void PaintRepeatingHeaderGroup( |
47 const PaintInfo&, | 47 const PaintInfo&, |
48 const LayoutPoint& paint_offset, | 48 const LayoutPoint& paint_offset, |
49 const CollapsedBorderValue& current_border_value, | 49 TableCollapsedBorderPainter& current_border_value, |
50 ItemToPaint); | 50 ItemToPaint); |
51 void PaintSection(const PaintInfo&, const LayoutPoint&); | 51 void PaintSection(const PaintInfo&, const LayoutPoint&); |
52 void PaintCollapsedSectionBorders(const PaintInfo&, | 52 void PaintCollapsedSectionBorders(const PaintInfo&, |
53 const LayoutPoint&, | 53 const LayoutPoint&, |
54 const CollapsedBorderValue&); | 54 TableCollapsedBorderPainter&); |
55 | 55 |
56 const LayoutTableSection& layout_table_section_; | 56 const LayoutTableSection& layout_table_section_; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
60 | 60 |
61 #endif // TableSectionPainter_h | 61 #endif // TableSectionPainter_h |
OLD | NEW |