OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi
ned in Source/WebCore/platform/graphics/MediaPlayer.h. | 58 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defi
ned in Source/WebCore/platform/graphics/MediaPlayer.h. |
59 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject
texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply
Alpha, bool flipY); | 59 bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject
texture, GC3Dint level, GC3Denum type, GC3Denum internalFormat, bool premultiply
Alpha, bool flipY); |
60 | 60 |
61 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di
splayMode() == PosterWaitingForVideo; } | 61 bool shouldDisplayPosterImage() const { return displayMode() == Poster || di
splayMode() == PosterWaitingForVideo; } |
62 | 62 |
63 KURL posterImageURL() const; | 63 KURL posterImageURL() const; |
64 | 64 |
65 private: | 65 private: |
66 HTMLVideoElement(const QualifiedName&, Document&, bool); | 66 HTMLVideoElement(const QualifiedName&, Document&, bool); |
67 | 67 |
68 virtual bool rendererIsNeeded(const RenderStyle&); | 68 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
69 virtual RenderObject* createRenderer(RenderStyle*); | 69 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
70 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 70 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
74 virtual bool isVideo() const { return true; } | 74 virtual bool isVideo() const OVERRIDE { return true; } |
75 virtual bool hasVideo() const { return player() && player()->hasVideo(); } | 75 virtual bool hasVideo() const OVERRIDE { return player() && player()->hasVid
eo(); } |
76 virtual bool supportsFullscreen() const; | 76 virtual bool supportsFullscreen() const OVERRIDE; |
77 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 77 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
78 virtual const AtomicString imageSourceURL() const OVERRIDE; | 78 virtual const AtomicString imageSourceURL() const OVERRIDE; |
79 | 79 |
80 virtual bool hasAvailableVideoFrame() const; | 80 virtual bool hasAvailableVideoFrame() const; |
81 virtual void updateDisplayState(); | 81 virtual void updateDisplayState() OVERRIDE; |
82 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 82 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
83 virtual void setDisplayMode(DisplayMode); | 83 virtual void setDisplayMode(DisplayMode) OVERRIDE; |
84 | 84 |
85 OwnPtr<HTMLImageLoader> m_imageLoader; | 85 OwnPtr<HTMLImageLoader> m_imageLoader; |
86 | 86 |
87 AtomicString m_defaultPosterURL; | 87 AtomicString m_defaultPosterURL; |
88 }; | 88 }; |
89 | 89 |
90 inline bool isHTMLVideoElement(const Node* node) | 90 inline bool isHTMLVideoElement(const Node* node) |
91 { | 91 { |
92 return node->hasTagName(HTMLNames::videoTag); | 92 return node->hasTagName(HTMLNames::videoTag); |
93 } | 93 } |
94 | 94 |
95 inline bool isHTMLVideoElement(const Element* element) | 95 inline bool isHTMLVideoElement(const Element* element) |
96 { | 96 { |
97 return element->hasTagName(HTMLNames::videoTag); | 97 return element->hasTagName(HTMLNames::videoTag); |
98 } | 98 } |
99 | 99 |
100 DEFINE_NODE_TYPE_CASTS(HTMLVideoElement, hasTagName(HTMLNames::videoTag)); | 100 DEFINE_NODE_TYPE_CASTS(HTMLVideoElement, hasTagName(HTMLNames::videoTag)); |
101 | 101 |
102 } //namespace | 102 } //namespace |
103 | 103 |
104 #endif | 104 #endif |
OLD | NEW |