diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/svg/SVGTextMetrics.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/rendering/svg/SVGTextMetrics.h')
-rw-r--r-- | Source/WebCore/rendering/svg/SVGTextMetrics.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/WebCore/rendering/svg/SVGTextMetrics.h b/Source/WebCore/rendering/svg/SVGTextMetrics.h index ba008c0ef..809629d0f 100644 --- a/Source/WebCore/rendering/svg/SVGTextMetrics.h +++ b/Source/WebCore/rendering/svg/SVGTextMetrics.h @@ -17,10 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGTextMetrics_h -#define SVGTextMetrics_h +#pragma once -#if ENABLE(SVG) #include <wtf/text/WTFString.h> namespace WebCore { @@ -31,16 +29,14 @@ class TextRun; class SVGTextMetrics { public: - enum MetricsType { - SkippedSpaceMetrics - }; + enum MetricsType { SkippedSpaceMetrics }; SVGTextMetrics(); - SVGTextMetrics(MetricsType); - SVGTextMetrics(RenderSVGInlineText*, unsigned position, unsigned length, float width, const String& glyphName); + explicit SVGTextMetrics(MetricsType); + SVGTextMetrics(RenderSVGInlineText&, unsigned length, float width); - static SVGTextMetrics measureCharacterRange(RenderSVGInlineText*, unsigned position, unsigned length); - static TextRun constructTextRun(RenderSVGInlineText*, const UChar* characters, unsigned position, unsigned length); + static SVGTextMetrics measureCharacterRange(RenderSVGInlineText&, unsigned position, unsigned length); + static TextRun constructTextRun(RenderSVGInlineText&, unsigned position = 0, unsigned length = std::numeric_limits<unsigned>::max()); bool isEmpty() const { return !m_width && !m_height && !m_glyph.isValid && m_length == 1; } @@ -72,7 +68,7 @@ public: const Glyph& glyph() const { return m_glyph; } private: - SVGTextMetrics(RenderSVGInlineText*, const TextRun&); + SVGTextMetrics(RenderSVGInlineText&, const TextRun&); float m_width; float m_height; @@ -81,6 +77,3 @@ private: }; } // namespace WebCore - -#endif // ENABLE(SVG) -#endif |