Commit graph

27804 commits

Author SHA1 Message Date
Josh Matthews
c94ac5bccb
Move various reflector types and traits to script_bindings (#35279)
* script: Move Reflector to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-04 06:58:08 +00:00
DK Liao
4461380792
chore: Rename CompositeTarget enum (#35263)
* chore: Rename CompositeTarget enum

Signed-off-by: DK Liao <dklassic@gmail.com>

sync name in other documents

Signed-off-by: DK Liao <dklassic@gmail.com>

sync more name in other documents

Signed-off-by: DK Liao <dklassic@gmail.com>

* Fix Android/ohos

Signed-off-by: DK Liao <dklassic@gmail.com>

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-02-04 04:38:11 +00:00
arthmis
24ead9c3a9
Update implementations of HTTP-network fetch and HTTP-network-or-cache fetch to take fetchParams as an argument (#35205)
* change http-network-or-cache-fetch to take FetchParams argument instead of request

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* change http-network-fetch to take fetchParams as an argument

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* run formatter

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* renaming variable to be similar to step in spec

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* refixing usage of http_request after rebasing

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

---------

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
2025-02-04 02:23:42 +00:00
Martin Robinson
fdfaf7b15c
libservo: Combine LoadStart, HeadParsed, and LoadComplete` messages (#35260)
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>
2025-02-03 22:31:17 +00:00
Oriol Brufau
27c40fcd29
layout: Don't let table grid boxes inherit display: inline-table (#35264)
The outer display type of a table element applies to the table wrapper
box. The table grid box needs to be block-level as defined in
https://drafts.csswg.org/css-tables/#table-grid-box

Therefore this sets `display: table` on table grid boxes, and then when
painting collapsed table borders we can use the usual logic to compute
the StackingContextSection.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-03 17:11:49 +00:00
Oriol Brufau
7301af8468
layout: Fix painting order of collapsed table borders (#35219)
In #35075 I painted them in front of the decorations (backgrounds and
borders) of any block-level box in the same stacking context. I did that
because other browsers paint them in front of the decorations of the
descendants of the table, but my approach also painted them in front of
decorations of following siblings of the table, which was wrong.

This patch makes it so that collapsed table orders are painted in the
same step as decorations. However, tables defer painting their collapsed
borders after the decorations of their descendants.

This matches Blink and WebKit, and brings us closer to Gecko (which is
slightly different in some corner cases).

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-03 14:46:40 +00:00
TIN TUN AUNG
2030b7affd
layout: align-content with default value normal should behave as strech in flex container (#35178)
Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-02-03 08:27:55 +00:00
Simon Wülker
6a2e37183c
Lay out the contents of slot elements (#35220)
* Make Slottable match layout/alignment of NonNull<Node>

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement ServoLayoutElement::slotted_nodes

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Bump mozjs

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Layout the contents of slot elements

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement ServoLayoutElement::assigned_slot

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* implement ServoLayoutElement::traversal_parent

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Simplify slottable name update

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Don't iterate over children of shadow hosts

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Recompute slot style when contents change

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Change match_slottable to a function instead of a macro

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix crown errors

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reset a slottable's assigned slot when it's removed from the slot

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-02 20:49:42 +00:00
shanehandley
938baf6bf3
script: Implement the Bytes() method on Request and Response (#35250)
* Implement the Bytes() method on Request and Response

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* avoid unsafe code during buffer creation

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2025-02-02 07:49:48 +00:00
Shalvin
ec6c4bc8fd
Consolidated opts into a manual Default trait implementation (#35257)
Signed-off-by: Shalvin Deo <shalvin.deo@live.com>
2025-02-01 20:18:09 +00:00
Josh Matthews
cdd6660113
libservo: Make background hang monitor integration optional. (#35256)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-01 20:15:39 +00:00
webbeef
c4f4d5cc04
Only consider fully active documents when running the 'update the rendering' steps (#35245)
This is specified in https://html.spec.whatwg.org/multipage/#update-the-rendering step 3.2 but we where not filtering out inactive documents.

Signed-off-by: webbeef <me@webbeef.org>
2025-02-01 18:10:20 +00:00
Roberto Huertas
8999b539df
chore(servo): simplify servo example (#35253)
Removes the `Arc<Mutex<T>>` usage in `winit_minimal` given that `EventLoopProxy` has `Send` and `Sync` traits.

re #35252

Signed-off-by: Roberto Huertas <roberto.huertas@outlook.com>
2025-02-01 14:03:54 +00:00
Oriol Brufau
3122de08f3
Let resolve_color() take its parameter by reference (#35247)
Bumps Stylo to https://github.com/servo/stylo/pull/116

This way the callers don't have to clone it if they don't have ownership
or want to use the value later.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-31 23:34:40 +00:00
Martin Robinson
5466c27f6f
Finish the integration of webxr into the Cargo workspace (#35229)
- Run `cargo fmt` on `webxr` and `webxr-api`
- Fix clippy warnings in the existing `webxr` code
- Integrate the new crates into the workspace
- Expose `webxr` via the libservo API rather than requiring embedders to
  depend on it explicitly.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-31 16:41:57 +00:00
Samson
35835af857
webgpu: implement get image for webgpu canvas (#35237)
* Implement `get_image_data` for WebGPU canvas

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Add docs

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-01-31 15:24:33 +00:00
webbeef
42b581a6f6
Fix crash in screenX and screenY getters returning negative values (#35235)
Instead of casting the window client rect to `u32`, keep it as `i32` and just cast the size dimensions to `u32`.

Signed-off-by: webbeef <me@webbeef.org>
2025-01-31 08:17:39 +00:00
Martin Robinson
ad07db0b0c
script_traits: Rename ConstellationControlMsg to ScriptThreadMessage (#35226)
At some point in the past this message was only sent from the
`Constellation` to `script`, but nowadays this is sent from various
parts of servo to the `ScriptThread`, so this is a better name. In
particular, the current name makes it seeem like this message controls
the `Constellation`, which it does not.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-30 22:46:17 +00:00
Martin Robinson
1aae7a441f
libservo: Move Android MediaSessionAction conversion to servoshell (#35225)
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>
2025-01-30 19:44:13 +00:00
Jonathan Schwender
764feada30
Use aws-lc-rs as rust-tls provider (#35106)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-01-30 19:10:49 +00:00
Martin Robinson
534e78db53
Merge webxr repository (#35228)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-30 19:07:35 +00:00
Simon Wülker
64b40ea700
Don't fire slotchange events when there's already a pending event for the same slot (#35222)
* Don't fire slotchange events if there is already a pending event for the same slot

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-01-30 13:57:04 +00:00
Delan Azabani
5e9de2cb61
Include WebViewId into EmbedderMsg variants where possible (#35211)
`EmbedderMsg` was previously paired with an implicit
`Option<WebViewId>`, even though almost all variants were either always
`Some` or always `None`, depending on whether there was a `WebView
involved.

This patch adds the `WebViewId` to as many `EmbedderMsg` variants as
possible, so we can call their associated `WebView` delegate methods
without needing to check and unwrap the `Option`. In many cases, this
required more changes to plumb through the `WebViewId`.

Notably, all `Request`s now explicitly need a `WebView` or not, in order
to ensure that it is passed when appropriate.

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-01-30 11:15:35 +00:00
Martin Robinson
9eeb602f7a
compositor: Remove some unused messages to the compositor (#35223)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-30 09:21:23 +00:00
Simon Wülker
1ad45a776a
Potentially signal a slot change in Node::insert (#35221)
* Potentially signal a slot change in Node::insert

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-01-30 08:47:21 +00:00
Oriol Brufau
bc7cdab46f
layout: Remove wrong optimization when placing table among floats (#35207)
When we try to place a table next to some floats, and it doesn't fit
vertically, then we try again considering more floats. And as an
optimization we were using the previous width of the table as a minimum.
However, this was wrong, because the table might accept a smaller width
when the available space is smaller than beforehand.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-29 15:54:52 +00:00
Jonathan Schwender
53fcc98585
ohos: Support resizing the surface (#35158)
A window resize requires to also resize the webview,
otherwise it will stay at the original size.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-01-29 15:45:17 +00:00
Simon Wülker
f6d1b30e97
Use "slot" attribute for slottable name (#35191)
* Implement Element::slot attribute

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Simplify slottable name update

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-01-29 12:50:03 +00:00
Martin Robinson
c633ca1cde
servoshell: Port Android / OHOS servoshell to use the WebView API (#35192)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-29 11:09:10 +00:00
Josh Matthews
a6218b42ea
bindings: Move string-related bindings code to script_bindings. (#35172)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-29 07:40:25 +00:00
Simon Wülker
1188d2b2e7
Never compute style for children of shadow hosts (#35198)
There is some interesting history to this change:

* https://github.com/servo/servo/issues/33495: Servo crashes on
  Cloudflare's turnstile, because we didn't compute style for
  elements inside shadow trees
* https://github.com/servo/servo/pull/34298: Resolves the issue
  by computing style for children of a potential shadow root,
  in addition to the children of an element
* https://github.com/servo/servo/pull/34701: Changes layout
  of elements with shadow roots such that only the contents
  of the shadow root are laid out

Now, we compute style for both the children of the element
and a potential shadow root, but only lay out the contents
of the shadow tree (if there is one).

This behaviour is not technically incorrect,
since regular children are not included in layout
their style doesn't matter. However, it is
inefficient: the only case where we need to compute
style for a child of a shadow host is when
that child is an assigned slottable in a slot
somewhere else.

This part 1/n of upstreaming the changes necessary
to lay out `<slot>` contents. Note that trying to compute
style for `<slot>` contents *and* children of shadow hosts
will crash in stylo, since it expects to see each
element only once.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-01-28 21:04:32 +00:00
Martin Robinson
9dbc942bee
libservo: Port desktop servoshell to use the new WebView API (#35183)
This removes all uses of `EmbedderEvent` in the desktop servoshell to
use the new `WebView` API -- filling it out when necessary.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Delan Azabani <dazabani@igalia.com>
2025-01-28 14:57:57 +00:00
Martin Robinson
a1cf0cbf86
libservo: Stop using script_traits in the embedding layer (#35185)
Many types used directly in the `libservo` API are in the
`script_traits` crate, which was created to break circular dependencies.
Move all API exposed types to `embedder_traits` which now contains types
exposed via the `libservo` embedding API. Also expose these at the root
of the `libservo` `servo` crate so that the API won't break when they
move around in the future.

The idea with `embedder_traits` in the future is that it contains types
that are available throughout servo because they are used in the
embedding API and thus should have minimal dependencies on other Servo
crates (a bit like `base`).

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-28 11:15:36 +00:00
Oriol Brufau
7977357a57
layout: Zero out collapsed track sizes when painting collapsed borders (#35165)
We were painting collapsed borders without taking into account that some
tracks might have been "removed" by `visibility: collapse`.

This just sets the sizes of these tracks to zero. Note this implies that
collapsed borders may overlap each other, or overlap cell contents, but
this seems to match Blink.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 20:40:26 +00:00
Oriol Brufau
38847d4991
layout: Correctly resolve currentcolor on collapsed borders (#35163)
If a collapsed border has the `currentcolor` color, we were resolving it
using the color of the table. Now we resolve it using the color of the
box which owns the border that wins and becomes the collapsed border.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 19:58:18 +00:00
Taym Haddadi
9943e97726
Script: implement ReadableStreamBYOBReader::Read (#35040)
* Script: implement ReadableStreamBYOBReader::Read

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix ReadRequest::close_steps

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix clippy

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* implement viewed_buffer_array_byte_length and byte_length

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix clippy

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Correct BufferSource implemntation

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Correct detach_buffer implemantation

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix JS_IsArrayBufferViewObject usage

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Reduce BufferSource to two variants ArrayBuffer and ArrayBufferView

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Add more doc and use promise.reject_error

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-01-27 15:52:54 +00:00
Simon Wülker
177b5b2cef
Propagate events from slottables to their assigned slot instead of their parent (#35177)
* Propagate events from slottables to their assigned slot instead of their parent

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-01-27 15:48:24 +00:00
Martin Robinson
6b04bc6263
layout: Take percentage columns into account when sizing table grid min and max (#35167)
The specification doesn't say how to deal with percentages when
determining the minimum and maximum size of a table grid, so follow the
approach that Chromium uses.

Essentially, figure out the "missing" percentage from the non-percentage
columns and then use that to work backwards to fine the size of the
percentage ones.

This change is larger than one might expect, because this percentage
approach shouldn't happen for tables that are descendants of a flex,
grid or table container (except when there is an interceding absolute).
We have to pass this information down when building the box tree. This
will also make it easier to improve propagated text decorations in the
future.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 15:04:37 +00:00
Oriol Brufau
d5fcc5a5d5
layout: Improve fixed table layout (#35170)
If `width` is indefinite, treat the outer size as zero, instead of
treating the content size as zero and then adding padding and borders.

Also, we don't want a default minimum of zero to get added padding and
borders, and then defeat the point baove. So just ignore minimums and
maximums.

That seems to roughly match what other browsers do, but as usual, the
details are not interoperable, e.g. some browsers may obey min or max
sizing properties in some cases.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 15:02:32 +00:00
Simon Wülker
859cc6ab9b
Fire slot change events when the slot content changes (#35137)
* Add the onslotchange attribute to ShadowRoot

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add spec comments to MutationObserver::queue_mutation_observer_microtask

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add DomRefCell::take

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add spec comments to notify_mutation_observers

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fire slotchange events when a slot changes

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* ./mach fmt

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix check for when to dispatch slot events

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Potentially fire slot change events in Node::remove

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* ./mach fmt

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Bump stylo

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Move "signal a slot change" into ScriptThread impl

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-01-27 14:13:22 +00:00
shanehandley
cd93841ba1
Remove UTF-8 BOM before parsing JSON (#35175)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2025-01-27 12:18:03 +00:00
Martin Robinson
37695c8c8c
script: Do not set up an IPC route for every image load (#35041)
Instead of setting up a route for every image load in the DOM / Layout,
route all incoming image cache responses through the `ScriptThread`.
This avoids creating a set of file descriptor for every image that is
loaded.

This change requires having the `ImageCache` track the `PipelineId` of
the original the listener so that the `ScriptThread` can route it
properly to the correct `Window`.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-25 09:39:04 +00:00
Delan Azabani
2ce7709b8b
libservo: Add an initial WebView data structure to the API (#35119)
This patch introduces a new handle-based webview API to libservo, with
two main design goals:

1. The lifetime of the handles controls the lifetime of the webview,
   giving the embedder full control over exactly when webviews are
   created and destroyed. This is consistent with how WebKitGTK’s
   WebView works; the engine can only create webviews via a create
   request, and can only destroy them via a close request.
2. All methods are infallible; if the constellation dies, the embedder
   finds out when calling Servo::handle_events.

For the moment, the embedder is only responsible for creating the
WebView id, and not the internal TopLevelBrowsingContext data
structures. This is so that the ScriptThread is able to get a handle on
the new WebView's WindowProxy in the case that it's an auxiliary
browsing context. In the future, the embedder should also be responsible
for creating the TopLevelBrowsingContext and the ScriptThread should
have mechanism to associate the two views so that WebView creation is
always executed through the same code path in the embedding layer. For
now, it's enough that the embedder can get a handle to the new WebView
when it's creation is requested.

Once we replace EmbedderMsg with a webview delegate trait, we will pass
WebView handles to the embedder, rather than webview ids. We’ll also add
detailed docs, once the design settles.

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-01-25 08:17:50 +00:00
Josh Matthews
d5d7b0d34f
Make generated bindings generic over DOM types (#35169)
* bindings: Start making generated bindings methods generic over DOM trait.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* bindings: Make binding initialization generic over the DOM types trait.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* bindings: Start making proxyhandler code generic over DOM types.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-25 05:08:49 +00:00
webbeef
8748071329
Add support for HTMLStyleElement.media (#35148)
Signed-off-by: webbeef <me@webbeef.org>
2025-01-25 04:34:58 +00:00
Domenico Rizzo
fe5a075766
[35131] Borrow hazard in Document::broadcast_active_resize_observations (#35168)
* removed panic status: added cloned and collect

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

* applied fmt

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

---------

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
2025-01-25 00:42:13 +00:00
Taym Haddadi
81b09790cd
Use Dom in native promise handlers instead of Trusted (#35145)
* Use Dom in native promise handlers instead of Trusted

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

* Remove #[cfg_attr(crown, allow(crown::unrooted_must_root))]

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-01-25 00:16:00 +00:00
Josh Matthews
af8d7c2de7
script: Move code generation and webidl files to new script_bindings crate. (#35157)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-24 20:47:43 +00:00
Domenico Rizzo
fc1a093976
[#34767] - Range header is missing from CORS header safelist (#35138)
* implemented main feauter, created tests, and modified ini

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

* corrected tidyness

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

* Modified general.any.js.ini file

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

* Removed PASSed tests from ini files

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>

---------

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
2025-01-24 17:31:27 +00:00
Oriol Brufau
fea8b68860
layout: Remove min and max container sizes from FlexContext (#35144)
Thanks to #34946 we don't have to recompute the min and max sizes, we
can get them from the `ContainingBlock`.

And then in `FlexContext` there is no need to store both the definite
and the min & max sizes of the container`, we can instead make do with
a single `FlexRelativeVec2<SizeConstraint>`.

This removes 1 of the 3 usages of `ContentBoxSizesAndPBMDeprecated`,
which is also good.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-24 16:11:23 +00:00