| 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* font_face = new FontFace(context, family, descriptors); | 96 FontFace* font_face = new FontFace(context, family, descriptors); |
| 95 | 97 |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 | 674 |
| 673 bool FontFace::HadBlankText() const { | 675 bool FontFace::HadBlankText() const { |
| 674 return css_font_face_->HadBlankText(); | 676 return css_font_face_->HadBlankText(); |
| 675 } | 677 } |
| 676 | 678 |
| 677 bool FontFace::HasPendingActivity() const { | 679 bool FontFace::HasPendingActivity() const { |
| 678 return status_ == kLoading && GetExecutionContext(); | 680 return status_ == kLoading && GetExecutionContext(); |
| 679 } | 681 } |
| 680 | 682 |
| 681 } // namespace blink | 683 } // namespace blink |
| OLD | NEW |