Commit graph

27997 commits

Author SHA1 Message Date
Simon Wülker
3d320fa96a
Update rustfmt to the 2024 style edition (#35764)
* 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>
2025-03-03 11:26:53 +00:00
Sean Burke
649291bf69
script: Avoid double borrow crash on iframe focus (#35742)
Signed-off-by: Seán de Búrca <leftmostcat@gmail.com>
2025-03-03 10:10:16 +00:00
Euclid Ye
28cea920ec
layout: Merge BoxFragment::used_overflow into 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>
2025-03-02 21:44:59 +00:00
Simon Wülker
e7e8ccea20
Respond to the connect message from a devtools client (#35745)
* 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>
2025-03-02 12:16:51 +00:00
Xiaocheng Hu
aa26aa1963
script: Implement preparation-time document (#35718)
* 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>
2025-03-02 10:25:00 +00:00
Bi Fuguo
929f87f598
add cancelable property to the TouchEvent (#35713)
* 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>
2025-03-02 08:12:26 +00:00
Yerkebulan Tulibergenov
67bd557f30
refactor: add CanGc as argument to methods in CSSGroupingRule, CSSKeyframesRule, Crypto (#35743)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-03-02 07:16:06 +00:00
Simon Wülker
18de59dd63
Refactor devtools server (#35735)
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>
2025-03-01 20:13:22 +00:00
Simon Wülker
25cc675101
Don't recurse in Node::GetRootNode (#35725)
* 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>
2025-03-01 17:19:27 +00:00
Yerkebulan Tulibergenov
ce977636f6
refactor: add CanGc as argument to methods in CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D (#35732)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-03-01 14:45:37 +00:00
Yerkebulan Tulibergenov
4f8d816385
refactor: add CanGc as argument to OffscreenCanvas methods (#35731)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-03-01 08:05:22 +00:00
Yerkebulan Tulibergenov
e91d44d023
refactor: add CanGc as argument to BaseAudioContext::{Destination, Listener} (#35729)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-03-01 03:20:21 +00:00
Martin Robinson
f949d2adc8
fonts: Remove the per-FontGroup cached fallback font (#35705)
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>
2025-02-28 14:33:21 +00:00
Martin Robinson
06d4272462
libservo: Stop double-buffering OffscreenRenderingContext (#35638)
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>
2025-02-28 11:41:56 +00:00
Gae24
900655fbc7
script: Avoid double borrow crash in DataTransferItem (#35699)
* 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>
2025-02-27 19:28:35 +00:00
Kousuke Takaki
8a3f62933b
script: Implement Blob::bytes() (#35151)
* 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>
2025-02-27 19:25:27 +00:00
Xiaocheng Hu
11f54b9f23
layout: Implement a non-recursive version of CSS quotes (#34770)
* 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>
2025-02-27 16:00:21 +00:00
webbeef
31de9c1c21
winit_mininal: support proper window resizing (#35691)
Signed-off-by: webbeef <me@webbeef.org>
2025-02-27 14:59:35 +00:00
Martin Robinson
0e85d9f30a
clippy: Fix a couple clippy warnings on macOS (#35703)
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>
2025-02-27 14:16:31 +00:00
Martin Robinson
e670464fef
compositor Remove frame_tree_id member (#35702)
This is unused.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-27 14:06:57 +00:00
Oriol Brufau
1966ab182f
layout: Use definite cross size to compute flex base size (#35688)
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>
2025-02-27 13:54:44 +00:00
Euclid Ye
64e227005f
Update sensitivity naming in DisplayList::new (#35694)
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-02-27 12:22:26 +00:00
Shubham Gupta
6b69f381e0
Set limits on pinch zoom (#35692)
Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
2025-02-27 11:56:48 +00:00
Samson
ce9c988f79
Reuse same ImageKey for 2d canvas (#35695)
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>
2025-02-27 09:51:12 +00:00
Mukilan Thiyagarajan
3cf4ef61ef
bindings: Fix support for interface members in setlike/maplike. (#35651)
#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>
2025-02-27 07:04:11 +00:00
webbeef
1d62776102
winit_minimal: fix build breakage (#35686)
Signed-off-by: webbeef <me@webbeef.org>
2025-02-27 04:52:29 +00:00
Delan Azabani
276f6a3ba7
libservo: Clean up interfaces for alert()/confirm()/prompt() (#35579)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-02-27 02:49:08 +00:00
Oriol Brufau
03e953e22c
layout: Support stretch cross size for flex base size (#35663)
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>
2025-02-26 18:03:38 +00:00
Oriol Brufau
6aae4df909
layout: Support stretch cross size for automatic min size in flexbox (#35652)
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>
2025-02-26 16:30:36 +00:00
Martin Robinson
9d5171f3c5
libservo: Add WebView immediately to the Compositor (#35662)
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>
2025-02-26 16:16:48 +00:00
Delan Azabani
b4e2037dbe
Make auxiliary webviews exist in the constellation immediately (#35672)
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>
2025-02-26 11:07:05 +00:00
Simon Wülker
1990f04e38
Implement the <progress> element (#35531)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-26 10:14:20 +00:00
Isaac Marovitz
88c8db2f8b
Don’t prompt user for credentials for non-Navigate request (#35664)
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
2025-02-26 03:52:00 +00:00
Martin Robinson
23524a5413
libservo: Move size handling to RenderContext from WindowMethods (#35621)
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>
2025-02-25 15:03:53 +00:00
Oriol Brufau
ebb19bcd60
layout: Change the IndefiniteContainingBlock sizes to Option<Au> (#35653)
Thus avoiding the need to convert to/from `AuOrAuto`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-25 14:24:29 +00:00
Yerkebulan Tulibergenov
31b2f81bc6
refactor: add CanGc as argument to exception_to_promise (#35647)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-02-25 13:21:59 +00:00
Simon Wülker
754b117011
Allow the <details> element to be opened and closed (#35261)
* 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>
2025-02-25 11:56:36 +00:00
Yerkebulan Tulibergenov
38b71087bd
refactor: add CanGc as argument to Promise::reject_error (#35646)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-02-25 10:12:58 +00:00
Oriol Brufau
864a5edb0b
layout: Let automatic_min_size() take a flex-relative cb size (#35642)
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>
2025-02-25 08:37:42 +00:00
Bi Fuguo
f3a8bf8ca2
Touch handler: Fix race condition and rate-limit move events (#35537)
* 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>
2025-02-25 07:13:16 +00:00
Yerkebulan Tulibergenov
31199076ec
refactor: add CanGc as argument to Promise::reject_native (#35640)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-02-25 03:58:36 +00:00
Samson
3c3b6cfdc4
chore: Update wgpu (#35639)
* Update wgpu

2f255edc60
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>
2025-02-24 20:27:36 +00:00
Simon Wülker
cdc33b398c
Don't tell stylo about stylesheets that are not in a browsing context (#35606)
* 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>
2025-02-24 20:04:18 +00:00
Simon Wülker
be6765447d
Update to rust 1.85 (#35628)
* 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>
2025-02-24 17:44:35 +00:00
Kingsley Yung
fc14b10099
Support for the isolation CSS property (#35552)
* 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>
2025-02-24 16:25:34 +00:00
Euclid Ye
d42146ce91
script: Fix typo in ScriptThread::process_pending_input_events (#35627)
Also remove an unused import.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-02-24 15:58:05 +00:00
Delan Azabani
fe509bb82f
libservo: Refactor ipc-channel default response logic (#35624)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-02-24 15:40:09 +00:00
Samson
e887e621f8
Do not assume OffscreenCanvasContext to be 2d (#35629)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-24 14:06:08 +00:00
Martin Robinson
6062995636
libservo: Move WebDriver messages to the embedder crate (#35602)
This is the first step toward moving the WebDriver implementation to
servoshell. This move will make it possible to start testing the
embedding API with WebDriver. See [this zulip thread][a] for more details.

While WebDriver will be able to use a lot of API commands to do what it
is doing now, there will still need to be some "cheat codes" for more
gnarly access to `ScriptThread` details. That's why we likely won't be
able to remove all WebDriver-specific messages from the API -- but maybe
they will be useful for embedders somehow.

A couple messages have to change as they depended on `script_traits`
types, particularly those that used `WindowSizeData` and `LoadData`. I
think this helps to encapsulate the WebDriver commands a bit more
though.

[a]: https://servo.zulipchat.com/#narrow/channel/437943-embedding/topic/webdriver.20as.20embedding.20api.20playgound

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-24 13:57:28 +00:00
Oriol Brufau
41c2422a66
layout: Ignore indefinite stretch on min and max sizing properties (#35630)
We were always treating an indefinite `stretch` as the automatic size.
This instead treats it as `0px` on min sizing properties, and as `none`
on max sizing properties, aligning with Blink and this recent CSSWG
resolution: https://github.com/w3c/csswg-drafts/issues/11006

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-24 13:51:08 +00:00