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) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const | 54 PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() const |
55 { | 55 { |
56 RefPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(getAttribute(X
LinkNames::hrefAttr)); | 56 RefPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(getAttribute(X
LinkNames::hrefAttr)); |
57 AtomicString value(fastGetAttribute(formatAttr)); | 57 AtomicString value(fastGetAttribute(formatAttr)); |
58 src->setFormat(value.isEmpty() ? "svg" : value); // Default format | 58 src->setFormat(value.isEmpty() ? "svg" : value); // Default format |
59 return src.release(); | 59 return src.release(); |
60 } | 60 } |
61 | 61 |
62 void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const Atom
icString& value) | 62 void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const Atom
icString& value) |
63 { | 63 { |
64 if (name == XLinkNames::hrefAttr) | 64 if (name.matches(XLinkNames::hrefAttr)) |
65 loadFont(); | 65 loadFont(); |
66 else | 66 else |
67 SVGElement::parseAttribute(name, value); | 67 SVGElement::parseAttribute(name, value); |
68 } | 68 } |
69 | 69 |
70 void SVGFontFaceUriElement::childrenChanged(bool changedByParser, Node* beforeCh
ange, Node* afterChange, int childCountDelta) | 70 void SVGFontFaceUriElement::childrenChanged(bool changedByParser, Node* beforeCh
ange, Node* afterChange, int childCountDelta) |
71 { | 71 { |
72 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); | 72 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); |
73 | 73 |
74 if (!parentNode() || !parentNode()->hasTagName(font_face_srcTag)) | 74 if (!parentNode() || !parentNode()->hasTagName(font_face_srcTag)) |
(...skipping 25 matching lines...) Expand all Loading... |
100 m_resource->beginLoadIfNeeded(fetcher); | 100 m_resource->beginLoadIfNeeded(fetcher); |
101 } | 101 } |
102 } else { | 102 } else { |
103 m_resource = 0; | 103 m_resource = 0; |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 } | 107 } |
108 | 108 |
109 #endif // ENABLE(SVG_FONTS) | 109 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |