| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) | 58 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) |
| 59 { | 59 { |
| 60 if (!isValid() || source != m_sources.first()) | 60 if (!isValid() || source != m_sources.first()) |
| 61 return; | 61 return; |
| 62 | 62 |
| 63 if (loadStatus() == FontFace::Loading) { | 63 if (loadStatus() == FontFace::Loading) { |
| 64 if (source->ensureFontData()) { | 64 if (source->ensureFontData()) { |
| 65 setLoadStatus(FontFace::Loaded); | 65 setLoadStatus(FontFace::Loaded); |
| 66 #if ENABLE(SVG_FONTS) | |
| 67 Document* document = m_segmentedFontFace ? m_segmentedFontFace->font
Selector()->document() : 0; | |
| 68 if (document && source->isSVGFontFaceSource()) | |
| 69 UseCounter::count(*document, UseCounter::SVGFontInCSS); | |
| 70 #endif | |
| 71 } else { | 66 } else { |
| 72 m_sources.removeFirst(); | 67 m_sources.removeFirst(); |
| 73 load(); | 68 load(); |
| 74 } | 69 } |
| 75 } | 70 } |
| 76 | 71 |
| 77 if (m_segmentedFontFace) | 72 if (m_segmentedFontFace) |
| 78 m_segmentedFontFace->fontLoaded(this); | 73 m_segmentedFontFace->fontLoaded(this); |
| 79 } | 74 } |
| 80 | 75 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 234 } |
| 240 | 235 |
| 241 void CSSFontFace::trace(Visitor* visitor) | 236 void CSSFontFace::trace(Visitor* visitor) |
| 242 { | 237 { |
| 243 visitor->trace(m_segmentedFontFace); | 238 visitor->trace(m_segmentedFontFace); |
| 244 visitor->trace(m_sources); | 239 visitor->trace(m_sources); |
| 245 visitor->trace(m_fontFace); | 240 visitor->trace(m_fontFace); |
| 246 } | 241 } |
| 247 | 242 |
| 248 } | 243 } |
| OLD | NEW |