Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
Zakor Gyula 67516483ed servo: Merge #15314 - Permissions API and WebBluetooth integration (from szeged:permissions-api); r=jdm
<!-- Please describe your changes on the following line: -->
This implements the [Permissions API](https://w3c.github.io/permissions/) spec.
Also includes the WebBluetooth related implementation for this.

There are some know issues:
- [ ] If the descriptor name is invalid [this](https://gist.github.com/dati91/7a6a0a563d90f49ba5a351e48c5b626b#file-permissionstatusbindings-rs-L323) will throw an error, rather that return it and we could handle it.
- [x] The [environment settings object](https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object) is not implemented in servo and the spec rely on it.
- [x] There is a popup in the implementation which prevent us to add wpt test, we should figure out a way to make it work
- [ ] The allowedDevice's allowed_services attribute is not used in our implementation, because we store these in the lower level, not in the dom side.
- [ ] We think the bluetooth revoke function will need some more work, but the problem is the spec needs clarifications on that part.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a537cf48b18d9bba3453b924a4453f5e19dea4ed

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 50bc944e75966879ab6aca2a6cc229212e733d64
2017-02-14 08:09:22 -08:00
Attila Dusnoki a972c3dec6 servo: Merge #15368 - Implement GetAvailability for Bluetooth (from szeged:get_availability); r=nox
<!-- Please describe your changes on the following line: -->
This implements the [getAvailability](https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetooth-getavailability) function from the spec.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e394334739635e58bc4d160e9d27bf7217945746

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3b9459c19ab0724894afdf50c0966fc109adeae6
2017-02-13 04:32:46 -08:00
Zakor Gyula 237eb76031 servo: Merge #15525 - Reorder startNotifications steps (from szeged:step-reorder); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->
https://github.com/WebBluetoothCG/web-bluetooth/pull/355 changed the step order in startNotifications.
The connection check is now Step 2 instead of Step 6.
Link for the current spec state: https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-startnotifications
Step annotations are also updated for this function.

---
<!-- 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
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 13f6d1f53f5293dee32ae2a30067719854fa1104

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 161bdc8f4203bfdae47303002d578eadf60654e9
2017-02-13 02:00:46 -08:00
Alan Jeffrey 94a31a8931 servo: Merge #14351 - An in-memory RNG that shares its file descriptor (from asajeffrey:servo-rand-share-fds); r=emilio
<!-- Please describe your changes on the following line: -->

This PR implements an in-memory random number generator that only uses an OS RNG for (re)seeding. The OS RNG is shared, so there's only one file descriptor for `/dev/urandom` being used.

The PR also implements a tidy check that we don't accidentally introduce an RNG. Rather annoyingly, there are a lot of transitive dependencies on `rand`, notably hash maps in `std`.

This PR makes it possible to use uuids for identifiers such as pipeline and frame ids.

---
<!-- 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
- [X] These changes do not require tests because it's fixing a resource issue

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 36ddf763f66b1b971db07649ff5c69b2e9fd5f91
2017-01-05 06:32:23 -08:00
Zakor Gyula 49357c5565 servo: Merge #14612 - Updating GATTServer's Connect/Disconnect calls (from szeged:connect-disconnect-update); r=jdm
<!-- Please describe your changes on the following line: -->
Added the missing [Step 5.2.3](https://github.com/servo/servo/compare/master...szeged:connect-disconnect-update#diff-1dbe29f87740f5aec93f37adbecace6cR213) to the `connect` function.
Updated the [disconnect](https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-disconnect) function to its current state in the specification, including the `clean_up_disconnected_device` and the `garbage_collect_the connection` functions.
Added new tests for checking the invalid state of JS objects after disconnection.

---
<!-- 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
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 23590f683a06b67f666e83009513b67ed8225ce7
2016-12-22 06:51:16 -08:00
Attila Dusnoki 031b0a518f servo: Merge #14593 - Implement GetGATTChildren (from szeged:getgattchildren); r=jdm
<!-- Please describe your changes on the following line: -->
Implement the [GetGATTChildren](https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren) function for webbluetooth.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6efea399ed0e44fe6bd151f346ca2c3371e2f66c
2016-12-16 12:30:41 -08:00
Artem Biryukov d686ee845b servo: Merge #14604 - Bluetooth manager cleanup (from impowski:bluetooth_manager_cleanup); r=jdm
<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes fix #14590

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because it's a cleanup

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fba5f752ef43ac391bcd48665076d577ac80253
2016-12-15 08:34:42 -08:00
Alan Jeffrey 07258edab3 servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck
<!-- Please describe your changes on the following line: -->

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std:🧵:Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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
- [X] These changes do not require tests because they are refactorings

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 4eb653817f87e5fb47de34356f558eb76ecbca9f

--HG--
rename : servo/components/util/Cargo.toml => servo/components/config/Cargo.toml
rename : servo/components/util/basedir.rs => servo/components/config/basedir.rs
rename : servo/components/util/lib.rs => servo/components/config/lib.rs
rename : servo/components/util/opts.rs => servo/components/config/opts.rs
rename : servo/components/util/prefs.rs => servo/components/config/prefs.rs
rename : servo/components/util/resource_files.rs => servo/components/config/resource_files.rs
rename : servo/components/util/geometry.rs => servo/components/geometry/lib.rs
rename : servo/components/util/remutex.rs => servo/components/remutex/lib.rs
rename : servo/tests/unit/util/lib.rs => servo/tests/unit/servo_config/lib.rs
rename : servo/tests/unit/util/opts.rs => servo/tests/unit/servo_config/opts.rs
rename : servo/tests/unit/util/prefs.rs => servo/tests/unit/servo_config/prefs.rs
rename : servo/tests/unit/util/remutex.rs => servo/tests/unit/servo_remutex/lib.rs
2016-12-14 16:48:42 -08:00
Zakor Gyula 560fb3dc8f servo: Merge #14567 - Check if represented attributes are cached (from szeged:represented-attributes); r=jdm
<!-- Please describe your changes on the following line: -->
Improve existing cache checks in `/bluetooth/lib.rs`, and update Step comments in `script/dom` corresponding to this.

---
<!-- 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
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6ee175bf705108ab25e80521d7be84b5e58ef698
2016-12-14 15:29:43 -08:00
Attila Dusnoki f9e88c7052 servo: Merge #14552 - Replace AdvertisingData with AdvertisingEvent (from szeged:advertising_event); r=jdm
<!-- Please describe your changes on the following line: -->
The spec changed AdvertisingData to an event. The low level support is still missing.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: eb1bd596822c7e24589fdc08c4f41c69c4207351
2016-12-14 13:53:51 -08:00
Zakor Gyula adb19135b6 servo: Merge #14468 - Move allowedService and blocklist checks into caching functions (from szeged:blocklist-allowed-services); r=jdm
<!-- Please describe your changes on the following line: -->
Move allowedService and blocklist checks into caching functions in `bluetooth/lib.rs`, to avoid caching not allowed services and blocklisted services, characteristics and descriptors.

---
<!-- 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
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 55248aeb2b890a13f7d021ad4e37662d57135945
2016-12-06 19:26:50 -08:00
Zakor Gyula e364af1a5d servo: Merge #14407 - Annotations for WebBluetooth functions (from szeged:annotations); r=jdm
<!-- Please describe your changes on the following line: -->
1. Moved the `convert_request_device_options` function steps into `request_bluetooth_devices` function, to stay consistent with the current specification.
2. Updated the existing step annotations for the requestDevice and related methods.
3. Added step annotations for the implemented WebBluetooth methods.

---
<!-- 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
- [x] These changes fix  #14324, #12614

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 16199b498367702561d4cae8eefb6e77f3fced3f
2016-11-30 16:37:24 -08:00
Attila Dusnoki c895131a64 servo: Merge #14276 - Add Start/Stop notifications (from szeged:notify); r=jdm
Add support for Start and Stop Notifications for WebBluetooth

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: c4b7cc863eb9c0387577be33db4e2c0a6fd92a60
2016-11-23 03:22:43 -08:00
zakorgyula 6c022d1d31 servo: Merge #14277 - serviceData and manufacturerData support (from szeged:service-and-manufacturer-data); r=jdm
<!-- Please describe your changes on the following line: -->
Allow requesting for BluetoothDevices with service and manufacturer specific data.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 5946f756d788a5ce9c8f6447b4fa04d57daf9076
2016-11-23 01:25:39 -08:00
Zakor Gyula 9ee8d60e3e servo: Merge #14206 - Rename blacklist to blocklist in WebBluetooth (from szeged:blacklist-to-blocklist); r=jdm
<!-- Please describe your changes on the following line: -->
There was a renaming in the [specification](1d5cfa4ee8).

---
<!-- 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
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a89ba50180532bc652db7ff649f252ffdca33177

--HG--
rename : servo/resources/gatt_blacklist.txt => servo/resources/gatt_blocklist.txt
2016-11-22 05:55:02 -06:00
Zakor Gyula 0ba9ded596 servo: Merge #14205 - Minor fixes for the WebBluetooth implementation (from szeged:minor-fixes); r=jdm
<!-- Please describe your changes on the following line: -->
1. Fix for a comment typo in `bluetooth.rs `.
2. Simplify caling `self.request_bluetooth_devices` in `bluetooth.rs` in `Step 2`.
We already have a check in `Step 1` to prevent calling `request_bluetooth_devices` with a `Some` value if `option.acceptAllDevices` is true, and `option.filters` is already an `Option`, so there is no need for the `None` in the else branch.
3. Updating the bluetooth extension in `Navigator.webidl `, to match the [specification](https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions).
4. Replace the `_` separating the characteristic property strings with `-` as described  [here](http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/gatt-api.txt#n142)

---
<!-- 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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f53626c23e0affc6fca3bf1f4f1f3c722f58074
2016-11-14 13:50:51 -06:00
Attila Dusnoki 2190c013f5 servo: Merge #13909 - Webbluetooth Async behaviour (from dati91:promise-queue); r=jdm
<!-- Please describe your changes on the following line: -->

Note: depends on https://github.com/servo/servo/pull/13612

The current WBT communication is synchronous. With this, it should work properly (except the disconnect function, which will need some more work, because the current implementation differ from the spec).

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1153ca9841f458daf373471f3c65295abd872271
2016-11-08 09:05:12 -06:00
zakorgyula 154504b9f2 servo: Merge #13918 - WebBluetooth fixes for the wpt tests (from szeged:wpt-error-fixes); r=jdm
<!-- Please describe your changes on the following line: -->

Note: depends on #13612
WebBluetooth fixes for the failing wpt tests, excluding the `disconnect-during` tests cases, due to the lack of the event handling in the current implementation.
---

<!-- 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
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: eb2484f86dd57c95957b417ac0dd249ea86df06b

--HG--
rename : servo/components/script/bluetooth_blacklist.rs => servo/components/bluetooth_traits/blacklist.rs
2016-11-07 09:50:13 -06:00
zakorgyula b15c7b02f2 servo: Merge #13612 - WebBluetooth Test API and tests (from szeged:test-api-impl); r=jdm
<!-- Please describe your changes on the following line: -->

This patch depends on the [devices mock device support PR](https://github.com/servo/devices/pull/17).
After it lands, the Cargo files can be updated.
1. Adjust to the changes in [devices mock device support PR](https://github.com/servo/devices/pull/17).
2. WebBluetooth Test API implementation. Based on : https://webbluetoothcg.github.io/web-bluetooth/tests.html
3. Wpt tests for the already landed WebBluetooth functions.

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: dae007fd1634bcf1545e67abaa7746fa95f10e94
2016-11-04 07:44:42 -05:00
Ms2ger e9fc4b5a3f servo: Merge #14044 - Split the bluetooth code out from the net crates (from servo:bluetooth); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 738f0eb97428f6b24c26df7e64a8328e0575b05c

--HG--
rename : servo/components/net/bluetooth_thread.rs => servo/components/bluetooth/lib.rs
rename : servo/components/net_traits/bluetooth_thread.rs => servo/components/bluetooth_traits/lib.rs
rename : servo/components/net_traits/bluetooth_scanfilter.rs => servo/components/bluetooth_traits/scanfilter.rs
2016-11-03 15:04:43 -05:00