Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/FontFaceSet.h |
| diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.h b/third_party/WebKit/Source/core/css/FontFaceSet.h |
| index fda6c9171e0ae44cbd4ed82cdf12b379849013f5..3b37b0381624e1679060018870366e671383a206 100644 |
| --- a/third_party/WebKit/Source/core/css/FontFaceSet.h |
| +++ b/third_party/WebKit/Source/core/css/FontFaceSet.h |
| @@ -26,6 +26,7 @@ |
| #ifndef FontFaceSet_h |
| #define FontFaceSet_h |
| +#include "bindings/core/v8/Iterable.h" |
| #include "bindings/core/v8/ScriptPromise.h" |
| #include "core/css/FontFace.h" |
| #include "core/css/FontFaceSetForEachCallback.h" |
| @@ -58,11 +59,11 @@ class FontResource; |
| class ExecutionContext; |
| #if ENABLE(OILPAN) |
| -class FontFaceSet final : public EventTargetWithInlineData, public HeapSupplement<Document>, public ActiveDOMObject { |
| +class FontFaceSet final : public EventTargetWithInlineData, public HeapSupplement<Document>, public ActiveDOMObject, public ValueIterable<RefPtrWillBeMember<FontFace>> { |
| USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); |
| using SupplementType = HeapSupplement<Document>; |
| #else |
| -class FontFaceSet final : public EventTargetWithInlineData, public RefCountedSupplement<Document, FontFaceSet>, public ActiveDOMObject { |
| +class FontFaceSet final : public EventTargetWithInlineData, public RefCountedSupplement<Document, FontFaceSet>, public ActiveDOMObject, public ValueIterable<RefPtrWillBeMember<FontFace>> { |
| REFCOUNTED_EVENT_TARGET(FontFaceSet); |
| using SupplementType = RefCountedSupplement<Document, FontFaceSet>; |
| #endif |
| @@ -81,11 +82,9 @@ public: |
| void add(FontFace*, ExceptionState&); |
| void clear(); |
| bool remove(FontFace*, ExceptionState&); |
| - void forEach(FontFaceSetForEachCallback*, const ScriptValue& thisArg) const; |
| - void forEach(FontFaceSetForEachCallback*) const; |
| - bool has(FontFace*, ExceptionState&) const; |
| + bool hasForBinding(ScriptState*, const PassRefPtrWillBeRawPtr<FontFace>&, ExceptionState&) const; |
|
Takashi Toyoshima
2015/10/16 06:36:34
I noticed the type was wrong here.
The last patch
|
| - unsigned long size() const; |
| + size_t size() const; |
| AtomicString status() const; |
| ExecutionContext* executionContext() const override; |
| @@ -116,6 +115,19 @@ private: |
| return adoptRefWillBeNoop(new FontFaceSet(document)); |
| } |
| + ValueIterable<RefPtrWillBeMember<FontFace>>::IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
| + |
| + class IterationSource final : public ValueIterable<RefPtrWillBeMember<FontFace>>::IterationSource { |
| + public: |
| + IterationSource(const WillBeHeapVector<RefPtrWillBeMember<FontFace>> fontFaces) |
| + : m_index(0) |
| + , m_fontFaces(fontFaces) { } |
| + bool next(ScriptState*, RefPtrWillBeMember<FontFace>&, ExceptionState&) override; |
| + private: |
| + size_t m_index; |
| + WillBeHeapVector<RefPtrWillBeMember<FontFace>> m_fontFaces; |
| + }; |
| + |
| class FontLoadHistogram { |
| DISALLOW_ALLOCATION(); |
| public: |