OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 InsertionNotificationRequest InsertedInto(ContainerNode*) override; | 343 InsertionNotificationRequest InsertedInto(ContainerNode*) override; |
344 void RemovedFrom(ContainerNode*) override; | 344 void RemovedFrom(ContainerNode*) override; |
345 | 345 |
346 void DidMoveToNewDocument(Document& old_document) override; | 346 void DidMoveToNewDocument(Document& old_document) override; |
347 virtual KURL PosterImageURL() const { return KURL(); } | 347 virtual KURL PosterImageURL() const { return KURL(); } |
348 | 348 |
349 enum DisplayMode { kUnknown, kPoster, kVideo }; | 349 enum DisplayMode { kUnknown, kPoster, kVideo }; |
350 DisplayMode GetDisplayMode() const { return display_mode_; } | 350 DisplayMode GetDisplayMode() const { return display_mode_; } |
351 virtual void SetDisplayMode(DisplayMode mode) { display_mode_ = mode; } | 351 virtual void SetDisplayMode(DisplayMode mode) { display_mode_ = mode; } |
352 | 352 |
| 353 // Assert the correct order of the children in shadow dom when DCHECK is on. |
| 354 static void AssertShadowRootChildren(ShadowRoot&); |
| 355 |
353 private: | 356 private: |
354 // Friend class for testing. | 357 // Friend class for testing. |
355 friend class MediaElementFillingViewportTest; | 358 friend class MediaElementFillingViewportTest; |
356 | 359 |
357 void ResetMediaPlayerAndMediaSource(); | 360 void ResetMediaPlayerAndMediaSource(); |
358 | 361 |
359 bool AlwaysCreateUserAgentShadowRoot() const final { return true; } | 362 bool AlwaysCreateUserAgentShadowRoot() const final { return true; } |
360 bool AreAuthorShadowsAllowed() const final { return false; } | 363 bool AreAuthorShadowsAllowed() const final { return false; } |
361 | 364 |
362 bool SupportsFocus() const final; | 365 bool SupportsFocus() const final; |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 | 772 |
770 inline bool IsHTMLMediaElement(const HTMLElement& element) { | 773 inline bool IsHTMLMediaElement(const HTMLElement& element) { |
771 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 774 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
772 } | 775 } |
773 | 776 |
774 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 777 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
775 | 778 |
776 } // namespace blink | 779 } // namespace blink |
777 | 780 |
778 #endif // HTMLMediaElement_h | 781 #endif // HTMLMediaElement_h |
OLD | NEW |