| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class Dictionary; | 51 class Dictionary; |
| 52 class Document; | 52 class Document; |
| 53 class ExceptionState; | 53 class ExceptionState; |
| 54 class Font; | 54 class Font; |
| 55 class FontFaceCache; | 55 class FontFaceCache; |
| 56 class FontResource; | 56 class FontResource; |
| 57 class FontsReadyPromiseResolver; | 57 class FontsReadyPromiseResolver; |
| 58 class ExecutionContext; | 58 class ExecutionContext; |
| 59 | 59 |
| 60 #if ENABLE(OILPAN) | 60 #if ENABLE(OILPAN) |
| 61 class FontFaceSet FINAL : public RefCountedGarbageCollected<FontFaceSet>, public
HeapSupplement<Document>, public ActiveDOMObject, public EventTargetWithInlineD
ata { | 61 class FontFaceSet FINAL : public GarbageCollectedFinalized<FontFaceSet>, public
HeapSupplement<Document>, public ActiveDOMObject, public EventTargetWithInlineDa
ta { |
| 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); | 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); |
| 63 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<FontFaceSet>); | |
| 64 typedef HeapSupplement<Document> SupplementType; | 63 typedef HeapSupplement<Document> SupplementType; |
| 65 #else | 64 #else |
| 66 class FontFaceSet FINAL : public RefCountedSupplement<Document, FontFaceSet>, pu
blic ActiveDOMObject, public EventTargetWithInlineData { | 65 class FontFaceSet FINAL : public RefCountedSupplement<Document, FontFaceSet>, pu
blic ActiveDOMObject, public EventTargetWithInlineData { |
| 67 DEFINE_EVENT_TARGET_REFCOUNTING(RefCounted<FontFaceSet>); | 66 DEFINE_EVENT_TARGET_REFCOUNTING(RefCounted<FontFaceSet>); |
| 68 typedef RefCountedSupplement<Document, FontFaceSet> SupplementType; | 67 typedef RefCountedSupplement<Document, FontFaceSet> SupplementType; |
| 69 #endif | 68 #endif |
| 70 public: | 69 public: |
| 71 virtual ~FontFaceSet(); | 70 virtual ~FontFaceSet(); |
| 72 | 71 |
| 73 DEFINE_ATTRIBUTE_EVENT_LISTENER(loading); | 72 DEFINE_ATTRIBUTE_EVENT_LISTENER(loading); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 107 |
| 109 void addFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); | 108 void addFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); |
| 110 | 109 |
| 111 #if ENABLE(OILPAN) | 110 #if ENABLE(OILPAN) |
| 112 virtual void trace(Visitor*) OVERRIDE; | 111 virtual void trace(Visitor*) OVERRIDE; |
| 113 #endif | 112 #endif |
| 114 | 113 |
| 115 private: | 114 private: |
| 116 static PassRefPtrWillBeRawPtr<FontFaceSet> create(Document& document) | 115 static PassRefPtrWillBeRawPtr<FontFaceSet> create(Document& document) |
| 117 { | 116 { |
| 118 return adoptRefWillBeRefCountedGarbageCollected<FontFaceSet>(new FontFac
eSet(document)); | 117 return adoptRefWillBeNoop(new FontFaceSet(document)); |
| 119 } | 118 } |
| 120 | 119 |
| 121 class FontLoadHistogram { | 120 class FontLoadHistogram { |
| 122 public: | 121 public: |
| 123 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported }; | 122 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported }; |
| 124 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false
) { } | 123 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false
) { } |
| 125 void incrementCount() { m_count++; } | 124 void incrementCount() { m_count++; } |
| 126 void updateStatus(FontFace*); | 125 void updateStatus(FontFace*); |
| 127 void record(); | 126 void record(); |
| 128 | 127 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 157 ListHashSet<RefPtrWillBeMember<FontFace> > m_nonCSSConnectedFaces; | 156 ListHashSet<RefPtrWillBeMember<FontFace> > m_nonCSSConnectedFaces; |
| 158 | 157 |
| 159 AsyncMethodRunner<FontFaceSet> m_asyncRunner; | 158 AsyncMethodRunner<FontFaceSet> m_asyncRunner; |
| 160 | 159 |
| 161 FontLoadHistogram m_histogram; | 160 FontLoadHistogram m_histogram; |
| 162 }; | 161 }; |
| 163 | 162 |
| 164 } // namespace WebCore | 163 } // namespace WebCore |
| 165 | 164 |
| 166 #endif // FontFaceSet_h | 165 #endif // FontFaceSet_h |
| OLD | NEW |