Commit graph

5159 commits

Author SHA1 Message Date
Attila Dusnoki
2de91c7788 refactor extra permission data 2017-02-14 13:39:00 +01:00
Attila Dusnoki
d5cc10a636 Move extra permission data to window 2017-02-13 14:58:16 +01:00
Attila Dusnoki
b1d388a991 Fix BluetoothPermissionResult return state 2017-02-13 14:58:15 +01:00
Zakor Gyula
f7e86d2d0e Use rooted_vec instead of Vec<JS<T>> 2017-02-13 14:58:14 +01:00
Attila Dusnoki
4a62562b0f Add pref to ignore popup in testing 2017-02-13 14:58:13 +01:00
Zakor Gyula
3ec9f0bab9 Fix comments, and lesser modifications 2017-02-13 14:58:12 +01:00
Attila Dusnoki
0b713fd689 Refactor permission operations into one function 2017-02-13 14:58:11 +01:00
Attila Dusnoki
cce362dc39 Fix popup build error 2017-02-13 14:58:10 +01:00
Attila Dusnoki
52680bba6b Fix Permissions and Bluetooth prefs 2017-02-13 14:58:07 +01:00
Zakor Gyula
5287cd3bea Bluetooth Permission API integration 2017-02-13 14:58:06 +01:00
Zakor Gyula
f3ddee5dbc Modify CodegenRust.py to import structs from sequence return values 2017-02-13 14:35:52 +01:00
Attila Dusnoki
5ca3ee9474 Permission API 2017-02-13 14:35:52 +01:00
bors-servo
e394334739 Auto merge of #15368 - szeged:get_availability, r=nox
Implement GetAvailability for Bluetooth

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

<!-- 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/15368)
<!-- Reviewable:end -->
2017-02-13 04:32:46 -08:00
bors-servo
13f6d1f53f Auto merge of #15525 - szeged:step-reorder, r=Wafflespeanut
Reorder startNotifications steps

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

<!-- 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/15525)
<!-- Reviewable:end -->
2017-02-13 02:00:46 -08:00
Michael Nelson
bb7833a7fc Rewrite TextEncoder::Encode to use typed array API. Fixes #15504 2017-02-13 07:21:44 +11:00
Anthony Ramine
5aba878227 Kill dead code 2017-02-12 09:44:10 +01:00
deror1869107
2d99f7f995 Remove slice_to_array_buffer_view and update_array_buffer_view 2017-02-11 23:25:14 +08:00
Josh Matthews
baf8c5462a Make typed_array_or_sequence_to_vec support typed arrays. 2017-02-10 16:34:11 -05:00
deror1869107
6c4ce7247f Use TypedArray 2017-02-10 16:33:57 -05:00
Zakor Gyula
fae2beeda0 Reorder startNotifications steps 2017-02-10 13:32:07 +01:00
bors-servo
3d0fe9a0dd Auto merge of #15475 - kekkyojin:bb15436, r=jdm
Only expose Storage/StorageEvent in Window

<!-- Please describe your changes on the following line: -->
This patch removes Worker scope from Storage and StorageEvent WebIDL definition. This way it is possible to construct the objects passing Window instead of GlobalScope. It also removes some tests as they would run out of the scope.

It removes Worker from the WebIDL files defining the Storage and StorageEvent interfaces, as they should not be exposed in that scope.

In Rust source code, this patch replaces "GlobalScope" with "Window" on the contructors. It also modifies constructor calling code in order to pass Window instead of the previously used GlobalScope.

There has been removed these interfaces from the Worker tests.

(This time I did a real build and real tests. Sorry about previous pull requests, I am used to the Mozilla flow, which doesn't uses GitHub)

---
<!-- 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 #15436 (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. -->

<!-- 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/15475)
<!-- Reviewable:end -->
2017-02-09 08:17:53 -08:00
Javier Rueda
1aeca9c255 Only expose Storage/StorageEvent in Window 2017-02-09 15:34:24 +01:00
Nazım Can Altınova
78afe2b8d1 Box larger specified values to avoid memmove impact 2017-02-09 11:10:08 +01:00
Bobby Holley
9e860df9df Bug 1336646 - Apply selector flags during traversal. r=emilio 2017-02-08 19:21:05 -08:00
Attila Dusnoki
ca7aa6bff8 Implement GetAvailability for Bluetooth 2017-02-08 15:53:53 +01:00
bors-servo
6d1d4b5783 Auto merge of #15453 - servo:unwrapCastableObject, r=nox
Inline unwrapCastableObject into its only caller.

<!-- 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/15453)
<!-- Reviewable:end -->
2017-02-08 06:38:44 -08:00
Ms2ger
350a970208 Inline unwrapCastableObject into its only caller. 2017-02-08 15:38:23 +01:00
Ms2ger
85585d9334 Remove unused Descriptor.needsRooting field. 2017-02-08 12:40:19 +01:00
Ms2ger
5230ad2c61 Remove typeNeedsRooting().
It is only used once, in a case where it can never have an effect: in case
for it to do something, both returnType.isDictionary() and
returnType.isGeckoInterface() would need to be true at the same time.
2017-02-08 12:39:38 +01:00
Ms2ger
7d5320f419 Remove pointless assertion in the typedef code. 2017-02-08 12:37:17 +01:00
Ms2ger
507b4bf05e Cleanup formatting for typedefs. 2017-02-08 12:31:56 +01:00
Ms2ger
8a5987c1db Fix typo in the non-union code path for typedefs. 2017-02-08 12:28:51 +01:00
Ms2ger
35bc171a05 Support using typedefs with nullable unions. 2017-02-08 12:18:24 +01:00
Anthony Ramine
55b2c5c1bd Update selectors to 0.17 2017-02-07 20:33:35 -08:00
Ms2ger
b57abc19da Make {get,ensure}_expando_object unsafe.
They trust the caller-provided raw pointers to be valid.
2017-02-07 11:44:38 +01:00
Ms2ger
bd431039b9 Properly root expando objects. 2017-02-07 11:35:55 +01:00
Manish Goregaokar
34ba00e6d9 Basic handling framework for presentation attributes in Stylo, with handling for font-size and color
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.

There are a number of improvements that can be done on top of this:

 - Implement all other properties
 - Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
 - Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
 - Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko

I'd prefer for these to be done in separate steps.
2017-02-03 17:35:44 -08:00
bors-servo
8926db302a Auto merge of #15359 - freeatnet:15332-macroed-event-handlers-check-for-window, r=KiChjang
Event handlers forwarded to a window check for window presence

<!-- Please describe your changes on the following line: -->
This change adds a check for the presence of a window in event handlers of `body` and `frameset` that are forwarded to the window.

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

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

I'm new to both Servo and Rust — so any suggestions for improvement are very welcome.

<!-- 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/15359)
<!-- Reviewable:end -->
2017-02-03 13:10:50 -08:00
Arseniy Ivanov
72ec00e0b5 Refactor some window_from_node calls based on feedback 2017-02-03 14:57:08 -05:00
bors-servo
fa60ce62b8 Auto merge of #15303 - nox:open-your-heart-to-eternal-dimension, r=jdm
Implement document.open and document.close

<!-- 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/15303)
<!-- Reviewable:end -->
2017-02-03 10:53:46 -08:00
Arseniy Ivanov
1bd1bddacf Extend window presence checks to non-native event handlers 2017-02-03 13:23:36 -05:00
Arseniy Ivanov
d23b34e243 Check for the presence of a window when working with event handlers forwarded to the window 2017-02-03 13:23:34 -05:00
bors-servo
b3ae74b5c9 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 -->
2017-02-03 08:56:33 -08:00
bors-servo
cbcafd18f4 Auto merge of #15189 - jdm:microtasks, r=nox
Implement microtask checkpoints

This generalizes the work previously done for Promise job callbacks. There is now a microtask queue that correctly processes all queued microtasks after each turn of the event loop, as well as after a scripted callback finishes executing, and after a classic script executes.

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

<!-- 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/15189)
<!-- Reviewable:end -->
2017-02-03 07:53:17 -08:00
Anthony Ramine
ac254046e4 Implement document.open and document.close (fixes #14591) 2017-02-03 16:50:12 +01:00
bors-servo
536c0d7499 Auto merge of #15122 - anholt:webgl-premultiply, r=emilio
webgl: premultiplication, y flipping, and format conversion

<!-- Please describe your changes on the following line: -->
This series implements a bunch of the texture unpack path features for WebGL.  There are known issues with big-endian systems noted in the comments, but I don't know of a clean way to cast from `Vec<u16>` to `Vec<u8>` (which, if we had one, would make this code much cleaner anyway).

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

<!-- 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/15122)
<!-- Reviewable:end -->
2017-02-03 06:59:11 -08:00
bors-servo
f0e21d0bbe Auto merge of #15285 - simartin:issue_15017, r=nox
Issue #15017: Properly handle and report network errors on page loads.

<!-- Please describe your changes on the following line: -->
This patch fixes how network errors are handled during page loads: they would not be reported and cause crashes before, and do not anymore.

---
<!-- 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 #15017 (github issue number if applicable).

<!-- 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/15285)
<!-- Reviewable:end -->
2017-02-03 06:04:40 -08:00
bors-servo
f5e35179d4 Auto merge of #15366 - szeged:name-filter-length, r=nox
Remove the 29 byte limitation, when requesting bluetooth devices

<!-- Please describe your changes on the following line: -->

Remove the 29 byte limit when calling `requestDevice` using a `name` or `namePrefix`. The following discussion is about this by the specification writers: https://bugs.chromium.org/p/chromium/issues/detail?id=653718.
Related tests also got removed.

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

<!-- 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/15366)
<!-- Reviewable:end -->
2017-02-03 04:15:34 -08:00
Zakor Gyula
706cffbca8 Update WebBluetooth webidl files 2017-02-03 11:30:50 +01:00
Zakor Gyula
b52f9e483f Remove the 29 byte length restriction, when requesting bluetooth devices 2017-02-03 11:12:32 +01:00