Commit graph

384 commits

Author SHA1 Message Date
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
Fernando Jiménez Moreno
d8365111c9 Test OscillatorNode with servo_media 2018-07-30 14:21:37 +02:00
Simon Sapin
3509bcb531 Upgrade to rustc 1.29.0-nightly (1ecf6929d 2018-07-16) 2018-07-18 11:25:30 +02:00
Gregory Terzian
671627e97e introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
Paul Rouget
9fb5795f37 delegate resource reading to embedder 2018-04-27 15:34:52 +08:00
Simon Sapin
3d6614e314 Upgrade to rustc 1.27.0-nightly (056f589fb 2018-04-07) 2018-04-09 21:43:25 +02:00
Anthony Weston
7f7fc91758 Pass new method in CollectServoSizes for accurate DOM heap use reporting 2018-03-27 20:35:39 -04:00
Anthony Ramine
ce81420bef Use ByteBuf for the canvas messages
The type Vec<u8> is super unefficient to work with in Serde if all you want
to represent is a simple blob.
2018-03-26 20:48:02 +02:00
Simon Sapin
67d983cb12 Switch from servo/angle to the mozangle crate
https://github.com/servo/mozangle
2018-03-12 14:23:20 +01:00
Paul Rouget
da349ee8a9 remove mozbrowser code 2018-02-13 09:40:06 +01:00
Simon Sapin
10ec5a2bb0 Replace NonZero<*{const,mut} _> with std::ptr::NonNull 2018-01-22 17:41:25 +01:00
Fernando Jiménez Moreno
f46fbe4599 Remove gecko-media dependency 2018-01-19 15:06:52 +01:00
tigercosmos
54c6028033 implement valid week string 2017-12-17 16:57:01 +08:00
Anthony Ramine
23d7783e02 Make script depend on gecko-media
It's not used yet though.
2017-11-14 17:33:25 +01:00
bors-servo
338e2ae520 Auto merge of #18262 - KiChjang:value-sanitization, r=nox
Implement value sanitization on HTMLInputElement

https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm

<!-- 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/18262)
<!-- Reviewable:end -->
2017-11-09 18:35:07 -06:00
Keith Yeung
9d60333af9 Implement string stripping utilities from the Infra spec 2017-11-08 11:58:18 -08:00
Alan Jeffrey
8008ba5081 Renamed js crate to mozjs 2017-11-08 11:43:30 -06:00
Simon Sapin
a5d9d0b32d Make the unrooted_must_root conditional on a default Cargo feature.
Only http://perf.rust-lang.org/ will disable it,
in order to be less subject to changes to rustc internal APIs.
2017-11-02 15:08:04 +01:00
Simon Sapin
a3971eb686 Replace rust-encoding with encoding-rs 2017-11-01 10:16:11 +01:00
Simon Sapin
3c36a36cc9 Use encoding-rs instead of rust-encoding for CSS parsing 2017-10-31 19:08:43 +01:00
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
Gecko Backout
11c64178d8 Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
2017-10-19 21:26:51 +00:00
bors-servo
fe16c1d5c3 Auto merge of #18809 - Eijebong:bitflags, r=nox
Update bitflags to 1.0 in every servo crate

It still needs dependencies update to remove all the other bitflags
versions.

- [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 a dependency update

<!-- 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/18809)
<!-- Reviewable:end -->
2017-10-19 10:35:08 -05:00
Bastien Orivel
e8e2d0a4b2 Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
2017-10-19 15:01:17 +02:00
Simon Sapin
959ce482dd Stop relying on linking details of std’s default allocator
We’ve been bitten before by symbol names changing:
https://github.com/servo/heapsize/pull/46
and upstream is planning to stop using jemalloc by default:
https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465

So use the (relatively) new `#[global_allocator]` attribute
to explicitly select the system allocator on Windows
and jemalloc (now in an external crate) on other platforms.
This choice matches current defaults.
2017-10-19 09:52:50 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Simon Sapin
27239e1123 Make usage of core_intrinsics optional 2017-10-16 20:20:21 +02:00
Simon Sapin
bffec1c1a1 Make usage of unstable feature on_unimplemented optional. 2017-10-16 20:20:18 +02:00
Simon Sapin
5a5b7d7f39 Remove usage of unstable features const_ptr_null and const_ptr_null_mut 2017-10-16 20:20:01 +02:00