| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // method | 42 // method |
| 43 #ifdef check | 43 #ifdef check |
| 44 #undef check | 44 #undef check |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 | 48 |
| 49 class CSSFontSelector; | 49 class CSSFontSelector; |
| 50 class ExceptionState; | 50 class ExceptionState; |
| 51 class Font; | 51 class Font; |
| 52 class FontFaceCache; |
| 52 class ExecutionContext; | 53 class ExecutionContext; |
| 53 | 54 |
| 54 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>; | 55 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>; |
| 55 | 56 |
| 56 class FontFaceSet final : public EventTargetWithInlineData, | 57 class FontFaceSet final : public EventTargetWithInlineData, |
| 57 public Supplement<Document>, | 58 public Supplement<Document>, |
| 58 public SuspendableObject, | 59 public SuspendableObject, |
| 59 public FontFaceSetIterable, | 60 public FontFaceSetIterable, |
| 60 public FontFace::LoadFontCallback { | 61 public FontFace::LoadFontCallback { |
| 61 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); | 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void suspend() override; | 100 void suspend() override; |
| 100 void resume() override; | 101 void resume() override; |
| 101 void contextDestroyed(ExecutionContext*) override; | 102 void contextDestroyed(ExecutionContext*) override; |
| 102 | 103 |
| 103 static FontFaceSet* from(Document&); | 104 static FontFaceSet* from(Document&); |
| 104 static void didLayout(Document&); | 105 static void didLayout(Document&); |
| 105 static size_t approximateBlankCharacterCount(Document&); | 106 static size_t approximateBlankCharacterCount(Document&); |
| 106 | 107 |
| 107 static const char* supplementName() { return "FontFaceSet"; } | 108 static const char* supplementName() { return "FontFaceSet"; } |
| 108 | 109 |
| 109 void addFontFacesToFontFaceCache(CSSFontSelector*); | 110 void addFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); |
| 110 | 111 |
| 111 DECLARE_VIRTUAL_TRACE(); | 112 DECLARE_VIRTUAL_TRACE(); |
| 112 | 113 |
| 113 private: | 114 private: |
| 114 static FontFaceSet* create(Document& document) { | 115 static FontFaceSet* create(Document& document) { |
| 115 return new FontFaceSet(document); | 116 return new FontFaceSet(document); |
| 116 } | 117 } |
| 117 | 118 |
| 118 FontFaceSetIterable::IterationSource* startIteration( | 119 FontFaceSetIterable::IterationSource* startIteration( |
| 119 ScriptState*, | 120 ScriptState*, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces; | 182 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces; |
| 182 | 183 |
| 183 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner; | 184 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner; |
| 184 | 185 |
| 185 FontLoadHistogram m_histogram; | 186 FontLoadHistogram m_histogram; |
| 186 }; | 187 }; |
| 187 | 188 |
| 188 } // namespace blink | 189 } // namespace blink |
| 189 | 190 |
| 190 #endif // FontFaceSet_h | 191 #endif // FontFaceSet_h |
| OLD | NEW |