OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "bindings/core/v8/ExceptionMessages.h" | 24 #include "bindings/core/v8/ExceptionMessages.h" |
25 #include "bindings/core/v8/ExceptionState.h" | 25 #include "bindings/core/v8/ExceptionState.h" |
26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 26 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
27 #include "core/CSSPropertyNames.h" | 27 #include "core/CSSPropertyNames.h" |
28 #include "core/CSSValueKeywords.h" | 28 #include "core/CSSValueKeywords.h" |
29 #include "core/SVGNames.h" | 29 #include "core/SVGNames.h" |
30 #include "core/XMLNames.h" | 30 #include "core/XMLNames.h" |
31 #include "core/editing/FrameSelection.h" | 31 #include "core/editing/FrameSelection.h" |
32 #include "core/frame/LocalFrame.h" | 32 #include "core/frame/LocalFrame.h" |
33 #include "core/rendering/RenderObject.h" | 33 #include "core/rendering/RenderObject.h" |
34 #include "core/rendering/svg/RenderSVGResource.h" | |
35 #include "core/rendering/svg/SVGTextQuery.h" | 34 #include "core/rendering/svg/SVGTextQuery.h" |
36 | 35 |
37 namespace blink { | 36 namespace blink { |
38 | 37 |
39 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGLengthAd
justType>() | 38 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGLengthAd
justType>() |
40 { | 39 { |
41 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
42 if (entries.isEmpty()) { | 41 if (entries.isEmpty()) { |
43 entries.append(std::make_pair(SVGLengthAdjustSpacing, "spacing")); | 42 entries.append(std::make_pair(SVGLengthAdjustSpacing, "spacing")); |
44 entries.append(std::make_pair(SVGLengthAdjustSpacingAndGlyphs, "spacingA
ndGlyphs")); | 43 entries.append(std::make_pair(SVGLengthAdjustSpacingAndGlyphs, "spacingA
ndGlyphs")); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 SVGGraphicsElement::svgAttributeChanged(attrName); | 235 SVGGraphicsElement::svgAttributeChanged(attrName); |
237 return; | 236 return; |
238 } | 237 } |
239 | 238 |
240 if (attrName == SVGNames::textLengthAttr) | 239 if (attrName == SVGNames::textLengthAttr) |
241 m_textLengthIsSpecifiedByUser = true; | 240 m_textLengthIsSpecifiedByUser = true; |
242 | 241 |
243 SVGElement::InvalidationGuard invalidationGuard(this); | 242 SVGElement::InvalidationGuard invalidationGuard(this); |
244 | 243 |
245 if (RenderObject* renderer = this->renderer()) | 244 if (RenderObject* renderer = this->renderer()) |
246 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); | 245 markForLayoutAndParentResourceInvalidation(renderer); |
247 } | 246 } |
248 | 247 |
249 bool SVGTextContentElement::selfHasRelativeLengths() const | 248 bool SVGTextContentElement::selfHasRelativeLengths() const |
250 { | 249 { |
251 // Any element of the <text> subtree is advertized as using relative lengths
. | 250 // Any element of the <text> subtree is advertized as using relative lengths
. |
252 // On any window size change, we have to relayout the text subtree, as the | 251 // On any window size change, we have to relayout the text subtree, as the |
253 // effective 'on-screen' font size may change. | 252 // effective 'on-screen' font size may change. |
254 return true; | 253 return true; |
255 } | 254 } |
256 | 255 |
257 SVGTextContentElement* SVGTextContentElement::elementFromRenderer(RenderObject*
renderer) | 256 SVGTextContentElement* SVGTextContentElement::elementFromRenderer(RenderObject*
renderer) |
258 { | 257 { |
259 if (!renderer) | 258 if (!renderer) |
260 return 0; | 259 return 0; |
261 | 260 |
262 if (!renderer->isSVGText() && !renderer->isSVGInline()) | 261 if (!renderer->isSVGText() && !renderer->isSVGInline()) |
263 return 0; | 262 return 0; |
264 | 263 |
265 SVGElement* element = toSVGElement(renderer->node()); | 264 SVGElement* element = toSVGElement(renderer->node()); |
266 ASSERT(element); | 265 ASSERT(element); |
267 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element)
: 0; | 266 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element)
: 0; |
268 } | 267 } |
269 | 268 |
270 } | 269 } |
OLD | NEW |