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

Unified Diff: Source/core/layout/svg/SVGLayoutSupport.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 9 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/layout/svg/SVGLayoutSupport.h ('k') | Source/core/layout/svg/SVGLayoutTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/SVGLayoutSupport.cpp
diff --git a/Source/core/layout/svg/SVGLayoutSupport.cpp b/Source/core/layout/svg/SVGLayoutSupport.cpp
index bacfbef928ae3ec30777f6f9355905eec0e297c2..53171e2894cdc0e9d6e5ed58ae1f191a56058c18 100644
--- a/Source/core/layout/svg/SVGLayoutSupport.cpp
+++ b/Source/core/layout/svg/SVGLayoutSupport.cpp
@@ -348,7 +348,7 @@ bool SVGLayoutSupport::transformToUserSpaceAndCheckClipping(LayoutObject* object
return pointInClippingArea(object, localPoint);
}
-DashArray SVGLayoutSupport::resolveSVGDashArray(const SVGDashArray& svgDashArray, const LayoutStyle& style, const SVGLengthContext& lengthContext)
+DashArray SVGLayoutSupport::resolveSVGDashArray(const SVGDashArray& svgDashArray, const ComputedStyle& style, const SVGLengthContext& lengthContext)
{
DashArray dashArray;
for (const Length& dashLength : svgDashArray.vector())
@@ -356,12 +356,12 @@ DashArray SVGLayoutSupport::resolveSVGDashArray(const SVGDashArray& svgDashArray
return dashArray;
}
-void SVGLayoutSupport::applyStrokeStyleToContext(GraphicsContext& context, const LayoutStyle& style, const LayoutObject& object)
+void SVGLayoutSupport::applyStrokeStyleToContext(GraphicsContext& context, const ComputedStyle& style, const LayoutObject& object)
{
ASSERT(object.node());
ASSERT(object.node()->isSVGElement());
- const SVGLayoutStyle& svgStyle = style.svgStyle();
+ const SVGComputedStyle& svgStyle = style.svgStyle();
SVGLengthContext lengthContext(toSVGElement(object.node()));
context.setStrokeThickness(lengthContext.valueForLength(svgStyle.strokeWidth()));
@@ -373,12 +373,12 @@ void SVGLayoutSupport::applyStrokeStyleToContext(GraphicsContext& context, const
context.setLineDash(dashArray, lengthContext.valueForLength(svgStyle.strokeDashOffset(), style));
}
-void SVGLayoutSupport::applyStrokeStyleToStrokeData(StrokeData& strokeData, const LayoutStyle& style, const LayoutObject& object)
+void SVGLayoutSupport::applyStrokeStyleToStrokeData(StrokeData& strokeData, const ComputedStyle& style, const LayoutObject& object)
{
ASSERT(object.node());
ASSERT(object.node()->isSVGElement());
- const SVGLayoutStyle& svgStyle = style.svgStyle();
+ const SVGComputedStyle& svgStyle = style.svgStyle();
SVGLengthContext lengthContext(toSVGElement(object.node()));
strokeData.setThickness(lengthContext.valueForLength(svgStyle.strokeWidth()));
@@ -390,7 +390,7 @@ void SVGLayoutSupport::applyStrokeStyleToStrokeData(StrokeData& strokeData, cons
strokeData.setLineDash(dashArray, lengthContext.valueForLength(svgStyle.strokeDashOffset(), style));
}
-bool SVGLayoutSupport::updateGraphicsContext(const PaintInfo& paintInfo, GraphicsContextStateSaver& stateSaver, const LayoutStyle& style, LayoutObject& layoutObject, LayoutSVGResourceMode resourceMode, const AffineTransform* additionalPaintServerTransform)
+bool SVGLayoutSupport::updateGraphicsContext(const PaintInfo& paintInfo, GraphicsContextStateSaver& stateSaver, const ComputedStyle& style, LayoutObject& layoutObject, LayoutSVGResourceMode resourceMode, const AffineTransform* additionalPaintServerTransform)
{
ASSERT(paintInfo.context == stateSaver.context());
@@ -398,7 +398,7 @@ bool SVGLayoutSupport::updateGraphicsContext(const PaintInfo& paintInfo, Graphic
if (paintInfo.isRenderingClipPathAsMaskImage()) {
if (resourceMode == ApplyToStrokeMode)
return false;
- context.setFillColor(SVGLayoutStyle::initialFillPaintColor());
+ context.setFillColor(SVGComputedStyle::initialFillPaintColor());
return true;
}
@@ -409,7 +409,7 @@ bool SVGLayoutSupport::updateGraphicsContext(const PaintInfo& paintInfo, Graphic
if (additionalPaintServerTransform && paintServer.isTransformDependent())
paintServer.prependTransform(*additionalPaintServerTransform);
- const SVGLayoutStyle& svgStyle = style.svgStyle();
+ const SVGComputedStyle& svgStyle = style.svgStyle();
float paintAlpha = resourceMode == ApplyToFillMode ? svgStyle.fillOpacity() : svgStyle.strokeOpacity();
paintServer.apply(context, resourceMode, paintAlpha, stateSaver);
@@ -428,9 +428,9 @@ bool SVGLayoutSupport::isLayoutableTextNode(const LayoutObject* object)
return object->isSVGInlineText() && !toLayoutSVGInlineText(object)->hasEmptyText();
}
-bool SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(const LayoutStyle& style)
+bool SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(const ComputedStyle& style)
{
- const SVGLayoutStyle& svgStyle = style.svgStyle();
+ const SVGComputedStyle& svgStyle = style.svgStyle();
return style.hasIsolation() || style.opacity() < 1 || style.hasBlendMode()
|| svgStyle.hasFilter() || svgStyle.hasMasker() || svgStyle.hasClipper();
« no previous file with comments | « Source/core/layout/svg/SVGLayoutSupport.h ('k') | Source/core/layout/svg/SVGLayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698