| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return style_for_cell_flow.IsLeftToRightDirection() ? values.EndBorder() | 56 return style_for_cell_flow.IsLeftToRightDirection() ? values.EndBorder() |
| 57 : values.StartBorder(); | 57 : values.StartBorder(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void TableCellPainter::Paint(const PaintInfo& paint_info, | 60 void TableCellPainter::Paint(const PaintInfo& paint_info, |
| 61 const LayoutPoint& paint_offset) { | 61 const LayoutPoint& paint_offset) { |
| 62 BlockPainter(layout_table_cell_).Paint(paint_info, paint_offset); | 62 BlockPainter(layout_table_cell_).Paint(paint_info, paint_offset); |
| 63 } | 63 } |
| 64 | 64 |
| 65 static EBorderStyle CollapsedBorderStyle(EBorderStyle style) { | 65 static EBorderStyle CollapsedBorderStyle(EBorderStyle style) { |
| 66 if (style == kBorderStyleOutset) | 66 if (style == EBorderStyle::kOutset) |
| 67 return kBorderStyleGroove; | 67 return EBorderStyle::kGroove; |
| 68 if (style == kBorderStyleInset) | 68 if (style == EBorderStyle::kInset) |
| 69 return kBorderStyleRidge; | 69 return EBorderStyle::kRidge; |
| 70 return style; | 70 return style; |
| 71 } | 71 } |
| 72 | 72 |
| 73 const DisplayItemClient& TableCellPainter::DisplayItemClientForBorders() const { | 73 const DisplayItemClient& TableCellPainter::DisplayItemClientForBorders() const { |
| 74 // TODO(wkorman): We may need to handle PaintInvalidationDelayedFull. | 74 // TODO(wkorman): We may need to handle PaintInvalidationDelayedFull. |
| 75 // http://crbug.com/657186 | 75 // http://crbug.com/657186 |
| 76 return layout_table_cell_.UsesCompositedCellDisplayItemClients() | 76 return layout_table_cell_.UsesCompositedCellDisplayItemClients() |
| 77 ? static_cast<const DisplayItemClient&>( | 77 ? static_cast<const DisplayItemClient&>( |
| 78 *layout_table_cell_.GetCollapsedBorderValues()) | 78 *layout_table_cell_.GetCollapsedBorderValues()) |
| 79 : layout_table_cell_; | 79 : layout_table_cell_; |
| (...skipping 208 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 |