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

Unified Diff: Source/core/paint/SVGPaintContext.cpp

Issue 910083002: Constify and use LayoutStyle reference in layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined again Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/TableCellPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGPaintContext.cpp
diff --git a/Source/core/paint/SVGPaintContext.cpp b/Source/core/paint/SVGPaintContext.cpp
index 2302ed4a0cd29f874d8c9b740cfc2e46032a9a96..248703e4963d26bea67a092b948097207df6d426 100644
--- a/Source/core/paint/SVGPaintContext.cpp
+++ b/Source/core/paint/SVGPaintContext.cpp
@@ -110,13 +110,12 @@ void SVGPaintContext::applyCompositingIfNecessary()
if (m_object->isSVGRoot())
return;
- LayoutStyle* style = m_object->style();
- ASSERT(style);
- float opacity = style->opacity();
- bool hasBlendMode = style->hasBlendMode() && m_object->isBlendingAllowed();
+ const LayoutStyle& style = m_object->styleRef();
+ float opacity = style.opacity();
+ bool hasBlendMode = style.hasBlendMode() && m_object->isBlendingAllowed();
if (opacity < 1 || hasBlendMode) {
m_clipRecorder = adoptPtr(new FloatClipRecorder(*m_paintInfo.context, m_object->displayItemClient(), m_paintInfo.phase, m_object->paintInvalidationRectInLocalCoordinates()));
- WebBlendMode blendMode = hasBlendMode ? style->blendMode() : WebBlendModeNormal;
+ WebBlendMode blendMode = hasBlendMode ? style.blendMode() : WebBlendModeNormal;
CompositeOperator compositeOp = hasBlendMode ? CompositeSourceOver : m_paintInfo.context->compositeOperationDeprecated();
m_compositingRecorder = adoptPtr(new CompositingRecorder(m_paintInfo.context, m_object->displayItemClient(), compositeOp, blendMode, opacity, compositeOp));
}
« no previous file with comments | « Source/core/paint/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/TableCellPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698