| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void clearTextFragments() { m_textFragments.clear(); } | 51 void clearTextFragments() { m_textFragments.clear(); } |
| 52 Vector<SVGTextFragment>& textFragments() { return m_textFragments; } | 52 Vector<SVGTextFragment>& textFragments() { return m_textFragments; } |
| 53 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment
s; } | 53 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment
s; } |
| 54 | 54 |
| 55 virtual void dirtyLineBoxes() OVERRIDE; | 55 virtual void dirtyLineBoxes() OVERRIDE; |
| 56 | 56 |
| 57 bool startsNewTextChunk() const { return m_startsNewTextChunk; } | 57 bool startsNewTextChunk() const { return m_startsNewTextChunk; } |
| 58 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } | 58 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } |
| 59 | 59 |
| 60 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; | 60 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; |
| 61 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); | |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; | 63 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; |
| 65 | 64 |
| 66 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment
&); | 65 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment
&); |
| 67 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTex
tFragment&, | 66 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTex
tFragment&, |
| 68 RenderObject* decorationRenderer, RenderSVGResourceModeFlags); | 67 RenderObject* decorationRenderer, RenderSVGResourceModeFlags); |
| 69 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SV
GTextFragment&, | 68 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SV
GTextFragment&, |
| 70 int startPosition, int endPosition, RenderSVGResourceModeFlags); | 69 int startPosition, int endPosition, RenderSVGResourceModeFlags); |
| 71 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle,
const SVGTextFragment&, | 70 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle,
const SVGTextFragment&, |
| 72 RenderSVGResourceModeFlags, bool hasSelection, bool paintSelectedTextOnl
y); | 71 RenderSVGResourceModeFlags, bool hasSelection, bool paintSelectedTextOnl
y); |
| 73 | 72 |
| 74 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; | 73 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; |
| 75 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; | 74 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; |
| 76 | 75 |
| 77 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; | 76 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; |
| 78 | 77 |
| 78 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); |
| 79 |
| 79 private: | 80 private: |
| 80 float m_logicalHeight; | 81 float m_logicalHeight; |
| 81 bool m_startsNewTextChunk : 1; | 82 bool m_startsNewTextChunk : 1; |
| 82 Vector<SVGTextFragment> m_textFragments; | 83 Vector<SVGTextFragment> m_textFragments; |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); | 86 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); |
| 86 | 87 |
| 87 } // namespace blink | 88 } // namespace blink |
| 88 | 89 |
| 89 #endif // SVGInlineTextBox_h | 90 #endif // SVGInlineTextBox_h |
| OLD | NEW |