Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: third_party/WebKit/Source/core/paint/TableCellPainter.cpp

Issue 2942123002: Break LayoutObject dependency for NinePieceImagePainter (Closed)
Patch Set: Pass document explicitly Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 BoxPainter::PaintNormalBoxShadow(paint_info, paint_rect, style); 257 BoxPainter::PaintNormalBoxShadow(paint_info, paint_rect, style);
258 PaintBackground(paint_info, paint_rect, layout_table_cell_); 258 PaintBackground(paint_info, paint_rect, layout_table_cell_);
259 // TODO(wangxianzhu): Calculate the inset shadow bounds by insetting paintRect 259 // TODO(wangxianzhu): Calculate the inset shadow bounds by insetting paintRect
260 // by half widths of collapsed borders. 260 // by half widths of collapsed borders.
261 BoxPainter::PaintInsetBoxShadow(paint_info, paint_rect, style); 261 BoxPainter::PaintInsetBoxShadow(paint_info, paint_rect, style);
262 262
263 if (!needs_to_paint_border) 263 if (!needs_to_paint_border)
264 return; 264 return;
265 265
266 BoxPainter::PaintBorder(layout_table_cell_, paint_info, paint_rect, style); 266 BoxPainter::PaintBorder(layout_table_cell_, layout_table_cell_.GetDocument(),
267 layout_table_cell_.GeneratingNode(), paint_info,
268 paint_rect, style);
267 } 269 }
268 270
269 void TableCellPainter::PaintMask(const PaintInfo& paint_info, 271 void TableCellPainter::PaintMask(const PaintInfo& paint_info,
270 const LayoutPoint& paint_offset) { 272 const LayoutPoint& paint_offset) {
271 if (layout_table_cell_.Style()->Visibility() != EVisibility::kVisible || 273 if (layout_table_cell_.Style()->Visibility() != EVisibility::kVisible ||
272 paint_info.phase != kPaintPhaseMask) 274 paint_info.phase != kPaintPhaseMask)
273 return; 275 return;
274 276
275 LayoutTable* table_elt = layout_table_cell_.Table(); 277 LayoutTable* table_elt = layout_table_cell_.Table();
276 if (!table_elt->ShouldCollapseBorders() && 278 if (!table_elt->ShouldCollapseBorders() &&
(...skipping 11 matching lines...) Expand all
288 BoxPainter(layout_table_cell_).PaintMaskImages(paint_info, paint_rect); 290 BoxPainter(layout_table_cell_).PaintMaskImages(paint_info, paint_rect);
289 } 291 }
290 292
291 LayoutRect TableCellPainter::PaintRectNotIncludingVisualOverflow( 293 LayoutRect TableCellPainter::PaintRectNotIncludingVisualOverflow(
292 const LayoutPoint& paint_offset) { 294 const LayoutPoint& paint_offset) {
293 return LayoutRect(paint_offset, 295 return LayoutRect(paint_offset,
294 LayoutSize(layout_table_cell_.PixelSnappedSize())); 296 LayoutSize(layout_table_cell_.PixelSnappedSize()));
295 } 297 }
296 298
297 } // namespace blink 299 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698