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 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 newString = newString->replace('\t', ' '); | 63 newString = newString->replace('\t', ' '); |
64 return newString.release(); | 64 return newString.release(); |
65 } | 65 } |
66 | 66 |
67 RenderSVGInlineText::RenderSVGInlineText(Node* n, PassRefPtr<StringImpl> string) | 67 RenderSVGInlineText::RenderSVGInlineText(Node* n, PassRefPtr<StringImpl> string) |
68 : RenderText(n, applySVGWhitespaceRules(string, false)) | 68 : RenderText(n, applySVGWhitespaceRules(string, false)) |
69 , m_scalingFactor(1) | 69 , m_scalingFactor(1) |
70 { | 70 { |
71 } | 71 } |
72 | 72 |
| 73 void RenderSVGInlineText::destroy() |
| 74 { |
| 75 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) |
| 76 textRenderer->setNeedsPositioningValuesUpdate(); |
| 77 |
| 78 RenderText::destroy(); |
| 79 } |
| 80 |
73 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle
* oldStyle) | 81 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle
* oldStyle) |
74 { | 82 { |
75 RenderText::styleDidChange(diff, oldStyle); | 83 RenderText::styleDidChange(diff, oldStyle); |
76 | 84 |
77 if (diff == StyleDifferenceLayout) { | 85 if (diff == StyleDifferenceLayout) { |
78 // The text metrics may be influenced by style changes. | 86 // The text metrics may be influenced by style changes. |
79 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAnce
stor(this)) | 87 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAnce
stor(this)) |
80 textRenderer->setNeedsPositioningValuesUpdate(); | 88 textRenderer->setNeedsPositioningValuesUpdate(); |
81 | 89 |
82 updateScaledFont(); | 90 updateScaledFont(); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 FontDescription fontDescription(style->fontDescription()); | 251 FontDescription fontDescription(style->fontDescription()); |
244 fontDescription.setComputedSize(fontDescription.computedSize() * scalingFact
or); | 252 fontDescription.setComputedSize(fontDescription.computedSize() * scalingFact
or); |
245 | 253 |
246 scaledFont = Font(fontDescription, 0, 0); | 254 scaledFont = Font(fontDescription, 0, 0); |
247 scaledFont.update(styleSelector->fontSelector()); | 255 scaledFont.update(styleSelector->fontSelector()); |
248 } | 256 } |
249 | 257 |
250 } | 258 } |
251 | 259 |
252 #endif // ENABLE(SVG) | 260 #endif // ENABLE(SVG) |
OLD | NEW |