Home | History | Annotate | Download | only in css

Lines Matching defs:exceptionState

35 #include "bindings/v8/ExceptionState.h"
106 static bool initFontFace(FontFace* fontFace, ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors, ExceptionState& exceptionState)
108 fontFace->setFamily(context, family, exceptionState);
109 if (exceptionState.hadException())
114 fontFace->setStyle(context, value, exceptionState);
115 if (exceptionState.hadException())
119 fontFace->setWeight(context, value, exceptionState);
120 if (exceptionState.hadException())
124 fontFace->setStretch(context, value, exceptionState);
125 if (exceptionState.hadException())
129 fontFace->setUnicodeRange(context, value, exceptionState);
130 if (exceptionState.hadException())
134 fontFace->setVariant(context, value, exceptionState);
135 if (exceptionState.hadException())
139 fontFace->setFeatureSettings(context, value, exceptionState);
140 if (exceptionState.hadException())
146 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, const String& source, const Dictionary& descriptors, ExceptionState& exceptionState)
150 exceptionState.throwDOMException(SyntaxError, "The source provided ('" + source + "') could not be parsed as a value list.");
155 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
160 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, PassRefPtr<ArrayBuffer> source, const Dictionary& descriptors, ExceptionState& exceptionState)
163 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
168 PassRefPtrWillBeRawPtr<FontFace> FontFace::create(ExecutionContext* context, const AtomicString& family, PassRefPtr<ArrayBufferView> source, const Dictionary& descriptors, ExceptionState& exceptionState)
171 if (initFontFace(fontFace.get(), context, family, descriptors, exceptionState))
244 void FontFace::setStyle(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
246 setPropertyFromString(toDocument(context), s, CSSPropertyFontStyle, exceptionState);
249 void FontFace::setWeight(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
251 setPropertyFromString(toDocument(context), s, CSSPropertyFontWeight, exceptionState);
254 void FontFace::setStretch(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
256 setPropertyFromString(toDocument(context), s, CSSPropertyFontStretch, exceptionState);
259 void FontFace::setUnicodeRange(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
261 setPropertyFromString(toDocument(context), s, CSSPropertyUnicodeRange, exceptionState);
264 void FontFace::setVariant(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
266 setPropertyFromString(toDocument(context), s, CSSPropertyFontVariant, exceptionState);
269 void FontFace::setFeatureSettings(ExecutionContext* context, const String& s, ExceptionState& exceptionState)
271 setPropertyFromString(toDocument(context), s, CSSPropertyWebkitFontFeatureSettings, exceptionState);
274 void FontFace::setPropertyFromString(const Document* document, const String& s, CSSPropertyID propertyID, ExceptionState& exceptionState)
278 exceptionState.throwDOMException(SyntaxError, "Failed to set '" + s + "' as a property value.");