| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes `FlexItem::content_cross_size` into `Size<Au>` to preserve
keyword sizes. The calculation of the hypothetical cross size still
ignores them though, that will be addressed in a follow-up.
Also, browsers don't follow the spec and treat a stretch size different
than a stretch alignment: the former stretches to the containing block,
while the latter stretches to the line. This aligns Servo with that
behavior (following the spec would require bigger refactorings), so
`stretches()` is renamed to `stretches_to_line()` for clarity.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#35701)
This is one of the first big steps toward making the compositor work
per-WebView. It moves the collection of pipelines into the per-WebView
data structure in the compositor as well as the pending paint metrics.
This means that more messages need to carry information about the
WebView they apply to. Note that there are still a few places that we
need to map from `PipelineId` to `WebViewId`, so this also includes a
shared mapping which tracks this. The mapping can be removed once event
handling is fully per-WebView.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Delan Azabani <dazabani@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade Stylo to 2025-03-01
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fixup for https://phabricator.services.mozilla.com/D236733
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update test expectations
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
---------
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
touch cancels occur (#35763)
* Fix the problem that touchmove crashes occasionally.
Check whether touchSequenceInfo exists when touch_sequence_map is modified in on_touch_event_processed.
Signed-off-by: kongbai1996 <1782765876@qq.com>
* Remove outdated todo.
We already transition to Finished in `on_touch_cancel`
in the Touch handler, so we don't need any logic
in the event handler.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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: Seán de Búrca <leftmostcat@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ComputedValuesExt::effective_overflow` (#35670) (#35670)
* Update wpt-test
* Merge used_overflow to effective_overflow; remove duplicate call
* Remove more duplicate calls; update effective_overflow logic
* Update reference link&style
* Apply final review suggestions
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Respond to the "connect" message
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Bump log levels in devtools implementation a bit
If everything is "debug" then nothing stands out.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use preparation-time document for scripts
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Rebaseline test
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Fix step numbers and spec quotes
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
---------
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add `cancelable` property to the `TouchEvent`
set cancellable = false when sending move events to script, if the first touch_move event did not cancel it
Signed-off-by: kongbai1996 <1782765876@qq.com>
* modified review commentss
Signed-off-by: kongbai1996 <1782765876@qq.com>
---------
Signed-off-by: kongbai1996 <1782765876@qq.com>
|
|
|
|
|
| |
CSSKeyframesRule, Crypto (#35743)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the devtools code was structured like this (in pseudocode):
```rust
fn run() {
let member_1;
let member_2;
fn foo(&member_1) {
// ...
}
fn bar(&member_1, &member_2) {
// ...
}
loop {
match get_message() {
Message1 => foo(&member_1),
Message2 => bar(&member_1, &member_2),
}
}
}
```
This is not very idiomatic rust. And, more importantly, it makes it hard
to edit this code with an IDE, because "find all references" and similar
actions don't properly work. (member_1 inside "foo" is a different
variable than member_1 inside "bar" or "run").
Instead, the code is now structured (roughly) like this:
```rust
struct DevtoolsInstance {
member_1,
member_2,
}
impl DevtoolsInstance {
fn foo(&self) {
// ...
}
fn bar(&self) {
// ...
}
fn run(&self) {
loop {
match get_message() {
Message1 => self.foo(),
Message2 => self.bar(),
}
}
}
}
```
In my opinion, this is an improvement and should make future additions
to the devtools server easier. No behaviour change is intended.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't recurse in Node::GetRootNode
This causes servo to crash when computing
the root of deeply nested shadow roots.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add test case
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
| |
OffscreenCanvasRenderingContext2D (#35732)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
| |
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
| |
(#35729)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of keeping a per-FontGroup cache of the previously used fallback
font, cache this value in the caller of `FontGroup::find_by_codepoint`.
The problem with caching this value in the `FontGroup` is that it can
make one layout different from the next.
Still, it is important to cache the value somewhere so that, for
instance, Chinese character don't have to continuously walk through the
entire fallback list when laying out. The heuristic here is to try to
last used font first if the `Script`s match. At the very least this
should make one layout consistent with the next.
Fixes #35704.
Fixes #35697.
Fixes #35689.
Fixes #35679.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The `OffscreenRenderingContext` does not need to be double-buffered.
Instead, when resizing the framebuffer, create a new one and blit the
old contents onto the new surface. This allows immediately displaying
the contents without having to render paint the WebRender scene one more
time. In addition to speeding up the rendering pipeline, the goal here
is to reduce flickering during resizes (though there is more work to
do).
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* avoid double borrow inside GetAsString
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* added crashtest
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Implement Blob.bytes()
Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
* improve read_all_bytes
Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
* fix read_all_bytes
Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
* fix bug
Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
* something went wrong
Signed-off-by: Kousuke Takaki <98276492+yoseio@users.noreply.github.com>
* fix read loop
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add use of can_gc to promise code following rebase
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* fix rooting of fulfillment handler
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Update test expectations
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* use dom for reader in read loop fulfillment handler
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* use the global of the reader in read loop fulfillment handler
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* remove FAIl expectations for blob methods in detached iframe
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
---------
Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
Signed-off-by: Kousuke Takaki <98276492+yoseio@users.noreply.github.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Squash and don't explicitly use noto-cjk in tests
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Mark quotes-034.html.ini failure
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Address review comments
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
---------
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
| |
The new version of rust has more checks trying to prevent mistakes
around order of operations and shifts.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
This is unused.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
| |
An intrinsic flex base size depends on the contents, which may depend on
the cross size through an aspect ratio. We were only taking this into
account if the preferred cross size was numeric, but `auto` or `stretch`
can also be definite.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
|
|
|
| |
Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
|
|
|
|
|
| |
this was not possible when original code was written due to wr limitations (image sizes could not be changed)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#30151 added support for setlike and maplike declarations in WebIDL, but
the tests only validated if generator code worked with 'DOMString' as
the key type. The support for interface type as members was broken as
`DomRoot<T>` didn't satify the bounds `Eq` and `Hash` needed by the
`Key` and `Value` types in `Setlike` and `Maplike` traits respectively.
In addition, the splitting of bindings into a separate 'script_bindings'
crate had also broken support for this in CodegenRust.py, as the types
used within the definition of `DomTraits` were not referenced using
`Self::`.
This patch fixes the WebIDL code generator by doing a simple string
replacement on the return value of `getRetvalDeclarationForType` so that
the proper `Self::` is used. I'm not not sure if there is a better
approach to this as it seems most logic in CodegenRust.py uses the `D::`
prefix that is expected to be available only when compiling `script`
crate and not `script_bindings`.
This patch also adds the missing trait implementations for `DomRoot` and
ensures that the generated code works for both members of primitive and
interface types by splitting the existing `TestBinding{Map,Set}Like`
interfaces into `TestBinding{Map,Set}LikeWith{Primitive,Interface}`
tests.
Fixes #35542.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
| |
Signed-off-by: Delan Azabani <dazabani@igalia.com>
|
|
|
|
|
|
|
|
| |
The computation of the flex base size may involve transferring a
definite cross size into the main axis through the aspect ratio.
We were only considering numeric sizes as definite, but `stretch` can
also be definite.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
| |
The computation of the automatic minimum size may involve transferring
a definite cross size into the main axis through the aspect ratio.
We were only considering numeric sizes as definite, but `stretch` can
also be definite.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
| |
When creating a `WebView`, let the Compositor know synchronously that
it exists. This allows the embedder to immediately call methods like
`WebView::focus()`. In addition remove messages associated with the
`WebViewDelegate::notify_ready_to_show()` method (and the method
itself), as now `WebView`s can be shown immediately.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To allow embedders to interact with webviews as soon as they are
created, we need to ensure that they exist in both the compositor and
the constellation before those interactions happen. #35662 does this
for the compositor, while this patch does this for the constellation.
When a webview opens another webview (via <a target>, <form target>,
window.open(), etc), the embedder creates an “auxiliary” webview,
which previously went as follows:
- script create_auxiliary_browsing_context
- libservo AllowOpeningWebView
- embedder request_open_auxiliary_webview (→ constellation FocusWebView)
- script create_auxiliary_browsing_context
- constellation ScriptNewAuxiliary
In that model, the constellation may receive FocusWebView before it
receives ScriptNewAuxiliary. Now they are created as follows:
- script create_auxiliary_browsing_context
- constellation CreateAuxiliaryWebView
- libservo AllowOpeningWebView
- embedder request_open_auxiliary_webview (→ constellation FocusWebView)
- constellation CreateAuxiliaryWebView
- script create_auxiliary_browsing_context
Since these messages are all synchronous and the constellation will
have set up the webview before handling any new messages, the webview
will always exist by the time we handle the embedder’s FocusWebView.
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Isaac Marovitz <isaacryu@icloud.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>
|
|
|
|
|
| |
Thus avoiding the need to convert to/from `AuOrAuto`.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement the <summary> element
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement UA shadow root for <details>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Invalidate style when display is opened or closed
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix /_mozilla/mozilla/duplicated_scroll_ids.html
This test previously assumed that <details> elements would
not be rendered.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement implicit summary elements
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove test for duplicated scroll IDs
See https://github.com/servo/servo/pull/35261#discussion_r1969328725 for
reasoning.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Use Iterator::find to find implicit summary element
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This method was taking an `IndefiniteContainingBlock` parameter, and
then it would first take the size corresponding to the main axis, and
then the one for the cross axis.
But it's simpler to just let it take a `FlexRelativeVec2<AuOrAuto>`
parameter.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* TouchSequenceInfo is added to store information about a touch sequence.
For details about TouchSequenceInfo, see the code comments.
The handling_touch_move attribute is added to the TouchHandler, indicating that the script is processing the touch move event.
When handling_touch_move is set to true, the touch move event does not need to be sent to the script thread.
Signed-off-by: kongbai1996 <1782765876@qq.com>
* move touch state, active_touch_point and handling_touch_move to TouchSequenceInfo form TouchHandler.
remove TouchSequenceInfo end_sequence property, add Finished state mark sequence end.
if preventDefault on touchup, do not prevent Fling.
Signed-off-by: kongbai1996 <1782765876@qq.com>
* Refactor Touchhandler
- Add a newtype wrapper for the TouchSequenceId
- Move more state back into the TouchSequenceState
- Rename TouchAction to TouchMoveAction,
since it only covers immediate actions now.
Everything else is handled via state, since
it needs to wait on the handler.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix test-tidy
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix clippy missing-default lint
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix remaining clippy lints
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Remove accidental committed test file
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Remove wrong todo comment
(move events that are sent to script are just raw touchpoints,
no merging needed)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix preventdefault after long touch_down handler
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
| |
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu
https://github.com/gfx-rs/wgpu/commit/2f255edc60e9669c8c737464c59af10d59a31126
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't register stylesheets outside of a browsing context with stylo
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update to rust 1.85
This is needed for cargo-deny
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Upgrade crown
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Clippy fixes
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Re-upgrade cargo-deny to 0.18
Keeping it locked to 0.18 just in case they
update their required rustc version again
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Support for the isolation CSS property
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* Temporarily bump stylo to refs/pull/125/head for testing
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* Remove FAIL expectation of CSS isolation tests
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* Add behavior test
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Revert temporary changes in Cargo.toml
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|