Commit graph

10510 commits

Author SHA1 Message Date
Andrei Volykhin
1f5087d773
imagebitmap: Make ImageBitmap serializable and transferable (#37101)
According to specification ImageBitmap objects are serializable objects
and transferable objects.

https://html.spec.whatwg.org/multipage/#the-imagebitmap-interface:imagebitmap-11

Testing:
 - html/canvas/element/manual/imagebitmap/*
 - html/infrastructure/safe-passing-of-structured-data/*
 - html/webappapis/structured-clone/*
 - workers/semantics/structured-clone/*

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-05-23 20:40:25 +00:00
Martin Robinson
cd36c35cf2
Enable all remaining disabled intermittent tests (#37094)
These were disabled long ago, but nowadays the intermittent filter can
ignore them when they flake. In addition, running them will allow us to
know if they are still intermittent or not since all intermittent
failures are tracked in GitHub via mentions on issues.

Testing: This is a change to test configuration.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-05-23 18:33:56 +00:00
TIN TUN AUNG
23ce7b31ac
Animation: update image active frame when update the rendering (#36286)
When no CSS animation exist, register timer for image animation, update
animated image active image frame as part of update_the_rendering, mark
node as dirty if the corresponding image need update. Added unit test to
test ImageAnimationState.

Part of https://github.com/servo/servo/issues/36057, the last step to
let the Animated Image "Move".

Testing: Introduced new WPT RefTest for animated image, but fail because
of https://github.com/servo/servo/issues/36931. New unit test for
`ImageAnimationState`.
Fixes: https://github.com/servo/servo/issues/22903
https://github.com/servo/servo/issues/36057

[Try](1472472966)

---------

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-05-23 03:13:35 +00:00
Martin Robinson
7f0cebd442
layout: Support wavy and double for text-decoration-line (#37079)
- Add support for `text-decoration-line: double`: Line drawing is done
similar to how it works in Firefox and Chromium. A gap of half of line
thickness is added between each line.
- Fix support for `text-decoration-line: wavy`: Wavy lines rectangles
were not calcualted properly, which meant they were rendered as solid
lines. Now the amplitude of the wave is 1.5 times line thickness.

Testing: A manual test is updated `tests/html/text_deco_simple.html`
to cover more cases. In general, rendering of text-decorations is
difficult
to test via reftesting.
Fixes #17887.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-05-22 17:42:50 +00:00
Sebastian C
cdf5fdd2b4
script: Refactor dom/headers to match spec better (#36943)
This includes removing an implementation of normalize for `ByteString`,
because it is effectively duplicated in net under
`trim_http_whitespace`. This is part of an attempt to cleanup and
centralize code for header parsing and manipulation.

Testing: Covered by existing WPT tests

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-05-21 19:07:32 +00:00
Martin Robinson
9781f1241a
layout: Move text decoration propagation to stacking context tree construction (#37069)
Text decorations have a special kind of propagation. Instead of
propating these during box tree construction, move propagation to
stacking context tree construction. This will allow for using a very
easy type of incremental layout when text decorations change. For
instance, when a link changes color during hovering over it, we can skip
all of box and fragment tree construction.

In addition, propagation works a bit better now and color and style
properly move down from their originating `Fragment`s.

This introduces three new failures, because now we are drawing the
text-decoration with the correct color in more places, which exposes an
issue we have with text-decorations not being drawn in relation to the
baseline (taking into account `vertical-align`).

Testing: There are tests for these changes.
Fixes #31736.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-05-21 16:38:29 +00:00
Andrei Volykhin
859a0ffbd5
htmlmediaelement: Make dirty element on any intrinsic size changes (#37056)
To properly compute (the video) element's content size for
layout requires to dirty the element on any intrinstic size changes.

Full list of the operations which cause layout invalidation:
- media metadata update (NEW)
- removing "src" attribute
- video frame update
- show poster image

Testing:
html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm
Fixes: https://github.com/servo/servo/issues/34434

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-05-21 11:18:24 +00:00
Oriol Brufau
3a527d784b
layout: Fix min-content inline size of multi-line row flex container (#37011)
`min_content_main_size_for_multiline_container` was initialized to an
outer size, but then it could be clamped by inner sizes.

This patch ensures that it's clamped by outer sizes, and refactors
`FlexItemBoxInlineContentSizesInfo`.

Testing: Covered by WPT
Fixes: #37008

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-21 06:57:50 +00:00
Taym Haddadi
5b2305784a
Stream implement pipeThrough (#36977)
Part of https://github.com/servo/servo/issues/34676

https://github.com/servo/servo/pull/36905 needs to be merged first.

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-05-20 14:33:22 +00:00
Vincent Ricard
6e97fc0bc4
Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321)
This changes includes two semi-related things:

1. Fixes some specification compliance issues when parsing mime
   types and charsets for `XMLHttpRequest`.
2. Implements a `<stylesheet>` parsing quirk involving mime types.

Testing: There are tests for these changes.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-05-19 11:38:01 +00:00
Servo WPT Sync
070a8cf937
Sync WPT with upstream (18-05-2025) (#37040)
Automated downstream sync of changes from upstream as of 18-05-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-05-18 01:43:27 +00:00
Tim van der Lippe
ed469fe72f
Propagate destination through load_data (#37020)
This way, we don't always set the destination to Document (which is as
the spec is written today). Instead, we set it it in the load_data,
depending on which context we load it from.

Doing so allows us to set the `Destination::IFrame` for navigations in
iframes, enabling all frame-related CSP checks.

While we currently block iframes when `frame-src` or `child-src` is set,
their respective tests don't pass yet. That's because we don't yet
handle the cases
where we fire the correct `load` event.

Also update one WPT test to correctly fail, rather than erroring. That's
because it was using the wrong JS test variable.

Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-05-17 08:22:11 +00:00
Josh Matthews
a028291466
Don't build testbinding-related code by default (#37034)
Disabling the TestBinding-related bindings and implementations saves 2mb
in a release build. Also, we lost the related test preferences when we
turned the layout-2020 tests on, so the tests have all been failing for
a long time.

Testing: Existing tests in CI.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-05-17 08:14:19 +00:00
Oriol Brufau
78f3f455dc
layout: Fix align-content on stretched row flex containers (#37024)
Fixes a regression from #36973, which didn't take into account that
stretching flex items affects their final block size when the cross axis
is the block axis.

Testing: Adding new test
Fixes: #37023

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-16 19:15:16 +00:00
Simon Wülker
b100a98e1d
Fully support <input type=color> (#36992)
This change adds a shadow-tree widget for `<input type=color>` elements.
It also involves some changes to the way layout interacts with the DOM,
because currently all `input` and `textarea` elements are rendered as
plain text and their descendants are ignored. This obviously doesn't
work for `<input type={color, date, range, etc}>`.


![image](https://github.com/user-attachments/assets/4f16c3b0-1f79-4095-b19d-1153f5853dd5)

<details><summary>HTML used for the screenshot above</summary>

```html
<input type=color>
```

</details>



Testing: I doubt that this affects WPT tests, because the appearance and
behaviour of the widget is almost entirely unspecified.

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-15 17:30:38 +00:00
Oriol Brufau
cd0dbb9afb
layout: Obey intrinsic min/max block sizes on flex containers (#36973)
Intrinsic sizing keywords weren't working correctly on the min and max
block sizes of a flex container, because we weren't setting the
`CacheableLayoutResult::content_block_size` to the right value. This
also ensures that `align-content` aligns within the final size of the
container.

Note it's not very clear what to do for single-line containers, they are
being discussed in https://github.com/w3c/csswg-drafts/issues/12123

Testing: Adding new WPT tests. There are still some failures, but most
subtests would fail without this change.
Fixes: #36981

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-15 07:57:07 +00:00
Tim van der Lippe
a24fce3ae7
Implement inner slot for cryptographic nonce (#36965)
Also update the `html/dom/reflection-metadata.html` test
to handle the case where `nonce` does not reflect back
to the attribute after an IDL change.

Part of https://github.com/servo/servo/issues/4577
Fixes https://github.com/web-platform-tests/wpt/issues/43286

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-14 10:21:21 +00:00
Steven Novaryo
a572bf1191
layout: Propagate specified info for flex item (#36993)
We should propagate specified info for flex items. This will prevent the
loss of it for boxes that have this info (e.g. table or grid).

Testing: Adding new WPT tests

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-05-13 21:10:40 +00:00
Tim van der Lippe
c985c08737
Implement iframe.srcdoc trusted type sink (#36960)
Part of https://github.com/servo/servo/issues/36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-13 21:07:13 +00:00
Andrei Volykhin
6468734aea
svg: Add mock SVGImageElement interface (#36975)
Add mock SVGImageElement interface to fix TIMEOUT WPT tests
which are related to ImageBitmap (html/canvas/*).
https://svgwg.org/svg2-draft/embedded.html#InterfaceSVGImageElement

Rationality of this change to fire event "error" on any attempt to fetch
image resource on href attribute change to not block WPT tests
execution.

Some WPT tests use the legacy namespace attribute "xlink:href", so
support for it was added to source code.
https://svgwg.org/svg2-draft/linking.html#XLinkHrefAttribute
 - setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:href', src);

Testing: Covered by existed WPT tests
 - fetch/metadata/generated/svg-image*
 - html/canvas/element/manual/*
 - html/dom/idlharness.https.html
 - html/semantics/embedded-content/the-canvas-element/*
 - html/webappapis/scripting/events/event-handler-all-global-events.html
 - mozilla/interfaces.https.html

Fixes: https://github.com/servo/servo/issues/35881

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-05-13 10:43:10 +00:00
Taym Haddadi
62569979ff
Make transform stream transferrable (#36905)
Part of https://github.com/servo/servo/issues/34676

#36739 needs to be merged first.

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-05-12 16:02:06 +00:00
Tim van der Lippe
d780fb7695
Implement trusted HTML sinks for Element (#36941)
Also implements a conversion for `TrustedHTMLOrNullIsEmptyString`
to `TrustedHTMLOrString` to avoid introducing a separate
`get_trusted_script_compliant_string` for the new type.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-12 10:53:03 +00:00
Martin Robinson
a0dd2c1beb
layout: Share styles to inline box children via SharedInlineStyles (#36896)
`TextRun`s use their parent style to render. Previously, these styles
were cloned and stored directly in the box tree `TextRun` and resulting
`TextFragment`s. This presents a problem for incremental layout.
Wrapping the style in another layer of shared ownership and mutability
will allow updating all `TextFragment`s during repaint-only incremental
layout by simply updating the box tree styles of the original text
parents.

This adds a new set of borrows when accessing text styles, but also
makes it so that during box tree block construction
`InlineFormattingContext`s are created lazily and now
`InlineFormattingContextBuilder::finish` consumes the builder, making
the API make a bit more sense. This should also improve performance of
box tree block construction slightly.

Testing: This should not change observable behavior and thus is covered
by existing WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-05-12 09:38:50 +00:00
Tim van der Lippe
b8fb985170
Fix integrity matching (#36963)
It was missing the ShA case in content-security-policy.

Part of #36437

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-11 17:10:09 +00:00
Simon Wülker
41283220dd
Update select shadow tree when contents of selected option change (#36958)
The label that is displayed inside a `<select>` element is that of the
selected option, or it's text contents if the option does not have a
label. Therefore, we need to update the `<select>` shadow tree when the
contents of the selected option change.

Testing: Covered by existing web platform tests
Fixes https://github.com/servo/servo/issues/36926
Fixes https://github.com/servo/servo/issues/36925

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-11 16:21:56 +00:00
Tim van der Lippe
fec6778eaa
Fix hash algorithm case-insensitiveness (#36962)
Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-11 15:59:43 +00:00
Tim van der Lippe
4821bc0ab0
Implement is-element-nonceable (#36961)
Unfortunately while it now passes almost all cases in
`tests/wpt/tests/content-security-policy/script-src/nonce-enforce-blocked.html`,
the test in question doesn't pass yet as it requires all cases to be
correct. Here, we still miss the "check for duplicate attributes during
parsing". Since we don't have this information available yet from the
parser, skip this for now.

Part of #36437

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-11 15:38:13 +00:00
Simon Wülker
dc0e7587bf
Don't attempt to resize Offscreencanvas without a rendering context (#36855)
When the canvas context mode is a placeholder then we shouldn't resize
the context.

Testing: Includes a new test
Fixes: https://github.com/servo/servo/issues/36846

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-11 15:27:33 +00:00
Servo WPT Sync
6cd44061d7
Sync WPT with upstream (11-05-2025) (#36954)
Automated downstream sync of changes from upstream as of 11-05-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-05-11 01:41:53 +00:00
Keith Yeung
da1c49299b
Update the list of global and window event handlers (#36894)
There's an expanded list of event handlers content attributes that need
to be forwarded to the corresponding window of the body element, and
this PR adds the remaining ones. The full list can be seen in [this
link](https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers-on-elements%2C-document-objects%2C-and-window-objects%3Aevent-handlers-6).

Testing: Covered by various WPT tests

---------

Signed-off-by: Keith Yeung <kungfukeith11@gmail.com>
2025-05-10 15:54:13 +00:00
Tim van der Lippe
d0de4e64d2
Add CSP check for inline style attribute (#36923)
To be able to abort the update, extract the functionality into a
separate method. Otherwise, we don't run the `node.rev_version` at the
end, which according to the comment is probably important.

Not all `style-src` tests pass and I don't fully understand why yet, but
I presume it has to do with some special quirks of stylesheets that
other CSP checks don't have. All `style-src-attr-elem` tests pass
though.

Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-09 17:36:55 +00:00
Taym Haddadi
e5347eceac
WebIDL Fix ImageData constructor to take a Uint8ClampedArray instead of js_object (#31398)
<!-- Please describe your changes on the following line: -->

Fix ImageData constructor to take a Uint8ClampedArray instead of
js_object

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #31320

<!-- Either: -->
- [x] These changes do not require tests because there is not behavior
change.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-05-09 11:05:56 +00:00
Martin Robinson
53be79a5b5
layout: Resolve canvas background properties during painting (#36917)
Instead of resolving the canvas background properties (essentially
keeping a possible reference to the `<body>`'s style) during fragment
tree construction, wait until painting to possibly find the style on an
appropriate `<body>` fragment. This is possible now because `Fragment`
keeps a list of flags with relevant information about the root and
`<body>` elements.

A benefit of this approach is that styles aren't cached in the fragment
tree, which would be problematic for incremental layout. In addition,
the old code was making an effort to transform the `<body>`'s background
by the root element's transform. Only Safari does this and there was
a resolution the WG that this should not happen in
https://github.com/w3c/csswg-drafts/issues/6683.

Testing:
 - `/css/css-transforms/transform-translate-background-001.html`
 - `/css/css-transforms/transform-translate-background-002.html`
 - `/css/CSS2/floats/float-root.html`
 
Fixes: #30475.
Closes: #30569.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-05-09 10:36:53 +00:00
Euclid Ye
f58b0c6ad4
rework webdriver deserialization to avoid false-positive cycle error (#36908)
1. Avoid false-positive cycle error when deserilizing
 - Only detect cycle for Objects
  - Remove last element of seen when success
2. Cite spec

Testing: `./mach test-wpt --product servodriver -r
tests\wpt\tests\webdriver\tests\classic\element_click\events.py`
Fixes: #36890 
cc @jdm @xiaochengh

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-05-08 13:54:58 +00:00
Tim van der Lippe
b6b80d4f6f
Correct event_target for CSP violations (#36887)
All logic is implemented in `report_csp_violations` to avoid
pulling in various element-logic into SecurityManager.

Update the `icon-blocked.sub.html` WPT test to ensure that
the document is the correct target (verified in Firefox and Chrome).

Fixes #36806

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-08 10:46:31 +00:00
Taym Haddadi
f3f4cc5500
Script implement TransformStream and TransformStreamDefaultController (#36739)
Part of https://github.com/servo/servo/issues/34676

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym <haddadi.taym@gmail.com>
Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-05-08 08:45:57 +00:00
Andrei Volykhin
bc9f55bcc9
pixels: Actually write pixels in MULTIPLY generic_transform_inplace operations (#36895)
Multiply operations applied in `generic_transform_inplace` were
calculating the new pixel values, but not actually writing them.
This changes fixes that issue.

Testing: /webgl/tests/conformance/context/premultiplyalpha-test.html
Fixes: #35759

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-05-08 07:38:02 +00:00
Gae24
5b913441d4
async clipboard: implement readText (#36689)
part of #36084
Testing: Only idl harness tests will pass for now

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-05-07 15:11:37 +00:00
Simon Wülker
23c327a988
script: Serialize a custom element's "is" value as an attribute (#36888)
Testing: Covered by web platform tests

[try
run](1486889324)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-07 10:29:14 +00:00
Kenzie Raditya Tirtarahardja
eaf9224799
Implement wheel action in webdriver (#36744)
https://w3c.github.io/webdriver/#wheel-actions

Test:
`tests/wpt/tests/webdriver/tests/classic/perform_actions/wheel.py::{test_null_response_value,test_params_actions_origin_outside_viewport[element],test_params_actions_origin_outside_viewport[viewport]},
tests/wpt/tests/webdriver/tests/classic/perform_actions/perform.py`
Fixes: https://github.com/servo/servo/issues/36720

cc: @xiaochengh @longvatrong111 @yezhizhen

Signed-off-by: PotatoCP <kenzieradityatirtarahardja.18@gmail.com>
Co-authored-by: PotatoCP <kenzieradityatirtarahardja.18@gmail.com>
2025-05-07 08:41:34 +00:00
Josh Matthews
f47e69c112
Improve some webdriver conformance tests results (#36673)
These changes allow test_dom_token_list from
/execute_script/collections.py to pass, and various tests in
/execute_script/arguments.py to expose new failures.

Testing: Not run in CI yet, but verified results from
tests/wpt/tests/webdriver/tests/classic/{execute_script,execute_async_script}
locally.
Fixes: #35738

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-05-07 07:22:29 +00:00
Tim van der Lippe
e9f364ef51
Implement inline CSP check for style element (#36860)
Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-06 18:52:27 +00:00
Josh Matthews
bbfa283518
Remove service worker pref from experimental web features. (#36867)
Most sites that feature detect Service Workers in Servo immediately
break when this pref is enabled, since our implementation is very
incomplete. This provides a poor user experience when recommending the
`--enable-experimental-web-platform-features` flag.

Testing: Existing test coverage should be unchanged.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-05-06 17:25:16 +00:00
Simon Wülker
51b95a6246
Serialize attribute nodes as the empty string (#36875)
The existing code asserts that attribute nodes are never serialized.
This is wrong, because you can pass an attribute node to
`XMLSerializer::serializeToString`. Instead, the spec mandates that
these are serialized as empty strings
(https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization-algorithm).

Testing: Includes a new web platform test
Fixes: https://github.com/servo/servo/issues/36872

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-06 12:26:15 +00:00
Simon Wülker
03abec4148
Replace urlpattern implementation with rust-urlpattern crate (#36826)
This change implements the full URLPattern API using
https://github.com/denoland/rust-urlpattern, except the two most
important functions (`test` and `exec`). These two are blocked on
https://github.com/servo/servo/issues/28679 due to this union:
539ca27284/components/script_bindings/webidls/URLPattern.webidl (L61).

Testing: Covered by existing web platform tests
Makes https://github.com/servo/servo/pull/36421 obsolete

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-06 09:42:55 +00:00
Simon Wülker
54c2818974
Don't slice a sliced blob (#36866)
When slicing a blob that is already sliced we should reference it's
parent's data instead of creating a subview into the sliced blob. This
keeps the blob ancestry chain small and reduces the number of blobs that
we have to resolve.

Testing: Includes a new crashtest
Fixes: https://github.com/servo/servo/issues/36843

[try
run](1484487366)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-06 07:25:11 +00:00
Oriol Brufau
2fa96cf961
Upgrade Stylo to 2025-05-01 (#36835)
This continues #35990

Changelog:
- Upstream:
4558df359b...ca369cbc83
- Servo fixups:
2bc1e5183b...7edd19e2f0

Stylo tracking issue: https://github.com/servo/stylo/issues/178

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-05 14:08:49 +00:00
Jimmy D. Buckets
1f6050f931
Implement document.scrollingElement (#35994)
<!-- Please describe your changes on the following line: -->
This implements `document.scrollingElement`
(https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #35700
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

---------

Signed-off-by: JimmyDdotEXE <50691404+JimmyDdotEXE@users.noreply.github.com>
2025-05-05 12:50:42 +00:00
Taym Haddadi
7ea5951e34
Avoid borrow panic when Path2D.addPath is called with self (#36847)
Fixes: #36842

Signed-off-by: Taym <haddadi.taym@gmail.com>
2025-05-05 12:10:33 +00:00
Keith Yeung
3936b1d22b
script: Ensure EventSource interprets non-200 response codes as failure (#36853)
Spec has updated so that all responses that aren't 200 shall fail the
event source connection.

Testing: Covered by
`tests/wpt/tests/eventsource/request-status-error.window.js`

---------

Signed-off-by: Keith Yeung <kungfukeith11@gmail.com>
2025-05-05 12:04:46 +00:00