Commit graph

3984 commits

Author SHA1 Message Date
yvt
41b3726271 feat: shorten thread names
The Linux kernel imposes a 15-byte limit on thread names[1]. This means
information that does not fit in this limit, e.g., the pipeline ID of
layout and script threads, is lost in a debugger and profiler (see the
first column of the table below).

This commit shortens the thread names used in Servo to maximize the
amount of information conveyed. It also rectifies some inconsistencies
in the names.

|       Before      |       After       |
|-------------------|-------------------|
| `BluetoothThread` | `Bluetooth`       |
| `CanvasThread`    | `Canvas`          |
| `display alert d` | `AlertDialog`     |
| `FontCacheThread` | `FontCache`       |
| `GLPlayerThread`  | `GLPlayer`        |
| `HTML Parser`     | `Parse:www.examp` |
| `LayoutThread Pi` | `Layout(1,1)`     |
| `Memory profiler` | `MemoryProfiler`  |
| `Memory profiler` | `MemoryProfTimer` |
| `OfflineAudioCon` | `OfflineACResolv` |
| `PullTimelineMar` | `PullTimelineDat` |
| `ScriptThread Pi` | `Script(1,1)`     |
| `WebWorker for h` | `WW:www.example.` |
| `ServiceWorker f` | `SW:www.example.` |
| `ServiceWorkerMa` | `SvcWorkerManage` |
| `Time profiler t` | `TimeProfTimer`   |
| `Time profiler`   | `TimeProfiler`    |
| `WebGL thread`    | `WebGL`           |
| `Choose a device` | `DevicePicker`    |
| `Pick a file`     | `FilePicker`      |
| `Pick files`      | `FilePicker`      |

[1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars
2021-07-19 00:57:48 +09:00
bors-servo
94e337f22f
Auto merge of #28308 - philip-lamb:phil-ime-textentry, r=jdm
Improve IME messaging to embedder with insertion point index and mult…

…iline flag.

<!-- Please describe your changes on the following line: -->
This improves handling of IME requests in the embedder by passing the location of the insertion point along with the current text, and a boolean flag 'multiline' (true for HTML textarea, false otherwise) which allows the embedder to be more clever about handling of the 'enter' or 'return' keys.

Tested and working in an embedding example.

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

<!-- 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. -->
2021-03-29 23:10:17 -04:00
Philip Lamb
b8a74e89cf Improve IME messaging to embedder with insertion point index and multiline flag. 2021-03-29 17:55:54 +13:00
Philip Lamb
b19438ad07 Minor fixes in simpleservo: improve embedding C header generation. Don't recursively panic if embedder doesn't throw on panic. Make init_with_gl unavailable when doing non-WGL windows build. 2021-03-29 16:47:32 +13:00
Josh Matthews
21e31547ea Don't use headless winit event loop on macOS. 2021-03-14 17:24:30 -04:00
Paulo E. Castro
84b06ab6d1 Work around absense of winit::event_loop in headless case. 2021-03-11 00:24:13 +00:00
Paulo E. Castro
2aa4778f86 Correct format. 2021-03-06 16:28:06 +00:00
Josh Matthews
49ddc5ea3d Only request synchronous repaint when a resize will actually occur. 2021-03-05 20:00:30 -05:00
Josh Matthews
10231573be Update to winit 0.24.
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Paulo E. Castro <pecastro@wormholenet.com>
2021-03-05 20:00:30 -05:00
Simon Sapin
2dd3c05479 Manually reformat ports/winit/**/*.rs
`cargo fmt` misses these files, possibly because of `include!` or `#[cfg]` in `main.rs`. This commit runs `rustfmt` directly.
2021-02-25 20:31:42 +01:00
Simon Sapin
a0d9f97c8e Fix warnings introduced in newer Rust Nightly
This does not (yet) upgrade ./rust-toolchain

The warnings:

* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
2021-02-25 15:36:03 +01:00
Michael Mc Donnell
304fe775b3
Extract crash handler
Moved the crash handler code into its own file since it is a distinct concept.  It
simplifies the main method a little.
2021-02-16 09:49:41 -08:00
dependabot-preview[bot]
2df713c0f0
Bump smallvec from 1.5.1 to 1.6.1
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.5.1 to 1.6.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.5.1...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 06:34:15 +00:00
Simon Schmeisser
d2915a8ff9
add instruction for building libsimpleservo 2020-12-28 21:34:15 +01:00
Philip Lamb
6125057c04 formatting. 2020-12-16 16:04:53 +13:00
Philip Lamb
1471a6dc80 Replace use of c++ keyword 'default' in c++ code and C APIs. Also correct obsolete use of qualified name in member declaration. 2020-12-16 11:36:55 +13:00
dependabot-preview[bot]
b31419c8f2
Bump smallvec from 1.4.2 to 1.5.1
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.4.2 to 1.5.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.4.2...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 06:23:15 +00:00
YUAN LYU
e15bc7516c Fix mouse button handling 2020-12-06 00:21:21 -05:00
dependabot-preview[bot]
6454df2c51
Bump jni from 0.16.0 to 0.18.0
Bumps [jni](https://github.com/jni-rs/jni-rs) from 0.16.0 to 0.18.0.
- [Release notes](https://github.com/jni-rs/jni-rs/releases)
- [Changelog](https://github.com/jni-rs/jni-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jni-rs/jni-rs/compare/v0.16.0...v0.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-03 06:17:05 +00:00
dependabot-preview[bot]
056a0380bd Bump env_logger from 0.7.1 to 0.8.2
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.7.1 to 0.8.2.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.1...v0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-24 16:24:21 -05:00
王滋涵 Zephyr Wang
0b7729edc6
Fix typo in gstplugin readme.md 2020-11-22 13:16:43 +08:00
Josh Matthews
d9484d5d06 Expose WebrenderSurfman interface to embedders. 2020-11-15 17:33:25 -05:00
Josh Matthews
cb2b2abdee Expose non-widget rendering to embedders. 2020-11-15 17:33:25 -05:00
Paul Rouget
0275afdfb4 Do not beautify title in libsimpleservo 2020-08-10 15:10:15 +02:00
Josh Matthews
a5e488bc2c webgl: Support preserveDrawingBuffer. 2020-08-06 14:25:17 -04:00
bors-servo
52c90955dc
Auto merge of #27438 - paulrouget:crashReporter, r=jdm
UWP Crash reporter

This is supposed to address #27167 and #26523. Also fix #27435.

These changes are still WIP as I found a few bugs, it needs more testing and the actual code to upload is not implemented yet. But I'd like to get an early feedback.

First, panics are caught via `panic::set_hook` instead of `catch_unwind` allowing us to catch more panics.
We also now report panics reported via the `Embedder:Panic` message.
Once the panic is caught, if possible, we try to recover.
I haven't found a way to recover when the panic is caught is a non-GL thread. We need a generic way to throw from the UWP code, and even trying to add a UnhandledEvent handler doesn't appear to work.

Once a panic is caught (even if we can not recover) a crash-report file is created, including the backtrace, stdout, and the current url.

If the app did not crash at that point, or after a restart if it did, we check if the crash report file is present, and if so, we present a panel to the user to allow them to upload the report. At that point the user can also add details to the report.

<img width="1079" alt="Screen Shot 2020-07-29 at 12 35 44" src="https://user-images.githubusercontent.com/373579/88790406-6d777180-d198-11ea-9237-6f80dc9d0340.png">
2020-08-04 11:30:47 -04:00
Paul Rouget
43670c6eaa Box C preferences to avoid dangling pointers 2020-08-03 17:36:52 +02:00
Paul Rouget
593200e693 Catch more panics.
Stop using catch_unwind and use set_hook, allowing us to catch
more panics. Also reporting Embedder::Panic messages.
2020-08-03 17:31:34 +02:00
Alan Jeffrey
ea0fec6aab Added a recipe for streaming to twitch 2020-07-31 14:16:13 -05:00
Alan Jeffrey
172d296c8b Replace a bounded channel by an unbounded one in the gstreamer plugin 2020-07-30 13:31:12 -05:00
Alan Jeffrey
78c7621177 Add an example streaming a Hubs room to the gstreamer plugin 2020-07-30 13:30:21 -05:00
Alan Jeffrey
f87fdfee3c Add a prefs property to the gstreamer plugin 2020-07-30 13:29:30 -05:00
bors-servo
b1bd409047
Auto merge of #27449 - asajeffrey:gst-plugin-readme-edits, r=jdm
Gstreamer plugin README edits

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

Updated docs to the gstreamer plugin, now with a recipe for streaming to youtube live!

---
<!-- 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 we don't test READMEs

<!-- 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. -->
2020-07-29 22:34:10 -04:00
Alan Jeffrey
4d4a9c22ef Update gstreamer plugin README: directions for streaming to youtube live 2020-07-29 17:59:43 -05:00
Alan Jeffrey
308aa1606b Update gstreamer plugin README: use the glvideoflip plugin 2020-07-29 17:39:06 -05:00
Alan Jeffrey
5c121bc8d4 Update gstreamer plugin README: use the -e flag 2020-07-29 17:38:35 -05:00
Alan Jeffrey
ad4eb52a85 Update gstreamer plugin README: we support webgl content 2020-07-29 17:37:55 -05:00
bors-servo
c26a803fee
Auto merge of #27429 - asajeffrey:webxr-user-intent-pref, r=Manishearth
Add a pref to indicate user intent to enter webxr

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

Add a pref to indicate that the user has indicated intent to enter webxr.

---
<!-- 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 it's a command-line pref

<!-- 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. -->
2020-07-29 18:25:12 -04:00
Alan Jeffrey
89a2c5175f Set the dom.webxr.unsafe-assume-user-intent pref in the gstreamer plugin's webxr mode 2020-07-29 16:58:47 -05:00
bors-servo
0ce3ad5a4b
Auto merge of #27417 - jdm:clear-reload, r=Manishearth
Make reload button clear the network cache.

The developer workflow in FxR is frustrating right now because of bugs like https://github.com/servo/servo/issues/24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix (kind of) #26411.
- [x] These changes do not require tests because can't test FxR.
2020-07-28 03:02:44 -04:00
Manish Goregaokar
9fe70e6b71 Move secondary view support into a pref 2020-07-27 20:45:42 -07:00
Josh Matthews
f030162ec3 Make reload button clear the network cache. 2020-07-27 22:34:07 -04:00
bors-servo
774673d186
Auto merge of #27304 - paulrouget:staticdevtoolsport, r=jdm
UWP: non random port for devtools, and support for custom UWP prefs

packages-prefs.json is now taken into account for libsimpleservo. Making it possible to have custom pref for the UWP builds, removing some weirdness in the way we handle preferences in the hololens code.

This also adds a new set of preferences to control the devtools server startup state, and make the port choice constant across sessions.

Fix #27267
Fix #22970
2020-07-21 03:38:10 -04:00
Paul Rouget
1b0de562ed Remove simpleservo antialiasing option, rely on pref 2020-07-21 06:30:06 +02:00
bors-servo
8ce3ff656d
Auto merge of #27295 - asajeffrey:gstreamer-webxr, r=Manishearth
Gstreamer plugin support for streaming from webxr

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

Allows us to stream webxr video content.

---
<!-- 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 we don't reftest the gstreamer plugin

<!-- 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. -->
2020-07-17 17:36:38 -04:00
Alan Jeffrey
ec9f1fe9d4 Added documentation for gstreamer webxr 2020-07-17 10:12:17 -05:00
Paul Rouget
b8d6b1d52d Support package-prefs.json for libsimpleservo 2020-07-17 08:30:11 +02:00
Alan Jeffrey
50e168a688 Gstreamer plugin support for streaming from webxr 2020-07-16 14:16:32 -05:00
Paul Rouget
6252d36a14 Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
Alan Jeffrey
a2142d7dbd Add support for webxr cubemap and spherical 360 rendering 2020-07-09 14:02:23 -05:00