* fix clone on copy warning in servoshell
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* Remove unecessary borrow in libservo
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* Ignore too many arguments warning on create_constellation()
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* fix explicit auto-deref warning
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* Autofix multiple clippy warnings in components/script
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
---------
Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* Plumb selected tracing spans into hitrace
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Tag the spans in #33189 with the `servo_profiling` field
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Add comment about fields vs extensions
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Currently Cmd/Ctrl + [1-9] and Ctrl + PageUp/Down, since they are
present in most major browsers.
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Make tracing available on all platforms
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Gate perfetto support behind its own feature
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Improved the minibrowser tab bar
Added a close button for each tab as well as another button for opening
a new tab, also changed the styling so it looks more like other
browsers.
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Make sure to restore the egui visuals after drawing a browser tab
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Only use colors from the current theme for the minibrowser tabbar
That way we can easily switch between light and dark mode
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
---------
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
Rely on callbacks from the vertical synchronization driver,
to drive presentation.
Future commits will base animation updates and touchless
gestures like fling off these vsync events.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Remove WebVR prefs, enable OpenXR by default
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Prefer OpenXR if available, otherwise use GLWindow
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* avoid unnecessary clones when setting tab title in minibrowser
This is of course not a performance issue, but rather just bad style.
Especially since the url doesn't even need to be .clone()'d
in the first place.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Don't allow empty tab titles in minibrowser
These look very confusing. If the page has no title
its better to fall back to the url instead of displaying
absolutely nothing. (This is what firefox seems to do
too)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
The compositor's `build.rs` script was parsing the `Cargo.lock` file in
order to tag WebRender captures with the WebRender version. The embedder
already knows what version of Servo we are using, which should be enough
to infer the WebRender revision. This changes does that and generally
does a bit of cleaning up of how captures are done.
- The name of the capture directory is now `webrender-captures`
- There is console output now when captures are done. Before it was hard
to know if it succeeded.
- Simplify the Compositor constructor a little to avoid passing
arguments so much.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This implements a simple tab system for servoshell:
- The egui part uses the built-in SelectableLabels components and
display the full tab title on hover.
- WebView structs now hold all the state for each WebView. When we
need "global" state, we return the focused WebView state, eg.
for the load status since it's still global in the UI.
- New keyboard shortcut: [Cmd-or-Ctrl]+[W] to close the current tab.
- New keyboard shortcut: [Cmd-or-Ctrl]+[T] to create a new tab.
- The new tab content is loaded from the 'servo:newtab' url using a
couple of custom protocol handlers.
Signed-off-by: webbeef <me@webbeef.org>
To be useful it requires using the latest version of the OH demo ArkTS app,
but it is still compatible with older versions, as the newly added FFI functions
will simply be unused in such a case.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Redesigned minibrowser toolbar to use icons instead of text
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Apply suggestions from code review
Address a couple nits
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Allow prefs to be passed in from a separate file
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add wpt-prefs.json for setting WPT-specific prefs
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* fix argument to read_prefs_file
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update test_parse_pref test
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add line in executorservo.py to read from wpt-prefs.json
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update MANIFEST.json
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Disable dom.webxr.test for interfaces test
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
The TouchHandler in servo already does the equivalent,
so there is no need to have this code in the OH specific code.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Increase default filtering to warn
* fix module filtering (filter_builder was never used)
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: redirect stdout/stderr to logging sink
Based on the existing android `redirect_stdout_to_logcat` implementation,
but using the safe abstractions from `nix` and dumping to the `log` sink,
instead of directly writing the log.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* android: Use new shared implementation for logcat redirection.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* servoshell: Register cfg(production)
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Update ports/servoshell/egl/log.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* Change info! to debug! to match original behavior on android
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove usage of lazy-static in background_hang_monitor
The lazy-static crate was only used to construct a mutex,
but since Mutex::new is const this can be done at compiletime
instead.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove usage of lazy-static in servoshell
Lazy-static was only used to construct a mutex, but
since Mutex::new is const this can simply be done at
compiletime.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Before when handling panics and hard-fail was activated, Servo would
just exit with an error return code. This isn't interpreted as a crash
by the WPT test runner. This change raises a SEGV signal instead, which
means that panics should more reliably be treated as crashes.
This doesn't seem to change any test results, at least any non-flaky
test results. It is necessary for the test in #32782 to work though.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
`webxr` depends on a very old verison of `time`, which allowed serializing
monotonic clock output. This isn't possible on all platforms, so newer
versions of `time` do not allow this. In order to stop using the old
0.1 versions of `time` we have to stop relying on times passed from `webxr`
to Servo. This change does that, at the cost of removing the XR
profiling feature. It has to be rewritten in another way in the `webxr`
crate.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* ohos: Use ohos-sys from crates.io
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* ohos: Bump ohos-sys to v0.2.1
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Implement Servo side of GamepadHapticActuator
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Get build working
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Create effect handling on embedder side
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update tracing for GamepadHapticEffect
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update gilrs to point to commit with effect complete event
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement playing and preempting haptic effects
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update IDL to add trigger rumble
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update WPT expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Handle stopping haptic effects from reset()
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* ./mach fmt, fix test-tidy issues
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add extra validity checks for trigger rumble
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Retrieve supported haptic effects from embedder
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix test expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add missing spec link, pin gilrs commit
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* servoshell cargo formatting
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix Cargo.toml
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Additional comments, realm proof, naming
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* ./mach fmt
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update gilrs rev to gilrs-core 0.5.12 release
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement sequence ids for gamepad haptic promises
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Take playing effect promise instead of cloning
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement listener for reset function
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Fix Cargo.lock
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Restructure IPC listeners, add comments, handle visibility change
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Check that haptic effect still exists before handling ff completion event
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Visibility steps, add InRealm bindings for promises
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add Gamepad EmbedderMsg arms to egl servo_glue
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Enable OpenXR backend from the WebXR crate
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Ensure openxr feature is only included on windows
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add cfgs for OpenXR usages
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Move legacy layout behind a feature flag
For now the new feature flag would still be enabled by default,
but disabling the `layout_2013` feature, gives the following
binary size improvements for servoshell on Linux:
- in debug mode from 1278MB -> 1201 MB
- in release mode from 144MB -> 140MB
- in production mode from 108MB -> 106MB
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Update components/servo/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>