Merge inbound to mozilla-central a=merge

This commit is contained in:
arthur.iakab 2018-10-24 07:15:44 +03:00
Родитель b42fc1b48b 71c13b613f
Коммит 0d669cb499
120 изменённых файлов: 579 добавлений и 3168 удалений

Просмотреть файл

@ -11,7 +11,7 @@ support-files =
[browser_address_edit.js] [browser_address_edit.js]
skip-if = verify && debug && os == 'mac' skip-if = verify && debug && os == 'mac'
[browser_card_edit.js] [browser_card_edit.js]
skip-if = (verify && debug && os == 'mac') || (os == 'linux' && debug) # bug 1465673 skip-if = debug && (os == 'mac' || os == 'linux') # bug 1465673
[browser_change_shipping.js] [browser_change_shipping.js]
[browser_dropdowns.js] [browser_dropdowns.js]
[browser_host_name.js] [browser_host_name.js]

Просмотреть файл

@ -14,7 +14,6 @@
// returns the value of StaticPrefs::foo_bar(). // returns the value of StaticPrefs::foo_bar().
// This is allows the use of DOMPrefs in WebIDL files. // This is allows the use of DOMPrefs in WebIDL files.
DOM_WEBIDL_PREF(canvas_imagebitmap_extensions_enabled)
DOM_WEBIDL_PREF(dom_caches_enabled) DOM_WEBIDL_PREF(dom_caches_enabled)
DOM_WEBIDL_PREF(dom_webnotifications_serviceworker_enabled) DOM_WEBIDL_PREF(dom_webnotifications_serviceworker_enabled)
DOM_WEBIDL_PREF(dom_webnotifications_requireinteraction_enabled) DOM_WEBIDL_PREF(dom_webnotifications_requireinteraction_enabled)

Просмотреть файл

@ -3095,7 +3095,8 @@ nsGlobalWindowInner::GetOwnPropertyNames(JSContext* aCx, JS::AutoIdVector& aName
nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext* aCx, JSObject* aObj) nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext* aCx, JSObject* aObj)
{ {
// For now, have to deal with XPConnect objects here. // For now, have to deal with XPConnect objects here.
return xpc::WindowOrNull(aObj)->IsChromeWindow() && nsGlobalWindowInner* win = xpc::WindowOrNull(aObj);
return win && win->IsChromeWindow() &&
nsContentUtils::ObjectPrincipal(aObj) == nsContentUtils::GetSystemPrincipal(); nsContentUtils::ObjectPrincipal(aObj) == nsContentUtils::GetSystemPrincipal();
} }
@ -7715,11 +7716,6 @@ nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
const ImageBitmapSource& aImage, const ImageBitmapSource& aImage,
ErrorResult& aRv) ErrorResult& aRv)
{ {
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
return ImageBitmap::Create(this, aImage, Nothing(), aRv); return ImageBitmap::Create(this, aImage, Nothing(), aRv);
} }
@ -7729,34 +7725,9 @@ nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh, int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
ErrorResult& aRv) ErrorResult& aRv)
{ {
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv); return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv);
} }
already_AddRefed<mozilla::dom::Promise>
nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
const ImageBitmapSource& aImage,
int32_t aOffset, int32_t aLength,
ImageBitmapFormat aFormat,
const Sequence<ChannelPixelLayout>& aLayout,
ErrorResult& aRv)
{
if (!StaticPrefs::canvas_imagebitmap_extensions_enabled()) {
aRv.Throw(NS_ERROR_TYPE_ERR);
return nullptr;
}
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
return ImageBitmap::Create(this, aImage, aOffset, aLength, aFormat, aLayout,
aRv);
}
aRv.Throw(NS_ERROR_TYPE_ERR);
return nullptr;
}
mozilla::dom::TabGroup* mozilla::dom::TabGroup*
nsGlobalWindowInner::TabGroupInner() nsGlobalWindowInner::TabGroupInner()
{ {

Просмотреть файл

@ -924,15 +924,6 @@ public:
int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh, int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
mozilla::ErrorResult& aRv); mozilla::ErrorResult& aRv);
already_AddRefed<mozilla::dom::Promise>
CreateImageBitmap(JSContext* aCx,
const mozilla::dom::ImageBitmapSource& aImage,
int32_t aOffset, int32_t aLength,
mozilla::dom::ImageBitmapFormat aFormat,
const mozilla::dom::Sequence<mozilla::dom::ChannelPixelLayout>& aLayout,
mozilla::ErrorResult& aRv);
// ChromeWindow bits. Do NOT call these unless your window is in // ChromeWindow bits. Do NOT call these unless your window is in
// fact chrome. // fact chrome.
uint16_t WindowState(); uint16_t WindowState();

Просмотреть файл

@ -32,7 +32,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1139964
ppm.removeMessageListener(msgName, processListener); ppm.removeMessageListener(msgName, processListener);
ok(m.data.hasPromise, "ProcessGlobal should have Promise object in the global scope!"); ok(m.data.hasPromise, "ProcessGlobal should have Promise object in the global scope!");
ok(m.data.hasTextEncoder, "ProcessGlobal should have TextEncoder object in the global scope!"); ok(m.data.hasTextEncoder, "ProcessGlobal should have TextEncoder object in the global scope!");
ok(!m.data.hasWindow, "ProcessGlobal should not have Window object in the global scope!"); ok(m.data.hasWindow, "ProcessGlobal should have Window object in the global scope!");
messageManager.addMessageListener(msgName, tabListener) messageManager.addMessageListener(msgName, tabListener)
messageManager.loadFrameScript("data:,(" + mmScriptForPromiseTest.toString() + ")()", true); messageManager.loadFrameScript("data:,(" + mmScriptForPromiseTest.toString() + ")()", true);
@ -42,7 +42,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1139964
messageManager.removeMessageListener(msgName, tabListener); messageManager.removeMessageListener(msgName, tabListener);
ok(m.data.hasPromise, "TabChildGlobal should have Promise object in the global scope!"); ok(m.data.hasPromise, "TabChildGlobal should have Promise object in the global scope!");
ok(m.data.hasTextEncoder, "TabChildGlobal should have TextEncoder object in the global scope!"); ok(m.data.hasTextEncoder, "TabChildGlobal should have TextEncoder object in the global scope!");
ok(!m.data.hasWindow, "TabChildGlobal should not have Window object in the global scope!"); ok(m.data.hasWindow, "TabChildGlobal should have Window object in the global scope!");
opener.setTimeout("done()", 0); opener.setTimeout("done()", 0);
window.close(); window.close();

Просмотреть файл

@ -464,10 +464,6 @@ DOMInterfaces = {
'headerFile': 'xpcjsid.h', 'headerFile': 'xpcjsid.h',
}, },
'ImageBitmap': {
'implicitJSContext': [ 'mapDataInto' ],
},
'ImageCapture': { 'ImageCapture': {
'binaryNames': { 'videoStreamTrack': 'GetVideoStreamTrack' } 'binaryNames': { 'videoStreamTrack': 'GetVideoStreamTrack' }
}, },

Просмотреть файл

@ -2973,13 +2973,20 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
# if we don't need to create anything, why are we generating this? # if we don't need to create anything, why are we generating this?
assert needInterfaceObject or needInterfacePrototypeObject assert needInterfaceObject or needInterfacePrototypeObject
def maybecrash(reason):
if self.descriptor.name == "Document":
return 'MOZ_CRASH("Bug 1405521/1488480: %s");\n' % reason
return ""
getParentProto = fill( getParentProto = fill(
""" """
JS::${type}<JSObject*> parentProto(${getParentProto}); JS::${type}<JSObject*> parentProto(${getParentProto});
if (!parentProto) { if (!parentProto) {
$*{maybeCrash}
return; return;
} }
""", """,
maybeCrash=maybecrash("Can't get Node.prototype"),
type=parentProtoType, type=parentProtoType,
getParentProto=getParentProto) getParentProto=getParentProto)
@ -2987,9 +2994,11 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
""" """
JS::${type}<JSObject*> constructorProto(${getConstructorProto}); JS::${type}<JSObject*> constructorProto(${getConstructorProto});
if (!constructorProto) { if (!constructorProto) {
$*{maybeCrash}
return; return;
} }
""", """,
maybeCrash=maybecrash("Can't get Node"),
type=constructorProtoType, type=constructorProtoType,
getConstructorProto=getConstructorProto) getConstructorProto=getConstructorProto)
@ -3005,7 +3014,12 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
for properties in idsToInit] for properties in idsToInit]
idsInitedFlag = CGGeneric("static bool sIdsInited = false;\n") idsInitedFlag = CGGeneric("static bool sIdsInited = false;\n")
setFlag = CGGeneric("sIdsInited = true;\n") setFlag = CGGeneric("sIdsInited = true;\n")
initIdConditionals = [CGIfWrapper(CGGeneric("return;\n"), call) initIdConditionals = [CGIfWrapper(CGGeneric(fill(
"""
$*{maybeCrash}
return;
""",
maybeCrash=maybecrash("Can't init IDs"))), call)
for call in initIdCalls] for call in initIdCalls]
initIds = CGList([idsInitedFlag, initIds = CGList([idsInitedFlag,
CGIfWrapper(CGList(initIdConditionals + [setFlag]), CGIfWrapper(CGList(initIdConditionals + [setFlag]),
@ -3208,10 +3222,12 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
JS::Rooted<JSObject*> holderProto(aCx, ${holderProto}); JS::Rooted<JSObject*> holderProto(aCx, ${holderProto});
unforgeableHolder = JS_NewObjectWithoutMetadata(aCx, ${holderClass}, holderProto); unforgeableHolder = JS_NewObjectWithoutMetadata(aCx, ${holderClass}, holderProto);
if (!unforgeableHolder) { if (!unforgeableHolder) {
$*{maybeCrash}
$*{failureCode} $*{failureCode}
} }
} }
""", """,
maybeCrash=maybecrash("Can't create unforgeable holder"),
holderProto=holderProto, holderProto=holderProto,
holderClass=holderClass, holderClass=holderClass,
failureCode=failureCode)) failureCode=failureCode))
@ -3547,12 +3563,22 @@ def InitUnforgeablePropertiesOnHolder(descriptor, properties, failureCode,
unforgeables = [] unforgeables = []
if descriptor.name == "Document":
maybeCrash = dedent(
"""
MOZ_CRASH("Bug 1405521/1488480: Can't define unforgeable attributes");
""");
else:
maybeCrash = "";
defineUnforgeableAttrs = fill( defineUnforgeableAttrs = fill(
""" """
if (!DefineUnforgeableAttributes(aCx, ${holderName}, %s)) { if (!DefineUnforgeableAttributes(aCx, ${holderName}, %s)) {
$*{maybeCrash}
$*{failureCode} $*{failureCode}
} }
""", """,
maybeCrash=maybeCrash,
failureCode=failureCode, failureCode=failureCode,
holderName=holderName) holderName=holderName)
defineUnforgeableMethods = fill( defineUnforgeableMethods = fill(
@ -17199,7 +17225,7 @@ class GlobalGenRoots():
curr = CGList([], "\n") curr = CGList([], "\n")
descriptors = config.getDescriptors(hasInterfaceObject=True, descriptors = config.getDescriptors(hasInterfaceObject=True,
isExposedInSystemGlobals=True, isExposedInWindow=True,
register=True) register=True)
properties = [desc.name for desc in descriptors] properties = [desc.name for desc in descriptors]
@ -17244,7 +17270,7 @@ class GlobalGenRoots():
defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface)
for desc in config.getDescriptors(hasInterfaceObject=True, for desc in config.getDescriptors(hasInterfaceObject=True,
register=True, register=True,
isExposedInSystemGlobals=True)] isExposedInWindow=True)]
defineIncludes.append("nsThreadUtils.h") # For NS_IsMainThread defineIncludes.append("nsThreadUtils.h") # For NS_IsMainThread
defineIncludes.append("js/Id.h") # For jsid defineIncludes.append("js/Id.h") # For jsid
defineIncludes.append("mozilla/dom/WebIDLGlobalNameHash.h") defineIncludes.append("mozilla/dom/WebIDLGlobalNameHash.h")

Просмотреть файл

@ -250,8 +250,6 @@ class Configuration(DescriptorProvider):
getter = lambda x: x.interface.isExposedInWorkerDebugger() getter = lambda x: x.interface.isExposedInWorkerDebugger()
elif key == 'isExposedInAnyWorklet': elif key == 'isExposedInAnyWorklet':
getter = lambda x: x.interface.isExposedInAnyWorklet() getter = lambda x: x.interface.isExposedInAnyWorklet()
elif key == 'isExposedInSystemGlobals':
getter = lambda x: x.interface.isExposedInSystemGlobals()
elif key == 'isExposedInWindow': elif key == 'isExposedInWindow':
getter = lambda x: x.interface.isExposedInWindow() getter = lambda x: x.interface.isExposedInWindow()
else: else:

Просмотреть файл

@ -327,6 +327,13 @@ class IDLScope(IDLObject):
assert identifier.scope == self assert identifier.scope == self
return self._lookupIdentifier(identifier) return self._lookupIdentifier(identifier)
def addIfaceGlobalNames(self, interfaceName, globalNames):
"""Record the global names (from |globalNames|) that can be used in
[Exposed] to expose things in a global named |interfaceName|"""
self.globalNames.update(globalNames)
for name in globalNames:
self.globalNameMapping[name].add(interfaceName)
class IDLIdentifier(IDLObject): class IDLIdentifier(IDLObject):
def __init__(self, location, scope, name): def __init__(self, location, scope, name):
@ -504,8 +511,10 @@ class IDLExposureMixins():
return 'Window' in self.exposureSet return 'Window' in self.exposureSet
def isExposedOnMainThread(self): def isExposedOnMainThread(self):
return (self.isExposedInWindow() or return self.isExposedInWindow()
self.isExposedInSystemGlobals())
def isExposedOffMainThread(self):
return len(self.exposureSet - {'Window', 'FakeTestPrimaryGlobal'}) > 0
def isExposedInAnyWorker(self): def isExposedInAnyWorker(self):
return len(self.getWorkerExposureSet()) > 0 return len(self.getWorkerExposureSet()) > 0
@ -516,9 +525,6 @@ class IDLExposureMixins():
def isExposedInAnyWorklet(self): def isExposedInAnyWorklet(self):
return len(self.getWorkletExposureSet()) > 0 return len(self.getWorkletExposureSet()) > 0
def isExposedInSystemGlobals(self):
return 'BackstagePass' in self.exposureSet
def isExposedInSomeButNotAllWorkers(self): def isExposedInSomeButNotAllWorkers(self):
""" """
Returns true if the Exposed extended attribute for this interface Returns true if the Exposed extended attribute for this interface
@ -1323,10 +1329,9 @@ class IDLInterfaceOrNamespace(IDLObjectWithScope, IDLExposureMixins):
checkDuplicateNames(member, bindingAlias, "BindingAlias") checkDuplicateNames(member, bindingAlias, "BindingAlias")
if (self.getExtendedAttribute("Pref") and if self.getExtendedAttribute("Pref") and self.isExposedOffMainThread():
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])): raise WebIDLError("[Pref] used on an interface that is not "
raise WebIDLError("[Pref] used on an interface that is not %s-only" % "main-thread-only",
self.parentScope.primaryGlobalName,
[self.location]) [self.location])
# Conditional exposure makes no sense for interfaces with no # Conditional exposure makes no sense for interfaces with no
@ -1710,9 +1715,8 @@ class IDLInterface(IDLInterfaceOrNamespace):
self.globalNames = attr.args() self.globalNames = attr.args()
else: else:
self.globalNames = [self.identifier.name] self.globalNames = [self.identifier.name]
self.parentScope.globalNames.update(self.globalNames) self.parentScope.addIfaceGlobalNames(self.identifier.name,
for globalName in self.globalNames: self.globalNames)
self.parentScope.globalNameMapping[globalName].add(self.identifier.name)
self._isOnGlobalProtoChain = True self._isOnGlobalProtoChain = True
elif identifier == "PrimaryGlobal": elif identifier == "PrimaryGlobal":
if not attr.noArguments(): if not attr.noArguments():
@ -1725,8 +1729,8 @@ class IDLInterface(IDLInterfaceOrNamespace):
self.parentScope.primaryGlobalAttr.location]) self.parentScope.primaryGlobalAttr.location])
self.parentScope.primaryGlobalAttr = attr self.parentScope.primaryGlobalAttr = attr
self.parentScope.primaryGlobalName = self.identifier.name self.parentScope.primaryGlobalName = self.identifier.name
self.parentScope.globalNames.add(self.identifier.name) self.parentScope.addIfaceGlobalNames(self.identifier.name,
self.parentScope.globalNameMapping[self.identifier.name].add(self.identifier.name) [self.identifier.name])
self._isOnGlobalProtoChain = True self._isOnGlobalProtoChain = True
elif identifier == "SecureContext": elif identifier == "SecureContext":
if not attr.noArguments(): if not attr.noArguments():
@ -3572,10 +3576,9 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
IDLExposureMixins.finish(self, scope) IDLExposureMixins.finish(self, scope)
def validate(self): def validate(self):
if (self.getExtendedAttribute("Pref") and if self.getExtendedAttribute("Pref") and self.isExposedOffMainThread():
self.exposureSet != set([self._globalScope.primaryGlobalName])):
raise WebIDLError("[Pref] used on an interface member that is not " raise WebIDLError("[Pref] used on an interface member that is not "
"%s-only" % self._globalScope.primaryGlobalName, "main-thread-only",
[self.location]) [self.location])
if self.isAttr() or self.isMethod(): if self.isAttr() or self.isMethod():
@ -6896,16 +6899,13 @@ class Parser(Tokenizer):
logger.reportGrammarErrors() logger.reportGrammarErrors()
self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None) self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
# To make our test harness work, pretend like we have a primary global already. # To make our test harness work, pretend like we have a primary global already.
# Note that we _don't_ set _globalScope.primaryGlobalAttr, # Note that we _don't_ set _globalScope.primaryGlobalAttr,
# so we'll still be able to detect multiple PrimaryGlobal extended attributes. # so we'll still be able to detect multiple PrimaryGlobal extended attributes.
self._globalScope.primaryGlobalName = "FakeTestPrimaryGlobal" self._globalScope.primaryGlobalName = "FakeTestPrimaryGlobal"
self._globalScope.globalNames.add("FakeTestPrimaryGlobal") self._globalScope.addIfaceGlobalNames("FakeTestPrimaryGlobal", ["FakeTestPrimaryGlobal"])
self._globalScope.globalNameMapping["FakeTestPrimaryGlobal"].add("FakeTestPrimaryGlobal")
# And we add the special-cased "System" global name, which
# doesn't have any corresponding interfaces.
self._globalScope.globalNames.add("System")
self._globalScope.globalNameMapping["System"].add("BackstagePass")
self._installBuiltins(self._globalScope) self._installBuiltins(self._globalScope)
self._productions = [] self._productions = []

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -41,7 +41,6 @@ class OffscreenCanvas;
class ArrayBufferViewOrArrayBuffer; class ArrayBufferViewOrArrayBuffer;
class CanvasRenderingContext2D; class CanvasRenderingContext2D;
struct ChannelPixelLayout;
class CreateImageBitmapFromBlob; class CreateImageBitmapFromBlob;
class CreateImageBitmapFromBlobTask; class CreateImageBitmapFromBlobTask;
class CreateImageBitmapFromBlobWorkerTask; class CreateImageBitmapFromBlobWorkerTask;
@ -52,7 +51,6 @@ class HTMLVideoElement;
enum class ImageBitmapFormat : uint8_t; enum class ImageBitmapFormat : uint8_t;
class ImageData; class ImageData;
class ImageUtils; class ImageUtils;
template<typename T> class MapDataIntoBufferSource;
class Promise; class Promise;
class PostMessageEvent; // For StructuredClone between windows. class PostMessageEvent; // For StructuredClone between windows.
class ImageBitmapShutdownObserver; class ImageBitmapShutdownObserver;
@ -62,7 +60,6 @@ struct ImageBitmapCloneData final
RefPtr<gfx::DataSourceSurface> mSurface; RefPtr<gfx::DataSourceSurface> mSurface;
gfx::IntRect mPictureRect; gfx::IntRect mPictureRect;
gfxAlphaType mAlphaType; gfxAlphaType mAlphaType;
bool mIsCroppingAreaOutSideOfSourceImage;
}; };
/* /*
@ -135,14 +132,6 @@ public:
Create(nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc, Create(nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc,
const Maybe<gfx::IntRect>& aCropRect, ErrorResult& aRv); 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* static JSObject*
ReadStructuredClone(JSContext* aCx, ReadStructuredClone(JSContext* aCx,
JSStructuredCloneReader* aReader, JSStructuredCloneReader* aReader,
@ -159,23 +148,6 @@ public:
friend CreateImageBitmapFromBlobTask; friend CreateImageBitmapFromBlobTask;
friend CreateImageBitmapFromBlobWorkerTask; friend CreateImageBitmapFromBlobWorkerTask;
template<typename T>
friend class MapDataIntoBufferSource;
// Mozilla Extensions
ImageBitmapFormat
FindOptimalFormat(const Optional<Sequence<ImageBitmapFormat>>& aPossibleFormats,
ErrorResult& aRv);
int32_t
MappedDataLength(ImageBitmapFormat aFormat, ErrorResult& aRv);
already_AddRefed<Promise>
MapDataInto(JSContext* aCx,
ImageBitmapFormat aFormat,
const ArrayBufferViewOrArrayBuffer& aBuffer,
int32_t aOffset, ErrorResult& aRv);
size_t GetAllocatedSize() const; size_t GetAllocatedSize() const;
void OnShutdown(); void OnShutdown();
@ -208,9 +180,6 @@ protected:
void SetPictureRect(const gfx::IntRect& aRect, ErrorResult& aRv); void SetPictureRect(const gfx::IntRect& aRect, ErrorResult& aRv);
void SetIsCroppingAreaOutSideOfSourceImage(const gfx::IntSize& aSourceSize,
const Maybe<gfx::IntRect>& aCroppingRect);
static already_AddRefed<ImageBitmap> static already_AddRefed<ImageBitmap>
CreateInternal(nsIGlobalObject* aGlobal, HTMLImageElement& aImageEl, CreateInternal(nsIGlobalObject* aGlobal, HTMLImageElement& aImageEl,
const Maybe<gfx::IntRect>& aCropRect, ErrorResult& aRv); const Maybe<gfx::IntRect>& aCropRect, ErrorResult& aRv);
@ -278,15 +247,6 @@ protected:
RefPtr<ImageBitmapShutdownObserver> mShutdownObserver; RefPtr<ImageBitmapShutdownObserver> mShutdownObserver;
/*
* Set mIsCroppingAreaOutSideOfSourceImage if image bitmap was cropped to the
* source rectangle so that it contains any transparent black pixels (cropping
* area is outside of the source image).
* This is used in mapDataInto() to check if we should reject promise with
* IndexSizeError.
*/
bool mIsCroppingAreaOutSideOfSourceImage;
/* /*
* Whether this object allocated allocated and owns the image data. * Whether this object allocated allocated and owns the image data.
*/ */

Просмотреть файл

@ -11,9 +11,8 @@ namespace mozilla {
namespace dom { namespace dom {
// So we don't have to forward declare this elsewhere. // So we don't have to forward declare this elsewhere.
class HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrBlobOrImageDataOrCanvasRenderingContext2DOrImageBitmapOrArrayBufferViewOrArrayBuffer; class HTMLImageElementOrHTMLCanvasElementOrHTMLVideoElementOrImageBitmapOrBlobOrCanvasRenderingContext2DOrImageData;
typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrBlobOrImageDataOrCanvasRenderingContext2DOrImageBitmapOrArrayBufferViewOrArrayBuffer typedef HTMLImageElementOrHTMLCanvasElementOrHTMLVideoElementOrImageBitmapOrBlobOrCanvasRenderingContext2DOrImageData ImageBitmapSource;
ImageBitmapSource;
} }
} }

Просмотреть файл

@ -2730,16 +2730,6 @@ GetChannelCountOfImageFormat(ImageBitmapFormat aFormat)
return format->GetChannelCount(); return format->GetChannelCount();
} }
uint32_t
CalculateImageBufferSize(ImageBitmapFormat aFormat,
uint32_t aWidth, uint32_t aHeight)
{
UtilsUniquePtr format = Utils::GetUtils(aFormat);
MOZ_ASSERT(format, "Cannot get a valid ImageBitmapFormatUtils instance.");
return format->NeededBufferSize(aWidth, aHeight);
}
UniquePtr<ImagePixelLayout> UniquePtr<ImagePixelLayout>
CopyAndConvertImageData(ImageBitmapFormat aSrcFormat, CopyAndConvertImageData(ImageBitmapFormat aSrcFormat,
const uint8_t* aSrcBuffer, const uint8_t* aSrcBuffer,

Просмотреть файл

@ -48,14 +48,6 @@ CreatePixelLayoutFromPlanarYCbCrData(const layers::PlanarYCbCrData* aData);
uint8_t uint8_t
GetChannelCountOfImageFormat(ImageBitmapFormat aFormat); GetChannelCountOfImageFormat(ImageBitmapFormat aFormat);
/*
* Get the needed buffer size to store the image data in the given
* ImageBitmapFormat with the given width and height.
*/
uint32_t
CalculateImageBufferSize(ImageBitmapFormat aFormat,
uint32_t aWidth, uint32_t aHeight);
/* /*
* This function always copies the image data in _aSrcBuffer_ into _aDstBuffer_ * This function always copies the image data in _aSrcBuffer_ into _aDstBuffer_
* and it also performs color conversion if the _aSrcFormat_ and the * and it also performs color conversion if the _aSrcFormat_ and the

Просмотреть файл

@ -125,38 +125,6 @@ public:
return (uint32_t)(size.height * stride); return (uint32_t)(size.height * stride);
} }
virtual UniquePtr<ImagePixelLayout>
MapDataInto(uint8_t* aBuffer,
uint32_t aOffset,
uint32_t aBufferLength,
ImageBitmapFormat aFormat,
ErrorResult& aRv) const
{
DataSourceSurface::ScopedMap map(Surface(), DataSourceSurface::READ);
if (!map.IsMapped()) {
aRv.Throw(NS_ERROR_ILLEGAL_VALUE);
return nullptr;
}
// Copy or convert data.
UniquePtr<ImagePixelLayout> srcLayout =
CreateDefaultPixelLayout(GetFormat(), Surface()->GetSize().width,
Surface()->GetSize().height, map.GetStride());
// Prepare destination buffer.
uint8_t* dstBuffer = aBuffer + aOffset;
UniquePtr<ImagePixelLayout> dstLayout =
CopyAndConvertImageData(GetFormat(), map.GetData(), srcLayout.get(),
aFormat, dstBuffer);
if (!dstLayout) {
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
return nullptr;
}
return dstLayout;
}
protected: protected:
Impl() {} Impl() {}
@ -203,31 +171,6 @@ public:
return mImage->AsNVImage()->GetBufferSize(); return mImage->AsNVImage()->GetBufferSize();
} }
UniquePtr<ImagePixelLayout> MapDataInto(uint8_t* aBuffer,
uint32_t aOffset,
uint32_t aBufferLength,
ImageBitmapFormat aFormat,
ErrorResult& aRv) const override
{
// Prepare source buffer and pixel layout.
const PlanarYCbCrData* data = GetPlanarYCbCrData();
UniquePtr<ImagePixelLayout> srcLayout =
CreatePixelLayoutFromPlanarYCbCrData(data);
// Do conversion.
UniquePtr<ImagePixelLayout> dstLayout =
CopyAndConvertImageData(GetFormat(), data->mYChannel, srcLayout.get(),
aFormat, aBuffer+aOffset);
if (!dstLayout) {
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
return nullptr;
}
return dstLayout;
}
private: private:
const PlanarYCbCrData* GetPlanarYCbCrData() const const PlanarYCbCrData* GetPlanarYCbCrData() const
{ {
@ -277,17 +220,5 @@ ImageUtils::GetBufferLength() const
return mImpl->GetBufferLength(); return mImpl->GetBufferLength();
} }
UniquePtr<ImagePixelLayout>
ImageUtils::MapDataInto(uint8_t* aBuffer,
uint32_t aOffset,
uint32_t aBufferLength,
ImageBitmapFormat aFormat,
ErrorResult& aRv) const
{
MOZ_ASSERT(mImpl);
MOZ_ASSERT(aBuffer, "Map data into a null buffer.");
return mImpl->MapDataInto(aBuffer, aOffset, aBufferLength, aFormat, aRv);
}
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -32,10 +32,6 @@ typedef nsTArray<ChannelPixelLayout> ImagePixelLayout;
* (1) GetFormat() converts the image's format into ImageBitmapFormat enum. * (1) GetFormat() converts the image's format into ImageBitmapFormat enum.
* (2) GetBufferLength() returns the number of bytes that are used to store * (2) GetBufferLength() returns the number of bytes that are used to store
* the image's underlying raw data. * the image's underlying raw data.
* (3) MapDataInto() writes the image's underlying raw data into a given
* ArrayBuffer in the given format. (If the given format is different from
* the existing format, the ImageUtils uses the ImageBitmapFormatUtils to
* performa color conversion.)
* *
* In theory, the functionalities of this class could be merged into the * In theory, the functionalities of this class could be merged into the
* interface of layers::Image. However, this is designed as a isolated wrapper * interface of layers::Image. However, this is designed as a isolated wrapper
@ -59,10 +55,6 @@ public:
uint32_t GetBufferLength() const; uint32_t GetBufferLength() const;
UniquePtr<ImagePixelLayout>
MapDataInto(uint8_t* aBuffer, uint32_t aOffset, uint32_t aBufferLength,
ImageBitmapFormat aFormat, ErrorResult& aRv) const;
protected: protected:
Impl* mImpl; Impl* mImpl;
}; };

Просмотреть файл

@ -1,49 +0,0 @@
<!DOCTYPE HTML>
<head>
<title>Test ImageBitmap Extensions (Bug 1141979)</title>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<script src="imagebitmap_extensions_prepareSources.js"></script>
<script src="imagebitmap_extensions_data.js"></script>
<script src="imagebitmap_extensions.js"></script>
<script type="text/javascript">
runTests();
function ok(expect, msg) {
window.parent.postMessage({"type": "status", status: !!expect, msg: msg}, "*");
}
function runTests() {
prepareSources().
then( function() { return Promise.all([testAccessing_randomTest("Video", gVideo, 20), // video might use slightly different frames
testAccessing_randomTest("Image", gImage, 0),
testAccessing_randomTest("Canvas", gCanvas, 0),
testAccessing_randomTest("Ctx", gCtx, 0),
testAccessing_randomTest("ImageData", gImageData, 0),
testAccessing_randomTest("ImageBitmap", gImageBitmap, 0),
testAccessing_randomTest("PNG", gPNGBlob, 0),
testAccessing_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information
]); }).
then( function() { return Promise.all([testCreateFromArrayBffer_randomTest("Video", gVideo, 20), // video might use slightly different frames
testCreateFromArrayBffer_randomTest("Image", gImage, 0),
testCreateFromArrayBffer_randomTest("Canvas", gCanvas, 0),
testCreateFromArrayBffer_randomTest("Ctx", gCtx, 0),
testCreateFromArrayBffer_randomTest("ImageData", gImageData, 0),
testCreateFromArrayBffer_randomTest("ImageBitmap", gImageBitmap, 0),
testCreateFromArrayBffer_randomTest("PNG", gPNGBlob, 0),
testCreateFromArrayBffer_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information
]); }).
then(testDraw()).
then(testExceptions).
then(testColorConversions()).
then(function() { return testInvalidAccess([gVideo, gImage, gCanvas, gCtx, gImageData, gImageBitmap, gPNGBlob, gJPEGBlob]); } ).
then(function() {window.parent.postMessage({"type": "finish"}, "*");}, function(ev) { failed(ev); window.parent.postMessage({"type": "finish"}, "*"); });
}
</script>
</body>

Просмотреть файл

@ -1,526 +0,0 @@
function failed(ex) {
ok(false, "Promise failure: " + ex);
}
function isPixel(sourceType, bitmapFormat, imageData, bitmapImageData, x, y, tolerance) {
if (imageData.width != bitmapImageData.width ||
imageData.height != bitmapImageData.height) {
ok(false, "Wrong dimension");
}
var index = 4 * (y * imageData.width + x);
var pr = imageData.data[index+0],
pg = imageData.data[index+1],
pb = imageData.data[index+2],
pa = imageData.data[index+3];
if (bitmapFormat == "RGBA32" || bitmapFormat == "RGBX32") {
var bpr = bitmapImageData.data[index+0],
bpg = bitmapImageData.data[index+1],
bpb = bitmapImageData.data[index+2],
bpa = bitmapImageData.data[index+3];
}
else if (bitmapFormat == "BGRA32" || bitmapFormat == "BGRX32") {
var bpb = bitmapImageData.data[index+0],
bpg = bitmapImageData.data[index+1],
bpr = bitmapImageData.data[index+2],
bpa = bitmapImageData.data[index+3];
}
else {
// format might be one of the followings: "R5G6B5", "A8", "YUV", ""
ok(false, "Not supported ImageFormat: " + bitmapFormat);
}
ok(pr - tolerance <= bpr && bpr <= pr + tolerance &&
pg - tolerance <= bpg && bpg <= pg + tolerance &&
pb - tolerance <= bpb && bpb <= pb + tolerance &&
pa - tolerance <= bpa && bpa <= pa + tolerance,
"pixel[" + x + "][" + y + "]: " + sourceType + " is "+pr+","+pg+","+pb+","+pa+"; ImageBitmap is "+ bpr + "," + bpg + "," + bpb + "," + bpa);
}
function promiseThrows(p, name) {
var didThrow;
return p.then(function() { didThrow = false; },
function() { didThrow = true; })
.then(function() { ok(didThrow, name); });
}
function testExceptions() {
return Promise.all([
promiseThrows(testColorConversion("GRAY8", "RGBA32", undefined, true), "[Exception] Cannot convert from GRAY8 to RGBA32"),
promiseThrows(testColorConversion("GRAY8", "BGRA32", undefined, true), "[Exception] Cannot convert from GRAY8 to BGRA32"),
promiseThrows(testColorConversion("GRAY8", "RGB24", undefined, true), "[Exception] Cannot convert from GRAY8 to RGB24"),
promiseThrows(testColorConversion("GRAY8", "BGR24", undefined, true), "[Exception] Cannot convert from GRAY8 to BGR24"),
promiseThrows(testColorConversion("GRAY8", "YUV444P", undefined, true), "[Exception] Cannot convert from GRAY8 to YUV444P"),
promiseThrows(testColorConversion("GRAY8", "YUV422P", undefined, true), "[Exception] Cannot convert from GRAY8 to YUV422P"),
promiseThrows(testColorConversion("GRAY8", "YUV420P", undefined, true), "[Exception] Cannot convert from GRAY8 to YUV420P"),
promiseThrows(testColorConversion("GRAY8", "YUV420SP_NV12", undefined, true), "[Exception] Cannot convert from GRAY8 to YUV420SP_NV12"),
promiseThrows(testColorConversion("GRAY8", "YUV420SP_NV21", undefined, true), "[Exception] Cannot convert from GRAY8 to YUV420SP_NV21"),
promiseThrows(testColorConversion("GRAY8", "HSV", undefined, true), "[Exception] Cannot convert from GRAY8 to HSV"),
promiseThrows(testColorConversion("GRAY8", "Lab", undefined, true), "[Exception] Cannot convert from GRAY8 to Lab"),
promiseThrows(testColorConversion("GRAY8", "DEPTH", undefined, true), "[Exception] Cannot convert from GRAY8 to DEPTH"),
promiseThrows(testColorConversion("DEPTH", "RGBA32", undefined, true), "[Exception] Cannot convert from DEPTH to RGBA32"),
promiseThrows(testColorConversion("DEPTH", "BGRA32", undefined, true), "[Exception] Cannot convert from DEPTH to BGRA32"),
promiseThrows(testColorConversion("DEPTH", "RGB24", undefined, true), "[Exception] Cannot convert from DEPTH to RGB24"),
promiseThrows(testColorConversion("DEPTH", "BGR24", undefined, true), "[Exception] Cannot convert from DEPTH to BGR24"),
promiseThrows(testColorConversion("DEPTH", "GRAY8", undefined, true), "[Exception] Cannot convert from DEPTH to GRAY8"),
promiseThrows(testColorConversion("DEPTH", "YUV444P", undefined, true), "[Exception] Cannot convert from DEPTH to YUV444P"),
promiseThrows(testColorConversion("DEPTH", "YUV422P", undefined, true), "[Exception] Cannot convert from DEPTH to YUV422P"),
promiseThrows(testColorConversion("DEPTH", "YUV420P", undefined, true), "[Exception] Cannot convert from DEPTH to YUV420P"),
promiseThrows(testColorConversion("DEPTH", "YUV420SP_NV12", undefined, true), "[Exception] Cannot convert from DEPTH to YUV420SP_NV12"),
promiseThrows(testColorConversion("DEPTH", "YUV420SP_NV21", undefined, true), "[Exception] Cannot convert from DEPTH to YUV420SP_NV21"),
promiseThrows(testColorConversion("DEPTH", "HSV", undefined, true), "[Exception] Cannot convert from DEPTH to HSV"),
promiseThrows(testColorConversion("DEPTH", "Lab", undefined, true), "[Exception] Cannot convert from DEPTH to Lab"),
promiseThrows(testColorConversion("RGBA32", "DEPTH", undefined, true), "[Exception] Cannot convert from RGBA32 to DEPTH"),
promiseThrows(testColorConversion("BGRA32", "DEPTH", undefined, true), "[Exception] Cannot convert from BGRA32 to DEPTH"),
promiseThrows(testColorConversion("RGB24", "DEPTH", undefined, true), "[Exception] Cannot convert from RGB24 to DEPTH"),
promiseThrows(testColorConversion("BGR24", "DEPTH", undefined, true), "[Exception] Cannot convert from BGR24 to DEPTH"),
promiseThrows(testColorConversion("YUV444P", "DEPTH", undefined, true), "[Exception] Cannot convert from YUV444P to DEPTH"),
promiseThrows(testColorConversion("YUV422P", "DEPTH", undefined, true), "[Exception] Cannot convert from YUV422P to DEPTH"),
promiseThrows(testColorConversion("YUV420P", "DEPTH", undefined, true), "[Exception] Cannot convert from YUV420P to DEPTH"),
promiseThrows(testColorConversion("YUV420SP_NV12", "DEPTH", undefined, true), "[Exception] Cannot convert from YUV420SP_NV12 to DEPTH"),
promiseThrows(testColorConversion("YUV420SP_NV21", "DEPTH", undefined, true), "[Exception] Cannot convert from YUV420SP_NV21 to DEPTH"),
promiseThrows(testColorConversion("HSV", "DEPTH", undefined, true), "[Exception] Cannot convert from HSV to DEPTH"),
promiseThrows(testColorConversion("Lab", "DEPTH", undefined, true), "[Exception] Cannot convert from Lab to DEPTH"),
]);
}
function testInvalidAccess(sources) {
function callMapDataIntoWithImageBitmapCroppedOutSideOfTheSourceImage(source) {
return new Promise(function(resolve, reject) {
var p = createImageBitmap(source, -1, -1, 2, 2);
p.then(
function(bitmap) {
var format = bitmap.findOptimalFormat();
var length = bitmap.mappedDataLength(format);
var buffer = new ArrayBuffer(length);
bitmap.mapDataInto(format, buffer, 0).then(
function(layout) { resolve(); },
function(error) { reject(error); }
);
},
function() { resolve(); });
});
};
var testCases = sources.map( function(source) {
return promiseThrows(callMapDataIntoWithImageBitmapCroppedOutSideOfTheSourceImage(source),
"[Exception] mapDataInto() should throw with transparent black."); });
return Promise.all(testCases);
}
function testColorConversions() {
return Promise.all([// From RGBA32
testColorConversion("RGBA32", "RGBA32"),
testColorConversion("RGBA32", "BGRA32"),
testColorConversion("RGBA32", "RGB24"),
testColorConversion("RGBA32", "BGR24"),
testColorConversion("RGBA32", "GRAY8"),
testColorConversion("RGBA32", "YUV444P"),
testColorConversion("RGBA32", "YUV422P"),
testColorConversion("RGBA32", "YUV420P", 2),
testColorConversion("RGBA32", "YUV420SP_NV12"),
testColorConversion("RGBA32", "YUV420SP_NV21"),
testColorConversion("RGBA32", "HSV", 0.01),
testColorConversion("RGBA32", "Lab", 0.5),
// From BGRA32
testColorConversion("BGRA32", "RGBA32"),
testColorConversion("BGRA32", "BGRA32"),
testColorConversion("BGRA32", "RGB24"),
testColorConversion("BGRA32", "BGR24"),
testColorConversion("BGRA32", "GRAY8"),
testColorConversion("BGRA32", "YUV444P", 3),
testColorConversion("BGRA32", "YUV422P", 2),
testColorConversion("BGRA32", "YUV420P", 2),
testColorConversion("BGRA32", "YUV420SP_NV12", 2),
testColorConversion("BGRA32", "YUV420SP_NV21", 2),
testColorConversion("BGRA32", "HSV", 0.01),
testColorConversion("BGRA32", "Lab", 0.5),
// From RGB24
testColorConversion("RGB24", "RGBA32"),
testColorConversion("RGB24", "BGRA32"),
testColorConversion("RGB24", "RGB24"),
testColorConversion("RGB24", "BGR24"),
testColorConversion("RGB24", "GRAY8"),
testColorConversion("RGB24", "YUV444P"),
testColorConversion("RGB24", "YUV422P"),
testColorConversion("RGB24", "YUV420P"),
testColorConversion("RGB24", "YUV420SP_NV12"),
testColorConversion("RGB24", "YUV420SP_NV21"),
testColorConversion("RGB24", "HSV", 0.01),
testColorConversion("RGB24", "Lab", 0.5),
// From BGR24
testColorConversion("BGR24", "RGBA32"),
testColorConversion("BGR24", "BGRA32"),
testColorConversion("BGR24", "RGB24"),
testColorConversion("BGR24", "BGR24"),
testColorConversion("BGR24", "GRAY8"),
testColorConversion("BGR24", "YUV444P"),
testColorConversion("BGR24", "YUV422P"),
testColorConversion("BGR24", "YUV420P"),
testColorConversion("BGR24", "YUV420SP_NV12"),
testColorConversion("BGR24", "YUV420SP_NV21"),
testColorConversion("BGR24", "HSV", 0.01),
testColorConversion("BGR24", "Lab", 0.5),
// From YUV444P
testColorConversion("YUV444P", "RGBA32"),
testColorConversion("YUV444P", "BGRA32"),
testColorConversion("YUV444P", "RGB24"),
testColorConversion("YUV444P", "BGR24"),
testColorConversion("YUV444P", "GRAY8"),
testColorConversion("YUV444P", "YUV444P"),
testColorConversion("YUV444P", "YUV422P", 4),
testColorConversion("YUV444P", "YUV420P", 3),
testColorConversion("YUV444P", "YUV420SP_NV12", 3),
testColorConversion("YUV444P", "YUV420SP_NV21", 3),
testColorConversion("YUV444P", "HSV", 0.01),
testColorConversion("YUV444P", "Lab", 0.01),
// From YUV422P
testColorConversion("YUV422P", "RGBA32"),
testColorConversion("YUV422P", "BGRA32", 2),
testColorConversion("YUV422P", "RGB24"),
testColorConversion("YUV422P", "BGR24"),
testColorConversion("YUV422P", "GRAY8"),
testColorConversion("YUV422P", "YUV444P", 3),
testColorConversion("YUV422P", "YUV422P"),
testColorConversion("YUV422P", "YUV420P"),
testColorConversion("YUV422P", "YUV420SP_NV12"),
testColorConversion("YUV422P", "YUV420SP_NV21"),
testColorConversion("YUV422P", "HSV", 0.01),
testColorConversion("YUV422P", "Lab", 0.01),
// From YUV420P
testColorConversion("YUV420P", "RGBA32", 2),
testColorConversion("YUV420P", "BGRA32", 2),
testColorConversion("YUV420P", "RGB24"),
testColorConversion("YUV420P", "BGR24"),
testColorConversion("YUV420P", "GRAY8"),
testColorConversion("YUV420P", "YUV444P", 3),
testColorConversion("YUV420P", "YUV422P", 1),
testColorConversion("YUV420P", "YUV420P"),
testColorConversion("YUV420P", "YUV420SP_NV12"),
testColorConversion("YUV420P", "YUV420SP_NV21"),
testColorConversion("YUV420P", "HSV", 0.01),
testColorConversion("YUV420P", "Lab", 0.01),
// From NV12
testColorConversion("YUV420SP_NV12", "RGBA32"),
testColorConversion("YUV420SP_NV12", "BGRA32", 2),
testColorConversion("YUV420SP_NV12", "RGB24"),
testColorConversion("YUV420SP_NV12", "BGR24"),
testColorConversion("YUV420SP_NV12", "GRAY8"),
testColorConversion("YUV420SP_NV12", "YUV444P", 3),
testColorConversion("YUV420SP_NV12", "YUV422P", 1),
testColorConversion("YUV420SP_NV12", "YUV420P"),
testColorConversion("YUV420SP_NV12", "YUV420SP_NV12"),
testColorConversion("YUV420SP_NV12", "YUV420SP_NV21"),
testColorConversion("YUV420SP_NV12", "HSV", 0.01),
testColorConversion("YUV420SP_NV12", "Lab", 0.01),
// From NV21
testColorConversion("YUV420SP_NV21", "RGBA32"),
testColorConversion("YUV420SP_NV21", "BGRA32", 2),
testColorConversion("YUV420SP_NV21", "RGB24"),
testColorConversion("YUV420SP_NV21", "BGR24"),
testColorConversion("YUV420SP_NV21", "GRAY8"),
testColorConversion("YUV420SP_NV21", "YUV444P", 3),
testColorConversion("YUV420SP_NV21", "YUV422P", 1),
testColorConversion("YUV420SP_NV21", "YUV420P"),
testColorConversion("YUV420SP_NV21", "YUV420SP_NV12"),
testColorConversion("YUV420SP_NV21", "YUV420SP_NV21"),
testColorConversion("YUV420SP_NV21", "HSV", 0.01),
testColorConversion("YUV420SP_NV21", "Lab", 0.01),
// From HSV
testColorConversion("HSV", "RGBA32"),
testColorConversion("HSV", "BGRA32"),
testColorConversion("HSV", "RGB24"),
testColorConversion("HSV", "BGR24"),
testColorConversion("HSV", "GRAY8"),
testColorConversion("HSV", "YUV444P"),
testColorConversion("HSV", "YUV422P"),
testColorConversion("HSV", "YUV420P"),
testColorConversion("HSV", "YUV420SP_NV12"),
testColorConversion("HSV", "YUV420SP_NV21"),
testColorConversion("HSV", "HSV", 0),
testColorConversion("HSV", "Lab", 0.5),
// From Lab
testColorConversion("Lab", "RGBA32", 1),
testColorConversion("Lab", "BGRA32", 1),
testColorConversion("Lab", "RGB24", 1),
testColorConversion("Lab", "BGR24", 1),
testColorConversion("Lab", "GRAY8", 1),
testColorConversion("Lab", "YUV444P", 1),
testColorConversion("Lab", "YUV422P", 1),
testColorConversion("Lab", "YUV420P", 1),
testColorConversion("Lab", "YUV420SP_NV12", 1),
testColorConversion("Lab", "YUV420SP_NV21", 1),
testColorConversion("Lab", "HSV", 0.5),
testColorConversion("Lab", "Lab", 0),
// From GRAY8
testColorConversion("GRAY8", "GRAY8"),
// From DEPTH
testColorConversion("DEPTH", "DEPTH", 0, Uint16Array),
]);
}
function testDraw() {
return Promise.all([doOneDrawTest("RGB24"),
doOneDrawTest("BGR24"),
doOneDrawTest("YUV444P", 5),
doOneDrawTest("YUV422P", 2),
doOneDrawTest("YUV420P", 2),
doOneDrawTest("YUV420SP_NV12", 2),
doOneDrawTest("YUV420SP_NV21", 2),
doOneDrawTest("HSV", 2),
doOneDrawTest("Lab", 2)]);
}
// Create an ImageBitmap, _bitmap_, from the _source_.
// Read the underlying data of _bitmap_ into _bitmapBuffer_.
// Compare the _bitmapBuffer_ with gGroundTruthImageData.
function testAccessing_randomTest(sourceType, source, duration) {
return new Promise(function(resolve, reject) {
var p = createImageBitmap(source);
p.then(
function(bitmap) {
bitmapFormat = "RGBA32";
var bitmapBufferLength = bitmap.mappedDataLength(bitmapFormat);
var bitmapBuffer = new ArrayBuffer(bitmapBufferLength);
var bitmapBufferView = new Uint8ClampedArray(bitmapBuffer, 0, bitmapBufferLength);
var promise = bitmap.mapDataInto(bitmapFormat, bitmapBuffer, 0);
promise.then(
function(bitmapPixelLayout) {
// Prepare.
bitmapImageData = new ImageData(bitmapBufferView, bitmap.width, bitmap.height);
// Test.
for (var t = 0; t < 50; ++t) {
var randomX = Math.floor(Math.random() * 240);
var randomY = Math.floor(Math.random() * 175);
isPixel(sourceType, "RGBA32", gGroundTruthImageData, bitmapImageData, randomX, randomY, duration);
}
resolve();
},
function(ev) { failed(ev); reject(); });
},
function(ev) { failed(ev); reject(); });
});
}
// Create an ImageBitmap, _bitmap_, from the _source_.
// Read the underlying data of _bitmap_ into _bitmapBuffer_.
// Create another ImageBitmap, _bitmap2_, from _bitmapBuffer_.
// Read the underlying data of _bitmap2_ into _bitmapBuffer2_.
// Compare the _bitmapBuffer2_ with gGroundTruthImageData.
function testCreateFromArrayBffer_randomTest(sourceType, source, duration) {
return new Promise(function(resolve, reject) {
var p = createImageBitmap(source);
p.then(
function(bitmap) {
bitmapFormat = "RGBA32";
var bitmapBufferLength = bitmap.mappedDataLength(bitmapFormat);
var bitmapBuffer = new ArrayBuffer(bitmapBufferLength);
var bitmapBufferView = new Uint8ClampedArray(bitmapBuffer, 0, bitmapBufferLength);
var promiseMapDataInto = bitmap.mapDataInto(bitmapFormat, bitmapBuffer, 0);
promiseMapDataInto.then(
function(bitmapPixelLayout) {
// Create a new ImageBitmap from an ArrayBuffer.
var p2 = createImageBitmap(bitmapBufferView,
0,
bitmapBufferLength,
bitmapFormat,
bitmapPixelLayout);
p2.then(
function(bitmap2) {
bitmapFormat2 = "RGBA32";
var bitmapBufferLength2 = bitmap2.mappedDataLength(bitmapFormat2);
var bitmapBuffer2 = new ArrayBuffer(bitmapBufferLength2);
var bitmapBufferView2 = new Uint8ClampedArray(bitmapBuffer2, 0, bitmapBufferLength2);
var promise2 = bitmap2.mapDataInto(bitmapFormat2, bitmapBuffer2, 0);
promise2.then(
function(bitmapPixelLayout2) {
// Prepare.
var bitmapImageData2 = new ImageData(bitmapBufferView2, bitmap2.width, bitmap2.height);
// Test.
for (var t = 0; t < 50; ++t) {
var randomX = Math.floor(Math.random() * 240);
var randomY = Math.floor(Math.random() * 175);
isPixel(sourceType, "RGBA32", gGroundTruthImageData, bitmapImageData2, randomX, randomY, duration);
}
resolve();
},
function(ev) { failed(ev); reject(); });
},
function(ev) { console.log("p2 rejected!"); failed(ev); reject(); });
},
function(ev) { console.log("promiseMapDataInto rejected!"); failed(ev); reject(); });
},
function(ev) { failed(ev); reject(); });
});
}
function testColorConversion(sourceFromat, destinationFormat, tolerance, shouldThrow) {
tolerance = tolerance || 0;
shouldThrow = shouldThrow || false;
return new Promise(function(resolve, reject) {
var [srcData, dstData] = getTestData(sourceFromat, destinationFormat);
ok(!!srcData, "Get valid srcData of type:" + sourceFromat);
ok(!!dstData, "Get valid dstData of type:" + destinationFormat);
// printInfo(sourceFromat, srcData);
// printInfo(destinationFormat, dstData);
// Create a new ImageBitmap from an ArrayBuffer.
var p = createImageBitmap(srcData.buffer,
0,
srcData.bufferLength,
srcData.format,
srcData.pixelLayout);
p.then(
function(srcBitmap) {
ok(!!srcBitmap, "Should get a valid srcBitmap.");
ok(srcBitmap.findOptimalFormat() == sourceFromat, "srcBitmap.findOptimalFormat():" + srcBitmap.findOptimalFormat() +
" should equal to sourceFromat:" + sourceFromat);
var dstBufferLength = srcBitmap.mappedDataLength(destinationFormat);
var dstBuffer = new ArrayBuffer(dstBufferLength);
var dstBufferView = new dstData.ArrayType(dstBuffer, 0, dstBufferLength / dstData.ArrayType.BYTES_PER_ELEMENT);
// Do color conversion here.
var p2 = srcBitmap.mapDataInto(destinationFormat, dstBuffer, 0);
p2.then(
function(dstPixelLayout) {
var dataPixalLayout = dstData.pixelLayout;
// Check pixel layout.
ok(dstPixelLayout.length == dstData.channelCount, "dstPixelLayout.length:" + dstPixelLayout.length +
" should equal to dstData.channelCount:" + dstData.channelCount);
for (var c = 0; c < dstData.channelCount; ++c) {
var dstChannelLayout = dstPixelLayout[c];
var dataChannelLayout = dataPixalLayout[c];
ok(dstChannelLayout.width == dataChannelLayout.width, "channel[" + c + "] dstChannelLayout.width:" + dstChannelLayout.width + " should equal to dataChannelLayout.width:" + dataChannelLayout.width);
ok(dstChannelLayout.height == dataChannelLayout.height, "channel[" + c + "] dstChannelLayout.height:" + dstChannelLayout.height + " should equal to dataChannelLayout.height:" + dataChannelLayout.height);
ok(dstChannelLayout.skip == dataChannelLayout.skip, "channel[" + c + "] dstChannelLayout.skip:" + dstChannelLayout.skip + " should equal to dataChannelLayout.skip:" + dataChannelLayout.skip);
for (var i = 0; i < dstChannelLayout.height; ++i) {
for (var j = 0; j < dstChannelLayout.width; ++j) {
var byteOffset = dstChannelLayout.offset + i * dstChannelLayout.stride + j * (dstChannelLayout.skip + 1) * dstData.ArrayType.BYTES_PER_ELEMENT;
var view = new dstData.ArrayType(dstBuffer, byteOffset, 1);
var dstBufferViewValue = view[0];
var dstDataValue = dstData.getPixelValue(i, j, c);
ok(Math.abs(dstBufferViewValue - dstDataValue) <= tolerance,
"[" + sourceFromat + " -> " + destinationFormat + "] pixel(" + i + "," + j + ") channnel(" + c +
"): dstBufferViewValue:" + dstBufferViewValue +
" should equal to dstDataValue:" + dstDataValue);
}
}
}
resolve();
},
function(ev) {
// If the "mapDataInto" throws, the flow goes here.
if (!shouldThrow) { failed(ev); }
reject();
}
);
},
function(ev) {
reject(ev);
}
);
});
}
function doOneDrawTest(sourceFromat, tolerance) {
tolerance = tolerance || 0;
var destinationFormat = "RGBA32";
return new Promise(function(resolve, reject) {
var [srcData, dstData] = getTestData(sourceFromat, destinationFormat);
ok(!!srcData, "Get valid srcData of type:" + sourceFromat);
ok(!!dstData, "Get valid dstData of type:" + destinationFormat);
var p = createImageBitmap(srcData.buffer,
0,
srcData.bufferLength,
srcData.format,
srcData.pixelLayout);
p.then(
function(srcBitmap) {
ok(!!srcBitmap, "Should get a valid srcBitmap.");
ok(srcBitmap.findOptimalFormat() == sourceFromat, "srcBitmap.findOptimalFormat():" + srcBitmap.findOptimalFormat() +
" should equal to sourceFromat:" + sourceFromat);
var canvas = document.createElement("canvas");
canvas.width = srcBitmap.width;
canvas.height = srcBitmap.height;
var ctx = canvas.getContext("2d");
ctx.drawImage(srcBitmap, 0, 0, srcBitmap.width, srcBitmap.height);
// Get an ImageData from the canvas.
var imageData = ctx.getImageData(0, 0, srcBitmap.width, srcBitmap.height);
for (var i = 0; i < srcBitmap.height; ++i) {
for (var j = 0; j < srcBitmap.width; ++j) {
var pixelOffset = i * srcBitmap.width * dstData.channelCount + j * dstData.channelCount;
var dstImageDataValue_R = imageData.data[pixelOffset + 0];
var dstImageDataValue_G = imageData.data[pixelOffset + 1];
var dstImageDataValue_B = imageData.data[pixelOffset + 2];
var dstImageDataValue_A = imageData.data[pixelOffset + 3];
var logPrefix = "[" + sourceFromat + " -> " + destinationFormat + "] pixel(" + i + "," + j + ")";
var dstDataValue_R = dstData.getPixelValue(i, j, 0);
var dstDataValue_G = dstData.getPixelValue(i, j, 1);
var dstDataValue_B = dstData.getPixelValue(i, j, 2);
var dstDataValue_A = dstData.getPixelValue(i, j, 3);
ok(Math.abs(dstImageDataValue_R - dstDataValue_R) <= tolerance,
logPrefix + "channnel(R): dstImageDataValue:" + dstImageDataValue_R + " should equal to dstDataValue_R: " + dstDataValue_R);
ok(Math.abs(dstImageDataValue_G - dstDataValue_G) <= tolerance,
logPrefix + "channnel(G): dstImageDataValue:" + dstImageDataValue_G + " should equal to dstDataValue_G: " + dstDataValue_G);
ok(Math.abs(dstImageDataValue_B - dstDataValue_B) <= tolerance,
logPrefix + "channnel(B): dstImageDataValue:" + dstImageDataValue_B + " should equal to dstDataValue_B: " + dstDataValue_B);
ok(Math.abs(dstImageDataValue_A - dstDataValue_A) <= tolerance,
logPrefix + "channnel(A): dstImageDataValue:" + dstImageDataValue_A + " should equal to dstDataValue_A: " + dstDataValue_A);
}
}
resolve();
},
function(ev) {
failed(ev);
reject(ev);
}
);
});
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,47 +0,0 @@
importScripts("imagebitmap_extensions_data.js");
importScripts("imagebitmap_extensions.js");
var gGroundTruthImageData;
var gImageData;
var gImageBitmap;
var gPNGBlob;
var gJPEGBlob;
onmessage = function(event) {
if (event.data.type == "setSources") {
gGroundTruthImageData = event.data.groundTruthImageData;
gImageData = event.data.imageData;
gImageBitmap = event.data.imageBitmap;
gPNGBlob = event.data.pngBlob;
gJPEGBlob = event.data.jpegBlob;
ok(!!gGroundTruthImageData, "Get gGroundTruthImageData!");
ok(!!gImageData, "Get gImageData!");
ok(!!gImageBitmap, "Get gImageBitmap!");
ok(!!gPNGBlob, "Get gPNGBlob!");
ok(!!gJPEGBlob, "Get gJPEGBlob!");
runTests();
}
};
function ok(expect, msg) {
postMessage({"type": "status", status: !!expect, msg: msg});
}
function runTests() {
testExceptions().
then(testColorConversions()).
then( function() { return Promise.all([testAccessing_randomTest("ImageData", gImageData, 0),
testAccessing_randomTest("ImageBitmap", gImageBitmap, 0),
testAccessing_randomTest("PNG", gPNGBlob, 0),
testAccessing_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information
]); }).
then( function() { return Promise.all([testCreateFromArrayBffer_randomTest("ImageData", gImageData, 0),
testCreateFromArrayBffer_randomTest("ImageBitmap", gImageBitmap, 0),
testCreateFromArrayBffer_randomTest("PNG", gPNGBlob, 0),
testCreateFromArrayBffer_randomTest("JPEG", gJPEGBlob, 10) // JPEG loses information
]); }).
then(function() { return testInvalidAccess([gImageData, gImageBitmap, gPNGBlob, gJPEGBlob]); } ).
then(function() {postMessage({"type": "finish"});}, function(ev) { failed(ev); postMessage({"type": "finish"}); });
}

Просмотреть файл

@ -1,94 +0,0 @@
var gImage;
var gVideo;
var gCanvas;
var gCtx;
var gImageData;
var gImageBitmap;
var gPNGBlob;
var gJPEGBlob;
var gGroundTruthImageData;
function prepareSources() {
gVideo = document.createElement("video");
gVideo.src = "http://example.com/tests/dom/canvas/test/crossorigin/video.sjs?name=tests/dom/canvas/test/320x240.ogv&type=video/ogg&cors=anonymous";
gVideo.crossOrigin = "anonymous";
gVideo.autoplay = "true"
gCanvas = document.createElement("canvas");
gCtx = gCanvas.getContext("2d");
var resolver;
var promise = new Promise(function(resolve, reject) {
resolver = resolve;
});
// Prepare video.
gVideo.onloadeddata = function() {
ok(gVideo, "[Prepare Sources] gVideo is ok.");
// Prepare canvas.
gCanvas.width = gVideo.videoWidth;
gCanvas.height = gVideo.videoHeight;
gCtx.drawImage(gVideo, 0, 0);
ok(gCanvas, "[Prepare Sources] gCanvas is ok.");
ok(gCtx, "[Prepare Sources] gCtx is ok.");
// Prepare gGroundTruthImageData.
gGroundTruthImageData = gCtx.getImageData(0, 0, gCanvas.width, gCanvas.height);
ok(gGroundTruthImageData, "[Prepare Sources] gGroundTruthImageData is ok.");
// Prepare image.
gImage = document.createElement("img");
gImage.src = gCanvas.toDataURL();
var resolverImage;
var promiseImage = new Promise(function(resolve, reject) {
resolverImage = resolve;
});
gImage.onload = function() {
resolverImage(true);
}
// Prepare ImageData.
gImageData = gCtx.getImageData(0, 0, gCanvas.width, gCanvas.height);
ok(gImageData, "[Prepare Sources] gImageData is ok.");
// Prepapre PNG Blob.
var promisePNGBlob = new Promise(function(resolve, reject) {
gCanvas.toBlob(function(blob) {
gPNGBlob = blob;
ok(gPNGBlob, "[Prepare Sources] gPNGBlob is ok.");
resolve(true);
});
});
// Prepare JPEG Blob.
var promiseJPEGBlob = new Promise(function(resolve, reject) {
gCanvas.toBlob(function(blob) {
gJPEGBlob = blob;
ok(gJPEGBlob, "[Prepare Sources] gJPEGBlob is ok.");
resolve(true);
}, "image/jpeg", 1.00);
});
// Prepare ImageBitmap.
var promiseImageBitmap = new Promise(function(resolve, reject) {
var p = createImageBitmap(gCanvas);
p.then(function(bitmap) {
gImageBitmap = bitmap;
ok(gImageBitmap, "[Prepare Sources] gImageBitmap is ok.");
resolve(true);
});
});
resolver(Promise.all([
promiseImage,
promisePNGBlob,
promiseJPEGBlob,
promiseImageBitmap
]))
}
return promise;
}

Просмотреть файл

@ -26,11 +26,6 @@ support-files =
image_yellow75.png image_yellow75.png
imagebitmap_bug1239300.js imagebitmap_bug1239300.js
imagebitmap_bug1239752.js imagebitmap_bug1239752.js
imagebitmap_extensions.html
imagebitmap_extensions.js
imagebitmap_extensions_data.js
imagebitmap_extensions_on_worker.js
imagebitmap_extensions_prepareSources.js
imagebitmap_on_worker.js imagebitmap_on_worker.js
imagebitmap_structuredclone.js imagebitmap_structuredclone.js
imagebitmap_structuredclone_iframe.html imagebitmap_structuredclone_iframe.html
@ -238,15 +233,6 @@ tags = imagebitmap
[test_imagebitmap_cropping.html] [test_imagebitmap_cropping.html]
skip-if = android_version >= '17' # bug 1336581 skip-if = android_version >= '17' # bug 1336581
tags = imagebitmap tags = imagebitmap
[test_imagebitmap_extensions.html]
skip-if = android_version >= '17' # bug 1336581
tags = imagebitmap
[test_imagebitmap_extensions_on_worker.html]
skip-if = android_version == '19' # bug 1338256
tags = imagebitmap
[test_imagebitmap_on_worker.html]
skip-if = android_version >= '17' # bug 1336581
tags = imagebitmap
[test_imagebitmap_structuredclone.html] [test_imagebitmap_structuredclone.html]
tags = imagebitmap tags = imagebitmap
[test_imagebitmap_structuredclone_iframe.html] [test_imagebitmap_structuredclone_iframe.html]
@ -311,3 +297,4 @@ skip-if = 1
subsuite = gpu subsuite = gpu
tags = offscreencanvas tags = offscreencanvas
skip-if = 1 skip-if = 1
[test_invalid_mime_type_blob.html]

Просмотреть файл

@ -1,37 +0,0 @@
<!DOCTYPE HTML>
<heand>
<title>Test ImageBitmap Extensions (Bug 1141979)</title>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<div id="content"><div>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
// The createImageBitmap() method is part of Window whose
// prototype was created before the preference is set. So I create another
// iframe with the right preference setting so that the
// createImageBitmap() will be visible.
SpecialPowers.pushPrefEnv({'set': [
['canvas.imagebitmap_extensions.enabled', true],
['gfx.ycbcr.accurate-conversion', true]
]}, function() {
var div = document.getElementById("content");
ok(div, "Parent exists");
var ifr = document.createElement("iframe");
ifr.setAttribute('src', "imagebitmap_extensions.html");
div.appendChild(ifr);
});
window.onmessage = function(event) {
if (event.data.type == "status") {
ok(event.data.status, event.data.msg);
} else if (event.data.type == "finish") {
SimpleTest.finish();
}
}
</script>
</body>

Просмотреть файл

@ -1,39 +0,0 @@
<!DOCTYPE HTML>
<heand>
<title>Test ImageBitmap Extensions On Worker (Bug 1141979)</title>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<div id="content"><div>
<script src="imagebitmap_extensions_prepareSources.js"></script>
<script type="text/javascript">
var worker;
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [
['canvas.imagebitmap_extensions.enabled', true]
]}, function() {
worker = new Worker("imagebitmap_extensions_on_worker.js");
worker.onmessage = function(event) {
if (event.data.type == "status") {
ok(event.data.status, event.data.msg);
} else if (event.data.type == "finish") {
SimpleTest.finish();
}
};
ok(!!worker, "Worker created successfully.");
prepareSources().then(function() {
worker.postMessage({"type": "setSources",
"groundTruthImageData": gGroundTruthImageData,
"imageData": gImageData,
"imageBitmap": gImageBitmap,
"pngBlob": gPNGBlob,
"jpegBlob": gJPEGBlob});
});
});
</script>
</body>

Просмотреть файл

@ -0,0 +1,85 @@
<!DOCTYPE HTML>
<title>createImageBitmap from Blob with invalid type</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<body>
<script>
function syncBlob() {
info("Let's create a small memory blob...");
// A 1x1 PNG image.
// Source: https://commons.wikimedia.org/wiki/File:1x1.png (Public Domain)
const IMAGE = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" +
"ACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=");
let bytes = new Array(IMAGE.length);
for (let i = 0; i < IMAGE.length; i++) {
bytes[i] = IMAGE.charCodeAt(i);
}
let blob = new Blob([new Uint8Array(bytes)], { type: "text/html"});
window.createImageBitmap(blob)
.then(imageBitmap => {
ok(true, "Image created!");
is(imageBitmap.width, 1, "Image is 1x1");
is(imageBitmap.height, 1, "Image is 1x1");
})
.then(next);
}
function asyncBlob() {
info("Let's create a big memory blob...");
// A 1x1 PNG image.
// Source: https://commons.wikimedia.org/wiki/File:1x1.png (Public Domain)
const IMAGE = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" +
"ACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=");
let bytes = new Array(IMAGE.length);
for (let i = 0; i < IMAGE.length; i++) {
bytes[i] = IMAGE.charCodeAt(i);
}
let array = [];
for (let i = 0; i < 20000; ++i) {
array.push(new Uint8Array(bytes));
}
let blob = new Blob(array, { type: "text/html"});
ok(blob.size > 1000000, "More than 1mb");
let bc = new BroadcastChannel('a');
bc.onmessage = e => {
window.createImageBitmap(e.data)
.then(imageBitmap => {
ok(true, "Image created!");
is(imageBitmap.width, 1, "Image is 1x1");
is(imageBitmap.height, 1, "Image is 1x1");
})
.then(next);
}
new BroadcastChannel('a').postMessage(blob);
}
let tests = [
syncBlob,
asyncBlob,
];
function next() {
if (tests.length == 0) {
SimpleTest.finish();
return;
}
let test = tests.shift();
test();
}
SimpleTest.waitForExplicitFinish();
next();
</script>
</body>
</html>

Просмотреть файл

@ -5,7 +5,7 @@
interface nsIDocShell; interface nsIDocShell;
[Exposed=(Window, System), ChromeOnly] [Exposed=Window, ChromeOnly]
interface BrowsingContext { interface BrowsingContext {
readonly attribute BrowsingContext? parent; readonly attribute BrowsingContext? parent;

Просмотреть файл

@ -41,7 +41,7 @@ enum MozContentPolicyType {
* A thin wrapper around nsIChannel and nsIHttpChannel that allows JS * A thin wrapper around nsIChannel and nsIHttpChannel that allows JS
* callers to access them without XPConnect overhead. * callers to access them without XPConnect overhead.
*/ */
[ChromeOnly, Exposed=System] [ChromeOnly, Exposed=Window]
interface ChannelWrapper : EventTarget { interface ChannelWrapper : EventTarget {
/** /**
* Returns the wrapper instance for the given channel. The same wrapper is * Returns the wrapper instance for the given channel. The same wrapper is

Просмотреть файл

@ -14,7 +14,7 @@
* C++ callers use a fast path, and never call the JSAPI or WebIDL methods of * C++ callers use a fast path, and never call the JSAPI or WebIDL methods of
* this object. * this object.
*/ */
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface MozQueryInterface { interface MozQueryInterface {
[Throws] [Throws]
legacycaller any (IID aIID); legacycaller any (IID aIID);
@ -25,7 +25,7 @@ interface MozQueryInterface {
* This is exposed in all the system globals where we can expose stuff by * This is exposed in all the system globals where we can expose stuff by
* default, so should only include methods that are **thread-safe**. * default, so should only include methods that are **thread-safe**.
*/ */
[ChromeOnly, Exposed=(Window,System,Worker)] [ChromeOnly, Exposed=(Window,Worker)]
namespace ChromeUtils { namespace ChromeUtils {
/** /**
* Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and * Serialize a snapshot of the heap graph, as seen by |JS::ubi::Node| and
@ -148,7 +148,7 @@ namespace ChromeUtils {
* Additional ChromeUtils methods that are _not_ thread-safe, and hence not * Additional ChromeUtils methods that are _not_ thread-safe, and hence not
* exposed in workers. * exposed in workers.
*/ */
[Exposed=(Window,System)] [Exposed=Window]
partial namespace ChromeUtils { partial namespace ChromeUtils {
/** /**
* A helper that converts OriginAttributesDictionary to a opaque suffix string. * A helper that converts OriginAttributesDictionary to a opaque suffix string.

Просмотреть файл

@ -38,7 +38,7 @@ typedef unsigned long long NodeSize;
* its retained size is therefore significant (assuming no external * its retained size is therefore significant (assuming no external
* references into the tree). * references into the tree).
*/ */
[ChromeOnly, Exposed=(Window,System,Worker)] [ChromeOnly, Exposed=(Window,Worker)]
interface DominatorTree { interface DominatorTree {
/** /**
* The `NodeId` for the root of the dominator tree. This is a "meta-root" in * The `NodeId` for the root of the dominator tree. This is a "meta-root" in

Просмотреть файл

@ -7,7 +7,7 @@
/** /**
* A HeapSnapshot represents a snapshot of the heap graph * A HeapSnapshot represents a snapshot of the heap graph
*/ */
[ChromeOnly, Exposed=(Window,System,Worker)] [ChromeOnly, Exposed=(Window,Worker)]
interface HeapSnapshot { interface HeapSnapshot {
/** /**
* A time stamp of when the heap snapshot was taken, if available. Units are * A time stamp of when the heap snapshot was taken, if available. Units are

Просмотреть файл

@ -9,7 +9,7 @@
* occurrence of "?" in the glob matches any single literal character. * occurrence of "?" in the glob matches any single literal character.
*/ */
[Constructor(DOMString glob, optional boolean allowQuestion = true), [Constructor(DOMString glob, optional boolean allowQuestion = true),
ChromeOnly, Exposed=(Window,System)] ChromeOnly, Exposed=Window]
interface MatchGlob { interface MatchGlob {
/** /**
* Returns true if the string matches the glob. * Returns true if the string matches the glob.

Просмотреть файл

@ -30,7 +30,7 @@ interface URI;
* the URL path must exactly match the pattern path. * the URL path must exactly match the pattern path.
*/ */
[Constructor(DOMString pattern, optional MatchPatternOptions options), [Constructor(DOMString pattern, optional MatchPatternOptions options),
ChromeOnly, Exposed=(Window,System)] ChromeOnly, Exposed=Window]
interface MatchPattern { interface MatchPattern {
/** /**
* Returns true if the given URI matches the pattern. * Returns true if the given URI matches the pattern.
@ -74,7 +74,7 @@ interface MatchPattern {
* matches when any of its sub-patterns matches. * matches when any of its sub-patterns matches.
*/ */
[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options), [Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
ChromeOnly, Exposed=(Window,System)] ChromeOnly, Exposed=Window]
interface MatchPatternSet { interface MatchPatternSet {
/** /**
* Returns true if the given URI matches any sub-pattern. * Returns true if the given URI matches any sub-pattern.

Просмотреть файл

@ -9,7 +9,7 @@ callback interface MozDocumentCallback {
void onPreloadDocument(MozDocumentMatcher matcher, LoadInfo loadInfo); void onPreloadDocument(MozDocumentMatcher matcher, LoadInfo loadInfo);
}; };
[ChromeOnly, Constructor(MozDocumentCallback callbacks), Exposed=System] [ChromeOnly, Constructor(MozDocumentCallback callbacks), Exposed=Window]
interface MozDocumentObserver { interface MozDocumentObserver {
[Throws] [Throws]
void observe(sequence<MozDocumentMatcher> matchers); void observe(sequence<MozDocumentMatcher> matchers);

Просмотреть файл

@ -12,12 +12,12 @@ enum PlacesEventType {
"bookmark-added", "bookmark-added",
}; };
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface PlacesEvent { interface PlacesEvent {
readonly attribute PlacesEventType type; readonly attribute PlacesEventType type;
}; };
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface PlacesVisit : PlacesEvent { interface PlacesVisit : PlacesEvent {
/** /**
* URL of the visit. * URL of the visit.
@ -76,7 +76,7 @@ interface PlacesVisit : PlacesEvent {
/** /**
* Base class for properties that are common to all bookmark events. * Base class for properties that are common to all bookmark events.
*/ */
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface PlacesBookmark : PlacesEvent { interface PlacesBookmark : PlacesEvent {
/** /**
* The id of the item. * The id of the item.
@ -135,7 +135,7 @@ dictionary PlacesBookmarkAdditionInit {
required boolean isTagging; required boolean isTagging;
}; };
[ChromeOnly, Exposed=(Window,System), Constructor(PlacesBookmarkAdditionInit initDict)] [ChromeOnly, Exposed=Window, Constructor(PlacesBookmarkAdditionInit initDict)]
interface PlacesBookmarkAddition : PlacesBookmark { interface PlacesBookmarkAddition : PlacesBookmark {
/** /**
* The item's index in the folder. * The item's index in the folder.

Просмотреть файл

@ -6,13 +6,13 @@
callback PlacesEventCallback = void (sequence<PlacesEvent> events); callback PlacesEventCallback = void (sequence<PlacesEvent> events);
[ChromeOnly, Exposed=(Window,System), [ChromeOnly, Exposed=Window,
Constructor(PlacesEventCallback callback)] Constructor(PlacesEventCallback callback)]
interface PlacesWeakCallbackWrapper { interface PlacesWeakCallbackWrapper {
}; };
// Global singleton which should handle all events for places. // Global singleton which should handle all events for places.
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
namespace PlacesObservers { namespace PlacesObservers {
[Throws] [Throws]
void addListener(sequence<PlacesEventType> eventTypes, void addListener(sequence<PlacesEventType> eventTypes,

Просмотреть файл

@ -8,7 +8,7 @@
* Represents a pre-compiled JS script, which can be repeatedly executed in * Represents a pre-compiled JS script, which can be repeatedly executed in
* different globals without being re-parsed. * different globals without being re-parsed.
*/ */
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface PrecompiledScript { interface PrecompiledScript {
/** /**
* Executes the script in the context of, and with the security principal * Executes the script in the context of, and with the security principal

Просмотреть файл

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. * You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
namespace PrioEncoder { namespace PrioEncoder {
[Throws, NewObject] [Throws, NewObject]
PrioEncodedData encode(ByteString batchID, PrioParams params); PrioEncodedData encode(ByteString batchID, PrioParams params);

Просмотреть файл

@ -50,7 +50,7 @@ callback interface UncaughtRejectionObserver {
void onConsumed(object p); void onConsumed(object p);
}; };
[ChromeOnly, Exposed=(Window,System)] [ChromeOnly, Exposed=Window]
interface PromiseDebugging { interface PromiseDebugging {
/** /**
* The various functions on this interface all expect to take promises but * The various functions on this interface all expect to take promises but

Просмотреть файл

@ -8,7 +8,7 @@
* A holder for structured-clonable data which can itself be cloned with * A holder for structured-clonable data which can itself be cloned with
* little overhead, and deserialized into an arbitrary global. * little overhead, and deserialized into an arbitrary global.
*/ */
[ChromeOnly, Exposed=(Window,System,Worker), [ChromeOnly, Exposed=(Window,Worker),
/** /**
* Serializes the given value to an opaque structured clone blob, and * Serializes the given value to an opaque structured clone blob, and
* returns the result. * returns the result.

Просмотреть файл

@ -9,7 +9,7 @@ interface WindowProxy;
typedef (MatchPatternSet or sequence<DOMString>) MatchPatternSetOrStringSequence; typedef (MatchPatternSet or sequence<DOMString>) MatchPatternSetOrStringSequence;
typedef (MatchGlob or DOMString) MatchGlobOrString; typedef (MatchGlob or DOMString) MatchGlobOrString;
[Constructor(MozDocumentMatcherInit options), ChromeOnly, Exposed=System] [Constructor(MozDocumentMatcherInit options), ChromeOnly, Exposed=Window]
interface MozDocumentMatcher { interface MozDocumentMatcher {
/** /**
* Returns true if the script's match and exclude patterns match the given * Returns true if the script's match and exclude patterns match the given
@ -132,7 +132,7 @@ enum ContentScriptRunAt {
"document_idle", "document_idle",
}; };
[Constructor(WebExtensionPolicy extension, WebExtensionContentScriptInit options), ChromeOnly, Exposed=System] [Constructor(WebExtensionPolicy extension, WebExtensionContentScriptInit options), ChromeOnly, Exposed=Window]
interface WebExtensionContentScript : MozDocumentMatcher { interface WebExtensionContentScript : MozDocumentMatcher {
/** /**
* The earliest point in the load cycle at which this script should run. For * The earliest point in the load cycle at which this script should run. For

Просмотреть файл

@ -11,7 +11,7 @@ callback WebExtensionLocalizeCallback = DOMString (DOMString unlocalizedText);
* Defines the platform-level policies for a WebExtension, including its * Defines the platform-level policies for a WebExtension, including its
* permissions and the characteristics of its moz-extension: URLs. * permissions and the characteristics of its moz-extension: URLs.
*/ */
[Constructor(WebExtensionInit options), ChromeOnly, Exposed=System] [Constructor(WebExtensionInit options), ChromeOnly, Exposed=Window]
interface WebExtensionPolicy { interface WebExtensionPolicy {
/** /**
* The add-on's internal ID, as specified in its manifest.json file or its * The add-on's internal ID, as specified in its manifest.json file or its

Просмотреть файл

@ -7,7 +7,7 @@
* https://dom.spec.whatwg.org/#abortcontroller * https://dom.spec.whatwg.org/#abortcontroller
*/ */
[Constructor(), Exposed=(Window,Worker,System)] [Constructor(), Exposed=(Window,Worker)]
interface AbortController { interface AbortController {
readonly attribute AbortSignal signal; readonly attribute AbortSignal signal;

Просмотреть файл

@ -7,7 +7,7 @@
* https://dom.spec.whatwg.org/#abortsignal * https://dom.spec.whatwg.org/#abortsignal
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface AbortSignal : EventTarget { interface AbortSignal : EventTarget {
readonly attribute boolean aborted; readonly attribute boolean aborted;

Просмотреть файл

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. * You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
[NoInterfaceObject, Exposed=(Window,Worker,System)] [NoInterfaceObject, Exposed=(Window,Worker)]
interface AbstractWorker { interface AbstractWorker {
attribute EventHandler onerror; attribute EventHandler onerror;
}; };

Просмотреть файл

@ -82,7 +82,7 @@ interface AddonManager : EventTarget {
readonly attribute boolean permissionPromptsEnabled; readonly attribute boolean permissionPromptsEnabled;
}; };
[ChromeOnly,Exposed=System,HeaderFile="mozilla/AddonManagerWebAPI.h"] [ChromeOnly,Exposed=Window,HeaderFile="mozilla/AddonManagerWebAPI.h"]
interface AddonManagerPermissions { interface AddonManagerPermissions {
static boolean isHostPermitted(DOMString host); static boolean isHostPermitted(DOMString host);
}; };

Просмотреть файл

@ -8,7 +8,7 @@
* https://console.spec.whatwg.org/#console-namespace * https://console.spec.whatwg.org/#console-namespace
*/ */
[Exposed=(Window,Worker,WorkerDebugger,Worklet,System), [Exposed=(Window,Worker,WorkerDebugger,Worklet),
ClassString="Console", ClassString="Console",
ProtoObjectHack] ProtoObjectHack]
namespace console { namespace console {
@ -146,7 +146,7 @@ dictionary ConsoleCounterError {
}; };
[ChromeOnly, [ChromeOnly,
Exposed=(Window,Worker,WorkerDebugger,Worklet,System)] Exposed=(Window,Worker,WorkerDebugger,Worklet)]
// This is basically a copy of the console namespace. // This is basically a copy of the console namespace.
interface ConsoleInstance { interface ConsoleInstance {
// Logging // Logging

Просмотреть файл

@ -11,7 +11,7 @@
*/ */
[Constructor(DOMString name, optional DOMString message = ""), [Constructor(DOMString name, optional DOMString message = ""),
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface DOMError { interface DOMError {
[Constant, UseCounter] [Constant, UseCounter]
readonly attribute DOMString name; readonly attribute DOMString name;

Просмотреть файл

@ -16,7 +16,7 @@
interface StackFrame; interface StackFrame;
[NoInterfaceObject, [NoInterfaceObject,
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface ExceptionMembers interface ExceptionMembers
{ {
// The nsresult associated with this exception. // The nsresult associated with this exception.
@ -66,7 +66,7 @@ Exception implements ExceptionMembers;
// XXXkhuey this is an 'exception', not an interface, but we don't have any // XXXkhuey this is an 'exception', not an interface, but we don't have any
// parser or codegen mechanisms for dealing with exceptions. // parser or codegen mechanisms for dealing with exceptions.
[ExceptionClass, [ExceptionClass,
Exposed=(Window, Worker,System), Exposed=(Window, Worker),
Constructor(optional DOMString message = "", optional DOMString name)] Constructor(optional DOMString message = "", optional DOMString name)]
interface DOMException { interface DOMException {
// The name of the error code (ie, a string repr of |result|). // The name of the error code (ie, a string repr of |result|).

Просмотреть файл

@ -5,7 +5,7 @@
enum DOMRequestReadyState { "pending", "done" }; enum DOMRequestReadyState { "pending", "done" };
[Exposed=(Window,Worker,System), NoInterfaceObject] [Exposed=(Window,Worker), NoInterfaceObject]
interface DOMRequestShared { interface DOMRequestShared {
readonly attribute DOMRequestReadyState readyState; readonly attribute DOMRequestReadyState readyState;
@ -16,7 +16,7 @@ interface DOMRequestShared {
attribute EventHandler onerror; attribute EventHandler onerror;
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface DOMRequest : EventTarget { interface DOMRequest : EventTarget {
// The [TreatNonCallableAsNull] annotation is required since then() should do // The [TreatNonCallableAsNull] annotation is required since then() should do
// nothing instead of throwing errors when non-callable arguments are passed. // nothing instead of throwing errors when non-callable arguments are passed.

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply. * liability, trademark and document use rules apply.
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface DOMStringList { interface DOMStringList {
readonly attribute unsigned long length; readonly attribute unsigned long length;
getter DOMString? item(unsigned long index); getter DOMString? item(unsigned long index);

Просмотреть файл

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Constructor(DOMString type, optional ErrorEventInit eventInitDict), [Constructor(DOMString type, optional ErrorEventInit eventInitDict),
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface ErrorEvent : Event interface ErrorEvent : Event
{ {
readonly attribute DOMString message; readonly attribute DOMString message;

Просмотреть файл

@ -11,7 +11,7 @@
*/ */
[Constructor(DOMString type, optional EventInit eventInitDict), [Constructor(DOMString type, optional EventInit eventInitDict),
Exposed=(Window,Worker,System), ProbablyShortLivingWrapper] Exposed=(Window,Worker), ProbablyShortLivingWrapper]
interface Event { interface Event {
[Pure] [Pure]
readonly attribute DOMString type; readonly attribute DOMString type;

Просмотреть файл

@ -26,7 +26,7 @@ dictionary AddEventListenerOptions : EventListenerOptions {
}; };
[Constructor, [Constructor,
Exposed=(Window,Worker,WorkerDebugger,AudioWorklet,System)] Exposed=(Window,Worker,WorkerDebugger,AudioWorklet)]
interface EventTarget { interface EventTarget {
/* Passing null for wantsUntrusted means "default behavior", which /* Passing null for wantsUntrusted means "default behavior", which
differs in content and chrome. In content that default boolean differs in content and chrome. In content that default boolean
@ -65,6 +65,6 @@ partial interface EventTarget {
// chrome easier. This returns the window which can be used to create // chrome easier. This returns the window which can be used to create
// events to fire at this EventTarget, or null if there isn't one. // events to fire at this EventTarget, or null if there isn't one.
partial interface EventTarget { partial interface EventTarget {
[ChromeOnly, Exposed=(Window,System), BinaryName="ownerGlobalForBindings"] [ChromeOnly, Exposed=Window, BinaryName="ownerGlobalForBindings"]
readonly attribute WindowProxy? ownerGlobal; readonly attribute WindowProxy? ownerGlobal;
}; };

Просмотреть файл

@ -11,7 +11,7 @@
*/ */
[Constructor, [Constructor,
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface FileReader : EventTarget { interface FileReader : EventTarget {
// async read methods // async read methods
[Throws] [Throws]

Просмотреть файл

@ -14,7 +14,7 @@ enum IDBCursorDirection {
"prevunique" "prevunique"
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBCursor { interface IDBCursor {
readonly attribute (IDBObjectStore or IDBIndex) source; readonly attribute (IDBObjectStore or IDBIndex) source;
@ -42,7 +42,7 @@ interface IDBCursor {
IDBRequest delete (); IDBRequest delete ();
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBCursorWithValue : IDBCursor { interface IDBCursorWithValue : IDBCursor {
[Throws] [Throws]
readonly attribute any value; readonly attribute any value;

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply. * liability, trademark and document use rules apply.
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBDatabase : EventTarget { interface IDBDatabase : EventTarget {
readonly attribute DOMString name; readonly attribute DOMString name;
readonly attribute unsigned long long version; readonly attribute unsigned long long version;

Просмотреть файл

@ -23,7 +23,7 @@ dictionary IDBOpenDBOptions
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
* for more information. * for more information.
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBFactory { interface IDBFactory {
[Throws, NeedsCallerType] [Throws, NeedsCallerType]
IDBOpenDBRequest IDBOpenDBRequest

Просмотреть файл

@ -8,7 +8,7 @@ dictionary IDBFileMetadataParameters
boolean lastModified = true; boolean lastModified = true;
}; };
[Exposed=(Window,System)] [Exposed=(Window)]
interface IDBFileHandle : EventTarget interface IDBFileHandle : EventTarget
{ {
readonly attribute IDBMutableFile? mutableFile; readonly attribute IDBMutableFile? mutableFile;

Просмотреть файл

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Exposed=(Window,System)] [Exposed=Window]
interface IDBFileRequest : DOMRequest { interface IDBFileRequest : DOMRequest {
readonly attribute IDBFileHandle? fileHandle; readonly attribute IDBFileHandle? fileHandle;
// this is deprecated due to renaming in the spec // this is deprecated due to renaming in the spec

Просмотреть файл

@ -18,7 +18,7 @@ dictionary IDBIndexParameters {
DOMString? locale = null; DOMString? locale = null;
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBIndex { interface IDBIndex {
[SetterThrows] [SetterThrows]
attribute DOMString name; attribute DOMString name;

Просмотреть файл

@ -9,7 +9,7 @@
* liability, trademark and document use rules apply. * liability, trademark and document use rules apply.
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBKeyRange { interface IDBKeyRange {
[Throws] [Throws]
readonly attribute any lower; readonly attribute any lower;
@ -33,7 +33,7 @@ interface IDBKeyRange {
static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false); static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
}; };
[Exposed=(Window,Worker,System), [Exposed=(Window,Worker),
Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"] Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
interface IDBLocaleAwareKeyRange : IDBKeyRange { interface IDBLocaleAwareKeyRange : IDBKeyRange {
[NewObject, Throws] [NewObject, Throws]

Просмотреть файл

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Exposed=(Window,System)] [Exposed=Window]
interface IDBMutableFile : EventTarget { interface IDBMutableFile : EventTarget {
readonly attribute DOMString name; readonly attribute DOMString name;
readonly attribute DOMString type; readonly attribute DOMString type;

Просмотреть файл

@ -12,7 +12,7 @@ dictionary IDBObjectStoreParameters {
boolean autoIncrement = false; boolean autoIncrement = false;
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBObjectStore { interface IDBObjectStore {
[SetterThrows] [SetterThrows]
attribute DOMString name; attribute DOMString name;

Просмотреть файл

@ -7,7 +7,7 @@
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBOpenDBRequest * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBOpenDBRequest
*/ */
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBOpenDBRequest : IDBRequest { interface IDBOpenDBRequest : IDBRequest {
attribute EventHandler onblocked; attribute EventHandler onblocked;

Просмотреть файл

@ -13,7 +13,7 @@ enum IDBRequestReadyState {
"done" "done"
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBRequest : EventTarget { interface IDBRequest : EventTarget {
[Throws] [Throws]
readonly attribute any result; readonly attribute any result;

Просмотреть файл

@ -19,7 +19,7 @@ enum IDBTransactionMode {
"versionchange" "versionchange"
}; };
[Exposed=(Window,Worker,System)] [Exposed=(Window,Worker)]
interface IDBTransaction : EventTarget { interface IDBTransaction : EventTarget {
[Throws] [Throws]
readonly attribute IDBTransactionMode mode; readonly attribute IDBTransactionMode mode;

Просмотреть файл

@ -16,7 +16,7 @@ dictionary IDBVersionChangeEventInit : EventInit {
}; };
[Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict), [Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface IDBVersionChangeEvent : Event { interface IDBVersionChangeEvent : Event {
readonly attribute unsigned long long oldVersion; readonly attribute unsigned long long oldVersion;
readonly attribute unsigned long long? newVersion; readonly attribute unsigned long long? newVersion;

Просмотреть файл

@ -7,7 +7,7 @@
* https://w3c.github.io/requestidlecallback/ * https://w3c.github.io/requestidlecallback/
*/ */
[Exposed=(Window,System), [Exposed=Window,
Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"] Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
interface IdleDeadline { interface IdleDeadline {
DOMHighResTimeStamp timeRemaining(); DOMHighResTimeStamp timeRemaining();

Просмотреть файл

@ -10,25 +10,17 @@
* http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions * http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions
*/ */
// Extensions // This is needed because we don't support SVG element as canvas image source.
// Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its // See bug 1500768.
// underlying image data
//
// Note:
// Our overload resolution implementation doesn't deal with a union as the
// distinguishing argument which means we cannot overload functions via union
// types, a.k.a. we cannot overload createImageBitmap() via ImageBitmapSource
// and BufferSource. Here, we work around this issue by adding the BufferSource
// into ImageBitmapSource.
typedef (HTMLImageElement or typedef (HTMLImageElement or
HTMLVideoElement or
HTMLCanvasElement or HTMLCanvasElement or
HTMLVideoElement or
ImageBitmap) CanvasImageSourceExcludedSVG;
typedef (CanvasImageSourceExcludedSVG or
Blob or Blob or
ImageData or CanvasRenderingContext2D or // This is out of spec.
CanvasRenderingContext2D or ImageData) ImageBitmapSource;
ImageBitmap or
BufferSource) ImageBitmapSource;
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface ImageBitmap { interface ImageBitmap {
@ -401,12 +393,3 @@ dictionary ChannelPixelLayout {
}; };
typedef sequence<ChannelPixelLayout> ImagePixelLayout; typedef sequence<ChannelPixelLayout> ImagePixelLayout;
partial interface ImageBitmap {
[Throws, Func="mozilla::dom::DOMPrefs::canvas_imagebitmap_extensions_enabled"]
ImageBitmapFormat findOptimalFormat (optional sequence<ImageBitmapFormat> aPossibleFormats);
[Throws, Func="mozilla::dom::DOMPrefs::canvas_imagebitmap_extensions_enabled"]
long mappedDataLength (ImageBitmapFormat aFormat);
[Throws, Func="mozilla::dom::DOMPrefs::canvas_imagebitmap_extensions_enabled"]
Promise<ImagePixelLayout> mapDataInto (ImageBitmapFormat aFormat, BufferSource aBuffer, long aOffset);
};

Просмотреть файл

@ -10,10 +10,10 @@ interface IID;
[NoInterfaceObject, [NoInterfaceObject,
// Need Exposed here, because this is a mixin onto things like Event // Need Exposed here, because this is a mixin onto things like Event
// that are exposed in workers. // that are exposed in workers.
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface LegacyQueryInterface { interface LegacyQueryInterface {
// Legacy QueryInterface, only exposed to chrome code on the main thread. // Legacy QueryInterface, only exposed to chrome code on the main thread.
[Exposed=(Window,System), ChromeOnly] [Exposed=Window, ChromeOnly]
nsISupports QueryInterface(IID iid); nsISupports QueryInterface(IID iid);
}; };

Просмотреть файл

@ -7,7 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
*/ */
[Constructor, Exposed=(Window,Worker,System)] [Constructor, Exposed=(Window,Worker)]
interface MessageChannel { interface MessageChannel {
readonly attribute MessagePort port1; readonly attribute MessagePort port1;
readonly attribute MessagePort port2; readonly attribute MessagePort port2;

Просмотреть файл

@ -8,7 +8,7 @@
*/ */
[Constructor(DOMString type, optional MessageEventInit eventInitDict), [Constructor(DOMString type, optional MessageEventInit eventInitDict),
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface MessageEvent : Event { interface MessageEvent : Event {
/** /**
* Custom data associated with this event. * Custom data associated with this event.

Просмотреть файл

@ -7,7 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
*/ */
[Exposed=(Window,Worker,AudioWorklet,System)] [Exposed=(Window,Worker,AudioWorklet)]
interface MessagePort : EventTarget { interface MessagePort : EventTarget {
[Throws] [Throws]
void postMessage(any message, optional sequence<object> transferable = []); void postMessage(any message, optional sequence<object> transferable = []);

Просмотреть файл

@ -14,7 +14,6 @@ callback AnyCallback = any (any value);
// Hack to allow us to have JS owning and properly tracing/CCing/etc a // Hack to allow us to have JS owning and properly tracing/CCing/etc a
// PromiseNativeHandler. // PromiseNativeHandler.
[NoInterfaceObject, [NoInterfaceObject, Exposed=(Window,Worker)]
Exposed=(Window,Worker,System)]
interface PromiseNativeHandler { interface PromiseNativeHandler {
}; };

Просмотреть файл

@ -57,7 +57,7 @@ enum StreamFilterStatus {
* An interface which allows an extension to intercept, and optionally modify, * An interface which allows an extension to intercept, and optionally modify,
* response data from an HTTP request. * response data from an HTTP request.
*/ */
[Exposed=(Window,System), [Exposed=Window,
Func="mozilla::extensions::StreamFilter::IsAllowedInContext"] Func="mozilla::extensions::StreamFilter::IsAllowedInContext"]
interface StreamFilter : EventTarget { interface StreamFilter : EventTarget {
/** /**

Просмотреть файл

@ -13,7 +13,7 @@
[Constructor(DOMString type, optional StreamFilterDataEventInit eventInitDict), [Constructor(DOMString type, optional StreamFilterDataEventInit eventInitDict),
Func="mozilla::extensions::StreamFilter::IsAllowedInContext", Func="mozilla::extensions::StreamFilter::IsAllowedInContext",
Exposed=(Window,System)] Exposed=Window]
interface StreamFilterDataEvent : Event { interface StreamFilterDataEvent : Event {
/** /**
* Contains a chunk of data read from the input stream. * Contains a chunk of data read from the input stream.

Просмотреть файл

@ -15,7 +15,7 @@ dictionary ServerSocketOptions {
[Constructor(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0), [Constructor(unsigned short port, optional ServerSocketOptions options, optional unsigned short backlog = 0),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist", Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)] Exposed=Window]
interface TCPServerSocket : EventTarget { interface TCPServerSocket : EventTarget {
/** /**
* The port of this server socket object. * The port of this server socket object.

Просмотреть файл

@ -5,7 +5,7 @@
[Constructor(DOMString type, optional TCPServerSocketEventInit eventInitDict), [Constructor(DOMString type, optional TCPServerSocketEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist", Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)] Exposed=Window]
interface TCPServerSocketEvent : Event { interface TCPServerSocketEvent : Event {
readonly attribute TCPSocket socket; readonly attribute TCPSocket socket;
}; };

Просмотреть файл

@ -41,7 +41,7 @@ interface LegacyMozTCPSocket {
[Constructor(DOMString host, unsigned short port, optional SocketOptions options), [Constructor(DOMString host, unsigned short port, optional SocketOptions options),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist", Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)] Exposed=Window]
interface TCPSocket : EventTarget { interface TCPSocket : EventTarget {
/** /**
* Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN. * Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN.

Просмотреть файл

@ -11,7 +11,7 @@
[Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict), [Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist", Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)] Exposed=Window]
interface TCPSocketErrorEvent : Event { interface TCPSocketErrorEvent : Event {
readonly attribute DOMString name; readonly attribute DOMString name;
readonly attribute DOMString message; readonly attribute DOMString message;

Просмотреть файл

@ -11,7 +11,7 @@
[Constructor(DOMString type, optional TCPSocketEventInit eventInitDict), [Constructor(DOMString type, optional TCPSocketEventInit eventInitDict),
Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist", Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
Exposed=(Window,System)] Exposed=Window]
interface TCPSocketEvent : Event { interface TCPSocketEvent : Event {
/** /**
* If the event is a "data" event, data will be the bytes read from the network; * If the event is a "data" event, data will be the bytes read from the network;

Просмотреть файл

@ -11,7 +11,7 @@
*/ */
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), [Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
Exposed=(Window,Worker,System)] Exposed=(Window,Worker)]
interface TextDecoder { interface TextDecoder {
[Constant] [Constant]
readonly attribute DOMString encoding; readonly attribute DOMString encoding;

Просмотреть файл

@ -10,8 +10,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/ * http://creativecommons.org/publicdomain/zero/1.0/
*/ */
[Constructor, [Constructor, Exposed=(Window,Worker)]
Exposed=(Window,Worker,System)]
interface TextEncoder { interface TextEncoder {
[Constant] [Constant]
readonly attribute DOMString encoding; readonly attribute DOMString encoding;

Просмотреть файл

@ -14,7 +14,7 @@
*/ */
[Constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""), [Constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""),
Exposed=(Window,Worker,WorkerDebugger,System)] Exposed=(Window,Worker,WorkerDebugger)]
interface URLSearchParams { interface URLSearchParams {
void append(USVString name, USVString value); void append(USVString name, USVString value);
void delete(USVString name); void delete(USVString name);

Просмотреть файл

@ -65,18 +65,3 @@ partial interface WindowOrWorkerGlobalScope {
[Throws, Func="mozilla::dom::DOMPrefs::dom_caches_enabled", SameObject] [Throws, Func="mozilla::dom::DOMPrefs::dom_caches_enabled", SameObject]
readonly attribute CacheStorage caches; 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);
};

Просмотреть файл

@ -13,7 +13,7 @@
*/ */
[Constructor(USVString scriptURL, optional WorkerOptions options), [Constructor(USVString scriptURL, optional WorkerOptions options),
Exposed=(Window,DedicatedWorker,SharedWorker,System)] Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget { interface Worker : EventTarget {
void terminate(); void terminate();
@ -34,6 +34,6 @@ dictionary WorkerOptions {
[Constructor(USVString scriptURL), [Constructor(USVString scriptURL),
Func="mozilla::dom::ChromeWorker::WorkerAvailable", Func="mozilla::dom::ChromeWorker::WorkerAvailable",
Exposed=(Window,DedicatedWorker,SharedWorker,System)] Exposed=(Window,DedicatedWorker,SharedWorker)]
interface ChromeWorker : Worker { interface ChromeWorker : Worker {
}; };

Просмотреть файл

@ -484,11 +484,6 @@ WorkerGlobalScope::CreateImageBitmap(JSContext* aCx,
const ImageBitmapSource& aImage, const ImageBitmapSource& aImage,
ErrorResult& aRv) ErrorResult& aRv)
{ {
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
return ImageBitmap::Create(this, aImage, Nothing(), aRv); return ImageBitmap::Create(this, aImage, Nothing(), aRv);
} }
@ -498,36 +493,9 @@ WorkerGlobalScope::CreateImageBitmap(JSContext* aCx,
int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh, int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
ErrorResult& aRv) ErrorResult& aRv)
{ {
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv); return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv);
} }
already_AddRefed<mozilla::dom::Promise>
WorkerGlobalScope::CreateImageBitmap(JSContext* aCx,
const ImageBitmapSource& aImage,
int32_t aOffset, int32_t aLength,
ImageBitmapFormat aFormat,
const Sequence<ChannelPixelLayout>& aLayout,
ErrorResult& aRv)
{
if (!StaticPrefs::canvas_imagebitmap_extensions_enabled()) {
aRv.Throw(NS_ERROR_TYPE_ERR);
return nullptr;
}
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
return ImageBitmap::Create(this, aImage, aOffset, aLength, aFormat, aLayout,
aRv);
} else {
aRv.Throw(NS_ERROR_TYPE_ERR);
return nullptr;
}
}
nsresult nsresult
WorkerGlobalScope::Dispatch(TaskCategory aCategory, WorkerGlobalScope::Dispatch(TaskCategory aCategory,
already_AddRefed<nsIRunnable>&& aRunnable) already_AddRefed<nsIRunnable>&& aRunnable)

Просмотреть файл

@ -191,14 +191,6 @@ public:
int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh, int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
ErrorResult& aRv); ErrorResult& aRv);
already_AddRefed<mozilla::dom::Promise>
CreateImageBitmap(JSContext* aCx,
const ImageBitmapSource& aImage,
int32_t aOffset, int32_t aLength,
mozilla::dom::ImageBitmapFormat aFormat,
const mozilla::dom::Sequence<mozilla::dom::ChannelPixelLayout>& aLayout,
mozilla::ErrorResult& aRv);
bool bool
WindowInteractionAllowed() const WindowInteractionAllowed() const
{ {

Просмотреть файл

@ -9976,47 +9976,88 @@ CreateSimpleClipRegion(const nsDisplayMasksAndClipPaths& aDisplayItem,
return Nothing(); return Nothing();
} }
// TODO(emilio): We should be able to still generate a clip and pass the
// opacity down to StackingContextHelper instead.
if (frame->StyleEffects()->mOpacity != 1.0) {
return Nothing();
}
auto& clipPath = style->mClipPath; auto& clipPath = style->mClipPath;
if (clipPath.GetType() != StyleShapeSourceType::Shape) { if (clipPath.GetType() != StyleShapeSourceType::Shape) {
return Nothing(); return Nothing();
} }
// TODO(emilio): We should be able to also simplify most of the circle() and
// ellipse() shapes.
auto& shape = clipPath.GetBasicShape(); auto& shape = clipPath.GetBasicShape();
if (shape->GetShapeType() != StyleBasicShapeType::Inset) { if (shape->GetShapeType() == StyleBasicShapeType::Polygon) {
return Nothing(); return Nothing();
} }
auto appUnitsPerDevPixel = frame->PresContext()->AppUnitsPerDevPixel();
const nsRect refBox = const nsRect refBox =
nsLayoutUtils::ComputeGeometryBox(frame, clipPath.GetReferenceBox()); nsLayoutUtils::ComputeGeometryBox(frame, clipPath.GetReferenceBox());
const nsRect insetRect =
ShapeUtils::ComputeInsetRect(shape, refBox) + aDisplayItem.ToReferenceFrame();
auto appUnitsPerDevPixel = frame->PresContext()->AppUnitsPerDevPixel();
nscoord radii[8] = { 0 };
AutoTArray<wr::ComplexClipRegion, 1> clipRegions; AutoTArray<wr::ComplexClipRegion, 1> clipRegions;
if (ShapeUtils::ComputeInsetRadii(shape, insetRect, refBox, radii)) {
clipRegions.AppendElement(wr::ToComplexClipRegion(
insetRect, radii, appUnitsPerDevPixel));
}
auto rect = wr::ToRoundedLayoutRect( wr::LayoutRect rect;
LayoutDeviceRect::FromAppUnits(insetRect, appUnitsPerDevPixel)); switch (shape->GetShapeType()) {
case StyleBasicShapeType::Inset: {
const nsRect insetRect =
ShapeUtils::ComputeInsetRect(shape, refBox) + aDisplayItem.ToReferenceFrame();
nscoord radii[8] = { 0 };
if (ShapeUtils::ComputeInsetRadii(shape, insetRect, refBox, radii)) {
clipRegions.AppendElement(wr::ToComplexClipRegion(
insetRect, radii, appUnitsPerDevPixel));
}
rect = wr::ToRoundedLayoutRect(
LayoutDeviceRect::FromAppUnits(insetRect, appUnitsPerDevPixel));
break;
}
case StyleBasicShapeType::Ellipse:
case StyleBasicShapeType::Circle: {
nsPoint center = ShapeUtils::ComputeCircleOrEllipseCenter(shape, refBox);
nsSize radii;
if (shape->GetShapeType() == StyleBasicShapeType::Ellipse) {
radii = ShapeUtils::ComputeEllipseRadii(shape, center, refBox);
} else {
nscoord radius = ShapeUtils::ComputeCircleRadius(shape, center, refBox);
radii = { radius, radius };
}
nsRect ellipseRect(
aDisplayItem.ToReferenceFrame() + center - nsPoint(radii.width, radii.height),
radii * 2);
nscoord ellipseRadii[8];
NS_FOR_CSS_HALF_CORNERS(corner) {
ellipseRadii[corner] = HalfCornerIsX(corner) ? radii.width : radii.height;
}
clipRegions.AppendElement(wr::ToComplexClipRegion(
ellipseRect, ellipseRadii, appUnitsPerDevPixel));
rect = wr::ToRoundedLayoutRect(
LayoutDeviceRect::FromAppUnits(ellipseRect, appUnitsPerDevPixel));
break;
}
default:
// Please don't add more exceptions, try to find a way to define the clip
// without using a mask image.
//
// And if you _really really_ need to add an exception, add it to where
// the polygon check is.
MOZ_ASSERT_UNREACHABLE("Unhandled shape id?");
return Nothing();
}
wr::WrClipId clipId = wr::WrClipId clipId =
aBuilder.DefineClip(Nothing(), rect, &clipRegions, nullptr); aBuilder.DefineClip(Nothing(), rect, &clipRegions, nullptr);
return Some(clipId); return Some(clipId);
} }
static Maybe<wr::WrClipId> enum class HandleOpacity
{
No,
Yes,
};
static Maybe<Pair<wr::WrClipId, HandleOpacity>>
CreateWRClipPathAndMasks(nsDisplayMasksAndClipPaths* aDisplayItem, CreateWRClipPathAndMasks(nsDisplayMasksAndClipPaths* aDisplayItem,
const LayoutDeviceRect& aBounds, const LayoutDeviceRect& aBounds,
wr::IpcResourceUpdateQueue& aResources, wr::IpcResourceUpdateQueue& aResources,
@ -10026,7 +10067,7 @@ CreateWRClipPathAndMasks(nsDisplayMasksAndClipPaths* aDisplayItem,
nsDisplayListBuilder* aDisplayListBuilder) nsDisplayListBuilder* aDisplayListBuilder)
{ {
if (auto clip = CreateSimpleClipRegion(*aDisplayItem, aBuilder)) { if (auto clip = CreateSimpleClipRegion(*aDisplayItem, aBuilder)) {
return clip; return Some(MakePair(*clip, HandleOpacity::Yes));
} }
Maybe<wr::WrImageMask> mask = aManager->CommandBuilder().BuildWrMaskImage( Maybe<wr::WrImageMask> mask = aManager->CommandBuilder().BuildWrMaskImage(
@ -10041,7 +10082,7 @@ CreateWRClipPathAndMasks(nsDisplayMasksAndClipPaths* aDisplayItem,
nullptr, nullptr,
mask.ptr()); mask.ptr());
return Some(clipId); return Some(MakePair(clipId, HandleOpacity::No));
} }
bool bool
@ -10058,7 +10099,7 @@ nsDisplayMasksAndClipPaths::CreateWebRenderCommands(
LayoutDeviceRect bounds = LayoutDeviceRect bounds =
LayoutDeviceRect::FromAppUnits(displayBounds, appUnitsPerDevPixel); LayoutDeviceRect::FromAppUnits(displayBounds, appUnitsPerDevPixel);
Maybe<wr::WrClipId> clip = Maybe<Pair<wr::WrClipId, HandleOpacity>> clip =
CreateWRClipPathAndMasks( CreateWRClipPathAndMasks(
this, bounds, aResources, aBuilder, aSc, aManager, aDisplayListBuilder); this, bounds, aResources, aBuilder, aSc, aManager, aDisplayListBuilder);
@ -10071,20 +10112,26 @@ nsDisplayMasksAndClipPaths::CreateWebRenderCommands(
// The stacking context shouldn't have any offset. // The stacking context shouldn't have any offset.
bounds.MoveTo(0, 0); bounds.MoveTo(0, 0);
wr::WrClipId clipId = clip->first();
Maybe<float> opacity = clip->second() == HandleOpacity::Yes
? Some(mFrame->StyleEffects()->mOpacity)
: Nothing();
layer.emplace(aSc, layer.emplace(aSc,
aBuilder, aBuilder,
/*aFilters: */ nsTArray<wr::WrFilterOp>(), /*aFilters: */ nsTArray<wr::WrFilterOp>(),
/*aBounds: */ bounds, /*aBounds: */ bounds,
/*aBoundTransform: */ nullptr, /*aBoundTransform: */ nullptr,
/*aAnimation: */ nullptr, /*aAnimation: */ nullptr,
/*aOpacity: */ nullptr, /*aOpacity: */ opacity.ptrOr(nullptr),
/*aTransform: */ nullptr, /*aTransform: */ nullptr,
/*aPerspective: */ nullptr, /*aPerspective: */ nullptr,
/*aMixBlendMode: */ gfx::CompositionOp::OP_OVER, /*aMixBlendMode: */ gfx::CompositionOp::OP_OVER,
/*aBackfaceVisible: */ true, /*aBackfaceVisible: */ true,
/*aIsPreserve3D: */ false, /*aIsPreserve3D: */ false,
/*aTransformForScrollData: */ Nothing(), /*aTransformForScrollData: */ Nothing(),
/*aClipNodeId: */ clip.ptr()); /*aClipNodeId: */ &clipId);
sc = layer.ptr(); sc = layer.ptr();
// The whole stacking context will be clipped by us, so no need to have any // The whole stacking context will be clipped by us, so no need to have any
// parent for the children context's clip. // parent for the children context's clip.

Просмотреть файл

@ -75,7 +75,7 @@ test-pref(font.size.inflation.emPerLine,20) test-pref(font.size.inflation.forceE
# The tests below use nonzero values of the lineThreshold preference. # The tests below use nonzero values of the lineThreshold preference.
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == text-1.html text-1.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == text-1.html text-1.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == list-1.html list-1-ref.html # Bug 1392106 test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(cocoaWidget) == list-1.html list-1-ref.html # Bug 1392106, Bug 1434812
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1a.html threshold-1a.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1a.html threshold-1a.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1b.html threshold-1b-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1b.html threshold-1b-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1c.html threshold-1c-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,100) == threshold-1c.html threshold-1c-ref.html

Просмотреть файл

@ -16,36 +16,36 @@
== clip-path-polygon-012.html clip-path-stripes-001-ref.html == clip-path-polygon-012.html clip-path-stripes-001-ref.html
fuzzy-if(skiaContent,0-1,0-20) fuzzy-if(webrender&&gtkWidget,8-8,20-20) fails-if(webrender&&!gtkWidget) == clip-path-polygon-013.html clip-path-stripes-003-ref.html fuzzy-if(skiaContent,0-1,0-20) fuzzy-if(webrender&&gtkWidget,8-8,20-20) fails-if(webrender&&!gtkWidget) == clip-path-polygon-013.html clip-path-stripes-003-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-001.html clip-path-circle-001-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-001.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-002.html clip-path-circle-001-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-002.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-003.html clip-path-circle-001-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-003.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-004.html clip-path-circle-001-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-004.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-005.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-005.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-006.html clip-path-circle-001-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-006.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-007.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-007.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-008.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-008.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-009.html clip-path-circle-003-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-009.html clip-path-circle-003-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-010.html clip-path-circle-004-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-010.html clip-path-circle-004-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-011.html clip-path-circle-005-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-011.html clip-path-circle-005-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-012.html clip-path-circle-006-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-012.html clip-path-circle-006-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-013.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-013.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-014.html clip-path-circle-007-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-014.html clip-path-circle-007-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-015.html clip-path-circle-008-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-015.html clip-path-circle-008-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-016.html clip-path-circle-009-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-016.html clip-path-circle-009-ref.html
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-16,0-9) fuzzy-if(webrender,64-64,714-714) == clip-path-circle-017.html clip-path-circle-007-ref.html fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-16,0-9) fuzzy-if(webrender,35-35,703-703) == clip-path-circle-017.html clip-path-circle-007-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-018.html clip-path-circle-010-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-018.html clip-path-circle-010-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-019.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-019.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64-64,714-714) == clip-path-circle-020.html clip-path-circle-002-ref.html fuzzy-if(webrender,35-35,703-703) == clip-path-circle-020.html clip-path-circle-002-ref.html
== clip-path-circle-021.html clip-path-circle-021-ref.html == clip-path-circle-021.html clip-path-circle-021-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
== clip-path-inset-001a.html clip-path-inset-001-ref.html == clip-path-inset-001a.html clip-path-inset-001-ref.html
== clip-path-inset-001b.html clip-path-inset-001-ref.html == clip-path-inset-001b.html clip-path-inset-001-ref.html

Просмотреть файл

@ -89,7 +89,7 @@ fails == mask-origin-2.html mask-origin-2-ref.html # bug 1260094
fuzzy-if(winWidget,0-1,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-1,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-contentBox-1b.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-contentBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,64-64,371-371) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,35-35,360-360) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-paddingBox-1b.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-paddingBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html

Просмотреть файл

@ -250,13 +250,6 @@ VARCACHE_PREF(
uint32_t, 5000 uint32_t, 5000
) )
// Disable the ImageBitmap-extensions for now.
VARCACHE_PREF(
"canvas.imagebitmap_extensions.enabled",
canvas_imagebitmap_extensions_enabled,
RelaxedAtomicBool, false
)
// SW Cache API // SW Cache API
VARCACHE_PREF( VARCACHE_PREF(
"dom.caches.enabled", "dom.caches.enabled",

Просмотреть файл

@ -954,7 +954,7 @@ win32-mingwclang/opt:
- linux64-node - linux64-node
- linux64-clang-trunk-mingw-x86 - linux64-clang-trunk-mingw-x86
- linux64-mingw32-nsis - linux64-mingw32-nsis
- linux64-mingw32-fxc2 - linux64-mingw-fxc2-x86
win32-mingwclang/debug: win32-mingwclang/debug:
description: "Win32 MinGW-Clang Debug" description: "Win32 MinGW-Clang Debug"
@ -990,7 +990,7 @@ win32-mingwclang/debug:
- linux64-node - linux64-node
- linux64-clang-trunk-mingw-x86 - linux64-clang-trunk-mingw-x86
- linux64-mingw32-nsis - linux64-mingw32-nsis
- linux64-mingw32-fxc2 - linux64-mingw-fxc2-x86
win64-mingwclang/opt: win64-mingwclang/opt:
description: "Win64 MinGW-Clang Opt" description: "Win64 MinGW-Clang Opt"
@ -1026,7 +1026,7 @@ win64-mingwclang/opt:
- linux64-node - linux64-node
- linux64-clang-trunk-mingw-x64 - linux64-clang-trunk-mingw-x64
- linux64-mingw32-nsis - linux64-mingw32-nsis
- linux64-mingw32-fxc2 - linux64-mingw-fxc2-x86
win64-mingwclang/debug: win64-mingwclang/debug:
description: "Win64 MinGW-Clang Debug" description: "Win64 MinGW-Clang Debug"
@ -1062,4 +1062,4 @@ win64-mingwclang/debug:
- linux64-node - linux64-node
- linux64-clang-trunk-mingw-x64 - linux64-clang-trunk-mingw-x64
- linux64-mingw32-nsis - linux64-mingw32-nsis
- linux64-mingw32-fxc2 - linux64-mingw-fxc2-x86

Просмотреть файл

@ -309,32 +309,34 @@ android-em-7.0-x86/opt:
test-sets: test-sets:
- android-x86-kvm-tests - android-x86-kvm-tests
# Bug 1501364 - Temporarily disable Bitbar android hardware tests
# android-hw test platforms execute on real devices attached to Autophone hosts. # android-hw test platforms execute on real devices attached to Autophone hosts.
# android-hw-g5-7-0 Motorola Moto G5 Android 7.0 # android-hw-g5-7-0 Motorola Moto G5 Android 7.0
android-hw-g5-7-0-arm7-api-16/opt: # android-hw-g5-7-0-arm7-api-16/opt:
build-platform: android-api-16/opt # build-platform: android-api-16/opt
test-sets: # test-sets:
- android-hw-arm7-raptor # - android-hw-arm7-raptor
- raptor-fetch-geckoview # - raptor-fetch-geckoview
# android-hw-p2-8-0 Google Pixel 2 Android 8.0 # android-hw-p2-8-0 Google Pixel 2 Android 8.0
android-hw-p2-8-0-arm7-api-16/opt: # android-hw-p2-8-0-arm7-api-16/opt:
build-platform: android-api-16/opt # build-platform: android-api-16/opt
test-sets: # test-sets:
- android-hw-arm7-opt-unittests # - android-hw-arm7-opt-unittests
- android-hw-arm7-raptor # - android-hw-arm7-raptor
- raptor-fetch-geckoview # - raptor-fetch-geckoview
android-hw-p2-8-0-arm7-api-16/debug: # android-hw-p2-8-0-arm7-api-16/debug:
build-platform: android-api-16/debug # build-platform: android-api-16/debug
test-sets: # test-sets:
- android-hw-arm7-debug-unittests # - android-hw-arm7-debug-unittests
android-hw-p2-8-0-android-aarch64/opt: # android-hw-p2-8-0-android-aarch64/opt:
build-platform: android-aarch64/opt # build-platform: android-aarch64/opt
test-sets: # test-sets:
- android-hw-aarch64-opt-unittests # - android-hw-aarch64-opt-unittests
- android-hw-aarch64-raptor # - android-hw-aarch64-raptor

Просмотреть файл

@ -810,12 +810,12 @@ linux64-mingw32-nsis:
toolchains: toolchains:
- linux64-mingw32-gcc - linux64-mingw32-gcc
linux64-mingw32-fxc2: linux64-mingw-fxc2-x86:
description: "fxc2.exe build for MinGW32 Cross Compile" description: "fxc2.exe x86 build for MinGW Cross Compile"
treeherder: treeherder:
kind: build kind: build
platform: toolchains/opt platform: toolchains/opt
symbol: TMW(mingw32-fxc2) symbol: TMW(mingw-fxc2-x86)
tier: 2 tier: 2
worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker: worker:
@ -823,10 +823,11 @@ linux64-mingw32-fxc2:
max-run-time: 1800 max-run-time: 1800
run: run:
using: toolchain-script using: toolchain-script
script: build-mingw32-fxc2.sh script: build-mingw-fxc2-x86.sh
resources: resources:
- 'build/unix/build-gcc/build-gcc.sh' - 'build/build-clang/build-clang.py'
- 'taskcluster/scripts/misc/build-gcc-mingw32.sh' - 'build/build-clang/clang-trunk-mingw.json'
- 'taskcluster/scripts/misc/build-clang-trunk-mingw.sh'
toolchain-artifact: public/build/fxc2.tar.xz toolchain-artifact: public/build/fxc2.tar.xz
toolchains: toolchains:
- linux64-mingw32-gcc - linux64-clang-trunk-mingw-x86

Просмотреть файл

@ -32,7 +32,7 @@ SRC_DIR=$TOOLCHAIN_DIR/src
make_flags="-j$(nproc)" make_flags="-j$(nproc)"
mingw_version=cfd85ebed773810429bf2164c3a985895b7dbfe3 mingw_version=c69c7a706d767c5ca3c7d1c70887fcd8e1f940b3
libunwind_version=1f89d78bb488bc71cfdee8281fc0834e9fbe5dce libunwind_version=1f89d78bb488bc71cfdee8281fc0834e9fbe5dce
binutils_version=2.27 binutils_version=2.27

Просмотреть файл

@ -11,20 +11,19 @@ mkdir -p $INSTALL_DIR/bin
cd $TOOLTOOL_DIR cd $TOOLTOOL_DIR
. taskcluster/scripts/misc/tooltool-download.sh . taskcluster/scripts/misc/tooltool-download.sh
export PATH="$TOOLTOOL_DIR/mingw32/bin:$PATH" export PATH="$TOOLTOOL_DIR/clang/bin:$PATH"
cd $WORKSPACE cd $WORKSPACE
# -------------- # --------------
git clone -n https://github.com/mozilla/fxc2.git fxc2-clone git clone -n https://github.com/tomrittervg/fxc2.git fxc2-clone
cd fxc2-clone cd fxc2-clone
git checkout 82527b81104e5e21390d3ddcd328700c67ce73d4 # Asserts integrity of the clone (right?) git checkout 502ef40807a472ba845f1cbdeac95ecab1aea2fd # Asserts integrity of the clone (right?)
make -j$(nproc) make -j$(nproc) x86
cp fxc2.exe $INSTALL_DIR/bin/ cp fxc2.exe $INSTALL_DIR/bin/
cp d3dcompiler_47.dll $INSTALL_DIR/bin/ cp dll/d3dcompiler_47_32.dll $INSTALL_DIR/bin/d3dcompiler_47.dll
cp $TOOLTOOL_DIR/mingw32/i686-w64-mingw32/bin/libwinpthread-1.dll $INSTALL_DIR/bin/
# -------------- # --------------

Просмотреть файл

@ -17,10 +17,9 @@ cd $WORKSPACE
# -------------- # --------------
$GPG --import $data_dir/DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D.key $GPG --import $data_dir/DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D.key
download_and_check http://dl.winehq.org/wine/source/3.0/ wine-3.0.3.tar.xz.sign
download_and_check http://dl.winehq.org/wine/source/2.0/ wine-2.0.1.tar.xz.sign tar xaf $TMPDIR/wine-3.0.3.tar.xz
tar xaf $TMPDIR/wine-2.0.1.tar.xz cd wine-3.0.3
cd wine-2.0.1
./configure --prefix=$INSTALL_DIR/ ./configure --prefix=$INSTALL_DIR/
make -j$(nproc) make -j$(nproc)
make install make install

Просмотреть файл

@ -1,28 +1,4 @@
[createImageBitmap-invalid-args.html] [createImageBitmap-invalid-args.html]
[createImageBitmap with an oversized canvas source rejects with a RangeError.]
expected: FAIL
[createImageBitmap with an invalid OffscreenCanvas source rejects with a RangeError.]
expected: FAIL
[createImageBitmap with a broken image source rejects with an InvalidStateError.]
expected: FAIL
[createImageBitmap with an available but undecodable image source rejects with an InvalidStateError.]
expected: FAIL
[createImageBitmap with an HTMLCanvasElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an HTMLVideoElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an HTMLImageElement source and sw set to 0]
expected: FAIL
[createImageBitmap with an HTMLImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and sw set to 0] [createImageBitmap with an OffscreenCanvas source and sw set to 0]
expected: FAIL expected: FAIL
@ -32,15 +8,6 @@
[createImageBitmap with an OffscreenCanvas source and oversized (unallocatable) crop region] [createImageBitmap with an OffscreenCanvas source and oversized (unallocatable) crop region]
expected: FAIL expected: FAIL
[createImageBitmap with an ImageData source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an ImageBitmap source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an oversized canvas source.]
expected: FAIL
[createImageBitmap with an invalid OffscreenCanvas source.] [createImageBitmap with an invalid OffscreenCanvas source.]
expected: FAIL expected: FAIL
@ -50,39 +17,18 @@
[createImageBitmap with an available but undecodable image source.] [createImageBitmap with an available but undecodable image source.]
expected: FAIL expected: FAIL
[createImageBitmap with a closed ImageBitmap.]
expected: FAIL
[createImageBitmap with a bitmap HTMLImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with a bitmap SVGImageElement source and sw set to 0] [createImageBitmap with a bitmap SVGImageElement source and sw set to 0]
expected: FAIL expected: FAIL
[createImageBitmap with a bitmap SVGImageElement source and sh set to 0] [createImageBitmap with a bitmap SVGImageElement source and sh set to 0]
expected: FAIL expected: FAIL
[createImageBitmap with a bitmap SVGImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with a vector SVGImageElement source and sw set to 0] [createImageBitmap with a vector SVGImageElement source and sw set to 0]
expected: FAIL expected: FAIL
[createImageBitmap with a vector SVGImageElement source and sh set to 0] [createImageBitmap with a vector SVGImageElement source and sh set to 0]
expected: FAIL expected: FAIL
[createImageBitmap with a vector SVGImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with CanvasRenderingContext2D image source.] [createImageBitmap with CanvasRenderingContext2D image source.]
expected: FAIL expected: FAIL
[createImageBitmap with Uint8Array image source.]
expected: FAIL
[createImageBitmap with ArrayBuffer image source.]
expected: FAIL
[createImageBitmap with an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region]
expected: FAIL

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше