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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; } | 42 const Vector<SVGTextMetrics>& metricsList() const { return m_metrics; } |
43 | 43 |
44 float scalingFactor() const { return m_scalingFactor; } | 44 float scalingFactor() const { return m_scalingFactor; } |
45 const Font& scaledFont() const { return m_scaledFont; } | 45 const Font& scaledFont() const { return m_scaledFont; } |
46 void updateScaledFont(); | 46 void updateScaledFont(); |
47 void updateMetricsList(bool& lastCharacterWasWhiteSpace); | 47 void updateMetricsList(bool& lastCharacterWasWhiteSpace); |
48 static void computeNewScaledFontForStyle(LayoutObject*, | 48 static void computeNewScaledFontForStyle(LayoutObject*, |
49 float& scalingFactor, | 49 float& scalingFactor, |
50 Font& scaledFont); | 50 Font& scaledFont); |
51 | 51 |
52 // Preserves floating point precision for the use in DRT. It knows how to roun
d and does a better job than enclosingIntRect. | 52 // Preserves floating point precision for the use in DRT. It knows how to |
| 53 // round and does a better job than enclosingIntRect. |
53 FloatRect floatLinesBoundingBox() const; | 54 FloatRect floatLinesBoundingBox() const; |
54 | 55 |
55 PassRefPtr<StringImpl> originalText() const override; | 56 PassRefPtr<StringImpl> originalText() const override; |
56 | 57 |
57 const char* name() const override { return "LayoutSVGInlineText"; } | 58 const char* name() const override { return "LayoutSVGInlineText"; } |
58 | 59 |
59 private: | 60 private: |
60 void setTextInternal(PassRefPtr<StringImpl>) override; | 61 void setTextInternal(PassRefPtr<StringImpl>) override; |
61 void styleDidChange(StyleDifference, const ComputedStyle*) override; | 62 void styleDidChange(StyleDifference, const ComputedStyle*) override; |
62 | 63 |
(...skipping 23 matching lines...) Expand all Loading... |
86 Font m_scaledFont; | 87 Font m_scaledFont; |
87 SVGCharacterDataMap m_characterDataMap; | 88 SVGCharacterDataMap m_characterDataMap; |
88 Vector<SVGTextMetrics> m_metrics; | 89 Vector<SVGTextMetrics> m_metrics; |
89 }; | 90 }; |
90 | 91 |
91 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); | 92 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); |
92 | 93 |
93 } // namespace blink | 94 } // namespace blink |
94 | 95 |
95 #endif // LayoutSVGInlineText_h | 96 #endif // LayoutSVGInlineText_h |
OLD | NEW |