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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 void SVGFontFaceUriElement::loadFont() | 92 void SVGFontFaceUriElement::loadFont() |
93 { | 93 { |
94 if (m_cachedFont) | 94 if (m_cachedFont) |
95 m_cachedFont->removeClient(this); | 95 m_cachedFont->removeClient(this); |
96 | 96 |
97 const AtomicString& href = getAttribute(XLinkNames::hrefAttr); | 97 const AtomicString& href = getAttribute(XLinkNames::hrefAttr); |
98 if (!href.isNull()) { | 98 if (!href.isNull()) { |
99 CachedResourceLoader* cachedResourceLoader = document()->cachedResourceL
oader(); | 99 CachedResourceLoader* cachedResourceLoader = document()->cachedResourceL
oader(); |
100 CachedResourceRequest request(ResourceRequest(document()->completeURL(hr
ef))); | 100 CachedResourceRequest request(ResourceRequest(document()->completeURL(hr
ef)), localName()); |
101 request.setInitiator(this); | |
102 m_cachedFont = cachedResourceLoader->requestFont(request); | 101 m_cachedFont = cachedResourceLoader->requestFont(request); |
103 if (m_cachedFont) { | 102 if (m_cachedFont) { |
104 m_cachedFont->addClient(this); | 103 m_cachedFont->addClient(this); |
105 m_cachedFont->beginLoadIfNeeded(cachedResourceLoader); | 104 m_cachedFont->beginLoadIfNeeded(cachedResourceLoader); |
106 } | 105 } |
107 } else | 106 } else |
108 m_cachedFont = 0; | 107 m_cachedFont = 0; |
109 } | 108 } |
110 | 109 |
111 } | 110 } |
112 | 111 |
113 #endif // ENABLE(SVG_FONTS) | 112 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |