aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement `URLPattern::{text, exec}` (#37044)Simon Wülker2025-05-241-38/+144
| | | | | | | | | | | | With this change the URLPattern API is fully implemented. I'll look into the remaining failures and then enable the preference by default. Testing: Covered by web platform tests Depends on https://github.com/servo/servo/pull/37042 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Add support for polygons in `HtmlAreaElement::hit_test` (#37064)Ashwin Naren2025-05-241-2/+24
| | | | | | | | | | Uses raycasting to determine whether point is in polygon Testing: Added unittest Fixes: None to my knowledge --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* ImageBitmap::new returns without Fallible (#37114)Kingsley Yung2025-05-242-11/+6
| | | | | | | | | | | ImageBitmap::new always returns Ok. Simplify it by changing to return DomRoot<ImageBitmap> directly. The #[allow(dead_code)] seems unnecessary. This patch also removes it. Testing: No test is needed. Fixes: #37105 Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* imagebitmap: Make ImageBitmap serializable and transferable (#37101)Andrei Volykhin2025-05-232-5/+150
| | | | | | | | | | | | | | 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>
* Removing unused dependencies in crates. (#37096)Narfinger2025-05-231-1/+0
| | | | | | | | Removed unused dependencies in various crates using cargo-machete, grep and cargo-udeps. Testing: The CI tests if any dependencies were used that are removed. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
* Animation: update image active frame when update the rendering (#36286)TIN TUN AUNG2025-05-235-2/+151
| | | | | | | | | | | | | | | | | | | | | 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](https://github.com/rayguo17/servo/actions/runs/14724729664) --------- Signed-off-by: rayguo17 <rayguo17@gmail.com>
* Return the proper texture format for GetPreferredCanvasFormat (#37073)Ashwin Naren2025-05-211-2/+6
| | | | | | | | | This follows firefox's implementation: https://github.com/mozilla-firefox/firefox/blob/24d49101ce17b78c3ba1217d00297fe2891be6b3/dom/webgpu/Instance.h#L68 It changes the default on most systems to `Bgra8Unorm` but leaves it as `Rgba8Unorm` on android. Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
* script: Refactor dom/headers to match spec better (#36943)Sebastian C2025-05-212-138/+121
| | | | | | | | | | 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>
* layout: When there is no restyle damage, do not re-layout (#37048)Martin Robinson2025-05-214-3/+39
| | | | | | | | | | | | | | | When the computed restyle damage is empty, do not do a layout. Instead, just rebuild the display list. In the future, even that can be omitted, but that requires changes to the compositor. These kind of relayouts commonly happen when the cursor is moving around the page and no style rules cause changes to :hover. Testing: This is covered existing WPT tests and should only have performance impacts. Unfortunately there are currently no performance tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* htmlmediaelement: Make dirty element on any intrinsic size changes (#37056)Andrei Volykhin2025-05-211-3/+1
| | | | | | | | | | | | | | | | 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>
* Synchronize `dispatch_actions` in WebDriver (#36932)batu_hoang2025-05-211-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement missing synchronization in `dispatch_actions` of `WebDriver`. https://w3c.github.io/webdriver/#dispatching-actions > The user agent event loop has spun enough times to process the DOM events generated by the last invocation of the >[dispatch tick actions](https://w3c.github.io/webdriver/#dfn-dispatch-tick-actions) steps. - Add a way for `ScriptThread` to notify `WebDriver` about the completion of input commands. - Add a `webdriver_id` field for `InputEvent`. `ScriptThread` uses it to distinguish WebDriver events and sends notification. Tests: `./mach test-wpt --product servodriver -r tests\wpt\tests\webdriver\tests\classic\element_click\events.py` pass if `hit_testing` pass. Check [issue](https://github.com/servo/servo/issues/36676#issuecomment-2882917136) cc: @xiaochengh --------- Signed-off-by: batu_hoang <longvatrong111@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Coalesce animated image frame data into a single shared memory region (#37058)Simon Wülker2025-05-202-3/+4
| | | | | | | | | | | | | | | | | This makes servo use less file descriptors for animated images and avoids the crash described in https://github.com/servo/servo/issues/36792. Doing this also forces the end users to be more explicit about whether they want to deal with all image frames or just the first one. Previously, `Image::bytes` silently returned only the data for the first frame. With this change there's now a `frames` method which returns an iterator over all frames in the image. Testing: No tests - this simply reduces the number of fds used. Servo doesn't currently display animated gifs anyways. Fixes: https://github.com/servo/servo/issues/36792 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Stream implement pipeThrough (#36977)Taym Haddadi2025-05-203-48/+110
| | | | | | | | | 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>
* script: Make `Blob.ArrayBuffer()` more specification-compliant (#35748)Kousuke Takaki2025-05-191-28/+43
| | | | | | | | | I have modified the Blob.ArrayBuffer implementation to comply with the specification part of #25209. See also: #35151. Testing: This does not seem to affect tested behavior, so no new tests. Signed-off-by: yoseio <98276492+yoseio@users.noreply.github.com>
* Use spec compliant content-type extraction in more places and enable a ↵Vincent Ricard2025-05-193-144/+98
| | | | | | | | | | | | | | `<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>
* Remove `ref_filter_map` dependency (#36857)Kingsley Yung2025-05-186-13/+12
| | | | | | | | | | | | Instead, use the `filter_map` functions of `std::cell::Ref` and `accountable_refcell::Ref`, which provide the same functionality as `ref_filter_map`. Testing: Refactoring for removing dependency. No extra test is needed. Fixes: #36851 --------- Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* Propagate destination through load_data (#37020)Tim van der Lippe2025-05-172-6/+7
| | | | | | | | | | | | | | | | | | | | | 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>
* Don't build testbinding-related code by default (#37034)Josh Matthews2025-05-175-0/+23
| | | | | | | | | | | | 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>
* Fully support `<input type=color>` (#36992)Simon Wülker2025-05-154-55/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Implement inner slot for cryptographic nonce (#36965)Tim van der Lippe2025-05-147-19/+125
| | | | | | | | | | 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>
* Implement iframe.srcdoc trusted type sink (#36960)Tim van der Lippe2025-05-132-2/+33
| | | | | | | 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>
* libservo: Allow embedders to execute JavaScript scripts via the API (#35720)Narfinger2025-05-132-3/+55
| | | | | | | | | | | | | | | | | | | This change adds a new `WebView` API `evaluate_javascript()`, which allows embedders to execute JavaScript code and wait for a reply asynchronously. Ongoing script execution is tracked by a libservo `JavaScriptEvaluator` struct, which maps an id to the callback passed to the `evaluate_javascript()` method. The id is used to track the script and its execution through the other parts of Servo. Testing: This changes includes `WebView` unit tests. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* svg: Add mock SVGImageElement interface (#36975)Andrei Volykhin2025-05-138-7/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* layout: Add a repaint-only incremental layout mode (#36978)Martin Robinson2025-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the simplest kind of incremental layout. When Servo detects that all style changes only require a repaint, only run stacking context tree and WebRender display list generation. This means that these kind of restyles do not need a re-layout. Instead, the existing box and fragment trees will be used and the styles of damaged nodes will be updated in their box and fragment tree nodes. This requires a new style repair DOM traversal for nodes that have had their style damaged. In addition, careful accounting of all the places where we store style must happen in order ot update those styles. Testing: This is covered by existing WPT tests as it should not change observable behavior. We have created a test case which shows a 50% speedup when run in Servo, even though there still a long way to go to match the speed of other browsers: https://gist.github.com/mrobinson/44ec87d028c0198917a7715a06dd98a0 Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Make transform stream transferrable (#36905)Taym Haddadi2025-05-122-1/+112
| | | | | | | | | Part of https://github.com/servo/servo/issues/34676 #36739 needs to be merged first. --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* fix: `ReadableStream::get_in_memory_bytes` too large (#36914)Ngo Iok Ui (Wu Yu Wei)2025-05-122-7/+14
| | | | | | | | | | | | | | | Fix a IPC hang due to `ReadableStream::get_in_memory_bytes` could return really huge chunk. Testing: WPT on ReadableStream should pass Fixes: IPC hang when transferring huge chunk bytes from `ReadableStream` cc @gterzian @Taym95 since this is also related to ReadableStream. --------- Signed-off-by: Yu Wei Wu <yuweiwu@YunoMacBook-Air.local> Co-authored-by: Yu Wei Wu <yuweiwu@YunoMacBook-Air.local>
* codegen: use `FromJSValConvertible` trait for `Promise` (#36966)Gae242025-05-122-20/+1
| | | | | | | | | | | | Before it was only used when converting to a `Record`, using it all the times allow us to remove two methods. Plus added a helper method in CodegenRust.py to avoid repeated code. Testing: a successful build and existing tests should cover the changes. Fixes: #36410 --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Implement trusted HTML sinks for Element (#36941)Tim van der Lippe2025-05-123-23/+114
| | | | | | | | | 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>
* Update select shadow tree when contents of selected option change (#36958)Simon Wülker2025-05-113-7/+32
| | | | | | | | | | | | | | 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>
* Implement is-element-nonceable (#36961)Tim van der Lippe2025-05-112-3/+30
| | | | | | | | | | | | 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>
* Don't attempt to resize Offscreencanvas without a rendering context (#36855)Simon Wülker2025-05-113-30/+51
| | | | | | | | | | | 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>
* Prevent overflow in intersection observer area evaluation (#36955)webbeef2025-05-111-6/+8
| | | | | | | | | | Prevent overflowing by not calculating the area and reordering arithmetic operations. Testing: No regression in wpt tests: https://github.com/webbeef/servo/actions/runs/14951055450 Fixes: https://github.com/servo/servo/issues/36940 Signed-off-by: webbeef <me@webbeef.org>
* Update the list of global and window event handlers (#36894)Keith Yeung2025-05-104-27/+33
| | | | | | | | | | | | 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>
* Add CSP check for inline style attribute (#36923)Tim van der Lippe2025-05-091-37/+55
| | | | | | | | | | | | | | 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>
* WebIDL Fix ImageData constructor to take a Uint8ClampedArray instead of ↵Taym Haddadi2025-05-092-57/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rework webdriver deserialization to avoid false-positive cycle error (#36908)Euclid Ye2025-05-081-16/+30
| | | | | | | | | | | | | | | 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>
* Correct event_target for CSP violations (#36887)Tim van der Lippe2025-05-0822-37/+113
| | | | | | | | | | | 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>
* Script implement TransformStream and TransformStreamDefaultController (#36739)Taym Haddadi2025-05-088-27/+1449
| | | | | | | | | | 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>
* async clipboard: implement `readText` (#36689)Gae242025-05-072-5/+149
| | | | | | | | part of #36084 Testing: Only idl harness tests will pass for now --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* script: Serialize a custom element's "is" value as an attribute (#36888)Simon Wülker2025-05-071-12/+29
| | | | | | | | | | Testing: Covered by web platform tests [try run](https://github.com/simonwuelker/servo/actions/runs/14868893249) --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Improve some webdriver conformance tests results (#36673)Josh Matthews2025-05-072-7/+49
| | | | | | | | | | | | | | 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>
* Fix double borrow panic in Node.childNodes (#36889)Josh Matthews2025-05-071-5/+9
| | | | | | | | | | | | `ensure_rare_data` returns a RefMut that extends the borrow of Node.rare_data. This can lead to a panic in any method that triggers a GC while this borrow is outstanding, such as Node.childNodes. Testing: Manual testing on the testcase from the issue. It is impossible to create a deterministic WPT crash test that is fast enough and can be counted upon to continue working in the future. Fixes: #36868 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Various memory measurement improvements (#36834)Josh Matthews2025-05-076-11/+17
| | | | | | | | | | | | | | The two significant changes here are 1) a commit that frees memory used to perform memory reporting once the reporting is complete, 2) memory reporting for the system font service. There are various other commits that remove `#[ignore_malloc_size_of]` attributes for data that we are now able to measure, but they do not significantly change our measurements when testing servo.org. Testing: Comparing the output of about:memory on servo.org. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Implement inline CSP check for style element (#36860)Tim van der Lippe2025-05-062-6/+20
| | | | | | | Part of #4577 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com> Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
* Serialize attribute nodes as the empty string (#36875)Simon Wülker2025-05-061-2/+1
| | | | | | | | | | | | | | 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>
* Replace urlpattern implementation with `rust-urlpattern` crate (#36826)Simon Wülker2025-05-066-2466/+205
| | | | | | | | | | | | | | 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: https://github.com/servo/servo/blob/539ca272843bd0937bc7ed48d6103a6338d2a3c9/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>
* Don't slice a sliced blob (#36866)Simon Wülker2025-05-062-65/+60
| | | | | | | | | | | | | | | | 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](https://github.com/simonwuelker/servo/actions/runs/14844873660) --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `document.scrollingElement` (#35994)Jimmy D. Buckets2025-05-052-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | <!-- 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>
* Avoid borrow panic when Path2D.addPath is called with self (#36847)Taym Haddadi2025-05-051-2/+8
| | | | | Fixes: #36842 Signed-off-by: Taym <haddadi.taym@gmail.com>
* script: Ensure `EventSource` interprets non-200 response codes as failure ↵Keith Yeung2025-05-051-15/+33
| | | | | | | | | | | | | (#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>