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 #include "core/paint/TablePainter.h" | 5 #include "core/paint/TablePainter.h" |
6 | 6 |
7 #include "core/layout/LayoutTable.h" | 7 #include "core/layout/LayoutTable.h" |
8 #include "core/layout/LayoutTableSection.h" | 8 #include "core/layout/LayoutTableSection.h" |
9 #include "core/style/CollapsedBorderValue.h" | 9 #include "core/style/CollapsedBorderValue.h" |
10 #include "core/paint/BoxClipper.h" | 10 #include "core/paint/BoxClipper.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild( | 41 LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild( |
42 toLayoutBox(child), paintOffset); | 42 toLayoutBox(child), paintOffset); |
43 child->paint(paintInfoForDescendants, childPoint); | 43 child->paint(paintInfoForDescendants, childPoint); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 if (m_layoutTable.collapseBorders() && | 47 if (m_layoutTable.collapseBorders() && |
48 shouldPaintDescendantBlockBackgrounds(paintPhase) && | 48 shouldPaintDescendantBlockBackgrounds(paintPhase) && |
49 m_layoutTable.style()->visibility() == EVisibility::Visible) { | 49 m_layoutTable.style()->visibility() == EVisibility::Visible) { |
50 // Using our cached sorted styles, we then do individual passes, | 50 // Using our cached sorted styles, we then do individual passes, |
51 // painting each style of border from lowest precedence to highest precede
nce. | 51 // painting each style of border from lowest precedence to highest |
| 52 // precedence. |
52 LayoutTable::CollapsedBorderValues collapsedBorders = | 53 LayoutTable::CollapsedBorderValues collapsedBorders = |
53 m_layoutTable.collapsedBorders(); | 54 m_layoutTable.collapsedBorders(); |
54 size_t count = collapsedBorders.size(); | 55 size_t count = collapsedBorders.size(); |
55 for (size_t i = 0; i < count; ++i) { | 56 for (size_t i = 0; i < count; ++i) { |
56 for (LayoutTableSection* section = m_layoutTable.bottomSection(); | 57 for (LayoutTableSection* section = m_layoutTable.bottomSection(); |
57 section; section = m_layoutTable.sectionAbove(section)) { | 58 section; section = m_layoutTable.sectionAbove(section)) { |
58 LayoutPoint childPoint = | 59 LayoutPoint childPoint = |
59 m_layoutTable.flipForWritingModeForChild(section, paintOffset); | 60 m_layoutTable.flipForWritingModeForChild(section, paintOffset); |
60 TableSectionPainter(*section).paintCollapsedBorders( | 61 TableSectionPainter(*section).paintCollapsedBorders( |
61 paintInfoForDescendants, childPoint, collapsedBorders[i]); | 62 paintInfoForDescendants, childPoint, collapsedBorders[i]); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 94 |
94 LayoutRect rect(paintOffset, m_layoutTable.size()); | 95 LayoutRect rect(paintOffset, m_layoutTable.size()); |
95 m_layoutTable.subtractCaptionRect(rect); | 96 m_layoutTable.subtractCaptionRect(rect); |
96 | 97 |
97 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTable, | 98 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTable, |
98 paintInfo.phase, rect); | 99 paintInfo.phase, rect); |
99 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); | 100 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); |
100 } | 101 } |
101 | 102 |
102 } // namespace blink | 103 } // namespace blink |
OLD | NEW |