Commit graph

5 commits

Author SHA1 Message Date
Euclid Ye
58425f6ae2
Replace all sort with unstable sort (#38427)
["When applicable, unstable sorting is preferred because it is generally
faster than stable sorting and it doesn’t allocate auxiliary
memory."](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.sort)

Binary also reduced by 1KB in Release.

Testing: No behaviour change as semantically all current usage does not
have any pair with `std::cmp::Ordering::Equal`.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-08-02 12:41:03 +00:00
Kenzie Raditya Tirtarahardja
c836ed374c
Suppress warning in webview unit test (#38398)
`webview.focus` return `Result<(),()>`, hence it gives warning if the
result is not handled.

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-08-01 05:42:16 +00:00
Josh Matthews
be38bd4636
servo: Track async webview focus operations (#38243)
https://github.com/servo/servo/pull/38160 added a webdriver-specific API
to support waiting on focus operations to complete. These changes
replace that with a generalized pattern, where a unique ID is created
for each focus operation and the embedder can receive notifications
about each focus operation when it is complete, regardless of whether
the focus was actually changed.

Testing: Existing test coverage from
https://github.com/servo/servo/pull/38160/ is unchanged.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-07-24 06:01:11 +00:00
Josh Matthews
7b16ae26b4
Reduce indexing boilerplate for serializable/transferrable objects. (#36624)
Rather than creating unique types for each pipeline-namespaced index
type (eg. MessagePortId, DomExceptionId, etc.), we can create a generic
common type that uses a marker to prevent type confusion. This change
allows us to reduce the boilerplate code required when implementing
serializable/transferable interfaces, since the structured clone
implementation can rely on the common type.

Testing: Existing WPT tests for serialization and transferring provide
coverage.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-22 02:02:02 +00:00
Shubham Gupta
df9efde1c3
Separate WebviewManager from Webview in compositor and constellation (#36302)
Create a separate file for `WebviewManager` to improve clarity.

Testing: This change is just a refactor, so no new tests are needed.

Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
2025-04-04 07:34:19 +00:00
Renamed from components/constellation/webview.rs (Browse further)