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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/TableCellPainter.h" | 6 #include "core/paint/TableCellPainter.h" |
7 | 7 |
8 #include "core/layout/LayoutTableCell.h" | 8 #include "core/layout/LayoutTableCell.h" |
9 #include "core/paint/BlockPainter.h" | 9 #include "core/paint/BlockPainter.h" |
10 #include "core/paint/BoxPainter.h" | 10 #include "core/paint/BoxPainter.h" |
11 #include "core/paint/LayoutObjectDrawingRecorder.h" | 11 #include "core/paint/LayoutObjectDrawingRecorder.h" |
12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "platform/graphics/GraphicsContextStateSaver.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 | 16 |
16 inline const CollapsedBorderValue& TableCellPainter::cachedCollapsedLeftBorder(c
onst ComputedStyle& styleForCellFlow) const | 17 inline const CollapsedBorderValue& TableCellPainter::cachedCollapsedLeftBorder(c
onst ComputedStyle& styleForCellFlow) const |
17 { | 18 { |
18 if (styleForCellFlow.isHorizontalWritingMode()) { | 19 if (styleForCellFlow.isHorizontalWritingMode()) { |
19 return styleForCellFlow.isLeftToRightDirection() ? m_layoutTableCell.se
ction()->cachedCollapsedBorder(&m_layoutTableCell, CBSStart) | 20 return styleForCellFlow.isLeftToRightDirection() ? m_layoutTableCell.se
ction()->cachedCollapsedBorder(&m_layoutTableCell, CBSStart) |
20 : m_layoutTableCell.section()->cachedCollapsedBorder(&m_layoutTableC
ell, CBSEnd); | 21 : m_layoutTableCell.section()->cachedCollapsedBorder(&m_layoutTableC
ell, CBSEnd); |
21 } | 22 } |
22 return styleForCellFlow.isFlippedBlocksWritingMode() ? m_layoutTableCell.se
ction()->cachedCollapsedBorder(&m_layoutTableCell, CBSAfter) | 23 return styleForCellFlow.isFlippedBlocksWritingMode() ? m_layoutTableCell.se
ction()->cachedCollapsedBorder(&m_layoutTableCell, CBSAfter) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo
undOffsetBehavior paintBoundOffsetBehavior) | 223 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo
undOffsetBehavior paintBoundOffsetBehavior) |
223 { | 224 { |
224 LayoutPoint adjustedPaintOffset = paintOffset; | 225 LayoutPoint adjustedPaintOffset = paintOffset; |
225 if (paintBoundOffsetBehavior == AddOffsetFromParent) | 226 if (paintBoundOffsetBehavior == AddOffsetFromParent) |
226 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); | 227 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); |
227 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna
ppedSize())); | 228 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna
ppedSize())); |
228 } | 229 } |
229 | 230 |
230 } // namespace blink | 231 } // namespace blink |
231 | 232 |
OLD | NEW |