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

Unified Diff: Source/core/css/SVGCSSComputedStyleDeclaration.cpp

Issue 57643004: Pass RenderStyle / RenderObject by reference in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/css/CSSValuePool.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SVGCSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
index 5858b4813159fbf607418b5f3912bfff4f39f8e3..e55a966826ce088ff8be28acfc7d606ab8073d39 100644
--- a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
@@ -80,11 +80,11 @@ static PassRefPtr<CSSValue> paintOrderToCSSValueList(EPaintOrder paintorder)
return list.release();
}
-PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const
+PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle& style) const
{
RefPtr<SVGPaint> paint = newPaint;
if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR)
- paint->setColor(style->color());
+ paint->setColor(style.color());
return paint.release();
}
@@ -154,13 +154,13 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp
return CSSPrimitiveValue::create(svgStyle->filterResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyFloodColor:
- return currentColorOrValidColor(style, svgStyle->floodColor());
+ return currentColorOrValidColor(*style, svgStyle->floodColor());
case CSSPropertyLightingColor:
- return currentColorOrValidColor(style, svgStyle->lightingColor());
+ return currentColorOrValidColor(*style, svgStyle->lightingColor());
case CSSPropertyStopColor:
- return currentColorOrValidColor(style, svgStyle->stopColor());
+ return currentColorOrValidColor(*style, svgStyle->stopColor());
case CSSPropertyFill:
- return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->fillPaintType(), svgStyle->fillPaintUri(), svgStyle->fillPaintColor()), style);
+ return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->fillPaintType(), svgStyle->fillPaintUri(), svgStyle->fillPaintColor()), *style);
case CSSPropertyKerning:
return SVGLength::toCSSPrimitiveValue(svgStyle->kerning());
case CSSPropertyMarkerEnd:
@@ -176,7 +176,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp
return CSSPrimitiveValue::create(svgStyle->markerStartResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyStroke:
- return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->strokePaintType(), svgStyle->strokePaintUri(), svgStyle->strokePaintColor()), style);
+ return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->strokePaintType(), svgStyle->strokePaintUri(), svgStyle->strokePaintColor()), *style);
case CSSPropertyStrokeDasharray:
return strokeDashArrayToCSSValueList(svgStyle->strokeDashArray());
case CSSPropertyStrokeDashoffset:
« no previous file with comments | « Source/core/css/CSSValuePool.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698