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

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

Issue 234453002: Remove SVG1.1 kerning property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations updates Created 6 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 | « Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h ('k') | Source/core/svg/SVGAttributeNames.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
index 39683386a79e18f7194c3d6f3fbc7cbf18e08e61..846c43ecf668a984342c6fee8c6d3eac88a7ce93 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
@@ -21,7 +21,6 @@
#include "core/rendering/svg/SVGTextLayoutEngineSpacing.h"
-#include "core/rendering/style/SVGRenderStyle.h"
#include "core/svg/SVGLengthContext.h"
#include "platform/fonts/Character.h"
#include "platform/fonts/Font.h"
@@ -83,24 +82,15 @@ float SVGTextLayoutEngineSpacing::calculateSVGKerning(bool isVerticalText, Glyph
#endif
}
-float SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing(const SVGRenderStyle* style, SVGElement* contextElement, UChar currentCharacter)
+float SVGTextLayoutEngineSpacing::calculateCSSSpacing(UChar currentCharacter)
{
- float kerning = 0;
- RefPtr<SVGLength> kerningLength = style->kerning();
- if (kerningLength->unitType() == LengthTypePercentage)
- kerning = kerningLength->valueAsPercentage() * m_font.fontDescription().computedPixelSize();
- else {
- SVGLengthContext lengthContext(contextElement);
- kerning = kerningLength->value(lengthContext);
- }
-
UChar lastCharacter = m_lastCharacter;
m_lastCharacter = currentCharacter;
- if (!kerning && !m_font.fontDescription().letterSpacing() && !m_font.fontDescription().wordSpacing())
+ if (!m_font.fontDescription().letterSpacing() && !m_font.fontDescription().wordSpacing())
return 0;
- float spacing = m_font.fontDescription().letterSpacing() + kerning;
+ float spacing = m_font.fontDescription().letterSpacing();
if (currentCharacter && lastCharacter && m_font.fontDescription().wordSpacing()) {
if (Character::treatAsSpace(currentCharacter) && !Character::treatAsSpace(lastCharacter))
spacing += m_font.fontDescription().wordSpacing();
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h ('k') | Source/core/svg/SVGAttributeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698