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

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

Issue 1637143002: Layers that have a backdrop-filter should paints contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another test Created 4 years, 10 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 } 183 }
184 184
185 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 185 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
186 { 186 {
187 LayoutTable* table = m_layoutTableCell.table(); 187 LayoutTable* table = m_layoutTableCell.table();
188 if (!table->collapseBorders() && m_layoutTableCell.style()->emptyCells() == HIDE && !m_layoutTableCell.firstChild()) 188 if (!table->collapseBorders() && m_layoutTableCell.style()->emptyCells() == HIDE && !m_layoutTableCell.firstChild())
189 return; 189 return;
190 190
191 bool needsToPaintBorder = m_layoutTableCell.styleRef().hasBorderDecoration() && !table->collapseBorders(); 191 bool needsToPaintBorder = m_layoutTableCell.styleRef().hasBorderDecoration() && !table->collapseBorders();
192 if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().boxS hadow() && !needsToPaintBorder) 192 if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().hasB ackdropFilter() && !m_layoutTableCell.styleRef().boxShadow() && !needsToPaintBor der)
193 return; 193 return;
194 194
195 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutTableCell, DisplayItem::BoxDecorationBackground, paintOffset)) 195 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutTableCell, DisplayItem::BoxDecorationBackground, paintOffset))
196 return; 196 return;
197 197
198 LayoutRect visualOverflowRect = m_layoutTableCell.visualOverflowRect(); 198 LayoutRect visualOverflowRect = m_layoutTableCell.visualOverflowRect();
199 visualOverflowRect.moveBy(paintOffset); 199 visualOverflowRect.moveBy(paintOffset);
200 // TODO(chrishtr): the pixel-snapping here is likely incorrect. 200 // TODO(chrishtr): the pixel-snapping here is likely incorrect.
201 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableCell, D isplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect), pa intOffset); 201 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableCell, D isplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect), pa intOffset);
202 202
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior) 235 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior)
236 { 236 {
237 LayoutPoint adjustedPaintOffset = paintOffset; 237 LayoutPoint adjustedPaintOffset = paintOffset;
238 if (paintBoundOffsetBehavior == AddOffsetFromParent) 238 if (paintBoundOffsetBehavior == AddOffsetFromParent)
239 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); 239 adjustedPaintOffset.moveBy(m_layoutTableCell.location());
240 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna ppedSize())); 240 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna ppedSize()));
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
244 244
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698