| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 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/SVGVKernElement.h" | 23 #include "core/svg/SVGVKernElement.h" |
| 24 | 24 |
| 25 #include "SVGNames.h" | 25 #include "SVGNames.h" |
| 26 #include "core/svg/SVGFontElement.h" | 26 #include "core/svg/SVGFontElement.h" |
| 27 #include "core/svg/SVGParserUtilities.h" | 27 #include "core/svg/SVGParserUtilities.h" |
| 28 | 28 |
| 29 namespace WebCore { | 29 namespace WebCore { |
| 30 | 30 |
| 31 inline SVGVKernElement::SVGVKernElement(const QualifiedName& tagName, Document&
document) | 31 inline SVGVKernElement::SVGVKernElement(Document& document) |
| 32 : SVGElement(tagName, document) | 32 : SVGElement(SVGNames::vkernTag, document) |
| 33 { | 33 { |
| 34 ASSERT(hasTagName(SVGNames::vkernTag)); | |
| 35 ScriptWrappable::init(this); | 34 ScriptWrappable::init(this); |
| 36 } | 35 } |
| 37 | 36 |
| 38 PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName
, Document& document) | 37 PassRefPtr<SVGVKernElement> SVGVKernElement::create(Document& document) |
| 39 { | 38 { |
| 40 return adoptRef(new SVGVKernElement(tagName, document)); | 39 return adoptRef(new SVGVKernElement(document)); |
| 41 } | 40 } |
| 42 | 41 |
| 43 Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode*
rootParent) | 42 Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode*
rootParent) |
| 44 { | 43 { |
| 45 if (rootParent->inDocument()) { | 44 if (rootParent->inDocument()) { |
| 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 | 49 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) | 74 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) |
| 76 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { | 75 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { |
| 77 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); | 76 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); |
| 78 kerningPairs.append(kerningPair); | 77 kerningPairs.append(kerningPair); |
| 79 } | 78 } |
| 80 } | 79 } |
| 81 | 80 |
| 82 } | 81 } |
| 83 | 82 |
| 84 #endif // ENABLE(SVG_FONTS) | 83 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |