summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/SVGTextChunkBuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/svg/SVGTextChunkBuilder.h')
-rw-r--r--Source/WebCore/rendering/svg/SVGTextChunkBuilder.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/svg/SVGTextChunkBuilder.h b/Source/WebCore/rendering/svg/SVGTextChunkBuilder.h
index 321f3915f..7a7880a87 100644
--- a/Source/WebCore/rendering/svg/SVGTextChunkBuilder.h
+++ b/Source/WebCore/rendering/svg/SVGTextChunkBuilder.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -17,10 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGTextChunkBuilder_h
-#define SVGTextChunkBuilder_h
+#pragma once
-#if ENABLE(SVG)
#include "SVGTextChunk.h"
#include <wtf/Vector.h>
@@ -41,18 +40,13 @@ public:
SVGTextChunkBuilder();
const Vector<SVGTextChunk>& textChunks() const { return m_textChunks; }
- void transformationForTextBox(SVGInlineTextBox*, AffineTransform&) const;
+ unsigned totalCharacters() const;
+ float totalLength() const;
+ float totalAnchorShift() const;
+ AffineTransform transformationForTextBox(SVGInlineTextBox*) const;
- void buildTextChunks(Vector<SVGInlineTextBox*>& lineLayoutBoxes);
- void layoutTextChunks(Vector<SVGInlineTextBox*>& lineLayoutBoxes);
-
-private:
- void addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxes, unsigned boxPosition, unsigned boxCount);
- void processTextChunk(const SVGTextChunk&);
-
- void processTextLengthSpacingCorrection(bool isVerticalText, float textLengthShift, Vector<SVGTextFragment>&, unsigned& atCharacter);
- void processTextAnchorCorrection(bool isVerticalText, float textAnchorShift, Vector<SVGTextFragment>&);
- void buildSpacingAndGlyphsTransform(bool isVerticalText, float scale, const SVGTextFragment&, AffineTransform&);
+ void buildTextChunks(const Vector<SVGInlineTextBox*>& lineLayoutBoxes);
+ void layoutTextChunks(const Vector<SVGInlineTextBox*>& lineLayoutBoxes);
private:
Vector<SVGTextChunk> m_textChunks;
@@ -60,6 +54,3 @@ private:
};
} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif