mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2546 - Part 2: Remove special FoxEye CreateImageBitmap method.
This commit is contained in:
parent
60fbaa2155
commit
2b8d75e136
5 changed files with 0 additions and 77 deletions
|
|
@ -14625,21 +14625,6 @@ nsGlobalWindow::CreateImageBitmap(const ImageBitmapSource& aImage,
|
|||
return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<mozilla::dom::Promise>
|
||||
nsGlobalWindow::CreateImageBitmap(const ImageBitmapSource& aImage,
|
||||
int32_t aOffset, int32_t aLength,
|
||||
ImageBitmapFormat aFormat,
|
||||
const Sequence<ChannelPixelLayout>& 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,
|
||||
|
|
|
|||
|
|
@ -1867,25 +1867,5 @@ ImageBitmap::MapDataInto(JSContext* aCx,
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
/*static*/ already_AddRefed<Promise>
|
||||
ImageBitmap::Create(nsIGlobalObject* aGlobal,
|
||||
const ImageBitmapSource& aBuffer,
|
||||
int32_t aOffset, int32_t aLength,
|
||||
mozilla::dom::ImageBitmapFormat aFormat,
|
||||
const Sequence<ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
MOZ_ASSERT(aGlobal);
|
||||
|
||||
RefPtr<Promise> 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
|
||||
|
|
|
|||
|
|
@ -132,14 +132,6 @@ public:
|
|||
Create(nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc,
|
||||
const Maybe<gfx::IntRect>& aCropRect, ErrorResult& aRv);
|
||||
|
||||
static already_AddRefed<Promise>
|
||||
Create(nsIGlobalObject* aGlobal,
|
||||
const ImageBitmapSource& aBuffer,
|
||||
int32_t aOffset, int32_t aLength,
|
||||
mozilla::dom::ImageBitmapFormat aFormat,
|
||||
const Sequence<mozilla::dom::ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv);
|
||||
|
||||
static JSObject*
|
||||
ReadStructuredClone(JSContext* aCx,
|
||||
JSStructuredCloneReader* aReader,
|
||||
|
|
|
|||
|
|
@ -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<ImageBitmap> createImageBitmap(ImageBitmapSource aImage, long aOffset, long aLength, ImageBitmapFormat aFormat, ImagePixelLayout aLayout);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -461,25 +461,6 @@ WorkerGlobalScope::CreateImageBitmap(const ImageBitmapSource& aImage,
|
|||
return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<mozilla::dom::Promise>
|
||||
WorkerGlobalScope::CreateImageBitmap(const ImageBitmapSource& aImage,
|
||||
int32_t aOffset, int32_t aLength,
|
||||
ImageBitmapFormat aFormat,
|
||||
const Sequence<ChannelPixelLayout>& 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<JS::Value> aValue,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue