Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: Source/core/rendering/svg/SVGInlineTextBox.h

Issue 14093017: Add FINAL decorators to the InlineBox class hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 24
25 #if ENABLE(SVG) 25 #if ENABLE(SVG)
26 #include "InlineTextBox.h" 26 #include "InlineTextBox.h"
27 #include "SVGTextLayoutEngine.h" 27 #include "SVGTextLayoutEngine.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class RenderSVGResource; 31 class RenderSVGResource;
32 class SVGRootInlineBox; 32 class SVGRootInlineBox;
33 33
34 class SVGInlineTextBox : public InlineTextBox { 34 class SVGInlineTextBox FINAL : public InlineTextBox {
35 public: 35 public:
36 SVGInlineTextBox(RenderObject*); 36 SVGInlineTextBox(RenderObject*);
37 37
38 virtual bool isSVGInlineTextBox() const { return true; } 38 virtual bool isSVGInlineTextBox() const { return true; }
39 39
40 virtual float virtualLogicalHeight() const { return m_logicalHeight; } 40 virtual float virtualLogicalHeight() const { return m_logicalHeight; }
41 void setLogicalHeight(float height) { m_logicalHeight = height; } 41 void setLogicalHeight(float height) { m_logicalHeight = height; }
42 42
43 virtual int selectionTop() { return top(); } 43 virtual int selectionTop() { return top(); }
44 virtual int selectionHeight() { return static_cast<int>(ceilf(m_logicalHeigh t)); } 44 virtual int selectionHeight() { return static_cast<int>(ceilf(m_logicalHeigh t)); }
45 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con st; 45 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con st;
46 virtual float positionForOffset(int offset) const; 46 virtual float positionForOffset(int offset) const;
47 47
48 void paintSelectionBackground(PaintInfo&); 48 void paintSelectionBackground(PaintInfo&);
49 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou tUnit lineBottom); 49 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou tUnit lineBottom);
50 virtual LayoutRect localSelectionRect(int startPosition, int endPosition); 50 virtual LayoutRect localSelectionRect(int startPosition, int endPosition);
51 51
52 bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&, int & startPosition, int& endPosition) const; 52 bool mapStartEndPositionsIntoFragmentCoordinates(const SVGTextFragment&, int & startPosition, int& endPosition) const;
53 53
54 virtual FloatRect calculateBoundaries() const; 54 virtual FloatRect calculateBoundaries() const;
55 55
56 void clearTextFragments() { m_textFragments.clear(); } 56 void clearTextFragments() { m_textFragments.clear(); }
57 Vector<SVGTextFragment>& textFragments() { return m_textFragments; } 57 Vector<SVGTextFragment>& textFragments() { return m_textFragments; }
58 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment s; } 58 const Vector<SVGTextFragment>& textFragments() const { return m_textFragment s; }
59 59
60 void dirtyLineBoxes() OVERRIDE; 60 virtual void dirtyLineBoxes() OVERRIDE;
61 61
62 bool startsNewTextChunk() const { return m_startsNewTextChunk; } 62 bool startsNewTextChunk() const { return m_startsNewTextChunk; }
63 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe xtChunk; } 63 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTe xtChunk; }
64 64
65 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool includePartialGlyphs) const; 65 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool includePartialGlyphs) const;
66 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS tartPosition, int fragmentEndPosition, RenderStyle*); 66 FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentS tartPosition, int fragmentEndPosition, RenderStyle*);
67 67
68 private: 68 private:
69 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const; 69 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const;
70 70
(...skipping 15 matching lines...) Expand all
86 unsigned m_paintingResourceMode : 4; 86 unsigned m_paintingResourceMode : 4;
87 unsigned m_startsNewTextChunk : 1; 87 unsigned m_startsNewTextChunk : 1;
88 RenderSVGResource* m_paintingResource; 88 RenderSVGResource* m_paintingResource;
89 Vector<SVGTextFragment> m_textFragments; 89 Vector<SVGTextFragment> m_textFragments;
90 }; 90 };
91 91
92 } // namespace WebCore 92 } // namespace WebCore
93 93
94 #endif 94 #endif
95 #endif // SVGInlineTextBox_h 95 #endif // SVGInlineTextBox_h
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGInlineFlowBox.h ('k') | Source/core/rendering/svg/SVGRootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698