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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } | 74 } |
75 | 75 |
76 FontFace* FontFace::create(ExecutionContext* context, | 76 FontFace* FontFace::create(ExecutionContext* context, |
77 const AtomicString& family, | 77 const AtomicString& family, |
78 StringOrArrayBufferOrArrayBufferView& source, | 78 StringOrArrayBufferOrArrayBufferView& source, |
79 const FontFaceDescriptors& descriptors) { | 79 const FontFaceDescriptors& descriptors) { |
80 if (source.isString()) | 80 if (source.isString()) |
81 return create(context, family, source.getAsString(), descriptors); | 81 return create(context, family, source.getAsString(), descriptors); |
82 if (source.isArrayBuffer()) | 82 if (source.isArrayBuffer()) |
83 return create(context, family, source.getAsArrayBuffer(), descriptors); | 83 return create(context, family, source.getAsArrayBuffer(), descriptors); |
84 if (source.isArrayBufferView()) | 84 if (source.isArrayBufferView()) { |
85 return create(context, family, source.getAsArrayBufferView(), descriptors); | 85 return create(context, family, source.getAsArrayBufferView().view(), |
| 86 descriptors); |
| 87 } |
86 NOTREACHED(); | 88 NOTREACHED(); |
87 return nullptr; | 89 return nullptr; |
88 } | 90 } |
89 | 91 |
90 FontFace* FontFace::create(ExecutionContext* context, | 92 FontFace* FontFace::create(ExecutionContext* context, |
91 const AtomicString& family, | 93 const AtomicString& family, |
92 const String& source, | 94 const String& source, |
93 const FontFaceDescriptors& descriptors) { | 95 const FontFaceDescriptors& descriptors) { |
94 FontFace* fontFace = new FontFace(context, family, descriptors); | 96 FontFace* fontFace = new FontFace(context, family, descriptors); |
95 | 97 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 | 673 |
672 bool FontFace::hadBlankText() const { | 674 bool FontFace::hadBlankText() const { |
673 return m_cssFontFace->hadBlankText(); | 675 return m_cssFontFace->hadBlankText(); |
674 } | 676 } |
675 | 677 |
676 bool FontFace::hasPendingActivity() const { | 678 bool FontFace::hasPendingActivity() const { |
677 return m_status == Loading && getExecutionContext(); | 679 return m_status == Loading && getExecutionContext(); |
678 } | 680 } |
679 | 681 |
680 } // namespace blink | 682 } // namespace blink |
OLD | NEW |