| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 if (!m_externalSVGDocument) | 127 if (!m_externalSVGDocument) |
| 128 setStatus(DecodeError); | 128 setStatus(DecodeError); |
| 129 } | 129 } |
| 130 | 130 |
| 131 return m_externalSVGDocument; | 131 return m_externalSVGDocument; |
| 132 } | 132 } |
| 133 | 133 |
| 134 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const | 134 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const |
| 135 { | 135 { |
| 136 RefPtr<HTMLCollection> collection = m_externalSVGDocument->getElementsByTagN
ameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName()); | 136 RefPtrWillBeRawPtr<HTMLCollection> collection = m_externalSVGDocument->getEl
ementsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName(
)); |
| 137 if (!collection) | 137 if (!collection) |
| 138 return 0; | 138 return 0; |
| 139 | 139 |
| 140 unsigned collectionLength = collection->length(); | 140 unsigned collectionLength = collection->length(); |
| 141 if (!collectionLength) | 141 if (!collectionLength) |
| 142 return 0; | 142 return 0; |
| 143 | 143 |
| 144 #ifndef NDEBUG | 144 #ifndef NDEBUG |
| 145 for (unsigned i = 0; i < collectionLength; ++i) { | 145 for (unsigned i = 0; i < collectionLength; ++i) { |
| 146 ASSERT(collection->item(i)); | 146 ASSERT(collection->item(i)); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 if (m_corsFailed) { | 191 if (m_corsFailed) { |
| 192 while (FontResourceClient* client = w.next()) | 192 while (FontResourceClient* client = w.next()) |
| 193 client->corsFailed(this); | 193 client->corsFailed(this); |
| 194 } else { | 194 } else { |
| 195 while (FontResourceClient* c = w.next()) | 195 while (FontResourceClient* c = w.next()) |
| 196 c->fontLoaded(this); | 196 c->fontLoaded(this); |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 | 199 |
| 200 } | 200 } |
| OLD | NEW |