| 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 } | 545 } |
| 546 } | 546 } |
| 547 | 547 |
| 548 void FontFace::initCSSFontFace(const unsigned char* data, unsigned size) | 548 void FontFace::initCSSFontFace(const unsigned char* data, unsigned size) |
| 549 { | 549 { |
| 550 m_cssFontFace = createCSSFontFace(this, m_unicodeRange.get()); | 550 m_cssFontFace = createCSSFontFace(this, m_unicodeRange.get()); |
| 551 if (m_error) | 551 if (m_error) |
| 552 return; | 552 return; |
| 553 | 553 |
| 554 RefPtr<SharedBuffer> buffer = SharedBuffer::create(data, size); | 554 RefPtr<SharedBuffer> buffer = SharedBuffer::create(data, size); |
| 555 OwnPtrWillBeRawPtr<BinaryDataFontFaceSource> source = adoptPtrWillBeNoop(new
BinaryDataFontFaceSource(buffer.get())); | 555 OwnPtrWillBeRawPtr<BinaryDataFontFaceSource> source = adoptPtrWillBeNoop(new
BinaryDataFontFaceSource(buffer.get(), m_otsParseMessage)); |
| 556 if (source->isValid()) | 556 if (source->isValid()) |
| 557 setLoadStatus(Loaded); | 557 setLoadStatus(Loaded); |
| 558 else | 558 else |
| 559 setError(DOMException::create(SyntaxError, "Invalid font data in ArrayBu
ffer.")); | 559 setError(DOMException::create(SyntaxError, "Invalid font data in ArrayBu
ffer.")); |
| 560 m_cssFontFace->addSource(source.release()); | 560 m_cssFontFace->addSource(source.release()); |
| 561 } | 561 } |
| 562 | 562 |
| 563 DEFINE_TRACE(FontFace) | 563 DEFINE_TRACE(FontFace) |
| 564 { | 564 { |
| 565 visitor->trace(m_src); | 565 visitor->trace(m_src); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 580 { | 580 { |
| 581 return m_cssFontFace->hadBlankText(); | 581 return m_cssFontFace->hadBlankText(); |
| 582 } | 582 } |
| 583 | 583 |
| 584 bool FontFace::hasPendingActivity() const | 584 bool FontFace::hasPendingActivity() const |
| 585 { | 585 { |
| 586 return m_status == Loading && executionContext() && !executionContext()->act
iveDOMObjectsAreStopped(); | 586 return m_status == Loading && executionContext() && !executionContext()->act
iveDOMObjectsAreStopped(); |
| 587 } | 587 } |
| 588 | 588 |
| 589 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |