| 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(const QualifiedName& tagName, Document&
document) |
| 32 : SVGElement(tagName, document) | 32 : SVGElement(tagName, document) |
| 33 { | 33 { |
| 34 ASSERT(hasTagName(SVGNames::vkernTag)); | 34 ASSERT(hasTagName(SVGNames::vkernTag)); |
| 35 ScriptWrappable::init(this); | 35 ScriptWrappable::init(this); |
| 36 } | 36 } |
| 37 | 37 |
| 38 PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName
, Document* document) | 38 PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName
, Document& document) |
| 39 { | 39 { |
| 40 return adoptRef(new SVGVKernElement(tagName, document)); | 40 return adoptRef(new SVGVKernElement(tagName, document)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode*
rootParent) | 43 Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode*
rootParent) |
| 44 { | 44 { |
| 45 if (rootParent->inDocument()) { | 45 if (rootParent->inDocument()) { |
| 46 ContainerNode* fontNode = parentNode(); | 46 ContainerNode* fontNode = parentNode(); |
| 47 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) | 47 if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
| 48 toSVGFontElement(fontNode)->invalidateGlyphCache(); | 48 toSVGFontElement(fontNode)->invalidateGlyphCache(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 75 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) | 75 && parseKerningUnicodeString(u1, kerningPair.unicodeRange1, kerningPair.
unicodeName1) |
| 76 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { | 76 && parseKerningUnicodeString(u2, kerningPair.unicodeRange2, kerningPair.
unicodeName2)) { |
| 77 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); | 77 kerningPair.kerning = fastGetAttribute(SVGNames::kAttr).string().toFloat
(); |
| 78 kerningPairs.append(kerningPair); | 78 kerningPairs.append(kerningPair); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 } | 82 } |
| 83 | 83 |
| 84 #endif // ENABLE(SVG_FONTS) | 84 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |