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

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

Issue 2922343002: Paint table row backgound behind visibility:hidden cell (Closed)
Patch Set: 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/LayoutTests/paint/tables/row-background-behind-hidden-cell-expected.html ('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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/tables/row-background-behind-hidden-cell-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698