| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const | 171 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const |
| 172 { | 172 { |
| 173 RefPtrWillBeRawPtr<TagCollection> collection = m_externalSVGDocument->getEle
mentsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName()
); | 173 RefPtrWillBeRawPtr<TagCollection> collection = m_externalSVGDocument->getEle
mentsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName()
); |
| 174 if (!collection) | 174 if (!collection) |
| 175 return 0; | 175 return 0; |
| 176 | 176 |
| 177 unsigned collectionLength = collection->length(); | 177 unsigned collectionLength = collection->length(); |
| 178 if (!collectionLength) | 178 if (!collectionLength) |
| 179 return 0; | 179 return 0; |
| 180 | 180 |
| 181 #ifndef NDEBUG | 181 #if ENABLE(ASSERT) |
| 182 for (unsigned i = 0; i < collectionLength; ++i) { | 182 for (unsigned i = 0; i < collectionLength; ++i) { |
| 183 ASSERT(collection->item(i)); | 183 ASSERT(collection->item(i)); |
| 184 ASSERT(isSVGFontElement(collection->item(i))); | 184 ASSERT(isSVGFontElement(collection->item(i))); |
| 185 } | 185 } |
| 186 #endif | 186 #endif |
| 187 | 187 |
| 188 if (fontName.isEmpty()) | 188 if (fontName.isEmpty()) |
| 189 return toSVGFontElement(collection->item(0)); | 189 return toSVGFontElement(collection->item(0)); |
| 190 | 190 |
| 191 for (unsigned i = 0; i < collectionLength; ++i) { | 191 for (unsigned i = 0; i < collectionLength; ++i) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 221 | 221 |
| 222 void FontResource::checkNotify() | 222 void FontResource::checkNotify() |
| 223 { | 223 { |
| 224 m_fontLoadWaitLimitTimer.stop(); | 224 m_fontLoadWaitLimitTimer.stop(); |
| 225 ResourceClientWalker<FontResourceClient> w(m_clients); | 225 ResourceClientWalker<FontResourceClient> w(m_clients); |
| 226 while (FontResourceClient* c = w.next()) | 226 while (FontResourceClient* c = w.next()) |
| 227 c->fontLoaded(this); | 227 c->fontLoaded(this); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } | 230 } |
| OLD | NEW |