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 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.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 11 matching lines...) Expand all Loading... |
22 #include "config.h" | 22 #include "config.h" |
23 | 23 |
24 #if ENABLE(SVG_FONTS) | 24 #if ENABLE(SVG_FONTS) |
25 #include "core/svg/SVGHKernElement.h" | 25 #include "core/svg/SVGHKernElement.h" |
26 | 26 |
27 #include "SVGNames.h" | 27 #include "SVGNames.h" |
28 #include "core/svg/SVGFontElement.h" | 28 #include "core/svg/SVGFontElement.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace WebCore { |
31 | 31 |
32 inline SVGHKernElement::SVGHKernElement(const QualifiedName& tagName, Document&
document) | 32 inline SVGHKernElement::SVGHKernElement(Document& document) |
33 : SVGElement(tagName, document) | 33 : SVGElement(SVGNames::hkernTag, document) |
34 { | 34 { |
35 ASSERT(hasTagName(SVGNames::hkernTag)); | |
36 ScriptWrappable::init(this); | 35 ScriptWrappable::init(this); |
37 } | 36 } |
38 | 37 |
39 PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName
, Document& document) | 38 PassRefPtr<SVGHKernElement> SVGHKernElement::create(Document& document) |
40 { | 39 { |
41 return adoptRef(new SVGHKernElement(tagName, document)); | 40 return adoptRef(new SVGHKernElement(document)); |
42 } | 41 } |
43 | 42 |
44 Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode*
rootParent) | 43 Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode*
rootParent) |
45 { | 44 { |
46 ContainerNode* fontNode = parentNode(); | 45 ContainerNode* fontNode = parentNode(); |
47 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) | 46 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
48 toSVGFontElement(fontNode)->invalidateGlyphCache(); | 47 toSVGFontElement(fontNode)->invalidateGlyphCache(); |
49 | 48 |
50 return SVGElement::insertedInto(rootParent); | 49 return SVGElement::insertedInto(rootParent); |
51 } | 50 } |
(...skipping 22 matching lines...) Expand all Loading... |
74 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) | 73 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) |
75 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { | 74 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { |
76 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); | 75 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); |
77 kerningPairs.append(kerningPair); | 76 kerningPairs.append(kerningPair); |
78 } | 77 } |
79 } | 78 } |
80 | 79 |
81 } | 80 } |
82 | 81 |
83 #endif // ENABLE(SVG_FONTS) | 82 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |