| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // CanvasImageSource implementation | 81 // CanvasImageSource implementation |
| 82 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; | 82 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; |
| 83 bool isVideoElement() const override { return true; } | 83 bool isVideoElement() const override { return true; } |
| 84 bool wouldTaintOrigin(SecurityOrigin*) const override; | 84 bool wouldTaintOrigin(SecurityOrigin*) const override; |
| 85 FloatSize elementSize(const FloatSize&) const override; | 85 FloatSize elementSize(const FloatSize&) const override; |
| 86 const KURL& sourceURL() const override { return currentSrc(); } | 86 const KURL& sourceURL() const override { return currentSrc(); } |
| 87 bool isHTMLVideoElement() const override { return true; } | 87 bool isHTMLVideoElement() const override { return true; } |
| 88 int sourceWidth() override { return videoWidth(); } | 88 int sourceWidth() override { return videoWidth(); } |
| 89 int sourceHeight() override { return videoHeight(); } | 89 int sourceHeight() override { return videoHeight(); } |
| 90 bool isAccelerated() const override { return false; } // Video elements curr
ently always go through RAM when used as a canvas image source. |
| 90 | 91 |
| 91 // ImageBitmapSource implementation | 92 // ImageBitmapSource implementation |
| 92 IntSize bitmapSourceSize() const override; | 93 IntSize bitmapSourceSize() const override; |
| 93 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Optional<IntRect
> cropRect, const ImageBitmapOptions&, ExceptionState&) override; | 94 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, Optional<IntRect
> cropRect, const ImageBitmapOptions&, ExceptionState&) override; |
| 94 | 95 |
| 95 private: | 96 private: |
| 96 HTMLVideoElement(Document&); | 97 HTMLVideoElement(Document&); |
| 97 | 98 |
| 98 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 99 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
| 99 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 100 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 100 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 101 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 101 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 102 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 102 bool isPresentationAttribute(const QualifiedName&) const override; | 103 bool isPresentationAttribute(const QualifiedName&) const override; |
| 103 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; | 104 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; |
| 104 bool isURLAttribute(const Attribute&) const override; | 105 bool isURLAttribute(const Attribute&) const override; |
| 105 const AtomicString imageSourceURL() const override; | 106 const AtomicString imageSourceURL() const override; |
| 106 | 107 |
| 107 void updateDisplayState() override; | 108 void updateDisplayState() override; |
| 108 void didMoveToNewDocument(Document& oldDocument) override; | 109 void didMoveToNewDocument(Document& oldDocument) override; |
| 109 void setDisplayMode(DisplayMode) override; | 110 void setDisplayMode(DisplayMode) override; |
| 110 | 111 |
| 111 Member<HTMLImageLoader> m_imageLoader; | 112 Member<HTMLImageLoader> m_imageLoader; |
| 112 | 113 |
| 113 AtomicString m_defaultPosterURL; | 114 AtomicString m_defaultPosterURL; |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace blink | 117 } // namespace blink |
| 117 | 118 |
| 118 #endif // HTMLVideoElement_h | 119 #endif // HTMLVideoElement_h |
| OLD | NEW |