| 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/TableCellPainter.h" | 5 #include "core/paint/TableCellPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutTableCell.h" | 7 #include "core/layout/LayoutTableCell.h" |
| 8 #include "core/paint/BlockPainter.h" | 8 #include "core/paint/BlockPainter.h" |
| 9 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
| 10 #include "core/paint/LayoutObjectDrawingRecorder.h" | 10 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 CollapsedBorderStyle(right_border_value.Style()), 0, 0, true); | 175 CollapsedBorderStyle(right_border_value.Style()), 0, 0, true); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 void TableCellPainter::PaintContainerBackgroundBehindCell( | 179 void TableCellPainter::PaintContainerBackgroundBehindCell( |
| 180 const PaintInfo& paint_info, | 180 const PaintInfo& paint_info, |
| 181 const LayoutPoint& paint_offset, | 181 const LayoutPoint& paint_offset, |
| 182 const LayoutObject& background_object) { | 182 const LayoutObject& background_object) { |
| 183 DCHECK(background_object != layout_table_cell_); | 183 DCHECK(background_object != layout_table_cell_); |
| 184 | 184 |
| 185 if (layout_table_cell_.Style()->Visibility() != EVisibility::kVisible) | 185 if (background_object.Style()->Visibility() != EVisibility::kVisible) |
| 186 return; | 186 return; |
| 187 | 187 |
| 188 LayoutTable* table = layout_table_cell_.Table(); | 188 LayoutTable* table = layout_table_cell_.Table(); |
| 189 if (!table->ShouldCollapseBorders() && | 189 if (!table->ShouldCollapseBorders() && |
| 190 layout_table_cell_.Style()->EmptyCells() == EEmptyCells::kHide && | 190 layout_table_cell_.Style()->EmptyCells() == EEmptyCells::kHide && |
| 191 !layout_table_cell_.FirstChild()) | 191 !layout_table_cell_.FirstChild()) |
| 192 return; | 192 return; |
| 193 | 193 |
| 194 LayoutRect paint_rect = PaintRectNotIncludingVisualOverflow( | 194 LayoutRect paint_rect = PaintRectNotIncludingVisualOverflow( |
| 195 paint_offset + layout_table_cell_.Location()); | 195 paint_offset + layout_table_cell_.Location()); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 BoxPainter(layout_table_cell_).PaintMaskImages(paint_info, paint_rect); | 288 BoxPainter(layout_table_cell_).PaintMaskImages(paint_info, paint_rect); |
| 289 } | 289 } |
| 290 | 290 |
| 291 LayoutRect TableCellPainter::PaintRectNotIncludingVisualOverflow( | 291 LayoutRect TableCellPainter::PaintRectNotIncludingVisualOverflow( |
| 292 const LayoutPoint& paint_offset) { | 292 const LayoutPoint& paint_offset) { |
| 293 return LayoutRect(paint_offset, | 293 return LayoutRect(paint_offset, |
| 294 LayoutSize(layout_table_cell_.PixelSnappedSize())); | 294 LayoutSize(layout_table_cell_.PixelSnappedSize())); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace blink | 297 } // namespace blink |
| OLD | NEW |