Commit graph

413 commits

Author SHA1 Message Date
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
Simon Sapin
091feba0ba Use #![register_attr(…)] instead of Registry::register_attribute
CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66080
2019-11-15 16:46:50 +01:00
Bailey Blankenship
ec2961920b Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions
Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
2019-11-10 18:37:14 -05:00
Simon Sapin
f2e7b4ec8c Remove use of on_unimplemented
It errors in today’s Nightly:

```rust
error[E0557]: feature has been removed
 --> components/script/lib.rs:9:12
  |
9 | #![feature(on_unimplemented)]
  |            ^^^^^^^^^^^^^^^^ feature has been removed

error[E0658]: this is an internal attribute that will never be stable
  --> components/script/dom/bindings/conversions.rs:77:1
   |
77 | #[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/29642
   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable

error: aborting due to 2 previous errors
```
2019-11-08 11:38:24 +01:00
Simon Sapin
d3439fb4d1 Upgrade to rustc 1.40.0-nightly (246be7e1a 2019-10-25) 2019-10-26 13:03:49 +02:00
Simon Sapin
642b8b0415 Move items at the root of the script crate to a module 2019-10-26 12:59:17 +02:00
Hanif Bin Ariffin
31ff2d43cc Moved CanvasState out of canvasrenderingcontext
Cleaned up imports...

Applied clang-tidy

Moved CanvasState  and some other files

Next commit should remove pub modifier from members of CanvasState and use getters/setters instead.

Members of CanvasState are now private and applied test-tidy

Now have getters that return an immutable reference.
Also, I have no idea what to name some_func.rs

Removed need for some_func and made pub(crate)
2019-10-25 02:27:57 -04:00
Simon Sapin
b6bd2d7302 Remove uses of mem::uninitialized 2019-07-17 10:48:54 +02:00
Josh Matthews
43a75011be Upgrade to rustc 1.37.0-nightly (088b98730 2019-07-03) 2019-07-05 16:53:02 +02:00
Simon Sapin
bddfe9a468 Remove default-except-unstable
… and use remaining unstable features unconditionally.
This doesn’t actually change the set of crates that can build on the Stable channel.
2019-07-01 15:43:24 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
bors-servo
852223b08a
Auto merge of #23253 - BartGitHub:refactor-promise-compartment, r=jdm
Refactor promise compartment

<!-- Please describe your changes on the following line: -->
This PR adds a mechanism to verify that certain code is executed inside a ```JSAutoCompartment```, and applies this to the ```Promise::new_in_current_compartment``` constructor.

r? @jdm

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

<!-- Either: -->
- [x] These changes do not require tests because they do not change existing functionality.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/23253)
<!-- Reviewable:end -->
2019-04-29 13:59:04 -04:00
Fernando Jiménez Moreno
d0b2e826ef Move StylesheetSetRef to script 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
7c9e8aa4cc First bits of shadow dom layout 2019-04-26 10:17:46 +02:00
Aron Zwaan
7b293ee8cb Add proof that code is executed in compartment 2019-04-24 12:44:33 +02:00
Anthony Ramine
44163148c2 Make use of RefCell::try_borrow_unguarded 2019-04-12 19:02:07 +02:00
George Roman
4b8282b3b1 Implement CDATASection interface and createCDATASection method 2019-03-14 21:41:02 +02:00
Anthony Ramine
5fe5e5d6de Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
2019-03-10 17:51:35 +01:00
Simon Sapin
99b898753f Upgrade to rustc 1.34.0-nightly (0ea22717a 2019-03-02) 2019-03-03 19:32:42 +01:00
Emilio Cobos Álvarez
6daebcc5df Fix servo build. 2019-02-10 07:23:51 +01:00
Fernando Jiménez Moreno
5c5b5aae0f Implement HTMLMediaElement poster attribute 2019-01-11 17:11:11 +01:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
bors-servo
2b410acbf9
Auto merge of #22225 - servo:webgl, r=emilio
Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d

<!-- 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/22225)
<!-- Reviewable:end -->
2018-11-21 10:21:41 -05:00
bors-servo
c8b0501178
Auto merge of #22231 - servo:warn, r=SimonSapin
Fix unused import warning in new Rust Nightly

https://tools.taskcluster.net/task-inspector/#Zw-1gs3xT4e79Lach3PISg

<!-- 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/22231)
<!-- Reviewable:end -->
2018-11-20 07:24:22 -05:00
Simon Sapin
4fcc2f7edb Fix unused import warning in new Rust Nightly 2018-11-20 13:23:16 +01:00
Anthony Ramine
ca62b5c318 Call prepare_pixels on the WebGL thread 2018-11-20 10:14:50 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Agustin Chiappe Berrini
75eb94afca Unify the task source and task canceller API
I moved away from the `Window` struct all the logic to handle task
sources, into a new struct called `TaskManager`. In a happy world, I'd
be able to just have there two functions, of the types:

```rust
fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T>
fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName)
  -> (Box<T>, TaskSourceCanceller)
```

And not so much duplicated code. However, because TaskSource can't be a
trait object (because it has generic type parameters), that's not
possible. Instead, I decided to reduce duplicated logic through macros.

For reasons[1], I have to pass both the name of the function with
canceller and the name of the function without, as I'm not able to
concatenate them in the macro itself. I could probably use
`concat_idents` to create both types already defined and reduce the
amount of arguments by one, but that macro is nightly only. At the same
time, not being able to declare macros inside `impl` forces me to pass
`self` as an argument.

All this makes this solution more verbose than it would be ideally. It
does reduce duplication, but it doesn't reduce the size of the file.

[1](https://github.com/rust-lang/rust/issues/29599)
2018-11-14 06:36:44 -05:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Simon Sapin
86f0431f16 Rename mozjs to js in script through Cargo rather than extern crate 2018-11-06 15:14:17 +01:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
bors-servo
9a0404ac5f
Auto merge of #21881 - pyfisch:keyboard-types, r=paulrouget
Use keyboard-types crate

Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331

What this PR does:

* allow the use non-ASCII keyboards for text input
* decouple keyboard event "key" from "code" (key meaning vs location)

What this PR does not do:

* completely improve keyboard events send from winit and webdriver
* add support for CompositionEvent or IME

Notes:

* The winit embedder does not send keyup events for printable keys (this is a regression)
* keyboard-types is on crates.io because I believe it to be useful outside of servo. If you prefer I can add a copy in this repo.

<!-- 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/21881)
<!-- Reviewable:end -->
2018-10-17 05:36:08 -04:00
bors-servo
7a88a2e28a
Auto merge of #21877 - servo:webgl, r=jdm
Improve some byte-swap and premultiply operations

<!-- 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/21877)
<!-- Reviewable:end -->
2018-10-09 20:15:40 -04:00
Víctor Manuel Jáquez Leal
ce76b5780a dom: htmlmediaelement: add initial player bits
Also removes the usage of audio-video-metadata crate (?)
2018-10-08 16:11:59 +02:00
Pyfisch
0ccaa7e1a9 Use keyboard-types crate
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331
2018-10-07 22:39:00 +02:00
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +02:00
Josh Matthews
06bca43aee script: Optionally store backtraces when throwing DOM exceptions. 2018-10-01 16:04:56 +02:00
Josh Matthews
5dc80dd07a webgl: Add feature to store backtraces for each WebGL API call for easier debugging. 2018-10-01 10:43:13 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Gregory Terzian
b977b4994c add servo_channel crate 2018-09-12 11:25:45 +08:00
bors-servo
1ee3deea27
Auto merge of #21388 - gterzian:introduce_task_queues, r=jdm
Introduce task queues, and throttling performance timeline tasksource

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #19997 (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/21388)
<!-- Reviewable:end -->
2018-08-30 14:56:26 -04:00
Gregory Terzian
ca6306c430 introduce task-queues, and throttling the performance-timeline task-source, in script and worker threads.
queue
2018-08-31 02:10:34 +08:00
Simon Sapin
a6dcfdcd55 Upgrade to rustc 1.30.0-nightly (721913067 2018-08-26) 2018-08-27 10:47:49 +02:00
Alan Jeffrey
74c1e00d81 Upgraded to SM 60 2018-08-20 18:22:29 -04:00
Manish Goregaokar
d4fcd8fb0c Remove recursion limit 2018-07-30 14:21:45 +02:00
Manish Goregaokar
8f9a081ff0 Fix Trusted usage in audio decoder to queue tasks (#3) 2018-07-30 14:21:44 +02:00