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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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())); |
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 void FontFace::trace(Visitor* visitor) | 563 DEFINE_TRACE(FontFace) |
564 { | 564 { |
565 visitor->trace(m_src); | 565 visitor->trace(m_src); |
566 visitor->trace(m_style); | 566 visitor->trace(m_style); |
567 visitor->trace(m_weight); | 567 visitor->trace(m_weight); |
568 visitor->trace(m_stretch); | 568 visitor->trace(m_stretch); |
569 visitor->trace(m_unicodeRange); | 569 visitor->trace(m_unicodeRange); |
570 visitor->trace(m_variant); | 570 visitor->trace(m_variant); |
571 visitor->trace(m_featureSettings); | 571 visitor->trace(m_featureSettings); |
572 visitor->trace(m_error); | 572 visitor->trace(m_error); |
573 visitor->trace(m_loadedProperty); | 573 visitor->trace(m_loadedProperty); |
574 visitor->trace(m_cssFontFace); | 574 visitor->trace(m_cssFontFace); |
575 visitor->trace(m_callbacks); | 575 visitor->trace(m_callbacks); |
576 ActiveDOMObject::trace(visitor); | 576 ActiveDOMObject::trace(visitor); |
577 } | 577 } |
578 | 578 |
579 bool FontFace::hadBlankText() const | 579 bool FontFace::hadBlankText() const |
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 |