Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 | 40 |
| 41 PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName , Document* document) | 41 PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName , Document* document) |
| 42 { | 42 { |
| 43 return adoptRef(new SVGGlyphElement(tagName, document)); | 43 return adoptRef(new SVGGlyphElement(tagName, document)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void SVGGlyphElement::invalidateGlyphCache() | 46 void SVGGlyphElement::invalidateGlyphCache() |
| 47 { | 47 { |
| 48 ContainerNode* fontNode = parentNode(); | 48 ContainerNode* fontNode = parentNode(); |
| 49 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) { | 49 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) { |
| 50 if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode)) | 50 if (SVGFontElement* element = toSVGFontElement(fontNode)) |
|
tkent
2013/07/06 06:14:37
Because fontNode is non-null, element never be nul
| |
| 51 element->invalidateGlyphCache(); | 51 element->invalidateGlyphCache(); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value) | 55 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value) |
| 56 { | 56 { |
| 57 if (name == SVGNames::dAttr) | 57 if (name == SVGNames::dAttr) |
| 58 invalidateGlyphCache(); | 58 invalidateGlyphCache(); |
| 59 else | 59 else |
| 60 SVGStyledElement::parseAttribute(name, value); | 60 SVGStyledElement::parseAttribute(name, value); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 String language = fastGetAttribute(SVGNames::langAttr); | 160 String language = fastGetAttribute(SVGNames::langAttr); |
| 161 if (!language.isEmpty()) | 161 if (!language.isEmpty()) |
| 162 identifier.languages = parseDelimitedString(language, ','); | 162 identifier.languages = parseDelimitedString(language, ','); |
| 163 | 163 |
| 164 return identifier; | 164 return identifier; |
| 165 } | 165 } |
| 166 | 166 |
| 167 } | 167 } |
| 168 | 168 |
| 169 #endif // ENABLE(SVG_FONTS) | 169 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |