| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #if ENABLE(SVG_FONTS) | 24 #if ENABLE(SVG_FONTS) |
| 25 #include "core/svg/SVGGlyphElement.h" | 25 #include "core/svg/SVGGlyphElement.h" |
| 26 | 26 |
| 27 #include "SVGNames.h" | 27 #include "SVGNames.h" |
| 28 #include "core/svg/SVGFontData.h" | 28 #include "core/svg/SVGFontData.h" |
| 29 #include "core/svg/SVGFontElement.h" | 29 #include "core/svg/SVGFontElement.h" |
| 30 #include "core/svg/SVGPathUtilities.h" | 30 #include "core/svg/SVGPathUtilities.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 inline SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document&
document) | 34 inline SVGGlyphElement::SVGGlyphElement(Document& document) |
| 35 : SVGElement(tagName, document) | 35 : SVGElement(SVGNames::glyphTag, document) |
| 36 { | 36 { |
| 37 ASSERT(hasTagName(SVGNames::glyphTag)); | |
| 38 ScriptWrappable::init(this); | 37 ScriptWrappable::init(this); |
| 39 } | 38 } |
| 40 | 39 |
| 41 PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName
, Document& document) | 40 PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(Document& document) |
| 42 { | 41 { |
| 43 return adoptRef(new SVGGlyphElement(tagName, document)); | 42 return adoptRef(new SVGGlyphElement(document)); |
| 44 } | 43 } |
| 45 | 44 |
| 46 void SVGGlyphElement::invalidateGlyphCache() | 45 void SVGGlyphElement::invalidateGlyphCache() |
| 47 { | 46 { |
| 48 ContainerNode* fontNode = parentNode(); | 47 ContainerNode* fontNode = parentNode(); |
| 49 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) | 48 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
| 50 toSVGFontElement(fontNode)->invalidateGlyphCache(); | 49 toSVGFontElement(fontNode)->invalidateGlyphCache(); |
| 51 } | 50 } |
| 52 | 51 |
| 53 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) | 52 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 String language = fastGetAttribute(SVGNames::langAttr); | 157 String language = fastGetAttribute(SVGNames::langAttr); |
| 159 if (!language.isEmpty()) | 158 if (!language.isEmpty()) |
| 160 identifier.languages = parseDelimitedString(language, ','); | 159 identifier.languages = parseDelimitedString(language, ','); |
| 161 | 160 |
| 162 return identifier; | 161 return identifier; |
| 163 } | 162 } |
| 164 | 163 |
| 165 } | 164 } |
| 166 | 165 |
| 167 #endif // ENABLE(SVG_FONTS) | 166 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |