| 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 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/loader/cache/CachedFont.h" | 46 #include "core/loader/cache/CachedFont.h" |
| 47 #include "core/loader/cache/CachedResourceLoader.h" | 47 #include "core/loader/cache/CachedResourceLoader.h" |
| 48 #include "core/page/Frame.h" | 48 #include "core/page/Frame.h" |
| 49 #include "core/page/Settings.h" | 49 #include "core/page/Settings.h" |
| 50 #include "core/platform/graphics/FontCache.h" | 50 #include "core/platform/graphics/FontCache.h" |
| 51 #include "core/platform/graphics/SimpleFontData.h" | 51 #include "core/platform/graphics/SimpleFontData.h" |
| 52 #include "core/svg/SVGFontFaceElement.h" | 52 #include "core/svg/SVGFontFaceElement.h" |
| 53 #include "wtf/text/AtomicString.h" | 53 #include "wtf/text/AtomicString.h" |
| 54 | 54 |
| 55 using namespace std; | 55 using namespace std; |
| 56 using namespace WebCore::FontFamilyNames; |
| 56 | 57 |
| 57 namespace WebCore { | 58 namespace WebCore { |
| 58 | 59 |
| 59 CSSFontSelector::CSSFontSelector(Document* document) | 60 CSSFontSelector::CSSFontSelector(Document* document) |
| 60 : m_document(document) | 61 : m_document(document) |
| 61 , m_beginLoadingTimer(this, &CSSFontSelector::beginLoadTimerFired) | 62 , m_beginLoadingTimer(this, &CSSFontSelector::beginLoadTimerFired) |
| 62 , m_version(0) | 63 , m_version(0) |
| 63 { | 64 { |
| 64 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document | 65 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document |
| 65 // because "we are guaranteed to be destroyed before the document". But ther
e does not | 66 // because "we are guaranteed to be destroyed before the document". But ther
e does not |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 598 } |
| 598 // Ensure that if the request count reaches zero, the frame loader will know
about it. | 599 // Ensure that if the request count reaches zero, the frame loader will know
about it. |
| 599 cachedResourceLoader->loadDone(0); | 600 cachedResourceLoader->loadDone(0); |
| 600 // New font loads may be triggered by layout after the document load is comp
lete but before we have dispatched | 601 // New font loads may be triggered by layout after the document load is comp
lete but before we have dispatched |
| 601 // didFinishLoading for the frame. Make sure the delegate is always dispatch
ed by checking explicitly. | 602 // didFinishLoading for the frame. Make sure the delegate is always dispatch
ed by checking explicitly. |
| 602 if (m_document && m_document->frame()) | 603 if (m_document && m_document->frame()) |
| 603 m_document->frame()->loader()->checkLoadComplete(); | 604 m_document->frame()->loader()->checkLoadComplete(); |
| 604 } | 605 } |
| 605 | 606 |
| 606 } | 607 } |
| OLD | NEW |