| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 FontFace* fontFace = new FontFace(context, family, descriptors); | 86 FontFace* fontFace = new FontFace(context, family, descriptors); |
| 87 | 87 |
| 88 CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc); | 88 CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc); |
| 89 if (!src || !src->isValueList()) | 89 if (!src || !src->isValueList()) |
| 90 fontFace->setError(DOMException::create(SyntaxError, "The source provide
d ('" + source + "') could not be parsed as a value list.")); | 90 fontFace->setError(DOMException::create(SyntaxError, "The source provide
d ('" + source + "') could not be parsed as a value list.")); |
| 91 | 91 |
| 92 fontFace->initCSSFontFace(toDocument(context), src); | 92 fontFace->initCSSFontFace(toDocument(context), src); |
| 93 return fontFace; | 93 return fontFace; |
| 94 } | 94 } |
| 95 | 95 |
| 96 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family
, DOMArrayBuffer* source, const FontFaceDescriptors& descriptors) | 96 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family
, PassRefPtr<DOMArrayBuffer> source, const FontFaceDescriptors& descriptors) |
| 97 { | 97 { |
| 98 FontFace* fontFace = new FontFace(context, family, descriptors); | 98 FontFace* fontFace = new FontFace(context, family, descriptors); |
| 99 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->data()),
source->byteLength()); | 99 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->data()),
source->byteLength()); |
| 100 return fontFace; | 100 return fontFace; |
| 101 } | 101 } |
| 102 | 102 |
| 103 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family
, DOMArrayBufferView* source, const FontFaceDescriptors& descriptors) | 103 FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family
, PassRefPtr<DOMArrayBufferView> source, const FontFaceDescriptors& descriptors) |
| 104 { | 104 { |
| 105 FontFace* fontFace = new FontFace(context, family, descriptors); | 105 FontFace* fontFace = new FontFace(context, family, descriptors); |
| 106 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->baseAddr
ess()), source->byteLength()); | 106 fontFace->initCSSFontFace(static_cast<const unsigned char*>(source->baseAddr
ess()), source->byteLength()); |
| 107 return fontFace; | 107 return fontFace; |
| 108 } | 108 } |
| 109 | 109 |
| 110 FontFace* FontFace::create(Document* document, const StyleRuleFontFace* fontFace
Rule) | 110 FontFace* FontFace::create(Document* document, const StyleRuleFontFace* fontFace
Rule) |
| 111 { | 111 { |
| 112 const StylePropertySet& properties = fontFaceRule->properties(); | 112 const StylePropertySet& properties = fontFaceRule->properties(); |
| 113 | 113 |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 { | 645 { |
| 646 return m_cssFontFace->hadBlankText(); | 646 return m_cssFontFace->hadBlankText(); |
| 647 } | 647 } |
| 648 | 648 |
| 649 bool FontFace::hasPendingActivity() const | 649 bool FontFace::hasPendingActivity() const |
| 650 { | 650 { |
| 651 return m_status == Loading && getExecutionContext() && !getExecutionContext(
)->activeDOMObjectsAreStopped(); | 651 return m_status == Loading && getExecutionContext() && !getExecutionContext(
)->activeDOMObjectsAreStopped(); |
| 652 } | 652 } |
| 653 | 653 |
| 654 } // namespace blink | 654 } // namespace blink |
| OLD | NEW |