* 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>
* Turn on clip-path tests and add results
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* enhance: Add support for `clip-path: [<basic-shape> || <shape-box>]`
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
* Changes from review
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This switches the WPT export script to use Servo's fork the `wpt`
upstream repository. The reasoning is that Servo developers's can fix
issues with branches there. This isn't possible because no one has
permissions to the servo-wpt-sync fork of the repository.
I have given `servo-wpt-sync` write persmissions to `servo/wpt`.
This also updates the tests a bit to reflect the new default repository.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
According to HTML, the `width` and `height` attributes should only set
the natural sizes and the aspect ratio.
The `width` and `height` properties should stay as `initial` by default.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
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>
Now that the script thread and the layout thread are the same the wait
time effectively zero, so there's no need to measure it. This also
removes one dependency and removes one use of legacy time.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
For non-replaced formatting contexts, this method redirected directly to
`NonReplacedFormattingContextContents::inline_content_sizes()`, which
has the actual logic for the computation.
Thus it was bypassing the cache, which is handled in
`NonReplacedFormattingContext::inline_content_sizes()`.
Therefore, this patch redirects to the latter.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
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>
* CI: use self-hosted Windows runners in main workflow
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix a couple of robustness issues by generating a unique build id
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Work around needs-context expressions being busted in concurrency
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* CI: use self-hosted Windows runners in try and try-label workflows
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rename windows workflow back for simplicity
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clarify why the copy resources step is for GitHub-hosted jobs only
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix cancelled status problem by dispatching instead of calling
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Tweak retry strategy to avoid hitting REST API rate limits
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Update dispatch-workflow.yml accordingly
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rework to use simpler approach with runner labels
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Use org-scoped self-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Don’t run runner-timeout job when GitHub-hosted runner is selected
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Downgrade to Python 3.10
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Avoid failing when RUNNER_API_TOKEN is missing (such as in forks)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix undefined needs output when RUNNER_API_TOKEN is missing
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Reset working tree, in case it was dirty in the runner image
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clearer runner assignment timeout jobs that fail and offer help
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix some other sources of incremental build breakage (but not PATH)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Log reasons why we fall back to GitHub-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Allow self-hosted runners to be disabled via repository variable
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Always install crown, even on self-hosted runners
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Rename incremental build debugging step
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Clean up job friendly names
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Reduce fetch depth, now that this job no longer lints
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Consider a block container that establishes an inline formatting context
and has a definite `block-size` which is clamped by `min-block-size` or
`max-block-size`.
We were already sizing such container correctly, however, its contents
were resolving their percentages against the unclamped `block-size`
value.
This patch fixes the `ContainingBlock` that we pass to the contents so
that they resolve percentages correctly.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This was due to uname reporting the architecture as arm64
instead of aarch64 on macos
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* More helpers on `Promise`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Sync `GPUBuffer`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Set some good expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Some bad expect
also on firefox
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Extract DataBlock, DataView impl from GPUBuffer
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix size check to work on 32bit platforms
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach: Do not manually install toolchain for non-cross builds
This fixes the Apple Silicon build where the installed toolchain does
not match the host triple. We only install toolchains manually for cross
builds, because cargo and friends will do this automatically when
executing.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fix lints
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Flexbox is still very much in progress, but things are working well
enough that we can enable it by default. It improves most pages that use
flexbox now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Introduce a new `BuildTarget` abstraction to centralize the code for
supporting different ways of choosing the build target (e.g --android,
--target x86_64-linux-android , --target aarch64-linux-ohos). This
is currently handled in an adhoc fashion in different commands (
mach package, install, run) leading to a proliferation of keyword
parameters for the commands and duplicated logic.
The patch introduces a new `allow_target_configuration` decorator to
do the validation and parsing of these parameters into the appropriate
`BuildTarget` subclass, which is now stored as an instance attribute
of the CommandBase class. All the code that previously relied on
`self.cross_compile_target` has been switched to use the BuildTarget.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.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>
* asan: Add suppression for known false positive
Signed-off-by: ede1998 <online@erik-hennig.me>
* fix: re-suppress lazy_static leaks
lazy_static is still used by dependencies and still leaks
from static variables.
Signed-off-by: ede1998 <online@erik-hennig.me>
* fix: Memory leak of Box<NetworkingTaskSource>
Signed-off-by: ede1998 <online@erik-hennig.me>
---------
Signed-off-by: ede1998 <online@erik-hennig.me>
* feat: retrieve applied styles
Signed-off-by: eri <eri@inventati.org>
* feat: preliminary style showing
Signed-off-by: eri <eri@inventati.org>
* chore: some style tests
Signed-off-by: eri <eri@inventati.org>
* feat: edit style rules
Signed-off-by: eri <eri@inventati.org>
* feat: css database
Signed-off-by: eri <eri@inventati.org>
* feat: computed styles
Signed-off-by: eri <eri@inventati.org>
* feat: inherited styles
Signed-off-by: eri <eri@inventati.org>
* feat: get stylesheet styles
Signed-off-by: eri <eri@inventati.org>
* feat: all styles in inspector
Signed-off-by: eri <eri@inventati.org>
* feat: multiple stylesheets
Signed-off-by: eri <eri@inventati.org>
* refactor: clean up
Signed-off-by: eri <eri@inventati.org>
* Some minor cleanup
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: eri <eri@inventati.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>