aboutsummaryrefslogtreecommitdiffstats
path: root/ports/jniapi/src
Commit message (Collapse)AuthorAgeFilesLines
* Move android port code to servoshell (#32533)Jonathan Schwender2024-06-193-1958/+0
| | | | Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Android: fix url resolution (#32422)Gae242024-06-101-4/+14
| | | | | | | | | | | | | | | | * fix localhost Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * android: parse search bar field in rust Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * Update comment to reflect new function behavior --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Move `RenderingContext` to `webrender_traits` (#32386)Martin Robinson2024-05-281-1/+1
| | | | | | The `gfx_traits` crate is gradually become just about text and fonts and this is one of the few things there that is standing in the way of this. Eventually `webrender_traits` will be the general cross-process compositor API, so this sort of makes sense as well.
* Upgrade jni to 0.21.1 (#32216)Delan Azabani2024-05-201-195/+244
| | | | | | | | JNI methods in `jniapi` now have explicit lifetime annotations to adapt it to the new `jni` version. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* android: Enable JIT compilation on 64-bit Android. (#32284)Mukilan Thiyagarajan2024-05-141-6/+12
| | | | | | | | | | Based on the investigation in [#31134][1], the [bug][2] in SpiderMonkey JIT affects only 32-bit systems. Therefore, we can safely enable JIT compilation again on 64-bit systems. [1]: https://github.com/servo/servo/issues/31134 [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1892374 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: Remove outdated `#[allow(bare_trait_objects)]` (#32225)Jonathan Schwender2024-05-041-2/+0
| | | This was added in 1d38bc04, but has since been fixed upstream.
* Android: load url from Intent, plus fixed some warnings (#32160)Gae242024-04-292-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update gitignore folder with android build files * address some warnings Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * fix servo not loading url from Intent Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * format Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * InitOptions, added url field to avoid override homepage url Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * actually there is a gitignore file in the android folder Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * Restore buildToolsVersion property Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Initial internal support for multiple webviews (#31417)Ngo Iok Ui (Wu Yu Wei)2024-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add multiple concurrent top-level browsing contexts Co-authored-by: Delan Azabani <dazabani@igalia.com> * Rename variables and comments There are some variable and comments still use browser as names. This commit renames them to webview. * Update log message from web view to webview * Revert offscreen_framebuffer_id rename * Rename all web view to webview * Cargo fmt * Fix viewport/event/clear coordinates when multiview is disabled * Only deprecate things when multiview is enabled * Update WebViewManger with shown and invisible sets Replace visible_webviews and native_window_is_visible with shown_webviews and invisible_webviews. Add 4 more methods to set them accordingly. The behavior of is_effectively_visible will return true if the wbview is in shown_webviews set but not in invisible_webviews. * Update variant behaviors * Rename WebViewVisibilityChanged to MarkWebViewInvisible * Fix unit test by marking id 3 visible again * Update MarkWebViewInvisible and add UnmarkWebViewInvisible * Update format and doc comments * Clean up doc comments * Address style and naming changes * Rename UpdateWebView to UpdateFrameTreeForWebView * constellation: send frame tree unconditionally over focus and feature * Clarify shown and invisible sets in constellation WebViewManager * Eliminate forward_to_constellation!() * Actually remove the unused macro * Don’t gate compositor changes on multiview feature flag * Update todo in mouse event dispatch * Pass all visible webview ids in a single ReadyToPresent message * Fix compile and lint errors * servoshell: fix gap between minibrowser toolbar and webview * Fix failure in /_mozilla/mozilla/window_resizeTo.html * Fix compile warnings * Remove stray dbg!() * Remove confusing “effectively visible” logic (see #31815, #31816) * Allow embedder to show/hide/raise webviews without ipc * Update root pipeline only when painting order actually changes * Stop gating old focus and SetFrameTree behaviour behind Cargo feature * Use webview_id and WebViewId in webview-related code * Improve logging of webview-related embedder events * Allow webview Show and Raise events to optionally hide all others * Don’t do anything in response to WebViewPaintingOrder * Remove WebViewPaintingOrder, since its payload is unreliable * On MoveResizeWebView, only update root pipeline if rect changed * Rename IOCompositor methods for clarity * compositor: add event tracing; log webview ops even without ipc * Add temporary debug logging * Add more temporary debug logging * Remove temporary logging in compositor * Remove temporary debug logging * Add temporary debug logging, but defer I/O until panic * Capture a backtrace with each crash log entry * Proper error handling without panicking in WebViewManager * Clean up imports in constellation --------- Co-authored-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Rework “visible” to “throttled” in embedder-to-constellation + ↵Delan Azabani2024-03-211-3/+3
| | | | jniapi (#31815)
* Use C-ABI for JNI functions (#31808)Jonathan Schwender2024-03-211-28/+48
| | | | | `#[no_mangle]` alone does not imply "C"-ABI, however the JNI layer will use the C-ABI to call the function. See also the relevant [clippy-lint](https://rust-lang.github.io/rust-clippy/master/index.html#/no_mangle)
* dependencies: Upgrade to WebRender 0.64 (#31486)Martin Robinson2024-03-141-1/+1
| | | | | | | | | This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: disable JIT in SM to workaround #31134 (#31270)Mukilan Thiyagarajan2024-02-071-1/+9
| | | | | | | | | | | | | | | | | The crash when loading servo.org happens in the JIT code emitted by SM's CacheIRCompiler to invoke the VM function `ProxyGetPropertyByValue`. To disable this code path, it is not sufficient to disable just the baseline JIT (which exposed in servo under the pref `js.baseline.enabled`) but also the baseline interpreter which is controlled by a different flag in SM. This PR disables renames the `js.baseline.enabled` pref in Servo to `js.baseline_jit.enabled` and introduces a new pref `js.baseline_interpreter.enabled` that controls the baseline interpreter. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* libservo: Handle GL video decoding setup internally (#31209)Martin Robinson2024-02-032-32/+3
| | | | | | | | Instead of making the client set up GL video decoding, have this done inside libservo. The details necessary for decoding are fetched via Surfman now. This also removes the setup for the context on Android -- which has no GStreamer support now anyway. In the future, this could be enabled, but should likely be done using Surfman, instead of passing on all these details manually.
* gfx: Rename `WebrenderSurfman` to `RenderingContext` and move to `gfx` (#31184)Martin Robinson2024-01-271-10/+10
| | | | | | | | | | | This is a small cleanup that moves and renames this class. The rename is simply because we are exposing a lot about the details of Servo's rendering in the API and it makes sense to start thinking about abstracting that away a bit. This also moves the struct to `gfx`, which does have an effect on Servo's dependency graph. This adds a new dependency on gfx to `compositing`, but `compositing` had a transitive dependency on gfx before through `canvas`.
* Remove the libsimpleservo C API (#31172)Martin Robinson2024-01-273-0/+1893
This is unused and unmaintained. It also added a bit of complication to the build.