| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 #if ENABLE(SVG_FONTS) | 22 #if ENABLE(SVG_FONTS) |
| 23 #include "core/svg/SVGGlyphRefElement.h" | 23 #include "core/svg/SVGGlyphRefElement.h" |
| 24 | 24 |
| 25 #include "XLinkNames.h" | 25 #include "XLinkNames.h" |
| 26 #include "core/svg/SVGParserUtilities.h" | 26 #include "core/svg/SVGParserUtilities.h" |
| 27 #include "wtf/text/AtomicString.h" | 27 #include "wtf/text/AtomicString.h" |
| 28 | 28 |
| 29 namespace WebCore { | 29 namespace WebCore { |
| 30 | 30 |
| 31 SVGGlyphRefElement::SVGGlyphRefElement(Document& document) | 31 inline SVGGlyphRefElement::SVGGlyphRefElement(Document& document) |
| 32 : SVGElement(SVGNames::glyphRefTag, document) | 32 : SVGElement(SVGNames::glyphRefTag, document) |
| 33 , SVGURIReference(this) | 33 , SVGURIReference(this) |
| 34 , m_x(0) | 34 , m_x(0) |
| 35 , m_y(0) | 35 , m_y(0) |
| 36 , m_dx(0) | 36 , m_dx(0) |
| 37 , m_dy(0) | 37 , m_dy(0) |
| 38 { | 38 { |
| 39 ScriptWrappable::init(this); | 39 ScriptWrappable::init(this); |
| 40 } | 40 } |
| 41 | 41 |
| 42 DEFINE_NODE_FACTORY(SVGGlyphRefElement) |
| 43 |
| 42 bool SVGGlyphRefElement::hasValidGlyphElement(AtomicString& glyphName) const | 44 bool SVGGlyphRefElement::hasValidGlyphElement(AtomicString& glyphName) const |
| 43 { | 45 { |
| 44 // FIXME: We only support xlink:href so far. | 46 // FIXME: We only support xlink:href so far. |
| 45 // https://bugs.webkit.org/show_bug.cgi?id=64787 | 47 // https://bugs.webkit.org/show_bug.cgi?id=64787 |
| 46 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA
ttr), document(), &glyphName); | 48 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA
ttr), document(), &glyphName); |
| 47 return isSVGGlyphElement(element); | 49 return isSVGGlyphElement(element); |
| 48 } | 50 } |
| 49 | 51 |
| 50 template<typename CharType> | 52 template<typename CharType> |
| 51 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const
AtomicString& value) | 53 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const
AtomicString& value) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void SVGGlyphRefElement::setDy(float dy) | 115 void SVGGlyphRefElement::setDy(float dy) |
| 114 { | 116 { |
| 115 // FIXME: Honor attribute change. | 117 // FIXME: Honor attribute change. |
| 116 // https://bugs.webkit.org/show_bug.cgi?id=64787 | 118 // https://bugs.webkit.org/show_bug.cgi?id=64787 |
| 117 m_dy = dy; | 119 m_dy = dy; |
| 118 } | 120 } |
| 119 | 121 |
| 120 } | 122 } |
| 121 | 123 |
| 122 #endif | 124 #endif |
| OLD | NEW |