| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Leo Yang <leoyang@webkit.org> | 2 * Copyright (C) 2011 Leo Yang <leoyang@webkit.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/svg/SVGParserUtilities.h" | 27 #include "core/svg/SVGParserUtilities.h" |
| 28 #include "wtf/text/AtomicString.h" | 28 #include "wtf/text/AtomicString.h" |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 // Animated property definitions | 32 // Animated property definitions |
| 33 DEFINE_ANIMATED_STRING(SVGGlyphRefElement, XLinkNames::hrefAttr, Href, href) | 33 DEFINE_ANIMATED_STRING(SVGGlyphRefElement, XLinkNames::hrefAttr, Href, href) |
| 34 | 34 |
| 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGlyphRefElement) | 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGlyphRefElement) |
| 36 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 36 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
| 37 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement) | 37 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
| 38 END_REGISTER_ANIMATED_PROPERTIES | 38 END_REGISTER_ANIMATED_PROPERTIES |
| 39 | 39 |
| 40 inline SVGGlyphRefElement::SVGGlyphRefElement(const QualifiedName& tagName, Docu
ment* document) | 40 inline SVGGlyphRefElement::SVGGlyphRefElement(const QualifiedName& tagName, Docu
ment* document) |
| 41 : SVGStyledElement(tagName, document) | 41 : SVGElement(tagName, document) |
| 42 , m_x(0) | 42 , m_x(0) |
| 43 , m_y(0) | 43 , m_y(0) |
| 44 , m_dx(0) | 44 , m_dx(0) |
| 45 , m_dy(0) | 45 , m_dy(0) |
| 46 { | 46 { |
| 47 ASSERT(hasTagName(SVGNames::glyphRefTag)); | 47 ASSERT(hasTagName(SVGNames::glyphRefTag)); |
| 48 ScriptWrappable::init(this); | 48 ScriptWrappable::init(this); |
| 49 registerAnimatedPropertiesForSVGGlyphRefElement(); | 49 registerAnimatedPropertiesForSVGGlyphRefElement(); |
| 50 } | 50 } |
| 51 | 51 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 75 parseNumber(ptr, end, m_x); | 75 parseNumber(ptr, end, m_x); |
| 76 } else if (name == SVGNames::yAttr) { | 76 } else if (name == SVGNames::yAttr) { |
| 77 parseNumber(ptr, end, m_y); | 77 parseNumber(ptr, end, m_y); |
| 78 } else if (name == SVGNames::dxAttr) { | 78 } else if (name == SVGNames::dxAttr) { |
| 79 parseNumber(ptr, end, m_dx); | 79 parseNumber(ptr, end, m_dx); |
| 80 } else if (name == SVGNames::dyAttr) { | 80 } else if (name == SVGNames::dyAttr) { |
| 81 parseNumber(ptr, end, m_dy); | 81 parseNumber(ptr, end, m_dy); |
| 82 } else { | 82 } else { |
| 83 if (SVGURIReference::parseAttribute(name, value)) | 83 if (SVGURIReference::parseAttribute(name, value)) |
| 84 return; | 84 return; |
| 85 SVGStyledElement::parseAttribute(name, value); | 85 SVGElement::parseAttribute(name, value); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 void SVGGlyphRefElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | 89 void SVGGlyphRefElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) |
| 90 { | 90 { |
| 91 if (value.isEmpty() || value.is8Bit()) | 91 if (value.isEmpty() || value.is8Bit()) |
| 92 parseAttributeInternal<LChar>(name, value); | 92 parseAttributeInternal<LChar>(name, value); |
| 93 else | 93 else |
| 94 parseAttributeInternal<UChar>(name, value); | 94 parseAttributeInternal<UChar>(name, value); |
| 95 } | 95 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 void SVGGlyphRefElement::setDy(float dy) | 129 void SVGGlyphRefElement::setDy(float dy) |
| 130 { | 130 { |
| 131 // FIXME: Honor attribute change. | 131 // FIXME: Honor attribute change. |
| 132 // https://bugs.webkit.org/show_bug.cgi?id=64787 | 132 // https://bugs.webkit.org/show_bug.cgi?id=64787 |
| 133 m_dy = dy; | 133 m_dy = dy; |
| 134 } | 134 } |
| 135 | 135 |
| 136 } | 136 } |
| 137 | 137 |
| 138 #endif | 138 #endif |
| OLD | NEW |