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

Side by Side Diff: Source/core/layout/svg/LayoutSVGInlineText.h

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInline.h ('k') | Source/core/layout/svg/LayoutSVGModelObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2008 Rob Buis <buis@kde.org>
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 25 matching lines...) Expand all
36 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; } 36 const SVGTextLayoutAttributes* layoutAttributes() const { return &m_layoutAt tributes; }
37 37
38 float scalingFactor() const { return m_scalingFactor; } 38 float scalingFactor() const { return m_scalingFactor; }
39 const Font& scaledFont() const { return m_scaledFont; } 39 const Font& scaledFont() const { return m_scaledFont; }
40 void updateScaledFont(); 40 void updateScaledFont();
41 static void computeNewScaledFontForStyle(LayoutObject*, const ComputedStyle* , float& scalingFactor, Font& scaledFont); 41 static void computeNewScaledFontForStyle(LayoutObject*, const ComputedStyle* , float& scalingFactor, Font& scaledFont);
42 42
43 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect. 43 // Preserves floating point precision for the use in DRT. It knows how to ro und and does a better job than enclosingIntRect.
44 FloatRect floatLinesBoundingBox() const; 44 FloatRect floatLinesBoundingBox() const;
45 45
46 virtual PassRefPtr<StringImpl> originalText() const override; 46 PassRefPtr<StringImpl> originalText() const override;
47 47
48 virtual const char* name() const override { return "LayoutSVGInlineText"; } 48 const char* name() const override { return "LayoutSVGInlineText"; }
49 49
50 private: 50 private:
51 virtual void setTextInternal(PassRefPtr<StringImpl>) override; 51 void setTextInternal(PassRefPtr<StringImpl>) override;
52 virtual void styleDidChange(StyleDifference, const ComputedStyle*) override; 52 void styleDidChange(StyleDifference, const ComputedStyle*) override;
53 53
54 virtual FloatRect objectBoundingBox() const override { return floatLinesBoun dingBox(); } 54 FloatRect objectBoundingBox() const override { return floatLinesBoundingBox( ); }
55 55
56 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || type == LayoutObjectSVGInlineText || LayoutText::isOfType(ty pe); } 56 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectSVG || type == LayoutObjectSVGInlineText || LayoutText::isOfType(type); }
57 57
58 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; 58 PositionWithAffinity positionForPoint(const LayoutPoint&) override;
59 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = nullptr) override; 59 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt hToEndOfLine = nullptr) override;
60 virtual IntRect linesBoundingBox() const override; 60 IntRect linesBoundingBox() const override;
61 virtual InlineTextBox* createTextBox(int start, unsigned short length) overr ide; 61 InlineTextBox* createTextBox(int start, unsigned short length) override;
62 62
63 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState*) const over ride final; 63 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer, const PaintInvalidationState*) const final;
64 64
65 float m_scalingFactor; 65 float m_scalingFactor;
66 Font m_scaledFont; 66 Font m_scaledFont;
67 SVGTextLayoutAttributes m_layoutAttributes; 67 SVGTextLayoutAttributes m_layoutAttributes;
68 }; 68 };
69 69
70 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); 70 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText());
71 71
72 class SVGInlineTextMetricsIterator { 72 class SVGInlineTextMetricsIterator {
73 public: 73 public:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 const LayoutSVGInlineText* m_textLayoutObject; 119 const LayoutSVGInlineText* m_textLayoutObject;
120 unsigned m_metricsListOffset; 120 unsigned m_metricsListOffset;
121 unsigned m_characterOffset; 121 unsigned m_characterOffset;
122 }; 122 };
123 123
124 } 124 }
125 125
126 #endif // LayoutSVGInlineText_h 126 #endif // LayoutSVGInlineText_h
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInline.h ('k') | Source/core/layout/svg/LayoutSVGModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698