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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 void RenderSVGInlineText::setTextInternal(PassRefPtr<StringImpl> text) | 93 void RenderSVGInlineText::setTextInternal(PassRefPtr<StringImpl> text) |
94 { | 94 { |
95 RenderText::setTextInternal(text); | 95 RenderText::setTextInternal(text); |
96 | 96 |
97 // When the underlying text content changes, call both textDOMChanged() & la
youtAttributesChanged() | 97 // When the underlying text content changes, call both textDOMChanged() & la
youtAttributesChanged() |
98 // The former will clear the SVGTextPositioningElement cache, which depends
on the textLength() of | 98 // The former will clear the SVGTextPositioningElement cache, which depends
on the textLength() of |
99 // the RenderSVGInlineText objects, and thus needs to be rebuild. The latter
will assure that the | 99 // the RenderSVGInlineText objects, and thus needs to be rebuild. The latter
will assure that the |
100 // SVGTextLayoutAttributes associated with the RenderSVGInlineText will be u
pdated. | 100 // SVGTextLayoutAttributes associated with the RenderSVGInlineText will be u
pdated. |
101 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) { | 101 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(this)) { |
102 textRenderer->textDOMChanged(); | 102 textRenderer->invalidateTextPositioningElements(); |
103 textRenderer->layoutAttributesChanged(this); | 103 textRenderer->layoutAttributesChanged(this); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle
* oldStyle) | 107 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle
* oldStyle) |
108 { | 108 { |
109 RenderText::styleDidChange(diff, oldStyle); | 109 RenderText::styleDidChange(diff, oldStyle); |
110 updateScaledFont(); | 110 updateScaledFont(); |
111 | 111 |
112 bool newPreserves = style() ? style()->whiteSpace() == PRE : false; | 112 bool newPreserves = style() ? style()->whiteSpace() == PRE : false; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 FontDescription fontDescription(style->fontDescription()); | 269 FontDescription fontDescription(style->fontDescription()); |
270 fontDescription.setComputedSize(CSSStyleSelector::getComputedSizeFromSpecifi
edSize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescriptio
n.computedSize(), DoNotUseSmartMinimumForFontSize)); | 270 fontDescription.setComputedSize(CSSStyleSelector::getComputedSizeFromSpecifi
edSize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescriptio
n.computedSize(), DoNotUseSmartMinimumForFontSize)); |
271 | 271 |
272 scaledFont = Font(fontDescription, 0, 0); | 272 scaledFont = Font(fontDescription, 0, 0); |
273 scaledFont.update(styleSelector->fontSelector()); | 273 scaledFont.update(styleSelector->fontSelector()); |
274 } | 274 } |
275 | 275 |
276 } | 276 } |
277 | 277 |
278 #endif // ENABLE(SVG) | 278 #endif // ENABLE(SVG) |
OLD | NEW |