Index: third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
index 4c30836ddb75063842efa86775f0456ff6316ccc..2d42f461bf49503a4ec7e1c1d82b4fc10b5c63db 100644 |
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp |
@@ -45,13 +45,12 @@ |
return StaticBitmapImage::create(adoptRef(surface->newImageSnapshot())); |
} |
-ImageBitmap::ImageBitmap(HTMLImageElement* image, const IntRect& cropRect, Document* document) |
+ImageBitmap::ImageBitmap(HTMLImageElement* image, const IntRect& cropRect) |
{ |
m_image = cropImage(image->cachedImage()->image(), cropRect); |
- m_image->setOriginClean(!image->wouldTaintOrigin(document->securityOrigin())); |
-} |
- |
-ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect, Document* document) |
+} |
+ |
+ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect) |
{ |
IntSize playerSize; |
if (video->webMediaPlayer()) |
@@ -66,14 +65,12 @@ |
IntPoint dstPoint = IntPoint(std::max(0, -cropRect.x()), std::max(0, -cropRect.y())); |
video->paintCurrentFrame(buffer->canvas(), IntRect(dstPoint, srcRect.size()), nullptr); |
m_image = StaticBitmapImage::create(buffer->newSkImageSnapshot(PreferNoAcceleration)); |
- m_image->setOriginClean(!video->wouldTaintOrigin(document->securityOrigin())); |
} |
ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas, const IntRect& cropRect) |
{ |
ASSERT(canvas->isPaintable()); |
m_image = cropImage(canvas->copiedImage(BackBuffer, PreferAcceleration).get(), cropRect); |
- m_image->setOriginClean(canvas->originClean()); |
} |
ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect) |
@@ -101,13 +98,11 @@ |
ImageBitmap::ImageBitmap(ImageBitmap* bitmap, const IntRect& cropRect) |
{ |
m_image = cropImage(bitmap->bitmapImage(), cropRect); |
- m_image->setOriginClean(bitmap->originClean()); |
-} |
- |
-ImageBitmap::ImageBitmap(PassRefPtrWillBeRawPtr<StaticBitmapImage> image, const IntRect& cropRect) |
-{ |
- m_image = cropImage(image.get(), cropRect); |
- m_image->setOriginClean(image->originClean()); |
+} |
+ |
+ImageBitmap::ImageBitmap(Image* image, const IntRect& cropRect) |
+{ |
+ m_image = cropImage(image, cropRect); |
} |
ImageBitmap::ImageBitmap(PassRefPtr<StaticBitmapImage> image) |
@@ -126,16 +121,16 @@ |
{ |
} |
-PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLImageElement* image, const IntRect& cropRect, Document* document) |
-{ |
- IntRect normalizedCropRect = normalizeRect(cropRect); |
- return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect, document)); |
-} |
- |
-PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, const IntRect& cropRect, Document* document) |
-{ |
- IntRect normalizedCropRect = normalizeRect(cropRect); |
- return adoptRefWillBeNoop(new ImageBitmap(video, normalizedCropRect, document)); |
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLImageElement* image, const IntRect& cropRect) |
+{ |
+ IntRect normalizedCropRect = normalizeRect(cropRect); |
+ return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect)); |
+} |
+ |
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, const IntRect& cropRect) |
+{ |
+ IntRect normalizedCropRect = normalizeRect(cropRect); |
+ return adoptRefWillBeNoop(new ImageBitmap(video, normalizedCropRect)); |
} |
PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLCanvasElement* canvas, const IntRect& cropRect) |
@@ -156,7 +151,7 @@ |
return adoptRefWillBeNoop(new ImageBitmap(bitmap, normalizedCropRect)); |
} |
-PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(PassRefPtr<StaticBitmapImage> image, const IntRect& cropRect) |
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(Image* image, const IntRect& cropRect) |
{ |
IntRect normalizedCropRect = normalizeRect(cropRect); |
return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect)); |