OLD | NEW |
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 Loading... |
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(RenderObject*, const RenderStyle*,
float& scalingFactor, Font& scaledFont); | 41 static void computeNewScaledFontForStyle(RenderObject*, const RenderStyle*,
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; |
| 47 |
46 private: | 48 private: |
47 virtual const char* renderName() const override { return "RenderSVGInlineTex
t"; } | 49 virtual const char* renderName() const override { return "RenderSVGInlineTex
t"; } |
48 | 50 |
49 virtual void setTextInternal(PassRefPtr<StringImpl>) override; | 51 virtual void setTextInternal(PassRefPtr<StringImpl>) override; |
50 virtual void styleDidChange(StyleDifference, const RenderStyle*) override; | 52 virtual void styleDidChange(StyleDifference, const RenderStyle*) override; |
51 | 53 |
52 virtual FloatRect objectBoundingBox() const override { return floatLinesBoun
dingBox(); } | 54 virtual FloatRect objectBoundingBox() const override { return floatLinesBoun
dingBox(); } |
53 | 55 |
54 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectSVG || type == RenderObjectSVGInlineText || RenderText::isOfType(ty
pe); } | 56 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectSVG || type == RenderObjectSVGInlineText || RenderText::isOfType(ty
pe); } |
55 | 57 |
56 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 58 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
57 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override; | 59 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override; |
58 virtual IntRect linesBoundingBox() const override; | 60 virtual IntRect linesBoundingBox() const override; |
59 virtual InlineTextBox* createTextBox(int start, unsigned short length) overr
ide; | 61 virtual InlineTextBox* createTextBox(int start, unsigned short length) overr
ide; |
60 | 62 |
61 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState*) const ov
erride final; | 63 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState*) const ov
erride final; |
62 | 64 |
63 float m_scalingFactor; | 65 float m_scalingFactor; |
64 Font m_scaledFont; | 66 Font m_scaledFont; |
65 SVGTextLayoutAttributes m_layoutAttributes; | 67 SVGTextLayoutAttributes m_layoutAttributes; |
66 }; | 68 }; |
67 | 69 |
68 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGInlineText, isSVGInlineText()); | 70 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGInlineText, isSVGInlineText()); |
69 | 71 |
70 } | 72 } |
71 | 73 |
72 #endif // RenderSVGInlineText_h | 74 #endif // RenderSVGInlineText_h |
OLD | NEW |