Commit graph

3913 commits

Author SHA1 Message Date
Zhen Zhang
0ff6f313e8 Add FileID validity setting/checking logic to Blob URL implementation 2016-07-11 10:51:55 +08:00
bors-servo
c6827a9e66 Auto merge of #12375 - gpoesia:master, r=KiChjang
Implement Runnable::name() for ImageResponseHandlerRunnable

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

Implement the name() method from the Runnable trait for ImageResponseHandlerRunnable.

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

<!-- Either: -->
- [X] These changes do not require tests because it's stated in the issue (the change is trivial).

<!-- 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/12375)
<!-- Reviewable:end -->
2016-07-10 13:10:37 -07:00
Gabriel Poesia
502497fb1f Implement Runnable::name() for ImageResponseHandlerRunnable 2016-07-10 15:20:41 -03:00
Josh Matthews
d0e3e612ab Avoid memmove in HTMLDivElement constructor. 2016-07-10 10:24:16 -04:00
Nikhil Shagrithaya
48fe15206e Implements name method for FilerReader event from trait Runnable 2016-07-10 15:40:22 +05:30
MovingtoMars
673db44402 Implement Runnable trait name method for FireSimpleEventTask 2016-07-10 14:48:37 +12:00
bors-servo
8f13bb24f1 Auto merge of #12360 - pierre-alain-b:master, r=Wafflespeanut
Add name method for Runnable trait in DedicatedMediaSourceFailureTask…

Add name method for Runnable trait in DedicatedMediaSourceFailureTask.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12349.
- [X] These changes do not require tests because it is says so in the issue description.

<!-- 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/12360)
<!-- Reviewable:end -->
2016-07-09 08:22:40 -07:00
Pierre-Alain Bandinelli
23ba67662c Implement Runnable trait name method for ResourceSelectionTask, fixing #12348 2016-07-09 09:55:14 +02:00
Zhen Zhang
5e051c08f6 Add ability to WPT-test file uploads and fetches, fixes #12322 2016-07-09 15:31:00 +08:00
Pierre-Alain Bandinelli
5601de0269 Add name method for Runnable trait in DedicatedMediaSourceFailureTask, fixing #12349 2016-07-09 09:30:09 +02:00
bors-servo
c2a22bd05e Auto merge of #12268 - izgzhen:fm-spawn, r=Manishearth
Spawn threads for requests in file manager

r? @Manishearth

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12268)
<!-- Reviewable:end -->
2016-07-08 20:33:26 -07:00
bors-servo
12260b24d0 Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, r=Manishearth
Make network listener runnable cancellable

<!-- Please describe your changes on the following line: -->
This keeps scripts from executing after its script thread has been shut down.

---
<!-- 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 (maybe) #12048 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12277)
<!-- Reviewable:end -->
2016-07-08 09:56:31 -07:00
Connor Brewster
55267560ca Change ignore async events ordering to SeqCst 2016-07-08 09:02:16 -06:00
Connor Brewster
315ffe7677 Make network listener runnable cancellable 2016-07-08 09:00:59 -06:00
bors-servo
1fabfee27e Auto merge of #12118 - emilio:animation-shorthand, r=SimonSapin
style: Add support to the animation shorthand and fix parsing of animation-name

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

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

Part of #11916.

r? @SimonSapin

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12118)
<!-- Reviewable:end -->
2016-07-08 06:01:52 -07:00
bors-servo
5afdf7fb5c Auto merge of #11781 - sjmelia:8719_support_for_css_active, r=Manishearth
Issue 8719: Add basic support for :active selector

<!-- Please describe your changes on the following line: -->
Added toggling of active state for element and parents on mousedown/mouseup. Active state is removed when mouseout. (hover)

- As with my other PR i'm struggling a bit with the automated testing. I've added a manual test case and found quirks-mode/active-and-hover-manual.html which - aside from also being a manual test, is functional in Firefox but does not render correctly in Servo.
- Not implemented: In Firefox, behaviour differs with a <!DOCTYPE HTML> and an anchor does not lose it's activation on mouseout; whereas a button does.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11781)
<!-- Reviewable:end -->
2016-07-08 05:06:57 -07:00
Zhen Zhang
bf18225ba2 Spawn threads for requests in file manager and other style fixes 2016-07-08 19:57:02 +08:00
Changwan Hong
de8be94691 Add name method for Runnable trait into DetailsNotificationRunnable 2016-07-08 19:31:47 +09:00
Andrew Savchyn
3c9d7a6627 Add name method for Runnable trait in DocumentProgressHandler 2016-07-08 10:57:58 +02:00
bors-servo
a8fd13bac3 Auto merge of #12309 - szeged:descriptor-functions, r=jdm
Add missing steps to descriptors writeValue function

<!-- Please describe your changes on the following line: -->
Add two missing steps to characteristic's writeValue function. https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-writevalue (Step 4 and 5)
<!-- 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 there is no Web Bluetooth test API implementation yet.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12309)
<!-- Reviewable:end -->
2016-07-07 18:15:38 -07:00
Emilio Cobos Álvarez
411ae84908
style: Add support to the animation shorthand and fix parsing of animation-name. 2016-07-07 16:05:22 -07:00
bors-servo
fdfde1c5eb Auto merge of #12292 - ConnorGBrewster:runnable_variant, r=KiChjang
Consolidate runnable variants on DOMManipulationTask into a single Runnable variant.

<!-- Please describe your changes on the following line: -->
Consolidates the runnable variants on `DOMManipulationTask` into a single `Runnable` variant.
Also combines `MainThreadRunnable` into the `Runnable` trait.

I plan on filing a few E-Easy issues after this lands to implement `name` on each of the structs that implement `Runnable`.

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

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12292)
<!-- Reviewable:end -->
2016-07-07 14:26:44 -07:00
zakorgyula
2ab4511de8 Add missing steps to descriptors writeValue function 2016-07-07 10:07:15 +02:00
bors-servo
4fafcb121f Auto merge of #12272 - Ms2ger:report, r=jdm
Reuse report_pending_exception in CallSetup.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12272)
<!-- Reviewable:end -->
2016-07-06 20:49:54 -07:00
bors-servo
921f605c05 Auto merge of #12287 - nox:die-util-die, r=KiChjang
Remove util::breakpoint

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12287)
<!-- Reviewable:end -->
2016-07-06 15:49:18 -07:00
bors-servo
7da28b7ca6 Auto merge of #12261 - szeged:gattcharacteristicfunctions, r=jdm
Missing steps of Characteristic's readValue, writeValue functions

<!-- Please describe your changes on the following line: -->
Add a check for the read property of the characteristic as described in https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue (Step 4.1)
Add two missing steps to characteristic's WriteValue function. https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue (Step 4 and 5)

---
<!-- 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, there are no Web Bluetooth test API implementation yet.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12261)
<!-- Reviewable:end -->
2016-07-06 11:11:26 -07:00
Connor Brewster
54cf3afe30 Add name method to Runnable trait 2016-07-06 11:23:56 -06:00
Connor Brewster
d6f4dc06df Combined DOMManipulationTask runnable variants into a single variant 2016-07-06 10:46:56 -06:00
Anthony Ramine
5f2d5ef748 Remove util::breakpoint 2016-07-06 12:20:47 +02:00
bors-servo
68fb9ebc41 Auto merge of #11950 - jdm:keylayout2, r=emilio
Support non-QWERTY keyboards

Using the ReceivedCharacter event from glutin, we can obtain the actual key characters that the user is pressing and releasing. This gets passed to the script thread along with the physical key data, since KeyboardEvent needs both pieces of information, where they get merged into a single logical key that gets processed by clients like TextInput without any special changes.

Tested by switching my macbook keyboard to dvorak and looking at the output of keypress/keyup/keydown event listeners, as well as playing with tests/html/textarea.html. Non-content keybindings like reload work as expected, too - the remapped keybinding triggers the reload action.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4144
- [X] These changes do not require tests because I can't think of a way to test remapped keyboard input

Fixes  #11991.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11950)
<!-- Reviewable:end -->
2016-07-06 02:51:50 -07:00
zakorgy
52e1d8325f Missing steps of Characteristic's readValue, writeValue functions 2016-07-06 09:31:52 +02:00
Josh Matthews
6496d73210 Make textinput handle actual key values. Don't restrict character values to a single byte. 2016-07-06 00:10:24 -04:00
bors-servo
0d76cf8e5c Auto merge of #11948 - stshine:flex-shorthand-properties, r=emilio
Support 'flex' and 'flex-flow' shorthand properties

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

Support the `flex` and `flex-flow` shorthand properties in
servo. Currently they are marked as experimental, so they are added to
`__dir__.ini`.
Thanks SimonSapin and jdm for help :)

---
<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11948)
<!-- Reviewable:end -->
2016-07-05 20:08:07 -07:00
Bobby Holley
1d8d1cb9d9 Upgrade rust-selectors. 2016-07-05 18:03:40 -07:00
Josh Matthews
04ce86c08c Associate logical and physical keypresses together to support non-QWERTY keyboards. 2016-07-05 18:06:42 -04:00
bors-servo
5574a4e4c8 Auto merge of #12003 - Manishearth:no-crash-url-parse, r=jdm
Don't crash when <img> fails to parse its src

Fixes #11992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12003)
<!-- Reviewable:end -->
2016-07-05 14:12:21 -07:00
Ms2ger
72540009d5 Reuse report_pending_exception in CallSetup. 2016-07-05 20:20:23 +02:00
Manish Goregaokar
fe5ff70284
Don't crash when <img> fails to parse its src 2016-07-05 21:52:18 +05:30
bors-servo
87c7772527 Auto merge of #12258 - izgzhen:remove-data-slice, r=Manishearth
Remove DataSlice, fix #12249

r? @Manishearth

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12258)
<!-- Reviewable:end -->
2016-07-05 06:24:46 -07:00
Zhen Zhang
ab14777312 Remove DataSlice, fix #12249 2016-07-05 17:51:53 +08:00
bors-servo
bb916bb38b Auto merge of #12256 - nox:die-util-die, r=Ms2ger
Move some stuff from util to style

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12256)
<!-- Reviewable:end -->
2016-07-05 02:04:42 -07:00
Anthony Ramine
8ecb5962f3 Move util::str to style 2016-07-05 10:43:54 +02:00
Ms2ger
77caf83098 Move webdriver_msg to script_traits. 2016-07-05 09:02:46 +02:00
Ms2ger
b8fe9e9637 Move WindowSizeData to script_traits. 2016-07-05 09:02:43 +02:00
bors-servo
61491447e2 Auto merge of #12241 - jdm:multiple-stylesheets, r=notriddle
Don't load stylesheets in documents without browsing contexts

Per https://github.com/whatwg/html/issues/1495, this fixes the most commonly reported panic in nightlies by making us match what other browsers do.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12047 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12241)
<!-- Reviewable:end -->
2016-07-04 22:09:41 -07:00
bors-servo
e21b47c2cc Auto merge of #12243 - TravisDean:else-brace-check, r=ConnorGBrewster
Add style check and test for else braces

<!-- Please describe your changes on the following line: -->
Added a regex check to enforce project style guidelines. Added unit check. Catches:
```
}
else {
```
when it should be
`} else {`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors (no core files changed)
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12234 (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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12243)
<!-- Reviewable:end -->
2016-07-04 16:52:19 -07:00
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
Steve Melia
421c354d44 Issue 8719: Add basic support for :active selector 2016-07-04 22:24:13 +01:00
bors-servo
3b0dadda52 Auto merge of #12224 - nox:die-util-die, r=Ms2ger
Remove some stuff from util

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12224)
<!-- Reviewable:end -->
2016-07-04 12:57:00 -07:00
bors-servo
80cb0cf821 Auto merge of #11872 - eddyb:back-to-roots, r=Ms2ger
Replace return_address usage for rooting with stack guards and convenience macros.

The existing `Rooted` and `RootedVec` users were migrated the the following two macros:
```rust
let x = Rooted::new(cx, value);
// Was changed to:
rooted!(in(cx) let x = value);
// Which expands to:
let mut __root = Rooted::new_unrooted(value);
let x = RootedGuard::new(cx, &mut __root);
```
```rust
let mut v = RootedVec::new();
v.extend(iterator);
// Was changed to:
rooted_vec!(let v <- iterator);
// Which expands to:
let mut __root = RootableVec::new();
let v = RootedVec::new(&mut __root, iterator);
```

The `rooted!` macro depends on servo/rust-mozjs#272.
These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`.

Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10.

Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway.
`RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT.

By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix rust-lang/rust#34227
- [x] These changes do not require tests because they are not functional changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11872)
<!-- Reviewable:end -->
2016-07-04 11:03:35 -07:00