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

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

Issue 868743002: Use SkXfermode::Mode in code related to Image. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 5 years, 11 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/SVGImagePainter.cpp ('k') | Source/core/svg/graphics/SVGImage.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/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/RenderDrawingRecorder.h" 10 #include "core/paint/RenderDrawingRecorder.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (bgLayer.hasImage() || c.alpha()) { 204 if (bgLayer.hasImage() || c.alpha()) {
205 // We have to clip here because the background would paint 205 // We have to clip here because the background would paint
206 // on top of the borders otherwise. This only matters for cells and row s. 206 // on top of the borders otherwise. This only matters for cells and row s.
207 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == & m_renderTableCell || backgroundObject == m_renderTableCell.parent()) && tableElt ->collapseBorders(); 207 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == & m_renderTableCell || backgroundObject == m_renderTableCell.parent()) && tableElt ->collapseBorders();
208 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip); 208 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip);
209 if (shouldClip) { 209 if (shouldClip) {
210 LayoutRect clipRect(paintRect.location(), m_renderTableCell.size()); 210 LayoutRect clipRect(paintRect.location(), m_renderTableCell.size());
211 clipRect.expand(m_renderTableCell.borderInsets()); 211 clipRect.expand(m_renderTableCell.borderInsets());
212 paintInfo.context->clip(clipRect); 212 paintInfo.context->clip(clipRect);
213 } 213 }
214 BoxPainter(m_renderTableCell).paintFillLayers(paintInfo, c, bgLayer, pai ntRect, BackgroundBleedNone, CompositeSourceOver, backgroundObject); 214 BoxPainter(m_renderTableCell).paintFillLayers(paintInfo, c, bgLayer, pai ntRect, BackgroundBleedNone, SkXfermode::kSrcOver_Mode, backgroundObject);
215 } 215 }
216 } 216 }
217 217
218 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) 218 void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
219 { 219 {
220 if (!paintInfo.shouldPaintWithinRoot(&m_renderTableCell)) 220 if (!paintInfo.shouldPaintWithinRoot(&m_renderTableCell))
221 return; 221 return;
222 222
223 RenderTable* tableElt = m_renderTableCell.table(); 223 RenderTable* tableElt = m_renderTableCell.table();
224 if (!tableElt->collapseBorders() && m_renderTableCell.style()->emptyCells() == HIDE && !m_renderTableCell.firstChild()) 224 if (!tableElt->collapseBorders() && m_renderTableCell.style()->emptyCells() == HIDE && !m_renderTableCell.firstChild())
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_renderTableCell.location()); 261 adjustedPaintOffset.moveBy(m_renderTableCell.location());
262 return LayoutRect(adjustedPaintOffset, LayoutSize(m_renderTableCell.pixelSna ppedSize())); 262 return LayoutRect(adjustedPaintOffset, LayoutSize(m_renderTableCell.pixelSna ppedSize()));
263 } 263 }
264 264
265 } // namespace blink 265 } // namespace blink
266 266
OLDNEW
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698