Chromium Code Reviews| Index: Source/core/css/CSSFontFace.h |
| diff --git a/Source/core/css/CSSFontFace.h b/Source/core/css/CSSFontFace.h |
| index 30b836fb240eeb01170318b42ac0513e1b1d7874..44a776a54c9ed5a58cd7fdb2a141613607ab406f 100644 |
| --- a/Source/core/css/CSSFontFace.h |
| +++ b/Source/core/css/CSSFontFace.h |
| @@ -29,6 +29,7 @@ |
| #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> |
| @@ -42,9 +43,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 +55,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 +91,8 @@ public: |
| enum LoadState { NotLoaded, Loading, Loaded, Error }; |
| LoadState loadState() const { return m_loadState; } |
| + void accept(Visitor*) const { } |
|
zerny-google
2013/07/02 14:24:04
visit m_segmentedFontFaces and m_rule.
haraken
2013/07/02 14:31:30
This is a big mistake... Done.
|
| + |
| private: |
| CSSFontFace(FontTraitsMask traitsMask, Handle<CSSFontFaceRule> rule, bool isLocalFallback) |
| : m_traitsMask(traitsMask) |
| @@ -102,12 +106,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); |
| }; |