| 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 29 matching lines...) Expand all Loading... |
| 40 #include "platform/fonts/FontCache.h" | 40 #include "platform/fonts/FontCache.h" |
| 41 #include "platform/fonts/SimpleFontData.h" | 41 #include "platform/fonts/SimpleFontData.h" |
| 42 #include "wtf/text/AtomicString.h" | 42 #include "wtf/text/AtomicString.h" |
| 43 | 43 |
| 44 using namespace std; | 44 using namespace std; |
| 45 | 45 |
| 46 namespace WebCore { | 46 namespace WebCore { |
| 47 | 47 |
| 48 CSSFontSelector::CSSFontSelector(Document* document) | 48 CSSFontSelector::CSSFontSelector(Document* document) |
| 49 : m_document(document) | 49 : m_document(document) |
| 50 , m_fontLoader(FontLoader::create(document->fetcher())) | 50 , m_fontLoader(FontLoader::create(this, document->fetcher())) |
| 51 , m_genericFontFamilySettings(document->frame()->settings()->genericFontFami
lySettings()) | 51 , m_genericFontFamilySettings(document->frame()->settings()->genericFontFami
lySettings()) |
| 52 { | 52 { |
| 53 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document | 53 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document |
| 54 // because "we are guaranteed to be destroyed before the document". But ther
e does not | 54 // because "we are guaranteed to be destroyed before the document". But ther
e does not |
| 55 // seem to be any such guarantee. | 55 // seem to be any such guarantee. |
| 56 | 56 |
| 57 ASSERT(m_document); | 57 ASSERT(m_document); |
| 58 ASSERT(m_document->frame()); | 58 ASSERT(m_document->frame()); |
| 59 FontCache::fontCache()->addClient(this); | 59 FontCache::fontCache()->addClient(this); |
| 60 FontFaceSet::from(*document)->addFontFacesToFontFaceCache(&m_fontFaceCache,
this); | 60 FontFaceSet::from(*document)->addFontFacesToFontFaceCache(&m_fontFaceCache,
this); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 void CSSFontSelector::trace(Visitor* visitor) | 177 void CSSFontSelector::trace(Visitor* visitor) |
| 178 { | 178 { |
| 179 visitor->trace(m_document); | 179 visitor->trace(m_document); |
| 180 visitor->trace(m_fontFaceCache); | 180 visitor->trace(m_fontFaceCache); |
| 181 visitor->trace(m_clients); | 181 visitor->trace(m_clients); |
| 182 visitor->trace(m_fontLoader); | 182 visitor->trace(m_fontLoader); |
| 183 FontSelector::trace(visitor); | 183 FontSelector::trace(visitor); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } | 186 } |
| OLD | NEW |