OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 #include "config.h" | 23 #include "config.h" |
24 | 24 |
25 #if ENABLE(SVG_FONTS) | 25 #if ENABLE(SVG_FONTS) |
26 #include "core/svg/SVGAltGlyphElement.h" | 26 #include "core/svg/SVGAltGlyphElement.h" |
27 | 27 |
28 #include "SVGNames.h" | 28 #include "SVGNames.h" |
29 #include "XLinkNames.h" | 29 #include "XLinkNames.h" |
30 #include "bindings/v8/ExceptionState.h" | 30 #include "bindings/v8/ExceptionState.h" |
31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
32 #include "core/dom/NodeRenderingContext.h" | |
33 #include "core/rendering/svg/RenderSVGTSpan.h" | 32 #include "core/rendering/svg/RenderSVGTSpan.h" |
34 #include "core/svg/SVGAltGlyphDefElement.h" | 33 #include "core/svg/SVGAltGlyphDefElement.h" |
35 | 34 |
36 namespace WebCore { | 35 namespace WebCore { |
37 | 36 |
38 // Animated property definitions | 37 // Animated property definitions |
39 DEFINE_ANIMATED_STRING(SVGAltGlyphElement, XLinkNames::hrefAttr, Href, href) | 38 DEFINE_ANIMATED_STRING(SVGAltGlyphElement, XLinkNames::hrefAttr, Href, href) |
40 | 39 |
41 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAltGlyphElement) | 40 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAltGlyphElement) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
(...skipping 26 matching lines...) Expand all Loading... |
69 void SVGAltGlyphElement::setFormat(const AtomicString&, ExceptionState& es) | 68 void SVGAltGlyphElement::setFormat(const AtomicString&, ExceptionState& es) |
70 { | 69 { |
71 es.throwDOMException(NoModificationAllowedError); | 70 es.throwDOMException(NoModificationAllowedError); |
72 } | 71 } |
73 | 72 |
74 const AtomicString& SVGAltGlyphElement::format() const | 73 const AtomicString& SVGAltGlyphElement::format() const |
75 { | 74 { |
76 return fastGetAttribute(SVGNames::formatAttr); | 75 return fastGetAttribute(SVGNames::formatAttr); |
77 } | 76 } |
78 | 77 |
79 bool SVGAltGlyphElement::childShouldCreateRenderer(const NodeRenderingContext& c
hildContext) const | 78 bool SVGAltGlyphElement::childShouldCreateRenderer(const Node& child) const |
80 { | 79 { |
81 if (childContext.node()->isTextNode()) | 80 if (child.isTextNode()) |
82 return true; | 81 return true; |
83 return false; | 82 return false; |
84 } | 83 } |
85 | 84 |
86 RenderObject* SVGAltGlyphElement::createRenderer(RenderStyle*) | 85 RenderObject* SVGAltGlyphElement::createRenderer(RenderStyle*) |
87 { | 86 { |
88 return new RenderSVGTSpan(this); | 87 return new RenderSVGTSpan(this); |
89 } | 88 } |
90 | 89 |
91 bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const | 90 bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const |
(...skipping 11 matching lines...) Expand all Loading... |
103 if (element->hasTagName(SVGNames::altGlyphDefTag) | 102 if (element->hasTagName(SVGNames::altGlyphDefTag) |
104 && static_cast<SVGAltGlyphDefElement*>(element)->hasValidGlyphElements(g
lyphNames)) | 103 && static_cast<SVGAltGlyphDefElement*>(element)->hasValidGlyphElements(g
lyphNames)) |
105 return true; | 104 return true; |
106 | 105 |
107 return false; | 106 return false; |
108 } | 107 } |
109 | 108 |
110 } | 109 } |
111 | 110 |
112 #endif | 111 #endif |
OLD | NEW |