diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index e21af85655..a9a387e15c 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -14625,21 +14625,6 @@ nsGlobalWindow::CreateImageBitmap(const ImageBitmapSource& aImage, return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv); } -already_AddRefed -nsGlobalWindow::CreateImageBitmap(const ImageBitmapSource& aImage, - int32_t aOffset, int32_t aLength, - ImageBitmapFormat aFormat, - const Sequence& aLayout, - ErrorResult& aRv) -{ - if (!ImageBitmap::ExtensionsEnabled(nullptr, nullptr)) { - aRv.Throw(NS_ERROR_TYPE_ERR); - return nullptr; - } - aRv.Throw(NS_ERROR_TYPE_ERR); - return nullptr; -} - // https://html.spec.whatwg.org/#structured-cloning void nsGlobalWindow::StructuredClone(JSContext* aCx, diff --git a/dom/canvas/ImageBitmap.cpp b/dom/canvas/ImageBitmap.cpp index e7bc1f08c8..c38f6d1650 100644 --- a/dom/canvas/ImageBitmap.cpp +++ b/dom/canvas/ImageBitmap.cpp @@ -1867,25 +1867,5 @@ ImageBitmap::MapDataInto(JSContext* aCx, return promise.forget(); } -/*static*/ already_AddRefed -ImageBitmap::Create(nsIGlobalObject* aGlobal, - const ImageBitmapSource& aBuffer, - int32_t aOffset, int32_t aLength, - mozilla::dom::ImageBitmapFormat aFormat, - const Sequence& aLayout, - ErrorResult& aRv) -{ - MOZ_ASSERT(aGlobal); - - RefPtr promise = Promise::Create(aGlobal, aRv); - - if (NS_WARN_IF(aRv.Failed())) { - return nullptr; - } - - aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); - return promise.forget(); -} - } // namespace dom } // namespace mozilla diff --git a/dom/canvas/ImageBitmap.h b/dom/canvas/ImageBitmap.h index f677ad6642..20422d969c 100644 --- a/dom/canvas/ImageBitmap.h +++ b/dom/canvas/ImageBitmap.h @@ -132,14 +132,6 @@ public: Create(nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc, const Maybe& aCropRect, ErrorResult& aRv); - static already_AddRefed - Create(nsIGlobalObject* aGlobal, - const ImageBitmapSource& aBuffer, - int32_t aOffset, int32_t aLength, - mozilla::dom::ImageBitmapFormat aFormat, - const Sequence& aLayout, - ErrorResult& aRv); - static JSObject* ReadStructuredClone(JSContext* aCx, JSStructuredCloneReader* aReader, diff --git a/dom/webidl/WindowOrWorkerGlobalScope.webidl b/dom/webidl/WindowOrWorkerGlobalScope.webidl index d378ba49ec..2989bc15c8 100644 --- a/dom/webidl/WindowOrWorkerGlobalScope.webidl +++ b/dom/webidl/WindowOrWorkerGlobalScope.webidl @@ -72,18 +72,3 @@ partial interface WindowOrWorkerGlobalScope { [Throws, Func="mozilla::dom::cache::CacheStorage::PrefEnabled", SameObject] readonly attribute CacheStorage caches; }; - -// Mozilla extensions -partial interface WindowOrWorkerGlobalScope { - // Extensions to ImageBitmap bits. - // Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its - // underlying image data - // - // Note: - // Overloaded functions cannot have different "extended attributes", - // so I cannot add preference on the extended version of createImageBitmap(). - // To work around, I will then check the preference at run time and throw if - // the preference is set to be false. - [Throws] - Promise createImageBitmap(ImageBitmapSource aImage, long aOffset, long aLength, ImageBitmapFormat aFormat, ImagePixelLayout aLayout); -}; diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index 6a05dfaa08..714e437349 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -461,25 +461,6 @@ WorkerGlobalScope::CreateImageBitmap(const ImageBitmapSource& aImage, return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv); } -already_AddRefed -WorkerGlobalScope::CreateImageBitmap(const ImageBitmapSource& aImage, - int32_t aOffset, int32_t aLength, - ImageBitmapFormat aFormat, - const Sequence& aLayout, - ErrorResult& aRv) -{ - JSContext* cx = GetCurrentThreadJSContext(); - MOZ_ASSERT(cx); - - if (!ImageBitmap::ExtensionsEnabled(cx, nullptr)) { - aRv.Throw(NS_ERROR_TYPE_ERR); - return nullptr; - } - - aRv.Throw(NS_ERROR_TYPE_ERR); - return nullptr; -} - // https://html.spec.whatwg.org/#structured-cloning void WorkerGlobalScope::StructuredClone(JSContext* aCx, JS::Handle aValue,