Commit graph

434 commits

Author SHA1 Message Date
Delan Azabani
fd1de05592 apply pylbrecht/servo/named.window.getter (closes #27952) 2023-03-23 18:01:26 +08:00
Josh Matthews
e57b9a3446 Fix warnings. 2022-04-01 00:36:48 -04:00
Dominic Cooney
3b93d20991 Fix three trivial warnings.
Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>
2021-05-23 19:03:57 +09:00
Dominic Cooney
7d997748da Update toolchain to nightly-2021-05-18
The nightly-2021-03-12 toolchain doesn't have RLS on Windows. This
breaks code completion in Visual Studio Code because the rust plugin
picks up the project toolchain.

RLS is available in all tier one platforms in nightly-2021-05-18 per:
https://rust-lang.github.io/rustup-components-history/

Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>
2021-05-22 19:47:31 +09:00
Simon Sapin
aa854ec2d2 Upgrade to rustc 1.52.0-nightly (a8486b64b 2021-02-24) 2021-02-25 20:31:43 +01:00
Josh Matthews
5c4939599e Update mozjs. 2021-02-18 09:35:45 -05:00
Gregory Terzian
89eb7c2aa2 serviceworker: make job queue unique per origin 2020-05-21 13:21:21 +08:00
Martin Robinson
3b0619aedd Move most animation processing to script
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.
2020-05-12 10:22:14 +02:00
Martin Robinson
3a74013abc Start having animations conform to the HTML spec
This is a small step toward fixing #19242. The main idea is that the
clock for animations should advance as the event loop ticks. We
accomplish this by moving the clock from layout and naming it the
"animation timeline" which is the spec language. This should fix
flakiness with animations and transitions tests where a reflow could
move animations forward while script was running.

This change also starts to break out transition and animation events
into their own data structure, because it's quite likely that the next
step in fixing #19242 is to no longer send these events through a
channel.
2020-05-05 20:08:44 +02:00
Simon Sapin
6175a68c10 Replace a transmute with .to_ne_bytes() + constructor 2020-04-15 17:54:04 +02:00
Simon Sapin
7861b0be79 Remove use of soon-to-be-deprecated unstable feature
https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016
2020-04-15 15:10:11 +02:00
Simon Sapin
fbfe86fffe Remove unused #![feature(…)] attributes 2020-04-15 15:01:46 +02:00
Gregory Terzian
db217d5575 allow for a service worker manager per origin 2020-04-05 22:43:40 +08:00
Anthony Ramine
0bda174823 Merge RawLayoutElementHelpers into LayoutElementHelpers 2020-03-31 18:30:42 +02:00
Anthony Ramine
df0118dd10 Move PendingRestyle to the style_layout_interface crate 2020-03-28 14:00:53 +01:00
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +01:00
Anthony Ramine
14846d0567 Introduce a new type MaybeUnreflectedDom<T> (fixes #25701) 2020-02-17 10:17:47 +01:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm 2020-01-24 20:52:36 +05:30
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
CYBAI
f2007751dd Scaffold module script 2020-01-03 13:02:31 +09:00
Josh Matthews
7944d9548c script: Ensure JS engine is initialized and deinitialized on the same thread. 2019-11-26 21:54:33 -05:00
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