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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 SVGFontFaceUriElement::~SVGFontFaceUriElement() | 44 SVGFontFaceUriElement::~SVGFontFaceUriElement() |
45 { | 45 { |
46 if (m_resource) | 46 if (m_resource) |
47 m_resource->removeClient(this); | 47 m_resource->removeClient(this); |
48 } | 48 } |
49 | 49 |
50 PassRefPtrWillBeRawPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() co
nst | 50 PassRefPtrWillBeRawPtr<CSSFontFaceSrcValue> SVGFontFaceUriElement::srcValue() co
nst |
51 { | 51 { |
52 RefPtrWillBeRawPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(ge
tAttribute(XLinkNames::hrefAttr)); | 52 RefPtrWillBeRawPtr<CSSFontFaceSrcValue> src = CSSFontFaceSrcValue::create(ge
tAttribute(XLinkNames::hrefAttr)); |
53 AtomicString value(fastGetAttribute(formatAttr)); | 53 AtomicString value(fastGetAttribute(formatAttr)); |
54 src->setFormat(value.isEmpty() ? "svg" : value); // Default format | 54 src->setFormat(value.isEmpty() ? AtomicString("svg", AtomicString::Construct
FromLiteral) : value); // Default format |
55 return src.release(); | 55 return src.release(); |
56 } | 56 } |
57 | 57 |
58 void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const Atom
icString& value) | 58 void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const Atom
icString& value) |
59 { | 59 { |
60 if (name.matches(XLinkNames::hrefAttr)) | 60 if (name.matches(XLinkNames::hrefAttr)) |
61 loadFont(); | 61 loadFont(); |
62 else | 62 else |
63 SVGElement::parseAttribute(name, value); | 63 SVGElement::parseAttribute(name, value); |
64 } | 64 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 m_resource->beginLoadIfNeeded(fetcher); | 96 m_resource->beginLoadIfNeeded(fetcher); |
97 } | 97 } |
98 } else { | 98 } else { |
99 m_resource = 0; | 99 m_resource = 0; |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 } | 103 } |
104 | 104 |
105 #endif // ENABLE(SVG_FONTS) | 105 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |