| Index: Source/core/css/CSSFontFace.h
|
| diff --git a/Source/core/css/CSSFontFace.h b/Source/core/css/CSSFontFace.h
|
| index 30b836fb240eeb01170318b42ac0513e1b1d7874..d0f444e6e5e05606ff31230a68b87636a93dfc06 100644
|
| --- a/Source/core/css/CSSFontFace.h
|
| +++ b/Source/core/css/CSSFontFace.h
|
| @@ -29,10 +29,10 @@
|
| #include "core/css/CSSFontFaceRule.h"
|
| #include "core/css/CSSFontFaceSource.h"
|
| #include "core/platform/graphics/FontTraitsMask.h"
|
| +#include "heap/Handle.h"
|
| #include <wtf/Forward.h>
|
| #include <wtf/HashSet.h>
|
| #include <wtf/PassRefPtr.h>
|
| -#include <wtf/RefCounted.h>
|
| #include <wtf/unicode/Unicode.h>
|
| #include <wtf/Vector.h>
|
|
|
| @@ -42,9 +42,10 @@ class CSSSegmentedFontFace;
|
| class FontDescription;
|
| class SimpleFontData;
|
|
|
| -class CSSFontFace : public RefCounted<CSSFontFace> {
|
| +class CSSFontFace : public HeapAllocatedFinalized<CSSFontFace> {
|
| + DECLARE_GC_TYPE_MARKER
|
| public:
|
| - static PassRefPtr<CSSFontFace> create(FontTraitsMask traitsMask, Handle<CSSFontFaceRule> rule, bool isLocalFallback = false) { return adoptRef(new CSSFontFace(traitsMask, rule, isLocalFallback)); }
|
| + static Result<CSSFontFace> create(FontTraitsMask traitsMask, Handle<CSSFontFaceRule> rule, bool isLocalFallback = false) { return adopt(new CSSFontFace(traitsMask, rule, isLocalFallback)); }
|
|
|
| FontTraitsMask traitsMask() const { return m_traitsMask; }
|
|
|
| @@ -53,8 +54,8 @@ public:
|
| void addRange(UChar32 from, UChar32 to) { m_ranges.append(UnicodeRange(from, to)); }
|
| const Vector<UnicodeRange>& ranges() const { return m_ranges; }
|
|
|
| - void addedToSegmentedFontFace(CSSSegmentedFontFace*);
|
| - void removedFromSegmentedFontFace(CSSSegmentedFontFace*);
|
| + void addedToSegmentedFontFace(Handle<CSSSegmentedFontFace>);
|
| + void removedFromSegmentedFontFace(Handle<CSSSegmentedFontFace>);
|
|
|
| bool isLoaded() const;
|
| bool isValid() const;
|
| @@ -89,6 +90,8 @@ public:
|
| enum LoadState { NotLoaded, Loading, Loaded, Error };
|
| LoadState loadState() const { return m_loadState; }
|
|
|
| + void accept(Visitor*) const;
|
| +
|
| private:
|
| CSSFontFace(FontTraitsMask traitsMask, Handle<CSSFontFaceRule> rule, bool isLocalFallback)
|
| : m_traitsMask(traitsMask)
|
| @@ -102,12 +105,12 @@ private:
|
|
|
| FontTraitsMask m_traitsMask;
|
| Vector<UnicodeRange> m_ranges;
|
| - HashSet<CSSSegmentedFontFace*> m_segmentedFontFaces;
|
| + HashSet<Member<CSSSegmentedFontFace> > m_segmentedFontFaces;
|
| Vector<OwnPtr<CSSFontFaceSource> > m_sources;
|
| CSSFontFaceSource* m_activeSource;
|
| bool m_isLocalFallback;
|
| LoadState m_loadState;
|
| - Persistent<CSSFontFaceRule> m_rule;
|
| + Member<CSSFontFaceRule> m_rule;
|
| void notifyFontLoader(LoadState);
|
| };
|
|
|
|
|