| 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 | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "core/dom/DOMException.h" | 40 #include "core/dom/DOMException.h" |
| 41 #include "platform/fonts/FontTraits.h" | 41 #include "platform/fonts/FontTraits.h" |
| 42 #include "wtf/PassRefPtr.h" | 42 #include "wtf/PassRefPtr.h" |
| 43 #include "wtf/RefCounted.h" | 43 #include "wtf/RefCounted.h" |
| 44 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 class CSSFontFace; | 48 class CSSFontFace; |
| 49 class CSSValueList; | 49 class CSSValueList; |
| 50 class DOMArrayBuffer; |
| 51 class DOMArrayBufferView; |
| 50 class Dictionary; | 52 class Dictionary; |
| 51 class Document; | 53 class Document; |
| 52 class ExceptionState; | 54 class ExceptionState; |
| 53 class FontFaceDescriptors; | 55 class FontFaceDescriptors; |
| 54 class StylePropertySet; | 56 class StylePropertySet; |
| 55 class StyleRuleFontFace; | 57 class StyleRuleFontFace; |
| 56 | 58 |
| 57 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable, public ActiveDOMObject { | 59 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable, public ActiveDOMObject { |
| 58 DEFINE_WRAPPERTYPEINFO(); | 60 DEFINE_WRAPPERTYPEINFO(); |
| 59 public: | 61 public: |
| 60 enum LoadStatus { Unloaded, Loading, Loaded, Error }; | 62 enum LoadStatus { Unloaded, Loading, Loaded, Error }; |
| 61 | 63 |
| 62 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBuffer> source, const FontFaceDescriptors&); | 64 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<DOMArrayBuffer> source, const FontFaceDescriptors&)
; |
| 63 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBufferView>, const FontFaceDescriptors&); | 65 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<DOMArrayBufferView>, const FontFaceDescriptors&); |
| 64 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, const String& source, const FontFaceDescriptors&); | 66 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, const String& source, const FontFaceDescriptors&); |
| 65 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); | 67 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); |
| 66 | 68 |
| 67 ~FontFace(); | 69 ~FontFace(); |
| 68 | 70 |
| 69 const AtomicString& family() const { return m_family; } | 71 const AtomicString& family() const { return m_family; } |
| 70 String style() const; | 72 String style() const; |
| 71 String weight() const; | 73 String weight() const; |
| 72 String stretch() const; | 74 String stretch() const; |
| 73 String unicodeRange() const; | 75 String unicodeRange() const; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 PersistentWillBeMember<LoadedProperty> m_loadedProperty; | 142 PersistentWillBeMember<LoadedProperty> m_loadedProperty; |
| 141 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; | 143 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; |
| 142 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback> > m_callbacks; | 144 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback> > m_callbacks; |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 typedef WillBeHeapVector<RefPtrWillBeMember<FontFace> > FontFaceArray; | 147 typedef WillBeHeapVector<RefPtrWillBeMember<FontFace> > FontFaceArray; |
| 146 | 148 |
| 147 } // namespace blink | 149 } // namespace blink |
| 148 | 150 |
| 149 #endif // FontFace_h | 151 #endif // FontFace_h |
| OLD | NEW |