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/CollapsedBorderValue.h" | 7 #include "core/layout/CollapsedBorderValue.h" |
8 #include "core/layout/LayoutTable.h" | 8 #include "core/layout/LayoutTable.h" |
9 #include "core/layout/LayoutTableSection.h" | 9 #include "core/layout/LayoutTableSection.h" |
10 #include "core/paint/BoxClipper.h" | 10 #include "core/paint/BoxClipper.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 for (LayoutObject* child = layout_table_.FirstChild(); child; | 37 for (LayoutObject* child = layout_table_.FirstChild(); child; |
38 child = child->NextSibling()) { | 38 child = child->NextSibling()) { |
39 if (child->IsBox() && !ToLayoutBox(child)->HasSelfPaintingLayer() && | 39 if (child->IsBox() && !ToLayoutBox(child)->HasSelfPaintingLayer() && |
40 (child->IsTableSection() || child->IsTableCaption())) { | 40 (child->IsTableSection() || child->IsTableCaption())) { |
41 LayoutPoint child_point = layout_table_.FlipForWritingModeForChild( | 41 LayoutPoint child_point = layout_table_.FlipForWritingModeForChild( |
42 ToLayoutBox(child), paint_offset); | 42 ToLayoutBox(child), paint_offset); |
43 child->Paint(paint_info_for_descendants, child_point); | 43 child->Paint(paint_info_for_descendants, child_point); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 if (layout_table_.CollapseBorders() && | 47 if (layout_table_.ShouldCollapseBorders() && |
48 ShouldPaintDescendantBlockBackgrounds(paint_phase) && | 48 ShouldPaintDescendantBlockBackgrounds(paint_phase) && |
49 layout_table_.Style()->Visibility() == EVisibility::kVisible) { | 49 layout_table_.Style()->Visibility() == EVisibility::kVisible) { |
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 | 51 // painting each style of border from lowest precedence to highest |
52 // precedence. | 52 // precedence. |
53 LayoutTable::CollapsedBorderValues collapsed_borders = | 53 LayoutTable::CollapsedBorderValues collapsed_borders = |
54 layout_table_.CollapsedBorders(); | 54 layout_table_.CollapsedBorders(); |
55 size_t count = collapsed_borders.size(); | 55 size_t count = collapsed_borders.size(); |
56 for (size_t i = 0; i < count; ++i) { | 56 for (size_t i = 0; i < count; ++i) { |
57 for (LayoutTableSection* section = layout_table_.BottomSection(); | 57 for (LayoutTableSection* section = layout_table_.BottomSection(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 LayoutRect rect(paint_offset, layout_table_.Size()); | 95 LayoutRect rect(paint_offset, layout_table_.Size()); |
96 layout_table_.SubtractCaptionRect(rect); | 96 layout_table_.SubtractCaptionRect(rect); |
97 | 97 |
98 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_table_, | 98 LayoutObjectDrawingRecorder recorder(paint_info.context, layout_table_, |
99 paint_info.phase, rect); | 99 paint_info.phase, rect); |
100 BoxPainter(layout_table_).PaintMaskImages(paint_info, rect); | 100 BoxPainter(layout_table_).PaintMaskImages(paint_info, rect); |
101 } | 101 } |
102 | 102 |
103 } // namespace blink | 103 } // namespace blink |
OLD | NEW |