OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 bool startsNewTextChunk() const { return m_startsNewTextChunk; } | 59 bool startsNewTextChunk() const { return m_startsNewTextChunk; } |
60 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } | 60 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } |
61 | 61 |
62 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; | 62 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; |
63 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); | 63 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); |
64 | 64 |
65 private: | 65 private: |
66 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; | 66 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; |
67 | 67 |
68 bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderO
bject*, | |
69 RenderStyle*, RenderSVGResourceModeFlags); | |
70 void releasePaintingResource(GraphicsContext*&, const Path*, RenderSVGResour
ceModeFlags); | |
71 | |
72 bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingF
actor, TextRun&, | |
73 RenderStyle*, RenderSVGResourceModeFlags); | |
74 void restoreGraphicsContextAfterTextPainting(GraphicsContext*&, TextRun&, Re
nderSVGResourceModeFlags); | |
75 | |
76 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment
&); | 68 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment
&); |
77 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTex
tFragment&, | 69 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTex
tFragment&, |
78 RenderObject* decorationRenderer, RenderSVGResourceModeFlags); | 70 RenderObject* decorationRenderer, RenderSVGResourceModeFlags); |
79 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SV
GTextFragment&, | 71 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SV
GTextFragment&, |
80 int startPosition, int endPosition, RenderSVGResourceModeFlags); | 72 int startPosition, int endPosition, RenderSVGResourceModeFlags); |
81 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle,
const SVGTextFragment&, | 73 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle,
const SVGTextFragment&, |
82 RenderSVGResourceModeFlags, bool hasSelection, bool paintSelectedTextOnl
y); | 74 RenderSVGResourceModeFlags, bool hasSelection, bool paintSelectedTextOnl
y); |
83 | 75 |
84 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; | 76 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; |
85 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; | 77 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; |
86 | 78 |
87 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; | 79 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; |
88 | 80 |
89 private: | 81 private: |
90 float m_logicalHeight; | 82 float m_logicalHeight; |
91 bool m_startsNewTextChunk : 1; | 83 bool m_startsNewTextChunk : 1; |
92 RenderSVGResource* m_paintingResource; | |
93 Vector<SVGTextFragment> m_textFragments; | 84 Vector<SVGTextFragment> m_textFragments; |
94 }; | 85 }; |
95 | 86 |
96 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); | 87 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); |
97 | 88 |
98 } // namespace blink | 89 } // namespace blink |
99 | 90 |
100 #endif // SVGInlineTextBox_h | 91 #endif // SVGInlineTextBox_h |
OLD | NEW |