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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 m_clients.remove(client); | 76 m_clients.remove(client); |
77 } | 77 } |
78 #endif | 78 #endif |
79 | 79 |
80 void CSSFontSelector::dispatchInvalidationCallbacks() | 80 void CSSFontSelector::dispatchInvalidationCallbacks() |
81 { | 81 { |
82 m_fontFaceCache.incrementVersion(); | 82 m_fontFaceCache.incrementVersion(); |
83 | 83 |
84 WillBeHeapVector<RawPtrWillBeMember<CSSFontSelectorClient>> clients; | 84 WillBeHeapVector<RawPtrWillBeMember<CSSFontSelectorClient>> clients; |
85 copyToVector(m_clients, clients); | 85 copyToVector(m_clients, clients); |
86 for (size_t i = 0; i < clients.size(); ++i) | 86 // TODO(sof): the null check is temporarily in place to speculatively addres
s |
87 clients[i]->fontsNeedUpdate(this); | 87 // crbug.com/568173. |
| 88 for (auto& client : clients) { |
| 89 if (client) |
| 90 client->fontsNeedUpdate(this); |
| 91 } |
88 } | 92 } |
89 | 93 |
90 void CSSFontSelector::fontFaceInvalidated() | 94 void CSSFontSelector::fontFaceInvalidated() |
91 { | 95 { |
92 dispatchInvalidationCallbacks(); | 96 dispatchInvalidationCallbacks(); |
93 } | 97 } |
94 | 98 |
95 void CSSFontSelector::fontCacheInvalidated() | 99 void CSSFontSelector::fontCacheInvalidated() |
96 { | 100 { |
97 dispatchInvalidationCallbacks(); | 101 dispatchInvalidationCallbacks(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 #if ENABLE(OILPAN) | 189 #if ENABLE(OILPAN) |
186 visitor->trace(m_document); | 190 visitor->trace(m_document); |
187 visitor->trace(m_fontFaceCache); | 191 visitor->trace(m_fontFaceCache); |
188 visitor->trace(m_clients); | 192 visitor->trace(m_clients); |
189 visitor->trace(m_fontLoader); | 193 visitor->trace(m_fontLoader); |
190 #endif | 194 #endif |
191 FontSelector::trace(visitor); | 195 FontSelector::trace(visitor); |
192 } | 196 } |
193 | 197 |
194 } // namespace blink | 198 } // namespace blink |
OLD | NEW |