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

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

Issue 655263002: Let the paint-server client compute and pass any additional transform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | « no previous file | Source/core/rendering/svg/RenderSVGResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/Source/core/paint/SVGInlineTextBoxPainter.cpp b/Source/core/paint/SVGInlineTextBoxPainter.cpp
index da2841d3565ff09c7ddcfeeeb6f7bb5eac261e54..1d59b20f6cc3dbd4f283141f1d229533c7db604c 100644
--- a/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -273,6 +273,7 @@ void SVGInlineTextBoxPainter::paintDecoration(GraphicsContext* context, TextDeco
break;
case PT_STROKE:
if (svgDecorationStyle.hasVisibleStroke()) {
+ // FIXME: Non-scaling stroke is not applied here.
fs 2014/10/15 15:42:11 This FIXME and the one below just document pre-exi
GraphicsContextStateSaver stateSaver(*context, false);
if (!SVGRenderSupport::updateGraphicsContext(stateSaver, decorationStyle, *decorationRenderer, ApplyToStrokeMode))
break;
@@ -304,6 +305,8 @@ void SVGInlineTextBoxPainter::paintTextWithShadows(GraphicsContext* context, Ren
FloatPoint textOrigin(fragment.x, fragment.y);
FloatSize textSize(fragment.width, fragment.height);
+ AffineTransform paintServerTransform;
+ const AffineTransform* additionalPaintServerTransform = 0;
GraphicsContextStateSaver stateSaver(*context, false);
if (scalingFactor != 1) {
@@ -311,9 +314,14 @@ void SVGInlineTextBoxPainter::paintTextWithShadows(GraphicsContext* context, Ren
textSize.scale(scalingFactor);
stateSaver.save();
context->scale(1 / scalingFactor, 1 / scalingFactor);
+ // Adjust the paint-server coordinate space.
+ paintServerTransform.scale(scalingFactor);
+ additionalPaintServerTransform = &paintServerTransform;
}
- if (!SVGRenderSupport::updateGraphicsContext(stateSaver, style, m_svgInlineTextBox.parent()->renderer(), resourceMode | ApplyToTextMode))
+ // FIXME: Non-scaling stroke is not applied here.
+
+ if (!SVGRenderSupport::updateGraphicsContext(stateSaver, style, m_svgInlineTextBox.parent()->renderer(), resourceMode, additionalPaintServerTransform))
return;
if (hasShadow) {
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698