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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 , m_fontLoader(document->fetcher()) | 108 , m_fontLoader(document->fetcher()) |
109 , m_genericFontFamilySettings(document->frame()->settings()->genericFontFami
lySettings()) | 109 , m_genericFontFamilySettings(document->frame()->settings()->genericFontFami
lySettings()) |
110 { | 110 { |
111 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document | 111 // FIXME: An old comment used to say there was no need to hold a reference t
o m_document |
112 // because "we are guaranteed to be destroyed before the document". But ther
e does not | 112 // because "we are guaranteed to be destroyed before the document". But ther
e does not |
113 // seem to be any such guarantee. | 113 // seem to be any such guarantee. |
114 | 114 |
115 ASSERT(m_document); | 115 ASSERT(m_document); |
116 ASSERT(m_document->frame()); | 116 ASSERT(m_document->frame()); |
117 FontCache::fontCache()->addClient(this); | 117 FontCache::fontCache()->addClient(this); |
118 FontFaceSet::from(document)->addFontFacesToFontFaceCache(&m_fontFaceCache, t
his); | 118 FontFaceSet::from(*document)->addFontFacesToFontFaceCache(&m_fontFaceCache,
this); |
119 } | 119 } |
120 | 120 |
121 CSSFontSelector::~CSSFontSelector() | 121 CSSFontSelector::~CSSFontSelector() |
122 { | 122 { |
123 clearDocument(); | 123 clearDocument(); |
124 FontCache::fontCache()->removeClient(this); | 124 FontCache::fontCache()->removeClient(this); |
125 } | 125 } |
126 | 126 |
127 void CSSFontSelector::registerForInvalidationCallbacks(CSSFontSelectorClient* cl
ient) | 127 void CSSFontSelector::registerForInvalidationCallbacks(CSSFontSelectorClient* cl
ient) |
128 { | 128 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 m_fontLoader.loadPendingFonts(); | 216 m_fontLoader.loadPendingFonts(); |
217 } | 217 } |
218 | 218 |
219 void CSSFontSelector::updateGenericFontFamilySettings(Document& document) | 219 void CSSFontSelector::updateGenericFontFamilySettings(Document& document) |
220 { | 220 { |
221 ASSERT(document.settings()); | 221 ASSERT(document.settings()); |
222 m_genericFontFamilySettings = document.settings()->genericFontFamilySettings
(); | 222 m_genericFontFamilySettings = document.settings()->genericFontFamilySettings
(); |
223 } | 223 } |
224 | 224 |
225 } | 225 } |
OLD | NEW |