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

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

Issue 1107983003: SVG Text decoration 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-decoration-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 b6e2f150852b53880b12b3b681d0f9131ad04f11..24b99ad04279e55d81bce4f8994fb9fe1233b997 100644
--- a/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -278,13 +278,14 @@ void SVGInlineTextBoxPainter::paintDecoration(const PaintInfo& paintInfo, TextDe
break;
case PT_STROKE:
if (svgDecorationStyle.hasVisibleStroke()) {
- // FIXME: Non-scaling stroke is not applied here.
SkPaint strokePaint;
if (!SVGPaintContext::paintForLayoutObject(paintInfo, decorationStyle, *decorationRenderer, ApplyToStrokeMode, strokePaint))
break;
strokePaint.setAntiAlias(true);
StrokeData strokeData;
SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeData, decorationStyle, *decorationRenderer);
+ if (svgDecorationStyle.vectorEffect() == VE_NON_SCALING_STROKE)
+ strokeData.setThickness(strokeData.thickness() / scalingFactor);
strokeData.setupPaint(&strokePaint);
paintInfo.context->drawPath(path.skPath(), strokePaint);
}
« no previous file with comments | « LayoutTests/svg/stroke/non-scaling-stroke-text-decoration-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698