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

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

Issue 1159773005: Handle border-image with fill and zero-width borders (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comment Created 5 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 | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/style/BorderData.h » ('j') | 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 "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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 178 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
179 { 179 {
180 if (!paintInfo.shouldPaintWithinRoot(&m_layoutTableCell)) 180 if (!paintInfo.shouldPaintWithinRoot(&m_layoutTableCell))
181 return; 181 return;
182 182
183 LayoutTable* table = m_layoutTableCell.table(); 183 LayoutTable* table = m_layoutTableCell.table();
184 if (!table->collapseBorders() && m_layoutTableCell.style()->emptyCells() == HIDE && !m_layoutTableCell.firstChild()) 184 if (!table->collapseBorders() && m_layoutTableCell.style()->emptyCells() == HIDE && !m_layoutTableCell.firstChild())
185 return; 185 return;
186 186
187 bool needsToPaintBorder = m_layoutTableCell.styleRef().hasBorder() && !table ->collapseBorders(); 187 bool needsToPaintBorder = m_layoutTableCell.styleRef().hasBorderDecoration() && !table->collapseBorders();
188 if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().boxS hadow() && !needsToPaintBorder) 188 if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().boxS hadow() && !needsToPaintBorder)
189 return; 189 return;
190 190
191 LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent); 191 LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent);
192 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(paintRect)); 192 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(paintRect));
193 if (recorder.canUseCachedDrawing()) 193 if (recorder.canUseCachedDrawing())
194 return; 194 return;
195 195
196 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutTableCell.styleRef( ), Normal); 196 BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutTableCell.styleRef( ), Normal);
197 197
(...skipping 23 matching lines...) Expand all
221 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior) 221 LayoutRect TableCellPainter::paintBounds(const LayoutPoint& paintOffset, PaintBo undOffsetBehavior paintBoundOffsetBehavior)
222 { 222 {
223 LayoutPoint adjustedPaintOffset = paintOffset; 223 LayoutPoint adjustedPaintOffset = paintOffset;
224 if (paintBoundOffsetBehavior == AddOffsetFromParent) 224 if (paintBoundOffsetBehavior == AddOffsetFromParent)
225 adjustedPaintOffset.moveBy(m_layoutTableCell.location()); 225 adjustedPaintOffset.moveBy(m_layoutTableCell.location());
226 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna ppedSize())); 226 return LayoutRect(adjustedPaintOffset, LayoutSize(m_layoutTableCell.pixelSna ppedSize()));
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
230 230
OLDNEW
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/style/BorderData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698