| 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 22 matching lines...) Expand all Loading... |
| 33 SVGInlineTextBox(RenderObject&); | 33 SVGInlineTextBox(RenderObject&); |
| 34 | 34 |
| 35 virtual bool isSVGInlineTextBox() const OVERRIDE { return true; } | 35 virtual bool isSVGInlineTextBox() const OVERRIDE { return true; } |
| 36 | 36 |
| 37 virtual float virtualLogicalHeight() const OVERRIDE { return m_logicalHeight
; } | 37 virtual float virtualLogicalHeight() const OVERRIDE { return m_logicalHeight
; } |
| 38 void setLogicalHeight(float height) { m_logicalHeight = height; } | 38 void setLogicalHeight(float height) { m_logicalHeight = height; } |
| 39 | 39 |
| 40 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con
st OVERRIDE; | 40 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con
st OVERRIDE; |
| 41 virtual float positionForOffset(int offset) const OVERRIDE; | 41 virtual float positionForOffset(int offset) const OVERRIDE; |
| 42 | 42 |
| 43 void paintSelectionBackground(PaintInfo&); | |
| 44 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom) OVERRIDE; | 43 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom) OVERRIDE; |
| 45 virtual LayoutRect localSelectionRect(int startPosition, int endPosition) OV
ERRIDE; | 44 virtual LayoutRect localSelectionRect(int startPosition, int endPosition) OV
ERRIDE; |
| 46 | 45 |
| 47 bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&, int
& startPosition, int& endPosition) const; | 46 bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&, int
& startPosition, int& endPosition) const; |
| 48 | 47 |
| 49 virtual FloatRect calculateBoundaries() const OVERRIDE; | 48 virtual FloatRect calculateBoundaries() const OVERRIDE; |
| 50 | 49 |
| 51 void clearTextFragments() { m_textFragments.clear(); } | 50 void clearTextFragments() { m_textFragments.clear(); } |
| 52 Vector<SVGTextFragment>& textFragments() { return m_textFragments; } | 51 Vector<SVGTextFragment>& textFragments() { return m_textFragments; } |
| 53 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment
s; } | 52 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment
s; } |
| 54 | 53 |
| 55 virtual void dirtyLineBoxes() OVERRIDE; | 54 virtual void dirtyLineBoxes() OVERRIDE; |
| 56 | 55 |
| 57 bool startsNewTextChunk() const { return m_startsNewTextChunk; } | 56 bool startsNewTextChunk() const { return m_startsNewTextChunk; } |
| 58 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } | 57 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe
xtChunk; } |
| 59 | 58 |
| 60 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; | 59 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool
includePartialGlyphs) const; |
| 60 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); |
| 61 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; | |
| 64 | |
| 65 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment
&); | |
| 66 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTex
tFragment&, | |
| 67 RenderObject* decorationRenderer, RenderSVGResourceModeFlags); | |
| 68 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SV
GTextFragment&, | |
| 69 int startPosition, int endPosition, RenderSVGResourceModeFlags); | |
| 70 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle,
const SVGTextFragment&, | |
| 71 RenderSVGResourceModeFlags, bool hasSelection, bool paintSelectedTextOnl
y); | |
| 72 | 64 |
| 73 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; | 65 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint&, Docume
ntMarker*, RenderStyle*, const Font&, bool) OVERRIDE FINAL; |
| 74 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; | 66 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, RenderStyle*, const Font&) OVERRIDE FINAL; |
| 75 | 67 |
| 76 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; | 68 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; |
| 77 | 69 |
| 78 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS
tartPosition, int fragmentEndPosition, RenderStyle*); | |
| 79 | |
| 80 private: | 70 private: |
| 81 float m_logicalHeight; | 71 float m_logicalHeight; |
| 82 bool m_startsNewTextChunk : 1; | 72 bool m_startsNewTextChunk : 1; |
| 83 Vector<SVGTextFragment> m_textFragments; | 73 Vector<SVGTextFragment> m_textFragments; |
| 84 }; | 74 }; |
| 85 | 75 |
| 86 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); | 76 DEFINE_INLINE_BOX_TYPE_CASTS(SVGInlineTextBox); |
| 87 | 77 |
| 88 } // namespace blink | 78 } // namespace blink |
| 89 | 79 |
| 90 #endif // SVGInlineTextBox_h | 80 #endif // SVGInlineTextBox_h |
| OLD | NEW |