зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1473111 [wpt PR 9832] - Update the shape-detection-api IDL file, a=testonly
Automatic update from web-platform-testsAdd the shape-detection-api IDL file and test (#9832) -- wpt-commits: 3f54c291ef98b8657ac772b04822460865cd6e7e wpt-pr: 9832
This commit is contained in:
Родитель
56406a9ec8
Коммит
b2f6a64643
|
@ -288979,6 +288979,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/shape-detection-api.idl": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/storage.idl": [
|
||||
[
|
||||
{}
|
||||
|
@ -296959,6 +296964,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"shape-detection/META.yml": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"speech-api/META.yml": [
|
||||
[
|
||||
{}
|
||||
|
@ -377627,6 +377637,16 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"shape-detection/idlharness.any.js": [
|
||||
[
|
||||
"/shape-detection/idlharness.any.html",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"/shape-detection/idlharness.any.worker.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"speech-api/SpeechSynthesis-speak-ownership.html": [
|
||||
[
|
||||
"/speech-api/SpeechSynthesis-speak-ownership.html",
|
||||
|
@ -592154,6 +592174,10 @@
|
|||
"0c9862d6e00d02a0955a1eaf2ec4f237bd060ac4",
|
||||
"support"
|
||||
],
|
||||
"interfaces/shape-detection-api.idl": [
|
||||
"e348a282e353caac1d0bb93e453e06031b1aca75",
|
||||
"support"
|
||||
],
|
||||
"interfaces/storage.idl": [
|
||||
"a1ad440d60e04902f494ecaced1fceb8560adc5c",
|
||||
"support"
|
||||
|
@ -616118,6 +616142,14 @@
|
|||
"bc28599cea839c13daf4739168f8c1ea42526050",
|
||||
"testharness"
|
||||
],
|
||||
"shape-detection/META.yml": [
|
||||
"35f8c1f9b9d7489b1dc57b71c1a9d6a99f9129b7",
|
||||
"support"
|
||||
],
|
||||
"shape-detection/idlharness.any.js": [
|
||||
"da1729edd2fbb4552c67029572940b8d5ad71b16",
|
||||
"testharness"
|
||||
],
|
||||
"speech-api/META.yml": [
|
||||
"52d79b2a35757493915c591ff306a108a5e77121",
|
||||
"support"
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the
|
||||
// "Accelerated Shape Detection in Images" spec.
|
||||
// See: https://wicg.github.io/shape-detection-api/
|
||||
|
||||
[Exposed=(Window,Worker),
|
||||
Constructor(optional FaceDetectorOptions faceDetectorOptions)]
|
||||
interface FaceDetector {
|
||||
Promise<sequence<DetectedFace>> detect(ImageBitmapSource image);
|
||||
};
|
||||
|
||||
dictionary FaceDetectorOptions {
|
||||
unsigned short maxDetectedFaces;
|
||||
boolean fastMode;
|
||||
};
|
||||
|
||||
interface DetectedFace {
|
||||
[SameObject] readonly attribute DOMRectReadOnly boundingBox;
|
||||
[SameObject] readonly attribute FrozenArray<Landmark>? landmarks;
|
||||
};
|
||||
|
||||
dictionary Landmark {
|
||||
required FrozenArray<Point2D> locations;
|
||||
LandmarkType type;
|
||||
};
|
||||
|
||||
enum LandmarkType {
|
||||
"mouth",
|
||||
"eye",
|
||||
"nose"
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker),
|
||||
Constructor(optional BarcodeDetectorOptions barcodeDetectorOptions)]
|
||||
interface BarcodeDetector {
|
||||
readonly attribute FrozenArray<BarcodeFormat> supportedFormats;
|
||||
|
||||
Promise<sequence<DetectedBarcode>> detect(ImageBitmapSource image);
|
||||
};
|
||||
|
||||
dictionary BarcodeDetectorOptions {
|
||||
sequence<BarcodeFormat> formats;
|
||||
};
|
||||
|
||||
interface DetectedBarcode {
|
||||
[SameObject] readonly attribute DOMRectReadOnly boundingBox;
|
||||
[SameObject] readonly attribute DOMString rawValue;
|
||||
[SameObject] readonly attribute BarcodeFormat format;
|
||||
[SameObject] readonly attribute FrozenArray<Point2D> cornerPoints;
|
||||
};
|
||||
|
||||
enum BarcodeFormat {
|
||||
"aztec",
|
||||
"code_128",
|
||||
"code_39",
|
||||
"code_93",
|
||||
"codabar",
|
||||
"data_matrix",
|
||||
"ean_13",
|
||||
"ean_8",
|
||||
"itf",
|
||||
"pdf417",
|
||||
"qr_code",
|
||||
"unknown",
|
||||
"upc_a",
|
||||
"upc_e"
|
||||
};
|
|
@ -0,0 +1,2 @@
|
|||
suggested_reviewers:
|
||||
- yellowdoge
|
|
@ -0,0 +1,12 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// See: https://wicg.github.io/shape-detection-api/
|
||||
|
||||
promise_test(async () => {
|
||||
const idl = await fetch('/interfaces/shape-detection-api.idl').then(r => r.text());
|
||||
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_idls(idl);
|
||||
idl_array.test();
|
||||
}, 'Test shape-detection IDL interface');
|
Загрузка…
Ссылка в новой задаче