зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1475061 [wpt PR 11922] - Update the pointerevents IDL file + tests, a=testonly
Automatic update from web-platform-testsUpdate the pointerevents IDL file + tests (#11922) -- wpt-commits: efef417d9f9ceb9016f682c3aa523d31405e1238 wpt-pr: 11922
This commit is contained in:
Родитель
39b1f47943
Коммит
a9aa08c5ca
|
@ -366477,9 +366477,9 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"pointerevents/idlharness.html": [
|
"pointerevents/idlharness.window.js": [
|
||||||
[
|
[
|
||||||
"/pointerevents/idlharness.html",
|
"/pointerevents/idlharness.window.html",
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -592899,7 +592899,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/pointerevents.idl": [
|
"interfaces/pointerevents.idl": [
|
||||||
"ef577f80b3480126c6d447fcaca219ae95bc8ec7",
|
"be4fdd5136343319cd3459cb669d033466e4013f",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/pointerlock.idl": [
|
"interfaces/pointerlock.idl": [
|
||||||
|
@ -603834,8 +603834,8 @@
|
||||||
"0ac911fd576d98e897b1aa19ec27236b20f92e43",
|
"0ac911fd576d98e897b1aa19ec27236b20f92e43",
|
||||||
"manual"
|
"manual"
|
||||||
],
|
],
|
||||||
"pointerevents/idlharness.html": [
|
"pointerevents/idlharness.window.js": [
|
||||||
"90f3c1cd708d3760b3b8d30b73b39a2dbd5ab36f",
|
"aa9b11c2c844ab0af60d705a93d4fe27d37aa3b4",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"pointerevents/pointerevent_attributes_hoverable_pointers-manual.html": [
|
"pointerevents/pointerevent_attributes_hoverable_pointers-manual.html": [
|
||||||
|
|
|
@ -4,37 +4,38 @@
|
||||||
// See: https://w3c.github.io/pointerevents/
|
// See: https://w3c.github.io/pointerevents/
|
||||||
|
|
||||||
dictionary PointerEventInit : MouseEventInit {
|
dictionary PointerEventInit : MouseEventInit {
|
||||||
long pointerId = 0;
|
long pointerId = 0;
|
||||||
double width = 1;
|
double width = 1;
|
||||||
double height = 1;
|
double height = 1;
|
||||||
float pressure = 0;
|
float pressure = 0;
|
||||||
float tangentialPressure = 0;
|
float tangentialPressure = 0;
|
||||||
long tiltX = 0;
|
long tiltX = 0;
|
||||||
long tiltY = 0;
|
long tiltY = 0;
|
||||||
long twist = 0;
|
long twist = 0;
|
||||||
DOMString pointerType = "";
|
DOMString pointerType = "";
|
||||||
boolean isPrimary = false;
|
boolean isPrimary = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Constructor(DOMString type, optional PointerEventInit eventInitDict),
|
[Constructor(DOMString type, optional PointerEventInit eventInitDict), Exposed=Window]
|
||||||
Exposed=Window]
|
|
||||||
interface PointerEvent : MouseEvent {
|
interface PointerEvent : MouseEvent {
|
||||||
readonly attribute long pointerId;
|
readonly attribute long pointerId;
|
||||||
readonly attribute double width;
|
readonly attribute double width;
|
||||||
readonly attribute double height;
|
readonly attribute double height;
|
||||||
readonly attribute float pressure;
|
readonly attribute float pressure;
|
||||||
readonly attribute float tangentialPressure;
|
readonly attribute float tangentialPressure;
|
||||||
readonly attribute long tiltX;
|
readonly attribute long tiltX;
|
||||||
readonly attribute long tiltY;
|
readonly attribute long tiltY;
|
||||||
readonly attribute long twist;
|
readonly attribute long twist;
|
||||||
readonly attribute DOMString pointerType;
|
readonly attribute DOMString pointerType;
|
||||||
readonly attribute boolean isPrimary;
|
readonly attribute boolean isPrimary;
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface Element {
|
partial interface Element {
|
||||||
void setPointerCapture(long pointerId);
|
void setPointerCapture(long pointerId);
|
||||||
void releasePointerCapture(long pointerId);
|
void releasePointerCapture(long pointerId);
|
||||||
boolean hasPointerCapture(long pointerId);
|
boolean hasPointerCapture(long pointerId);
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface GlobalEventHandlers {
|
partial interface GlobalEventHandlers {
|
||||||
attribute EventHandler ongotpointercapture;
|
attribute EventHandler ongotpointercapture;
|
||||||
attribute EventHandler onlostpointercapture;
|
attribute EventHandler onlostpointercapture;
|
||||||
|
@ -47,6 +48,7 @@ partial interface GlobalEventHandlers {
|
||||||
attribute EventHandler onpointerenter;
|
attribute EventHandler onpointerenter;
|
||||||
attribute EventHandler onpointerleave;
|
attribute EventHandler onpointerleave;
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface Navigator {
|
partial interface Navigator {
|
||||||
readonly attribute long maxTouchPoints;
|
readonly attribute long maxTouchPoints;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<title>idlharness test</title>
|
|
||||||
<script src=/resources/testharness.js></script>
|
|
||||||
<script src=/resources/testharnessreport.js></script>
|
|
||||||
<script src="/resources/WebIDLParser.js"></script>
|
|
||||||
<script src="/resources/idlharness.js"></script>
|
|
||||||
|
|
||||||
<pre id='untested_idl' style='display:none'>
|
|
||||||
[Global=Window, Exposed=Window]
|
|
||||||
interface Window {
|
|
||||||
};
|
|
||||||
|
|
||||||
[TreatNonObjectAsNull]
|
|
||||||
callback EventHandlerNonNull = any (Event event);
|
|
||||||
typedef EventHandlerNonNull? EventHandler;
|
|
||||||
|
|
||||||
[NoInterfaceObject]
|
|
||||||
interface GlobalEventHandlers {
|
|
||||||
};
|
|
||||||
Window implements GlobalEventHandlers;
|
|
||||||
|
|
||||||
interface Navigator {
|
|
||||||
};
|
|
||||||
|
|
||||||
interface Element {
|
|
||||||
};
|
|
||||||
|
|
||||||
interface HTMLElement : Element {
|
|
||||||
};
|
|
||||||
HTMLElement implements GlobalEventHandlers;
|
|
||||||
|
|
||||||
interface Document {
|
|
||||||
};
|
|
||||||
Document implements GlobalEventHandlers;
|
|
||||||
|
|
||||||
interface MouseEvent {
|
|
||||||
};
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
promise_test(async function() {
|
|
||||||
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
|
|
||||||
const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
|
|
||||||
const idl = await fetch('/interfaces/pointerevents.idl').then(r => r.text());
|
|
||||||
|
|
||||||
const idl_array = new IdlArray();
|
|
||||||
idl_array.add_untested_idls(dom, { only: ['EventInit'] });
|
|
||||||
idl_array.add_untested_idls(uievents, { only: [
|
|
||||||
'UIEventInit',
|
|
||||||
'MouseEventInit',
|
|
||||||
'EventModifierInit']
|
|
||||||
});
|
|
||||||
idl_array.add_untested_idls(
|
|
||||||
document.getElementById("untested_idl").textContent);
|
|
||||||
idl_array.add_idls(document.getElementById("idl").textContent);
|
|
||||||
|
|
||||||
// Note that I don't bother including Document here because there are still
|
|
||||||
// a bunch of differences between browsers around Document vs HTMLDocument.
|
|
||||||
idl_array.add_objects({
|
|
||||||
Window: ["window"],
|
|
||||||
Navigator: ["navigator"]
|
|
||||||
});
|
|
||||||
idl_array.test();
|
|
||||||
}, 'pointerevents interfaces');
|
|
||||||
</script>
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
// META: script=/resources/WebIDLParser.js
|
||||||
|
// META: script=/resources/idlharness.js
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// https://w3c.github.io/pointerevents/
|
||||||
|
|
||||||
|
idl_test(
|
||||||
|
['pointerevents'],
|
||||||
|
['uievents', 'dom', 'html'],
|
||||||
|
idl_array => {
|
||||||
|
idl_array.add_objects({
|
||||||
|
Element: ['document'],
|
||||||
|
Window: ['window'],
|
||||||
|
Navigator: ['navigator'],
|
||||||
|
PointerEvent: ['new PointerEvent("type")']
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'pointerevents interfaces'
|
||||||
|
);
|
Загрузка…
Ссылка в новой задаче