summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/SVGTextQuery.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/svg/SVGTextQuery.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/svg/SVGTextQuery.h')
-rw-r--r--Source/WebCore/rendering/svg/SVGTextQuery.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/WebCore/rendering/svg/SVGTextQuery.h b/Source/WebCore/rendering/svg/SVGTextQuery.h
index bf60a6da6..3f09a76c9 100644
--- a/Source/WebCore/rendering/svg/SVGTextQuery.h
+++ b/Source/WebCore/rendering/svg/SVGTextQuery.h
@@ -17,12 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGTextQuery_h
-#define SVGTextQuery_h
+#pragma once
-#if ENABLE(SVG)
#include "FloatRect.h"
-#include "SVGPoint.h"
#include "SVGTextFragment.h"
#include <wtf/Vector.h>
@@ -39,11 +36,11 @@ public:
unsigned numberOfCharacters() const;
float textLength() const;
float subStringLength(unsigned startPosition, unsigned length) const;
- SVGPoint startPositionOfCharacter(unsigned position) const;
- SVGPoint endPositionOfCharacter(unsigned position) const;
+ FloatPoint startPositionOfCharacter(unsigned position) const;
+ FloatPoint endPositionOfCharacter(unsigned position) const;
float rotationOfCharacter(unsigned position) const;
FloatRect extentOfCharacter(unsigned position) const;
- int characterNumberAtPosition(const SVGPoint&) const;
+ int characterNumberAtPosition(const FloatPoint&) const;
// Public helper struct. Private classes in SVGTextQuery inherit from it.
struct Data;
@@ -53,8 +50,8 @@ private:
bool executeQuery(Data*, ProcessTextFragmentCallback) const;
void collectTextBoxesInFlowBox(InlineFlowBox*);
- bool mapStartEndPositionsIntoFragmentCoordinates(Data*, const SVGTextFragment&, int& startPosition, int& endPosition) const;
- void modifyStartEndPositionsRespectingLigatures(Data*, int& startPosition, int& endPosition) const;
+ bool mapStartEndPositionsIntoFragmentCoordinates(Data*, const SVGTextFragment&, unsigned& startPosition, unsigned& endPosition) const;
+ void modifyStartEndPositionsRespectingLigatures(Data*, unsigned& startPosition, unsigned& endPosition) const;
private:
bool numberOfCharactersCallback(Data*, const SVGTextFragment&) const;
@@ -70,7 +67,4 @@ private:
Vector<SVGInlineTextBox*> m_textBoxes;
};
-}
-
-#endif
-#endif
+} // namespace WebCore