Home | History | Annotate | Download | only in css

Lines Matching defs:FontFace

32 #include "core/css/FontFace.h"
72 void resolve(PassRefPtrWillBeRawPtr<FontFace> fontFace)
74 switch (fontFace->loadStatus()) {
75 case FontFace::Loaded:
76 m_resolver->resolve(fontFace);
78 case FontFace::Error:
79 m_resolver->reject(fontFace->error());
106 static bool initFontFace(FontFace* fontFace, ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors, ExceptionState& exceptionState)
108 fontFace->setFamily(context, family, exceptionState);
114 fontFace->setStyle(context, value, exceptionState);
119 fontFace->setWeight(context, value, exceptionState);
124 fontFace->setStretch(context, value, exceptionState);
129 fontFace->setUnicodeRange(context, value, exceptionState);
134 fontFace->setVariant(context, value, exceptionState);
139 fontFace->setFeatureSettings(context, value, exceptionState);
146 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, const String& source, const Dictionary& descriptors, ExceptionState& exceptionState)
154 RefPtrWillBeRawPtr<FontFace> fontFace = adoptRefWillBeNoop(new FontFace());
155 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
156 fontFace->initCSSFontFace(toDocument(context), src);
157 return fontFace.release();
160 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, PassRefPtr<ArrayBuffer> source, const Dictionary& descriptors, ExceptionState& exceptionState)
162 RefPtrWillBeRawPtr<FontFace> fontFace = adoptRefWillBeNoop(new FontFace());
163 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
164 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->data()), source->byteLength());
165 return fontFace.release();
168 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, PassRefPtr<ArrayBufferView> source, const Dictionary& descriptors, ExceptionState& exceptionState)
170 RefPtrWillBeRawPtr<FontFace> fontFace = adoptRefWillBeNoop(new FontFace());
171 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
172 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->baseAddress()), source->byteLength());
173 return fontFace.release();
176 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(Document* document, const StyleRuleFontFace* fontFaceRule)
188 RefPtrWillBeRawPtr<FontFace> fontFace = adoptRefWillBeNoop(new FontFace());
190 if (fontFace->setFamilyValue(toCSSValueList(family.get()))
191 && fontFace->setPropertyFromStyle(properties, CSSPropertyFontStyle)
192 && fontFace->setPropertyFromStyle(properties, CSSPropertyFontWeight)
193 && fontFace->setPropertyFromStyle(properties, CSSPropertyFontStretch)
194 && fontFace->setPropertyFromStyle(properties, CSSPropertyUnicodeRange)
195 && fontFace->setPropertyFromStyle(properties, CSSPropertyFontVariant)
196 && fontFace->setPropertyFromStyle(properties, CSSPropertyWebkitFontFeatureSettings)
197 && !fontFace->family().isEmpty()
198 && fontFace->traits().mask()) {
199 fontFace->initCSSFontFace(document, src);
200 return fontFace.release();
205 FontFace::FontFace()
210 FontFace::~FontFace()
214 String FontFace::style() const
219 String FontFace::weight() const
224 String FontFace::stretch() const
229 String FontFace::unicodeRange() const
234 String FontFace::variant() const
239 String FontFace::featureSettings() const
244 void FontFace::setStyle(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
249 void FontFace::setWeight(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
254 void FontFace::setStretch(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
259 void FontFace::setUnicodeRange(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
264 void FontFace::setVariant(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
269 void FontFace::setFeatureSettings(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
274 void FontFace::setPropertyFromString(const Document* document, const String& s, CSSPropertyID propertyID, ExceptionState& exceptionState)
281 bool FontFace::setPropertyFromStyle(const StylePropertySet& properties, CSSPropertyID propertyID)
286 bool FontFace::setPropertyValue(PassRefPtrWillBeRawPtr<CSSValue> value, CSSPropertyID propertyID)
316 bool FontFace::setFamilyValue(CSSValueList* familyList)
356 String FontFace::status() const
373 void FontFace::setLoadStatus(LoadStatus status)
392 ScriptPromise FontFace::fontStatusPromise(ScriptState* scriptState)
394 // Since we cannot hold a ScriptPromise as a member of FontFace (that will
406 ScriptPromise FontFace::load(ScriptState* scriptState)
412 void FontFace::loadWithCallback(PassRefPtrWillBeRawPtr<LoadFontCallback> callback, ExecutionContext* context)
423 void FontFace::loadInternal(ExecutionContext* context)
432 void FontFace::resolveReadyPromises()
439 FontTraits FontFace::traits() const
534 static PassOwnPtrWillBeRawPtr<CSSFontFace> createCSSFontFace(FontFace* fontFace, CSSValue* unicodeRange)
545 return adoptPtrWillBeNoop(new CSSFontFace(fontFace, ranges));
548 void FontFace::initCSSFontFace(Document* document, PassRefPtrWillBeRawPtr<CSSValue> src)
605 void FontFace::initCSSFontFace(const unsigned char* data, unsigned size)
620 void FontFace::trace(Visitor* visitor)
634 bool FontFace::hadBlankText() const