| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 FontFaceCache; |
| 53 class ExecutionContext; | 53 class ExecutionContext; |
| 54 | 54 |
| 55 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>; | 55 using FontFaceSetIterable = SetlikeIterable<Member<FontFace>>; |
| 56 | 56 |
| 57 class CORE_EXPORT FontFaceSet final : public EventTargetWithInlineData, | 57 class CORE_EXPORT FontFaceSet final : public EventTargetWithInlineData, |
| 58 public Supplement<Document>, | 58 public Supplement<Document>, |
| 59 public SuspendableObject, | 59 public SuspendableObject, |
| 60 public FontFaceSetIterable, | 60 public FontFaceSetIterable, |
| 61 public FontFace::LoadFontCallback { | 61 public FontFace::LoadFontCallback { |
| 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); | 62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); |
| 63 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
| 64 WTF_MAKE_NONCOPYABLE(FontFaceSet); | 64 WTF_MAKE_NONCOPYABLE(FontFaceSet); |
| 65 | 65 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 void AddFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); | 110 void AddFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); |
| 111 | 111 |
| 112 DECLARE_VIRTUAL_TRACE(); | 112 DECLARE_VIRTUAL_TRACE(); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 static FontFaceSet* Create(Document& document) { | 115 static FontFaceSet* Create(Document& document) { |
| 116 return new FontFaceSet(document); | 116 return new FontFaceSet(document); |
| 117 } | 117 } |
| 118 | 118 |
| 119 // Iterable overrides. |
| 119 FontFaceSetIterable::IterationSource* StartIteration( | 120 FontFaceSetIterable::IterationSource* StartIteration( |
| 120 ScriptState*, | 121 ScriptState*, |
| 121 ExceptionState&) override; | 122 ExceptionState&) override; |
| 122 | 123 |
| 123 class IterationSource final : public FontFaceSetIterable::IterationSource { | 124 class IterationSource final : public FontFaceSetIterable::IterationSource { |
| 124 public: | 125 public: |
| 125 explicit IterationSource(const HeapVector<Member<FontFace>>& font_faces) | 126 explicit IterationSource(const HeapVector<Member<FontFace>>& font_faces) |
| 126 : index_(0), font_faces_(font_faces) {} | 127 : index_(0), font_faces_(font_faces) {} |
| 127 bool Next(ScriptState*, | 128 bool Next(ScriptState*, |
| 128 Member<FontFace>&, | 129 Member<FontFace>&, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 HeapListHashSet<Member<FontFace>> non_css_connected_faces_; | 183 HeapListHashSet<Member<FontFace>> non_css_connected_faces_; |
| 183 | 184 |
| 184 Member<AsyncMethodRunner<FontFaceSet>> async_runner_; | 185 Member<AsyncMethodRunner<FontFaceSet>> async_runner_; |
| 185 | 186 |
| 186 FontLoadHistogram histogram_; | 187 FontLoadHistogram histogram_; |
| 187 }; | 188 }; |
| 188 | 189 |
| 189 } // namespace blink | 190 } // namespace blink |
| 190 | 191 |
| 191 #endif // FontFaceSet_h | 192 #endif // FontFaceSet_h |
| OLD | NEW |