| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 protected: | 325 protected: |
| 326 HTMLMediaElement(const QualifiedName&, Document&); | 326 HTMLMediaElement(const QualifiedName&, Document&); |
| 327 ~HTMLMediaElement() override; | 327 ~HTMLMediaElement() override; |
| 328 void dispose(); | 328 void dispose(); |
| 329 | 329 |
| 330 void parseAttribute(const AttributeModificationParams&) override; | 330 void parseAttribute(const AttributeModificationParams&) override; |
| 331 void finishParsingChildren() final; | 331 void finishParsingChildren() final; |
| 332 bool isURLAttribute(const Attribute&) const override; | 332 bool isURLAttribute(const Attribute&) const override; |
| 333 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 333 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 334 | 334 |
| 335 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 336 void removedFrom(ContainerNode*) override; |
| 337 |
| 335 void didMoveToNewDocument(Document& oldDocument) override; | 338 void didMoveToNewDocument(Document& oldDocument) override; |
| 336 virtual KURL posterImageURL() const { return KURL(); } | 339 virtual KURL posterImageURL() const { return KURL(); } |
| 337 | 340 |
| 338 enum DisplayMode { Unknown, Poster, Video }; | 341 enum DisplayMode { Unknown, Poster, Video }; |
| 339 DisplayMode getDisplayMode() const { return m_displayMode; } | 342 DisplayMode getDisplayMode() const { return m_displayMode; } |
| 340 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } | 343 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
| 341 | 344 |
| 342 private: | 345 private: |
| 343 // Friend class for testing. | 346 // Friend class for testing. |
| 344 friend class MediaElementFillingViewportTest; | 347 friend class MediaElementFillingViewportTest; |
| 345 | 348 |
| 346 void resetMediaPlayerAndMediaSource(); | 349 void resetMediaPlayerAndMediaSource(); |
| 347 | 350 |
| 348 bool alwaysCreateUserAgentShadowRoot() const final { return true; } | 351 bool alwaysCreateUserAgentShadowRoot() const final { return true; } |
| 349 bool areAuthorShadowsAllowed() const final { return false; } | 352 bool areAuthorShadowsAllowed() const final { return false; } |
| 350 | 353 |
| 351 bool supportsFocus() const final; | 354 bool supportsFocus() const final; |
| 352 bool isMouseFocusable() const final; | 355 bool isMouseFocusable() const final; |
| 353 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 356 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
| 354 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 357 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 355 InsertionNotificationRequest insertedInto(ContainerNode*) final; | |
| 356 void didNotifySubtreeInsertionsToDocument() override; | 358 void didNotifySubtreeInsertionsToDocument() override; |
| 357 void removedFrom(ContainerNode*) final; | |
| 358 void didRecalcStyle() final; | 359 void didRecalcStyle() final; |
| 359 | 360 |
| 360 bool canStartSelection() const override { return false; } | 361 bool canStartSelection() const override { return false; } |
| 361 | 362 |
| 362 bool isInteractiveContent() const final; | 363 bool isInteractiveContent() const final; |
| 363 | 364 |
| 364 // SuspendableObject functions. | 365 // SuspendableObject functions. |
| 365 void contextDestroyed(ExecutionContext*) override; | 366 void contextDestroyed(ExecutionContext*) override; |
| 366 | 367 |
| 367 virtual void updateDisplayState() {} | 368 virtual void updateDisplayState() {} |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 765 |
| 765 inline bool isHTMLMediaElement(const HTMLElement& element) { | 766 inline bool isHTMLMediaElement(const HTMLElement& element) { |
| 766 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 767 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 767 } | 768 } |
| 768 | 769 |
| 769 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 770 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 770 | 771 |
| 771 } // namespace blink | 772 } // namespace blink |
| 772 | 773 |
| 773 #endif // HTMLMediaElement_h | 774 #endif // HTMLMediaElement_h |
| OLD | NEW |