| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool hasPendingActivity() const final; | 114 bool hasPendingActivity() const final; |
| 115 | 115 |
| 116 private: | 116 private: |
| 117 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBuffer* source, const FontFaceDescriptors&); | 117 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBuffer* source, const FontFaceDescriptors&); |
| 118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBufferView*, const FontFaceDescriptors&); | 118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr
rayBufferView*, const FontFaceDescriptors&); |
| 119 static FontFace* create(ExecutionContext*, const AtomicString& family, const
String& source, const FontFaceDescriptors&); | 119 static FontFace* create(ExecutionContext*, const AtomicString& family, const
String& source, const FontFaceDescriptors&); |
| 120 | 120 |
| 121 explicit FontFace(ExecutionContext*); | 121 explicit FontFace(ExecutionContext*); |
| 122 FontFace(ExecutionContext*, const AtomicString& family, const FontFaceDescri
ptors&); | 122 FontFace(ExecutionContext*, const AtomicString& family, const FontFaceDescri
ptors&); |
| 123 | 123 |
| 124 void initCSSFontFace(Document*, CSSValue* src); | 124 void initCSSFontFace(Document*, const CSSValue* src); |
| 125 void initCSSFontFace(const unsigned char* data, size_t); | 125 void initCSSFontFace(const unsigned char* data, size_t); |
| 126 void setPropertyFromString(const Document*, const String&, CSSPropertyID, Ex
ceptionState* = 0); | 126 void setPropertyFromString(const Document*, const String&, CSSPropertyID, Ex
ceptionState* = 0); |
| 127 bool setPropertyFromStyle(const StylePropertySet&, CSSPropertyID); | 127 bool setPropertyFromStyle(const StylePropertySet&, CSSPropertyID); |
| 128 bool setPropertyValue(CSSValue*, CSSPropertyID); | 128 bool setPropertyValue(const CSSValue*, CSSPropertyID); |
| 129 bool setFamilyValue(const CSSValue&); | 129 bool setFamilyValue(const CSSValue&); |
| 130 void loadInternal(ExecutionContext*); | 130 void loadInternal(ExecutionContext*); |
| 131 ScriptPromise fontStatusPromise(ScriptState*); | 131 ScriptPromise fontStatusPromise(ScriptState*); |
| 132 | 132 |
| 133 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>, Member<FontFa
ce>, Member<DOMException>>; | 133 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>, Member<FontFa
ce>, Member<DOMException>>; |
| 134 | 134 |
| 135 AtomicString m_family; | 135 AtomicString m_family; |
| 136 String m_otsParseMessage; | 136 String m_otsParseMessage; |
| 137 Member<CSSValue> m_style; | 137 Member<const CSSValue> m_style; |
| 138 Member<CSSValue> m_weight; | 138 Member<const CSSValue> m_weight; |
| 139 Member<CSSValue> m_stretch; | 139 Member<const CSSValue> m_stretch; |
| 140 Member<CSSValue> m_unicodeRange; | 140 Member<const CSSValue> m_unicodeRange; |
| 141 Member<CSSValue> m_variant; | 141 Member<const CSSValue> m_variant; |
| 142 Member<CSSValue> m_featureSettings; | 142 Member<const CSSValue> m_featureSettings; |
| 143 Member<CSSValue> m_display; | 143 Member<const CSSValue> m_display; |
| 144 LoadStatusType m_status; | 144 LoadStatusType m_status; |
| 145 Member<DOMException> m_error; | 145 Member<DOMException> m_error; |
| 146 | 146 |
| 147 Member<LoadedProperty> m_loadedProperty; | 147 Member<LoadedProperty> m_loadedProperty; |
| 148 Member<CSSFontFace> m_cssFontFace; | 148 Member<CSSFontFace> m_cssFontFace; |
| 149 HeapVector<Member<LoadFontCallback>> m_callbacks; | 149 HeapVector<Member<LoadFontCallback>> m_callbacks; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 using FontFaceArray = HeapVector<Member<FontFace>>; | 152 using FontFaceArray = HeapVector<Member<FontFace>>; |
| 153 | 153 |
| 154 } // namespace blink | 154 } // namespace blink |
| 155 | 155 |
| 156 #endif // FontFace_h | 156 #endif // FontFace_h |
| OLD | NEW |