| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 void CSSFontFace::didBeginLoad() | 53 void CSSFontFace::didBeginLoad() |
| 54 { | 54 { |
| 55 if (loadStatus() == FontFace::Unloaded) | 55 if (loadStatus() == FontFace::Unloaded) |
| 56 setLoadStatus(FontFace::Loading); | 56 setLoadStatus(FontFace::Loading); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) | 59 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) |
| 60 { | 60 { |
| 61 if (m_segmentedFontFace) | |
| 62 m_segmentedFontFace->fontSelector()->fontFaceInvalidated(); | |
| 63 | |
| 64 if (!isValid() || source != m_sources.first()) | 61 if (!isValid() || source != m_sources.first()) |
| 65 return; | 62 return; |
| 66 | 63 |
| 67 if (loadStatus() == FontFace::Loading) { | 64 if (loadStatus() == FontFace::Loading) { |
| 68 if (source->ensureFontData()) { | 65 if (source->ensureFontData()) { |
| 69 setLoadStatus(FontFace::Loaded); | 66 setLoadStatus(FontFace::Loaded); |
| 70 #if ENABLE(SVG_FONTS) | 67 #if ENABLE(SVG_FONTS) |
| 71 Document* document = m_segmentedFontFace ? m_segmentedFontFace->font
Selector()->document() : 0; | 68 Document* document = m_segmentedFontFace ? m_segmentedFontFace->font
Selector()->document() : 0; |
| 72 if (document && source->isSVGFontFaceSource()) | 69 if (document && source->isSVGFontFaceSource()) |
| 73 UseCounter::count(*document, UseCounter::SVGFontInCSS); | 70 UseCounter::count(*document, UseCounter::SVGFontInCSS); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 237 } |
| 241 | 238 |
| 242 void CSSFontFace::trace(Visitor* visitor) | 239 void CSSFontFace::trace(Visitor* visitor) |
| 243 { | 240 { |
| 244 visitor->trace(m_segmentedFontFace); | 241 visitor->trace(m_segmentedFontFace); |
| 245 visitor->trace(m_sources); | 242 visitor->trace(m_sources); |
| 246 visitor->trace(m_fontFace); | 243 visitor->trace(m_fontFace); |
| 247 } | 244 } |
| 248 | 245 |
| 249 } | 246 } |
| OLD | NEW |