OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 Document* d = document(); | 349 Document* d = document(); |
350 d->ensureStyleResolver(); // Flush pending style changes. | 350 d->ensureStyleResolver(); // Flush pending style changes. |
351 return d->styleEngine()->fontSelector()->fontFaceCache()->cssConnectedFontFa
ces(); | 351 return d->styleEngine()->fontSelector()->fontFaceCache()->cssConnectedFontFa
ces(); |
352 } | 352 } |
353 | 353 |
354 bool FontFaceSet::isCSSConnectedFontFace(FontFace* fontFace) const | 354 bool FontFaceSet::isCSSConnectedFontFace(FontFace* fontFace) const |
355 { | 355 { |
356 return cssConnectedFontFaceList().contains(fontFace); | 356 return cssConnectedFontFaceList().contains(fontFace); |
357 } | 357 } |
358 | 358 |
359 void FontFaceSet::forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback> cal
lback, const ScriptValue& thisArg) const | 359 void FontFaceSet::forEach(FontFaceSetForEachCallback* callback, const ScriptValu
e& thisArg) const |
360 { | 360 { |
361 forEachInternal(callback, &thisArg); | 361 forEachInternal(callback, &thisArg); |
362 } | 362 } |
363 | 363 |
364 void FontFaceSet::forEach(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallback> cal
lback) const | 364 void FontFaceSet::forEach(FontFaceSetForEachCallback* callback) const |
365 { | 365 { |
366 forEachInternal(callback, 0); | 366 forEachInternal(callback, 0); |
367 } | 367 } |
368 | 368 |
369 void FontFaceSet::forEachInternal(PassOwnPtrWillBeRawPtr<FontFaceSetForEachCallb
ack> callback, const ScriptValue* thisArg) const | 369 void FontFaceSet::forEachInternal(FontFaceSetForEachCallback* callback, const Sc
riptValue* thisArg) const |
370 { | 370 { |
371 if (!inActiveDocumentContext()) | 371 if (!inActiveDocumentContext()) |
372 return; | 372 return; |
373 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFace
s = cssConnectedFontFaceList(); | 373 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFace
s = cssConnectedFontFaceList(); |
374 WillBeHeapVector<RefPtrWillBeMember<FontFace> > fontFaces; | 374 WillBeHeapVector<RefPtrWillBeMember<FontFace> > fontFaces; |
375 fontFaces.reserveInitialCapacity(cssConnectedFaces.size() + m_nonCSSConnecte
dFaces.size()); | 375 fontFaces.reserveInitialCapacity(cssConnectedFaces.size() + m_nonCSSConnecte
dFaces.size()); |
376 for (WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >::const_iterator it
= cssConnectedFaces.begin(); it != cssConnectedFaces.end(); ++it) | 376 for (WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >::const_iterator it
= cssConnectedFaces.begin(); it != cssConnectedFaces.end(); ++it) |
377 fontFaces.append(*it); | 377 fontFaces.append(*it); |
378 for (WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >::const_iterator it
= m_nonCSSConnectedFaces.begin(); it != m_nonCSSConnectedFaces.end(); ++it) | 378 for (WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >::const_iterator it
= m_nonCSSConnectedFaces.begin(); it != m_nonCSSConnectedFaces.end(); ++it) |
379 fontFaces.append(*it); | 379 fontFaces.append(*it); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 visitor->trace(m_loadingFonts); | 586 visitor->trace(m_loadingFonts); |
587 visitor->trace(m_loadedFonts); | 587 visitor->trace(m_loadedFonts); |
588 visitor->trace(m_failedFonts); | 588 visitor->trace(m_failedFonts); |
589 visitor->trace(m_nonCSSConnectedFaces); | 589 visitor->trace(m_nonCSSConnectedFaces); |
590 DocumentSupplement::trace(visitor); | 590 DocumentSupplement::trace(visitor); |
591 EventTargetWithInlineData::trace(visitor); | 591 EventTargetWithInlineData::trace(visitor); |
592 } | 592 } |
593 #endif | 593 #endif |
594 | 594 |
595 } // namespace blink | 595 } // namespace blink |
OLD | NEW |