From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/rendering/svg/SVGTextMetrics.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'Source/WebCore/rendering/svg/SVGTextMetrics.h') 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 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::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 -- cgit v1.2.1