aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-02-03 08:56:33 -0800
committerGitHub <noreply@github.com>2017-02-03 08:56:33 -0800
commitb3ae74b5c9ae7b05af10ffbd5080d34bfc5ecb49 (patch)
treeeff06f13847243346f736d8276c585427074eb7f
parentcbcafd18f4cb5973948b081b4c104d99735e2789 (diff)
parent706cffbca89f599784395b4b14d8a6c1b553dcbc (diff)
downloadservo-b3ae74b5c9ae7b05af10ffbd5080d34bfc5ecb49.tar.gz
servo-b3ae74b5c9ae7b05af10ffbd5080d34bfc5ecb49.zip
Auto merge of #15367 - szeged:bluetooth-webidl, r=nox
Update WebBluetooth webidl files <!-- Please describe your changes on the following line: --> Update the WebBluetooth related webidl files with the `[SameObject]` extended attribute, and unify the indentation in these files. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15367) <!-- Reviewable:end -->
-rw-r--r--components/script/dom/webidls/Bluetooth.webidl24
-rw-r--r--components/script/dom/webidls/BluetoothAdvertisingEvent.webidl3
-rw-r--r--components/script/dom/webidls/BluetoothCharacteristicProperties.webidl18
-rw-r--r--components/script/dom/webidls/BluetoothDevice.webidl12
-rw-r--r--components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl1
-rw-r--r--components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl1
-rw-r--r--components/script/dom/webidls/BluetoothRemoteGATTServer.webidl1
-rw-r--r--components/script/dom/webidls/BluetoothRemoteGATTService.webidl17
-rw-r--r--components/script/dom/webidls/BluetoothUUID.webidl14
-rw-r--r--components/script/dom/webidls/Navigator.webidl2
10 files changed, 48 insertions, 45 deletions
diff --git a/components/script/dom/webidls/Bluetooth.webidl b/components/script/dom/webidls/Bluetooth.webidl
index de2b95c3fbb..fe87d10aa81 100644
--- a/components/script/dom/webidls/Bluetooth.webidl
+++ b/components/script/dom/webidls/Bluetooth.webidl
@@ -5,9 +5,9 @@
// https://webbluetoothcg.github.io/web-bluetooth/#bluetooth
dictionary BluetoothDataFilterInit {
-// BufferSource dataPrefix;
- sequence<octet> dataPrefix;
-// BufferSource mask;
+ // BufferSource dataPrefix;
+ sequence<octet> dataPrefix;
+ // BufferSource mask;
sequence<octet> mask;
};
@@ -15,9 +15,9 @@ dictionary BluetoothLEScanFilterInit {
sequence<BluetoothServiceUUID> services;
DOMString name;
DOMString namePrefix;
-// Maps unsigned shorts to BluetoothDataFilters.
+ // Maps unsigned shorts to BluetoothDataFilters.
MozMap<BluetoothDataFilterInit> manufacturerData;
-// Maps BluetoothServiceUUIDs to BluetoothDataFilters.
+ // Maps BluetoothServiceUUIDs to BluetoothDataFilters.
MozMap<BluetoothDataFilterInit> serviceData;
};
@@ -29,20 +29,16 @@ dictionary RequestDeviceOptions {
[Pref="dom.bluetooth.enabled"]
interface Bluetooth : EventTarget {
-// [SecureContext]
-// readonly attribute BluetoothDevice? referringDevice;
+ // [SecureContext]
+ // Promise<boolean> getAvailability();
+ [SecureContext]
attribute EventHandler onavailabilitychanged;
-// [SecureContext]
-// Promise<boolean> getAvailability();
-// [SecureContext]
-// attribute EventHandler onavailabilitychanged;
-// [SecureContext]
-// readonly attribute BluetoothDevice? referringDevice;
+ // [SecureContext, SameObject]
+ // readonly attribute BluetoothDevice? referringDevice;
[SecureContext]
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
};
-// Bluetooth implements EventTarget;
// Bluetooth implements BluetoothDeviceEventHandlers;
// Bluetooth implements CharacteristicEventHandlers;
// Bluetooth implements ServiceEventHandlers;
diff --git a/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl b/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl
index 2bb88b6f9de..a6a86a393a9 100644
--- a/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl
+++ b/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl
@@ -12,13 +12,16 @@ interface BluetoothServiceDataMap {
};*/
[Pref="dom.bluetooth.enabled", Constructor(DOMString type, BluetoothAdvertisingEventInit init)]
interface BluetoothAdvertisingEvent : Event {
+ [SameObject]
readonly attribute BluetoothDevice device;
// readonly attribute FrozenArray<UUID> uuids;
readonly attribute DOMString? name;
readonly attribute unsigned short? appearance;
readonly attribute byte? txPower;
readonly attribute byte? rssi;
+ // [SameObject]
// readonly attribute BluetoothManufacturerDataMap manufacturerData;
+ // [SameObject]
// readonly attribute BluetoothServiceDataMap serviceData;
};
dictionary BluetoothAdvertisingEventInit : EventInit {
diff --git a/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl b/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl
index 381ee568462..01079511d84 100644
--- a/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl
+++ b/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl
@@ -6,13 +6,13 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothCharacteristicProperties {
- readonly attribute boolean broadcast;
- readonly attribute boolean read;
- readonly attribute boolean writeWithoutResponse;
- readonly attribute boolean write;
- readonly attribute boolean notify;
- readonly attribute boolean indicate;
- readonly attribute boolean authenticatedSignedWrites;
- readonly attribute boolean reliableWrite;
- readonly attribute boolean writableAuxiliaries;
+ readonly attribute boolean broadcast;
+ readonly attribute boolean read;
+ readonly attribute boolean writeWithoutResponse;
+ readonly attribute boolean write;
+ readonly attribute boolean notify;
+ readonly attribute boolean indicate;
+ readonly attribute boolean authenticatedSignedWrites;
+ readonly attribute boolean reliableWrite;
+ readonly attribute boolean writableAuxiliaries;
};
diff --git a/components/script/dom/webidls/BluetoothDevice.webidl b/components/script/dom/webidls/BluetoothDevice.webidl
index a68049dd08b..eac8b533392 100644
--- a/components/script/dom/webidls/BluetoothDevice.webidl
+++ b/components/script/dom/webidls/BluetoothDevice.webidl
@@ -6,13 +6,13 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothDevice : EventTarget {
- readonly attribute DOMString id;
- readonly attribute DOMString? name;
- readonly attribute BluetoothRemoteGATTServer gatt;
+ readonly attribute DOMString id;
+ readonly attribute DOMString? name;
+ readonly attribute BluetoothRemoteGATTServer gatt;
- Promise<void> watchAdvertisements();
- void unwatchAdvertisements();
- readonly attribute boolean watchingAdvertisements;
+ Promise<void> watchAdvertisements();
+ void unwatchAdvertisements();
+ readonly attribute boolean watchingAdvertisements;
};
[NoInterfaceObject]
diff --git a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl
index 55d7bf0a43c..3e086fc21ca 100644
--- a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl
+++ b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl
@@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTCharacteristic : EventTarget {
+ [SameObject]
readonly attribute BluetoothRemoteGATTService service;
readonly attribute DOMString uuid;
readonly attribute BluetoothCharacteristicProperties properties;
diff --git a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl
index bb5dfe71653..a202975013c 100644
--- a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl
+++ b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl
@@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTDescriptor {
+ [SameObject]
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
readonly attribute DOMString uuid;
readonly attribute ByteString? value;
diff --git a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl
index 68daf9c1ac6..cb735cdc66d 100644
--- a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl
+++ b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl
@@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTServer {
+ [SameObject]
readonly attribute BluetoothDevice device;
readonly attribute boolean connected;
Promise<BluetoothRemoteGATTServer> connect();
diff --git a/components/script/dom/webidls/BluetoothRemoteGATTService.webidl b/components/script/dom/webidls/BluetoothRemoteGATTService.webidl
index c39dcc1447a..41a6fdfef3a 100644
--- a/components/script/dom/webidls/BluetoothRemoteGATTService.webidl
+++ b/components/script/dom/webidls/BluetoothRemoteGATTService.webidl
@@ -6,14 +6,15 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTService : EventTarget {
- readonly attribute BluetoothDevice device;
- readonly attribute DOMString uuid;
- readonly attribute boolean isPrimary;
- Promise<BluetoothRemoteGATTCharacteristic> getCharacteristic(BluetoothCharacteristicUUID characteristic);
- Promise<sequence<BluetoothRemoteGATTCharacteristic>>
- getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
- Promise<BluetoothRemoteGATTService> getIncludedService(BluetoothServiceUUID service);
- Promise<sequence<BluetoothRemoteGATTService>> getIncludedServices(optional BluetoothServiceUUID service);
+ [SameObject]
+ readonly attribute BluetoothDevice device;
+ readonly attribute DOMString uuid;
+ readonly attribute boolean isPrimary;
+ Promise<BluetoothRemoteGATTCharacteristic> getCharacteristic(BluetoothCharacteristicUUID characteristic);
+ Promise<sequence<BluetoothRemoteGATTCharacteristic>>
+ getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
+ Promise<BluetoothRemoteGATTService> getIncludedService(BluetoothServiceUUID service);
+ Promise<sequence<BluetoothRemoteGATTService>> getIncludedServices(optional BluetoothServiceUUID service);
};
[NoInterfaceObject]
diff --git a/components/script/dom/webidls/BluetoothUUID.webidl b/components/script/dom/webidls/BluetoothUUID.webidl
index fb0bad5451e..eca9710eeb6 100644
--- a/components/script/dom/webidls/BluetoothUUID.webidl
+++ b/components/script/dom/webidls/BluetoothUUID.webidl
@@ -6,13 +6,13 @@
[Pref="dom.bluetooth.enabled"]
interface BluetoothUUID {
- [Throws]
- static UUID getService(BluetoothServiceUUID name);
- [Throws]
- static UUID getCharacteristic(BluetoothCharacteristicUUID name);
- [Throws]
- static UUID getDescriptor(BluetoothDescriptorUUID name);
- static UUID canonicalUUID([EnforceRange] unsigned long alias);
+ [Throws]
+ static UUID getService(BluetoothServiceUUID name);
+ [Throws]
+ static UUID getCharacteristic(BluetoothCharacteristicUUID name);
+ [Throws]
+ static UUID getDescriptor(BluetoothDescriptorUUID name);
+ static UUID canonicalUUID([EnforceRange] unsigned long alias);
};
typedef DOMString UUID;
diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl
index 495222cecd2..a60a1541446 100644
--- a/components/script/dom/webidls/Navigator.webidl
+++ b/components/script/dom/webidls/Navigator.webidl
@@ -28,7 +28,7 @@ interface NavigatorID {
// https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions
partial interface Navigator {
- readonly attribute Bluetooth bluetooth;
+ [SameObject, Pref="dom.bluetooth.enabled"] readonly attribute Bluetooth bluetooth;
};
// https://w3c.github.io/ServiceWorker/#navigator-service-worker