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

Unified Diff: Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp

Issue 861213003: Fix problems with flakes in SVG LayoutTests by reordering arithmetic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rephrased comment. Created 5 years, 11 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/filters/parent-children-with-same-filter-expected.txt ('k') | Source/core/svg/SVGLength.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp b/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp
index dceefe5d35b9c7392718ccf28cc0581d732afc70..57c963fd83c7a70eac48c7da7617df66dd4a8c7d 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp
@@ -40,7 +40,7 @@ float SVGTextLayoutEngineBaseline::calculateBaselineShift(const SVGRenderStyle&
if (style.baselineShift() == BS_LENGTH) {
RefPtrWillBeRawPtr<SVGLength> baselineShiftValueLength = style.baselineShiftValue();
if (baselineShiftValueLength->unitType() == LengthTypePercentage)
- return baselineShiftValueLength->valueAsPercentage() * m_font.fontDescription().computedPixelSize();
+ return baselineShiftValueLength->scaleByPercentage(m_font.fontDescription().computedPixelSize());
SVGLengthContext lengthContext(contextElement);
return baselineShiftValueLength->value(lengthContext);
« no previous file with comments | « LayoutTests/svg/filters/parent-children-with-same-filter-expected.txt ('k') | Source/core/svg/SVGLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698