mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1349459 part 1 - mark element as tainted when CreateImageBitmap() is used; r=jwwang,mattwoodrow
In this patch, we simply modify the ImageBitmap::createInternal(..., HTMLMediaElement&, ...) method to use HTMLMediaElement::GetCurrentImage() utility and HTMLMediaElement::GetCurrentImage() marks the videl element as tainted. MozReview-Commit-ID: KyN2xRqKVrr --HG-- extra : rebase_source : 5e0e0400f1848823751cd88f2bbe734bc5aec5fe
This commit is contained in:
parent
871c76462e
commit
1ae5278f6a
@ -827,15 +827,7 @@ ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, HTMLVideoElement& aVideoEl
|
||||
}
|
||||
|
||||
// Create ImageBitmap.
|
||||
ImageContainer *container = aVideoEl.GetImageContainer();
|
||||
|
||||
if (!container) {
|
||||
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AutoLockImage lockImage(container);
|
||||
layers::Image* data = lockImage.GetImage();
|
||||
RefPtr<layers::Image> data = aVideoEl.GetCurrentImage();
|
||||
if (!data) {
|
||||
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user