OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); | 258 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); |
259 void scheduleTimeupdateEvent(bool periodicEvent); | 259 void scheduleTimeupdateEvent(bool periodicEvent); |
260 | 260 |
261 // Returns the "effective media volume" value as specified in the HTML5 spec
. | 261 // Returns the "effective media volume" value as specified in the HTML5 spec
. |
262 double effectiveMediaVolume() const; | 262 double effectiveMediaVolume() const; |
263 | 263 |
264 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF
or] IDL attribute usage.) | 264 // Predicates also used when dispatching wrapper creation (cf. [SpecialWrapF
or] IDL attribute usage.) |
265 virtual bool isHTMLAudioElement() const { return false; } | 265 virtual bool isHTMLAudioElement() const { return false; } |
266 virtual bool isHTMLVideoElement() const { return false; } | 266 virtual bool isHTMLVideoElement() const { return false; } |
267 | 267 |
| 268 // Notify us that we have changed layout size. This is useful so that we |
| 269 // can paint based on our last known size, without having to trigger a |
| 270 // layout mid-paint. |
| 271 void notifySizeChanged(const LayoutSize& newSize); |
| 272 |
| 273 // Get the last known layout size that we were given by notifySizeChanged. |
| 274 const LayoutSize& cachedLayoutSize() const { return m_cachedSize; } |
| 275 |
268 protected: | 276 protected: |
269 HTMLMediaElement(const QualifiedName&, Document&); | 277 HTMLMediaElement(const QualifiedName&, Document&); |
270 ~HTMLMediaElement() override; | 278 ~HTMLMediaElement() override; |
271 #if ENABLE(OILPAN) | 279 #if ENABLE(OILPAN) |
272 void dispose(); | 280 void dispose(); |
273 #endif | 281 #endif |
274 | 282 |
275 void parseAttribute(const QualifiedName&, const AtomicString&) override; | 283 void parseAttribute(const QualifiedName&, const AtomicString&) override; |
276 void finishParsingChildren() final; | 284 void finishParsingChildren() final; |
277 bool isURLAttribute(const Attribute&) const override; | 285 bool isURLAttribute(const Attribute&) const override; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 PersistentWillBeMember<AudioClientImpl> m_client; | 621 PersistentWillBeMember<AudioClientImpl> m_client; |
614 Mutex provideInputLock; | 622 Mutex provideInputLock; |
615 }; | 623 }; |
616 | 624 |
617 AudioSourceProviderImpl m_audioSourceProvider; | 625 AudioSourceProviderImpl m_audioSourceProvider; |
618 #endif | 626 #endif |
619 | 627 |
620 friend class MediaController; | 628 friend class MediaController; |
621 PersistentWillBeMember<MediaController> m_mediaController; | 629 PersistentWillBeMember<MediaController> m_mediaController; |
622 | 630 |
| 631 LayoutSize m_cachedSize; |
| 632 |
623 friend class Internals; | 633 friend class Internals; |
624 friend class TrackDisplayUpdateScope; | 634 friend class TrackDisplayUpdateScope; |
625 | 635 |
626 static URLRegistry* s_mediaStreamRegistry; | 636 static URLRegistry* s_mediaStreamRegistry; |
627 }; | 637 }; |
628 | 638 |
629 inline bool isHTMLMediaElement(const HTMLElement& element) | 639 inline bool isHTMLMediaElement(const HTMLElement& element) |
630 { | 640 { |
631 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 641 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
632 } | 642 } |
633 | 643 |
634 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 644 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
635 | 645 |
636 } // namespace blink | 646 } // namespace blink |
637 | 647 |
638 #endif // HTMLMediaElement_h | 648 #endif // HTMLMediaElement_h |
OLD | NEW |