Commit graph

4013 commits

Author SHA1 Message Date
michaelgrigoryan25
f0690ec7c1 Remove ports/libmlservo 2023-05-22 19:31:08 +04:00
michaelgrigoryan25
545c8a0ded Undo deletion of ports/libmlservo/Cargo.toml 2023-05-22 19:20:28 +04:00
michaelgrigoryan25
05e1e0ea9e Merge branch 'master' into issue#29773 2023-05-22 19:05:25 +04:00
michaelgrigoryan25
72085994b0 Remove ports/libmlservo 2023-05-22 16:06:31 +04:00
michaelgrigoryan25
644a6089b3 Fix: Invalid fields in libservo InitOptions 2023-05-22 11:59:37 +04:00
Michael Grigoryan
a1e9f55bba
Update ports/winit/headed_window.rs
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2023-05-21 09:49:51 +04:00
michaelgrigoryan25
b3ce330398 Fix: Fixed a namespacing error 2023-05-21 00:18:46 +04:00
michaelgrigoryan25
93819dc542 Patch: Applied code patches for clippy warnings 2023-05-19 08:01:38 +04:00
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
sagudev
dffb75a4c6 cargo-fix for 2021 2023-05-07 15:45:56 +02:00
dependabot[bot]
a6b6b7cb41
Bump winit from 0.28.2 to 0.28.3
Bumps [winit](https://github.com/rust-windowing/winit) from 0.28.2 to 0.28.3.
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.28.2...v0.28.3)

---
updated-dependencies:
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-17 17:28:00 +00:00
dependabot[bot]
6cf8013b93
Bump winit from 0.28.1 to 0.28.2
Bumps [winit](https://github.com/rust-windowing/winit) from 0.28.1 to 0.28.2.
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.28.1...v0.28.2)

---
updated-dependencies:
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-07 11:06:10 +00:00
bors-servo
05c431f626
Auto merge of #29443 - delan:fix-thread-crash-output, r=jdm
Improve winit/mach segfault output

This patch improves the output that you see when the winit port segfaults, especially when the segfault happens on a layout or script thread, by making two changes to our crash handler and one change to mach.

* we make the crash handler use stderr instead of stdout, because [std::io::stdout](https://doc.rust-lang.org/std/io/fn.stdout.html) allocates when first called, which will often cause a second segfault
* we make the crash handler reraise the signal to terminate abnormally, allowing mach to distinguish it from exiting normally with the same status code as a signal number
* we make mach print different messages for whether the process terminated by signal or exited normally

You can try this yourself by running servo with the following patch:

```diff
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index ac1a7fe21e..77c4c9d087 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -589,6 +589,7 @@ impl LayoutThread {
             rw_data: &rw_data,
             possibly_locked_rw_data: &mut possibly_locked_rw_data,
         };
+        unsafe { std::ptr::read::<usize>(std::ptr::null()); }
         while self.handle_request(&mut rw_data) {
             // Loop indefinitely.
         }
```

Before:

```
$ ./mach run -d about:blank
[should print “Stack trace for "Layout(1,1)"” here, but segfaults]
Servo exited with return value 11
```

After:

```
$ ./mach run -d about:blank
Caught signal 11 in thread "Layout(1,1)"
[should ideally print backtrace here, but segfaults]
Servo was terminated by signal 11
```

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it would be impractical to test them

(r? @jdm, @SimonSapin based on git log for crash handler)
2023-02-28 15:29:50 +01:00
Delan Azabani
07c1286334 Improve winit/mach segfault output 2023-02-28 21:54:48 +08:00
Josh Matthews
a99dd55584 Ensure winit windows are cleaned up before TLS disappears. 2023-02-27 10:10:17 -05:00
Thomas Gardner
140dda9968 Bump surfman to 0.6
Update to the new release of surfman, and consume it without using the
`patches` section in Cargo.toml.
2023-02-24 19:00:57 +11:00
Josh Matthews
f64814f249 Fix macOS extensions in winit. 2023-02-21 19:15:32 +11:00
Thomas Gardner
f89602948e Bump winit to 0.28.1
This fixes the following wayland-client error:

	Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
2023-02-21 19:15:32 +11:00
Martin Robinson
423cc34cb0 Bump euclid to 0.22
- Also updates raqote to latest with an upgrade of font-kit to 0.11
  applied on as a patch
- Update lyon_geom to the latest version

Major change:

- All matrices are now stored in row major order. This means that
  parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
  so `then()` is used and the order of operations changed.
2023-01-26 08:59:21 +01:00
dependabot[bot]
0b747e8a15
Bump smallvec from 1.8.0 to 1.9.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 16:32:09 +00:00
dependabot[bot]
20c437878b
Bump cbindgen from 0.14.6 to 0.20.0
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.14.6 to 0.20.0.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.14.6...v0.20.0)

---
updated-dependencies:
- dependency-name: cbindgen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 01:45:34 +00:00
Josh Matthews
f8a44d0ad4 Remove env_logger duplicate. 2022-04-01 02:26:19 -04:00
Josh Matthews
369a5c0370 Update image/png. 2022-04-01 02:07:17 -04:00
Josh Matthews
471650ba90 Update keyboard-types. 2022-04-01 00:35:22 -04:00
s-maurice
4784564d5c move servo_version from config crate to ports/libsimpleservo/api/src/lib.rs and duplicate in ports/winit/main2.rs
Signed-off-by: s-maurice <51819025+s-maurice@users.noreply.github.com>
2022-03-06 01:43:46 +01:00
Josh Matthews
898f66bcd0 Update rustc. 2021-12-02 17:05:19 -05:00
bors-servo
9693111c97
Auto merge of #28591 - servo:jdm-patch-51, r=jdm
Update rustc to latest nightly.

None
2021-11-01 10:19:52 -04:00
Josh Matthews
01681e79c4 Update nightly rustc. 2021-11-01 08:46:18 -04:00
Josh Matthews
6b50d7025c Create initial browser id for compositor on startup. 2021-10-18 09:58:32 -04:00
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