| Index: Source/core/rendering/svg/RenderSVGResourceContainer.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
|
| index bc3c0518e8a18dfcb02c4c250cb9a696ae0516a9..7dfe28e69040f3eef72e922b0e0f0ec1a54843f1 100644
|
| --- a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
|
| +++ b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
|
| @@ -235,6 +235,23 @@ void RenderSVGResourceContainer::registerResource()
|
| }
|
| }
|
|
|
| +static bool shouldTransformOnTextPainting(RenderObject* object, AffineTransform& resourceTransform)
|
| +{
|
| + ASSERT(object);
|
| +
|
| + // This method should only be called for RenderObjects that deal with text rendering. Cmp. RenderObject.h's is*() methods.
|
| + ASSERT(object->isSVGText() || object->isSVGTextPath() || object->isSVGInline());
|
| +
|
| + // In text drawing, the scaling part of the graphics context CTM is removed, compare SVGInlineTextBox::paintTextWithShadows.
|
| + // So, we use that scaling factor here, too, and then push it down to pattern or gradient space
|
| + // in order to keep the pattern or gradient correctly scaled.
|
| + float scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(object);
|
| + if (scalingFactor == 1)
|
| + return false;
|
| + resourceTransform.scale(scalingFactor);
|
| + return true;
|
| +}
|
| +
|
| AffineTransform RenderSVGResourceContainer::computeResourceSpaceTransform(RenderObject* object, const AffineTransform& baseTransform, const SVGRenderStyle* svgStyle, unsigned short resourceMode)
|
| {
|
| AffineTransform computedSpaceTransform = baseTransform;
|
| @@ -255,23 +272,6 @@ AffineTransform RenderSVGResourceContainer::computeResourceSpaceTransform(Render
|
| return computedSpaceTransform;
|
| }
|
|
|
| -bool RenderSVGResourceContainer::shouldTransformOnTextPainting(RenderObject* object, AffineTransform& resourceTransform)
|
| -{
|
| - ASSERT(object);
|
| -
|
| - // This method should only be called for RenderObjects that deal with text rendering. Cmp. RenderObject.h's is*() methods.
|
| - ASSERT(object->isSVGText() || object->isSVGTextPath() || object->isSVGInline());
|
| -
|
| - // In text drawing, the scaling part of the graphics context CTM is removed, compare SVGInlineTextBox::paintTextWithShadows.
|
| - // So, we use that scaling factor here, too, and then push it down to pattern or gradient space
|
| - // in order to keep the pattern or gradient correctly scaled.
|
| - float scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(object);
|
| - if (scalingFactor == 1)
|
| - return false;
|
| - resourceTransform.scale(scalingFactor);
|
| - return true;
|
| -}
|
| -
|
| // FIXME: This does not belong here.
|
| AffineTransform RenderSVGResourceContainer::transformOnNonScalingStroke(RenderObject* object, const AffineTransform& resourceTransform)
|
| {
|
|
|