| 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" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext); | 174 bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext); |
| 175 | 175 |
| 176 for (CollapsedBorder* border = borders.nextBorder(); border; border = border
s.nextBorder()) { | 176 for (CollapsedBorder* border = borders.nextBorder(); border; border = border
s.nextBorder()) { |
| 177 if (border->borderValue.isSameIgnoringColor(*m_layoutTableCell.table()->
currentBorderValue())) { | 177 if (border->borderValue.isSameIgnoringColor(*m_layoutTableCell.table()->
currentBorderValue())) { |
| 178 ObjectPainter::drawLineForBoxSide(graphicsContext, border->x1, borde
r->y1, border->x2, border->y2, border->side, | 178 ObjectPainter::drawLineForBoxSide(graphicsContext, border->x1, borde
r->y1, border->x2, border->y2, border->side, |
| 179 border->borderValue.color().resolve(m_layoutTableCell.resolveCol
or(CSSPropertyColor)), border->style, 0, 0, antialias); | 179 border->borderValue.color().resolve(m_layoutTableCell.resolveCol
or(CSSPropertyColor)), border->style, 0, 0, antialias); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co
nst LayoutPoint& paintOffset, RenderObject* backgroundObject) | 184 void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co
nst LayoutPoint& paintOffset, LayoutObject* backgroundObject) |
| 185 { | 185 { |
| 186 if (!paintInfo.shouldPaintWithinRoot(&m_layoutTableCell)) | 186 if (!paintInfo.shouldPaintWithinRoot(&m_layoutTableCell)) |
| 187 return; | 187 return; |
| 188 | 188 |
| 189 if (!backgroundObject) | 189 if (!backgroundObject) |
| 190 return; | 190 return; |
| 191 | 191 |
| 192 if (m_layoutTableCell.style()->visibility() != VISIBLE) | 192 if (m_layoutTableCell.style()->visibility() != VISIBLE) |
| 193 return; | 193 return; |
| 194 | 194 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo
undOffsetBehavior paintBoundOffsetBehavior) | 257 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo
undOffsetBehavior paintBoundOffsetBehavior) |
| 258 { | 258 { |
| 259 LayoutPoint adjustedPaintOffset = paintOffset; | 259 LayoutPoint adjustedPaintOffset = paintOffset; |
| 260 if (paintBoundOffsetBehavior == AddOffsetFromParent) | 260 if (paintBoundOffsetBehavior == AddOffsetFromParent) |
| 261 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); | 261 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); |
| 262 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna
ppedSize())); | 262 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna
ppedSize())); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace blink | 265 } // namespace blink |
| 266 | 266 |
| OLD | NEW |