diff options
author | Steve Block <steveblock@google.com> | 2010-02-15 12:23:52 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:32 +0000 |
commit | 8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch) | |
tree | 73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/rendering/SVGCharacterLayoutInfo.h | |
parent | bf14be70295513b8076f3fa47a268a7e42b2c478 (diff) | |
download | external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2 |
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/rendering/SVGCharacterLayoutInfo.h')
-rw-r--r-- | WebCore/rendering/SVGCharacterLayoutInfo.h | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/WebCore/rendering/SVGCharacterLayoutInfo.h b/WebCore/rendering/SVGCharacterLayoutInfo.h index fb29110..f80c79c 100644 --- a/WebCore/rendering/SVGCharacterLayoutInfo.h +++ b/WebCore/rendering/SVGCharacterLayoutInfo.h @@ -24,15 +24,15 @@ #define SVGCharacterLayoutInfo_h #if ENABLE(SVG) +#include "AffineTransform.h" +#include "SVGRenderStyle.h" +#include "SVGTextContentElement.h" + #include <wtf/Assertions.h> #include <wtf/HashMap.h> #include <wtf/HashSet.h> -#include <wtf/Vector.h> - -#include "TransformationMatrix.h" #include <wtf/RefCounted.h> -#include "SVGRenderStyle.h" -#include "SVGTextContentElement.h" +#include <wtf/Vector.h> namespace WebCore { @@ -234,7 +234,7 @@ struct SVGChar { // Helper methods bool isHidden() const; - TransformationMatrix characterTransform() const; + AffineTransform characterTransform() const; }; struct SVGInlineBoxCharacterRange { @@ -275,7 +275,7 @@ struct SVGTextChunk { // textLength & lengthAdjust support float textLength; ELengthAdjust lengthAdjust; - TransformationMatrix ctm; + AffineTransform ctm; // status flags bool isVerticalText : 1; @@ -291,7 +291,7 @@ struct SVGTextChunk { struct SVGTextChunkWalkerBase { virtual ~SVGTextChunkWalkerBase() { } - virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm, + virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm, const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end) = 0; // Followings methods are only used for painting text chunks @@ -300,7 +300,9 @@ struct SVGTextChunkWalkerBase { virtual bool setupBackground(InlineBox*) = 0; virtual bool setupFill(InlineBox*) = 0; + virtual bool setupFillSelection(InlineBox*) = 0; virtual bool setupStroke(InlineBox*) = 0; + virtual bool setupStrokeSelection(InlineBox*) = 0; virtual bool setupForeground(InlineBox*) = 0; }; @@ -309,7 +311,7 @@ struct SVGTextChunkWalker : public SVGTextChunkWalkerBase { public: typedef void (CallbackClass::*SVGTextChunkWalkerCallback)(SVGInlineTextBox* textBox, int startOffset, - const TransformationMatrix& chunkCtm, + const AffineTransform& chunkCtm, const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end); @@ -328,7 +330,9 @@ public: SVGTextChunkEndCallback end = 0, SVGTextChunkSetupBackgroundCallback background = 0, SVGTextChunkSetupFillCallback fill = 0, + SVGTextChunkSetupFillCallback fillSelection = 0, SVGTextChunkSetupStrokeCallback stroke = 0, + SVGTextChunkSetupStrokeCallback strokeSelection = 0, SVGTextChunkSetupForegroundCallback foreground = 0) : m_object(object) , m_walkerCallback(walker) @@ -336,14 +340,16 @@ public: , m_endCallback(end) , m_setupBackgroundCallback(background) , m_setupFillCallback(fill) + , m_setupFillSelectionCallback(fillSelection) , m_setupStrokeCallback(stroke) + , m_setupStrokeSelectionCallback(strokeSelection) , m_setupForegroundCallback(foreground) { ASSERT(object); ASSERT(walker); } - virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm, + virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm, const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end) { (*m_object.*m_walkerCallback)(textBox, startOffset, chunkCtm, start, end); @@ -384,6 +390,15 @@ public: return false; } + virtual bool setupFillSelection(InlineBox* box) + { + if (m_setupFillSelectionCallback) + return (*m_object.*m_setupFillSelectionCallback)(box); + + ASSERT_NOT_REACHED(); + return false; + } + virtual bool setupStroke(InlineBox* box) { if (m_setupStrokeCallback) @@ -393,6 +408,15 @@ public: return false; } + virtual bool setupStrokeSelection(InlineBox* box) + { + if (m_setupStrokeSelectionCallback) + return (*m_object.*m_setupStrokeSelectionCallback)(box); + + ASSERT_NOT_REACHED(); + return false; + } + virtual bool setupForeground(InlineBox* box) { if (m_setupForegroundCallback) @@ -409,7 +433,9 @@ private: SVGTextChunkEndCallback m_endCallback; SVGTextChunkSetupBackgroundCallback m_setupBackgroundCallback; SVGTextChunkSetupFillCallback m_setupFillCallback; + SVGTextChunkSetupFillCallback m_setupFillSelectionCallback; SVGTextChunkSetupStrokeCallback m_setupStrokeCallback; + SVGTextChunkSetupStrokeCallback m_setupStrokeSelectionCallback; SVGTextChunkSetupForegroundCallback m_setupForegroundCallback; }; |