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

Unified Diff: Source/core/svg/SVGLengthContext.cpp

Issue 18421006: Resolve em units against the specified font size in SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/zoom/text/zoom-em-units-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/svg/SVGLengthContext.cpp
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp
index 42416b12f084b4f3339ec114eb351e9cd4943321..b7fc72c632e87a1fa4580ff39690fc14d9a6804a 100644
--- a/Source/core/svg/SVGLengthContext.cpp
+++ b/Source/core/svg/SVGLengthContext.cpp
@@ -228,7 +228,7 @@ float SVGLengthContext::convertValueFromUserUnitsToEMS(float value, ExceptionCod
return 0;
}
- float fontSize = style->fontSize();
+ float fontSize = style->specifiedFontSize();
if (!fontSize) {
ec = NotSupportedError;
return 0;
@@ -245,7 +245,7 @@ float SVGLengthContext::convertValueFromEMSToUserUnits(float value, ExceptionCod
return 0;
}
- return value * style->fontSize();
+ return value * style->specifiedFontSize();
}
float SVGLengthContext::convertValueFromUserUnitsToEXS(float value, ExceptionCode& ec) const
« no previous file with comments | « LayoutTests/svg/zoom/text/zoom-em-units-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698