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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return 0; | 128 return 0; |
129 | 129 |
130 #ifndef NDEBUG | 130 #ifndef NDEBUG |
131 for (unsigned i = 0; i < listLength; ++i) { | 131 for (unsigned i = 0; i < listLength; ++i) { |
132 ASSERT(list->item(i)); | 132 ASSERT(list->item(i)); |
133 ASSERT(list->item(i)->hasTagName(SVGNames::fontTag)); | 133 ASSERT(list->item(i)->hasTagName(SVGNames::fontTag)); |
134 } | 134 } |
135 #endif | 135 #endif |
136 | 136 |
137 if (fontName.isEmpty()) | 137 if (fontName.isEmpty()) |
138 return static_cast<SVGFontElement*>(list->item(0)); | 138 return toSVGFontElement(list->item(0)); |
139 | 139 |
140 for (unsigned i = 0; i < listLength; ++i) { | 140 for (unsigned i = 0; i < listLength; ++i) { |
141 SVGFontElement* element = static_cast<SVGFontElement*>(list->item(i)); | 141 SVGFontElement* element = toSVGFontElement(list->item(i)); |
142 if (element->getIdAttribute() == fontName) | 142 if (element->getIdAttribute() == fontName) |
143 return element; | 143 return element; |
144 } | 144 } |
145 | 145 |
146 return 0; | 146 return 0; |
147 } | 147 } |
148 #endif | 148 #endif |
149 | 149 |
150 void CachedFont::allClientsRemoved() | 150 void CachedFont::allClientsRemoved() |
151 { | 151 { |
(...skipping 15 matching lines...) Expand all Loading... |
167 { | 167 { |
168 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceFont); | 168 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceFont); |
169 CachedResource::reportMemoryUsage(memoryObjectInfo); | 169 CachedResource::reportMemoryUsage(memoryObjectInfo); |
170 #if ENABLE(SVG_FONTS) | 170 #if ENABLE(SVG_FONTS) |
171 info.addMember(m_externalSVGDocument, "externalSVGDocument"); | 171 info.addMember(m_externalSVGDocument, "externalSVGDocument"); |
172 #endif | 172 #endif |
173 info.addMember(m_fontData, "fontData"); | 173 info.addMember(m_fontData, "fontData"); |
174 } | 174 } |
175 | 175 |
176 } | 176 } |
OLD | NEW |