| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Expose a `ServoBuilder` for easily creating Servo instances using
default values. This change enables removing `EmbedderTraits`.
Testing: This is covered by `Servo` unit tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Migrate to 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Allow unsafe_op_in_unsafe_fn lint
This lint warns by default in the 2024
edition, but is *way* too noisy for servo.
We might enable it in the future, but not now.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Compile using the 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Delan Azabani <dazabani@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step toward removing `WindowMethods`, which will
gradually be integrated into the `WebView` and `WebViewDelegate`. Sizing
of the `WebView` is now handled by the a size associated with a
`RenderingContext`. `WebView`s will eventually just paint the entire
size of their `RenderingContext`. Notes:
- This is transitionary step so now there is a `WebView::resize` and a
`WebView::move_resize`. The first is the future which will resize the
`WebView` and its associated `RenderingContext`. The second is a
function that the virtual `WebView`s that will soon be replaced by a
the one-`WebView` per `WebView` model.
- We do not need to call `WebView::move_resize` at as much any longer
because the default size of the `WebView` is to take up the whole
`RenderingContext`.
- `SurfmanRenderingContext` is no longer exposed in the API, as a
surfman context doesn't naturally have a size unless a surface is
bound to it.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#35501)
Expose two easy-to-use wrappers around `SurfmanRenderingContext` that
make the API simpler to use:
- `WindowRenderingContext`: This `RenderingContext` is a newtype around
`SurfmanRenderingContext` takes a `raw-window-handle` display and window
and creates a full window rendering context.
- `SoftwareRenderingContext`: is wraps `SurfmanRenderingContext` and
adds a swap chain in order to expose a software GL rendering context.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Constellation (#35369)
Instead of telling the Constellation to tell the embedder that new
frames are ready, have the compositor tell the embedder directly. This
should reduce frame latency. Now, after processing compositor
updates, run any pending `WebView::new_frame_ready` delegate methods.
This change also removes the `refresh` call from the Java interface as
that was the only other place that the compositor was rendering the
WebRender scene outside of event looping spinning. This `refresh` call
was completely unused.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a `ClipboardDelegate` to the `WebView` API and a default
implementation in libservo for this delegate that works on Mac, Windows,
and Linux. Support for Android will be added in the future. This means
that embedders do not need to do anything special to get clipboard
support, but can choose to override it or implement it for other
platforms.
In addition, this adds support for handling fetches of clipboard contents
and renames things to reflect that eventually other types of clipboard
content will be supported. Part of this is removing the string
argument from the `ClipboardEventType::Paste` enum because script will
need to get other types of content from the clipboard than just a
string. It now talks to the embedder to get this information directly.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
| |
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
| |
These will be a single method in the upcoming `WebView` delegate, so it
makes sense to also combine the internal message to match this. In
addition, since `LoadStatus` is now exposed to the API if there is ever
the need to add more statuses or to move to an event-based version, the
API is already set up for this.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
The conversion of an integer into a `MediaSessionAction` is
Android-specific and thus shouldn't be used throughout the source code.
This change moves the conversion to the Android port of servoshell.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
This fixes a variety of clippy issues that show up on the Android build.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flatten and simplify Servo's preferences code. In addition, have both
preferences and options passed in as arguments to `Servo::new()` and
make sure not to use the globally set preferences in `servoshell` (as
much as possible now).
Instead of a complex procedural macro to generate preferences, just
expose a very simple derive macro that adds string based getters and
setters.
- All command-line parsing is moved to servoshell.
- There is no longer the concept of a missing preference.
- Preferences no longer have to be part of the resources bundle because
they now have reasonable default values.
- servoshell specific preferences are no longer part of the preferences
exposed by the Servo API.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
| |
- The default value for SwapInterval is 1,
so setting it to 1 changes nothing
- We don't clear the screen immediately anymore, which was the only
useage of the egl bindings
this saves us from duplicated EGL bindings.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
|
|
|
|
| |
This removes unused code in order to reduce the number of compiler
warnings on the Android build. Some of this code might be used in the
future and it can be restored from git commit history.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
| |
Bundle resource files into the .hap, so they are available
as files in the application sandbox, instead of included
into the shared library.
This should slightly reduce the binary size in debug and
release mode.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
|
|
|
|
|
| |
Our build script sets `servo_production` and not `production`.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generate EGL bindings for ohos
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Adjust servoshell `bin` error message for android/ohos
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: disable WebGL
offscreen buffers are not implemented yet on ohos.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Add OpenHarmony support to servoshell
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Share ResourceReaderInstance
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Share android/ohos HostTrait
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Share servo glue
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Pass Init options from ArkTS to Servo
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* f rebase ResourceReaderMethods
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* fixup! Share ResourceReaderInstance
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Fix typo
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Update Cargo.lock
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Move WebGL check to webgl thread
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Remove commented code
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Remove commented and duplicate / unused code
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
|
| |
Signed-off-by: Mu Xianming <mu.xianming@lmwn.com>
Co-authored-by: Mu Xianming <mu.xianming@lmwn.com>
|
|
|
|
|
| |
`servoshell` (#32554)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|