| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 ASSERT(m_document->frame()); | 118 ASSERT(m_document->frame()); |
| 119 FontCache::fontCache()->addClient(this); | 119 FontCache::fontCache()->addClient(this); |
| 120 } | 120 } |
| 121 | 121 |
| 122 CSSFontSelector::~CSSFontSelector() | 122 CSSFontSelector::~CSSFontSelector() |
| 123 { | 123 { |
| 124 clearDocument(); | 124 clearDocument(); |
| 125 FontCache::fontCache()->removeClient(this); | 125 FontCache::fontCache()->removeClient(this); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void CSSFontSelector::registerForInvalidationCallbacks(FontSelectorClient* clien
t) | 128 void CSSFontSelector::registerForInvalidationCallbacks(CSSFontSelectorClient* cl
ient) |
| 129 { | 129 { |
| 130 m_clients.add(client); | 130 m_clients.add(client); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void CSSFontSelector::unregisterForInvalidationCallbacks(FontSelectorClient* cli
ent) | 133 void CSSFontSelector::unregisterForInvalidationCallbacks(CSSFontSelectorClient*
client) |
| 134 { | 134 { |
| 135 m_clients.remove(client); | 135 m_clients.remove(client); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void CSSFontSelector::dispatchInvalidationCallbacks() | 138 void CSSFontSelector::dispatchInvalidationCallbacks() |
| 139 { | 139 { |
| 140 Vector<FontSelectorClient*> clients; | 140 Vector<CSSFontSelectorClient*> clients; |
| 141 copyToVector(m_clients, clients); | 141 copyToVector(m_clients, clients); |
| 142 for (size_t i = 0; i < clients.size(); ++i) | 142 for (size_t i = 0; i < clients.size(); ++i) |
| 143 clients[i]->fontsNeedUpdate(this); | 143 clients[i]->fontsNeedUpdate(this); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void CSSFontSelector::fontLoaded() | 146 void CSSFontSelector::fontLoaded() |
| 147 { | 147 { |
| 148 dispatchInvalidationCallbacks(); | 148 dispatchInvalidationCallbacks(); |
| 149 } | 149 } |
| 150 | 150 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 { | 221 { |
| 222 m_fontLoader.addFontToBeginLoading(font); | 222 m_fontLoader.addFontToBeginLoading(font); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void CSSFontSelector::loadPendingFonts() | 225 void CSSFontSelector::loadPendingFonts() |
| 226 { | 226 { |
| 227 m_fontLoader.loadPendingFonts(); | 227 m_fontLoader.loadPendingFonts(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } | 230 } |
| OLD | NEW |