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

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

Issue 1072403010: SVG Text should respect non-scaling-stroke. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 8 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 | « LayoutTests/svg/stroke/non-scaling-stroke-text-expected.html ('k') | no next file » | 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 b0e2f49342daccfdbb9d95434cc44b782d375f07..e6d47bc8838cbe5175f2c2ee45e8923703fb68f9 100644
--- a/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -329,7 +329,6 @@ void SVGInlineTextBoxPainter::paintTextWithShadows(const PaintInfo& paintInfo, c
additionalPaintServerTransform = &paintServerTransform;
}
- // FIXME: Non-scaling stroke is not applied here.
SkPaint paint;
if (!SVGPaintContext::paintForLayoutObject(paintInfo, style, m_svgInlineTextBox.parent()->layoutObject(), resourceMode, paint, additionalPaintServerTransform))
return;
@@ -344,7 +343,8 @@ void SVGInlineTextBoxPainter::paintTextWithShadows(const PaintInfo& paintInfo, c
if (resourceMode == ApplyToStrokeMode) {
StrokeData strokeData;
SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeData, style, m_svgInlineTextBox.parent()->layoutObject());
- strokeData.setThickness(strokeData.thickness() * scalingFactor);
+ if (style.svgStyle().vectorEffect() != VE_NON_SCALING_STROKE)
+ strokeData.setThickness(strokeData.thickness() * scalingFactor);
strokeData.setupPaint(&paint);
}
« no previous file with comments | « LayoutTests/svg/stroke/non-scaling-stroke-text-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698