aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt
Commit message (Collapse)AuthorAgeFilesLines
* Update web-platform-tests to revision ↵wpt_update_16-03-2025Servo WPT Sync2025-03-16293-1831/+14550
| | | | | | b'7a9307ef9e1e88229ced4a29991270d20911669c' Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Various fixes for webdriver conformance tests (#35737)Josh Matthews2025-03-153-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * servodriver: Ensure capabilities is always a non-empty value. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Serialize arguments object like an array. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Ensure script body is always valid JS. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Use current browsing context when getting element center point. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Propagate errors received from getting element center point. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Ensure opening a new window records a unique window handle. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Don't panic if script execution fails. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Do not update the current browsing context after closing a window. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * webdriver: Use more precise check for arguments exotic object. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Implement HTMLOptgroupElement::Label (#35970)Simon Wülker2025-03-143-126/+0
| | | | | | | | | | | | | * Implement HTMLOptgroupElement::Label 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>
* layout: Add support for basic transform css properties (#35926)chocolate-pie2025-03-1410-31/+2
| | | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Check whether an element is custom in the spec-compliant way (#35960)Xiaocheng Hu2025-03-133-5/+55
| | | | | | | | | | | | | * Check whether element is custom in spec-compliant way Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com> * Update tests Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com> --------- Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Don't run disconnected callback on already disconnected custom elements (#35883)Xiaocheng Hu2025-03-133-33/+0
| | | | | | | | | | | | | * Add missing step 11 of remove a node algorithm Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com> * Rebaseline tests Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com> --------- Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-1317165-1551721/+0
| | | | | | We were already not compiling it and not running tests on it by default. So it's simpler to just completely remove it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Improve logic for establishing a stacking context (#35947)Oriol Brufau2025-03-1329-48/+127
| | | | | | | | | | In particular: - `z-index` will now work on unpositioned grid items. - `will-change: z-index` will only establish a stacking context if `z-index` applies, i.e. if the box is positioned or a flex/grid item. - The conditions in `establishes_stacking_context()` are reordered, so that the most likely ones are checked first. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Remove special height logic of replaced element with auto width (#35275)Oriol Brufau2025-03-137-79/+76
| | | | | | | | | | | | | When computing the intrinsic block size of a replaced element with a computed preferred inline size of `auto`, instead of transferring the final inline size through the aspect ratio, we were only transferring the min and max constraints. We did this to match other browsers, but Ian Kilpatrick agreed that this is a bug and plans to change Blink. CSSWG issue: https://github.com/w3c/csswg-drafts/issues/11236 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Set `is` value when constructing custom elements with the `new` operator ↵Simon Wülker2025-03-122-339/+0
| | | | | | | | | | | | | | | | | | | | | | | (#35930) * Add doc comments throughout the code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set is-value for elements constructed with the "new" operator Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow custom elements to extend <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>
* Remove message from WebGL subtest name and remove stale expectations (#35791)Samson2025-03-12616-18472/+19771
| | | | | | | | | | | | | | | * Remove message from WebGL subtest name This causes stale expectations: https://github.com/servo/servo/issues/35750 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>
* Implement `ElementInternals::shadowRoot` (#35923)Simon Wülker2025-03-123-12/+0
| | | | | | | | | | | | | * Implement ElementInternals::shadowRoot 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>
* Bump Stylo to from a93e7ef to 4add86f (#34714)Asun02042025-03-111-2/+0
| | | | | | | | | | | | | | | https://github.com/servo/stylo/compare/a93e7efd1b4ce73d5a1b3df2337f5d16d3de121e...4add86f53a05ee27c13db998465e83e1ed733871 - servo/stylo#134 Remove unnecessary imports - servo/stylo#133 Reinstate missing gecko-specific import - servo/stylo#135 fix: add atoms "show" - servo/stylo#102 Use truncation instead of rounding to resolve percentages into app units Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Fix interaction of margin and stretch size on block-level boxes (#35904)Oriol Brufau2025-03-118-69/+240
| | | | | | | | | | | | | The CSSWG resolved that `block-size: stretch` on a block-level box stretches the margin box to fill the parent. However, if the parent doesn't have padding nor border, and doesn't establish an independent formatting context, then we assume that the margins will collapse. Therefore, we treat the margins as zero when resolving the stretch size, regardless of whether they will actually end up collapsing. https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2599101601 https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Enable ShadowDom support by default (#35899)Simon Wülker2025-03-112-2/+2
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: implement ReadableByteStreamController (#35410)Taym Haddadi2025-03-1011-0/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: implement ReadableByteStreamController Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement can_copy_data_block_bytes and copy_data_block_bytes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove BufferSource::Default Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement StartAlgorithmFulfillmentHandler, StartAlgorithmRejectionHandler, PullAlgorithmFulfillmentHandler, PullAlgorithmRejectionHandler for ReadableByteStreamController Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement perform_pull_into Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix build Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix build Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove RefCell from PullIntoDescriptor and QueueEntry Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove commented code Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * add perform_cancel_steps, perform_release_steps and perform_pull_steps Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix crown Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * unskip readable-byte-streams Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix CRASH Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix more CRASHS Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix more crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix bad-buffers-and-views.any.js test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Update test expectations Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix BorrowMutError crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix view_byte_length test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix non-transferable-buffers test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Pass contexts as much as possible by reference Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Make respond_internal Fallible Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix crwon Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix process pull into descriptors using queue logic and resulting double-borrow Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * Fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * FIx more crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix timeout tests Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix all tests Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove all error! logs Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove #[allow(unsafe_code)] Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix lint Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix tidy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix test expectation Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Don't run scripts in documents that don't have a browsing context (#35871)Simon Wülker2025-03-102-3/+3
| | | | | | | | | | | | | | | | * Don't run scripts in document that don't have a browsing context For confirmation that this is correct, refer to the note under Step 3 of https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring. 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>
* layout: Support min/max cross keywords sizes in flexbox (#35860)Oriol Brufau2025-03-106-174/+0
| | | | | | | | Adds support for min-content, max-content, fit-content and stretch on the min and max cross size properties of a flex item. With one exception: when resolving the main sizes, transferred cross minimums and maximums will still ignore keywords. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Only prevent fixed table layout when `inline-size` is `auto` (#35882)Oriol Brufau2025-03-103-24/+22
| | | | | | | | | | | | We were ignoring `table-layout: fixed` both for `inline-size: auto` and `inline-size: max-content`. However, the CSSWG resolved that fixed table layout should be triggered except when `inline-size` is `auto`. https://github.com/w3c/csswg-drafts/issues/10937#issuecomment-2669150397 Blink has already adopted this change, and they modified the WPT `/css/css-tables/fixed-layout-2.html` accordingly. Here I'm doing some further cosmetic cleanups to the test. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Add test for percentage sizes resolving against subpixel lengths (#35809)Oriol Brufau2025-03-104-0/+168
| | | | | | | | | | | Two floats with `width: 50%` each should fit on the same line, and four floats with `width: 25%` each should fit on the same line. That's even if the containing block width, expressed in layout units, cannot be divided by 2 or 4. This test checks cases that are tricky for browsers where 1 pixel are either 60, 64 or 100 layout units. It passes on other browsers but fails on Servo because of #34665. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Handle keyword sizes when computing the hypothetical cross size (#35826)Oriol Brufau2025-03-102-21/+0
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fix animation frame callback cancellation (#35849)Xiaocheng Hu2025-03-101-3/+0
| | | Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
* script: use passive event listener option on AddEventListenerOptions (#35877)shanehandley2025-03-102-197/+0
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Implement `nonce` attribute to pass more CSP checks (#35876)Simon Wülker2025-03-109-282/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add doc comments to RequestBuilder fields/methods Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement Request::cryptographic_nonce_metadata Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement HTMLOrSVGElement::nonce Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set request cryptographic nonce metadata for link elements Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set request's cryptographic nonce when fetching scripts Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Forward request nonce to rust-content-security-policy 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>
* layout: support CSS will-change (#35787)Euclid Ye2025-03-0918-50/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * support CSS `will-change` * update wpt-test result * Enable css-will-change test * Update css-will-change test results * Check transformable before will-change; update wpt-results * Solve merge conflict * Update Cargo.toml and Cargo.lock * Mark new failing test-cases --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2025-03-09762-9697/+25202
| | | | | b'c23b0ad587af296087067b48a2f2101233589a8f' (#35869) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Implement can-have-its-url-rewritten for history api (#35864)Kingsley Yung2025-03-085-38/+3
| | | | | | | Implement the helper function to verify whether the document can have its URL rewritten to a new URL. https://html.spec.whatwg.org/multipage/nav-history-apis.html#can-have-its-url-rewritten Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* layout: Make `transform-style: preserve-3d` establish a containing block for ↵Daniel Hast2025-03-073-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all descendants (#35808) * layout: Fix behavior of `transform-style: preserve-3d` This makes `transform-style: preserve-3d` establish a containing block for all descendants, as specified here: <https://drafts.csswg.org/css-transforms-2/#transform-style-property> Signed-off-by: Daniel Hast <hast.daniel@protonmail.com> * layout: Check for transformable elements Adds a new `is_transformable` helper method and use this in several other methods, including the methods for whether the fragment establishes a new stacking context or a containing block for all descendants. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com> * Use generic green square reference for reftest. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com> * layout: Fix stacking context & containing block checks. Only the computed value of `transform-style` should be used to determine whether the element establishes a stacking context and/or a containing block, not the used value. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com> * Update clip-no-stacking-context test expectation to pass. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com> --------- Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
* layout: Partial support for keyword sizes on preferred cross size (#35682)Oriol Brufau2025-03-045-60/+15
| | | | | | | | | | | | | This changes `FlexItem::content_cross_size` into `Size<Au>` to preserve keyword sizes. The calculation of the hypothetical cross size still ignores them though, that will be addressed in a follow-up. Also, browsers don't follow the spec and treat a stretch size different than a stretch alignment: the former stretches to the containing block, while the latter stretches to the line. This aligns Servo with that behavior (following the spec would require bigger refactorings), so `stretches()` is renamed to `stretches_to_line()` for clarity. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Upgrade Stylo to 2025-03-01 (#35782)Oriol Brufau2025-03-044-432/+0
| | | | | | | | | | | | | | | | | * Upgrade Stylo to 2025-03-01 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D236733 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Update test expectations Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* script: Avoid double borrow crash on iframe focus (#35742)Sean Burke2025-03-032-0/+16
| | | Signed-off-by: Seán de Búrca <leftmostcat@gmail.com>
* layout: Merge `BoxFragment::used_overflow` into ↵Euclid Ye2025-03-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | `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>
* Update web-platform-tests to revision ↵Servo WPT Sync2025-03-022380-42480/+54478
| | | | | b'fc557e215e11221c91de4f283539725ef2f35928' (#35741) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* script: Implement preparation-time document (#35718)Xiaocheng Hu2025-03-022-4/+0
| | | | | | | | | | | | | | | | | * 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>
* Don't recurse in Node::GetRootNode (#35725)Simon Wülker2025-03-016-4/+53
| | | | | | | | | | | | | | | | * 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>
* fonts: Remove the per-FontGroup cached fallback font (#35705)Martin Robinson2025-02-287-10/+4
| | | | | | | | | | | | | | | | | | | 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>
* script: Avoid double borrow crash in `DataTransferItem` (#35699)Gae242025-02-272-0/+22
| | | | | | | | | | | | | * 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>
* script: Implement `Blob::bytes()` (#35151)Kousuke Takaki2025-02-275-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* layout: Implement a non-recursive version of CSS `quotes` (#34770)Xiaocheng Hu2025-02-2715-25/+44
| | | | | | | | | | | | | | | | | * 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>
* layout: Use definite cross size to compute flex base size (#35688)Oriol Brufau2025-02-273-2/+87
| | | | | | | | 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>
* bindings: Fix support for interface members in setlike/maplike. (#35651)Mukilan Thiyagarajan2025-02-274-240/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | #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>
* libservo: Clean up interfaces for alert()/confirm()/prompt() (#35579)Delan Azabani2025-02-274-14/+0
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* layout: Support `stretch` cross size for flex base size (#35663)Oriol Brufau2025-02-263-0/+86
| | | | | | | | 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>
* layout: Support `stretch` cross size for automatic min size in flexbox (#35652)Oriol Brufau2025-02-263-0/+86
| | | | | | | | 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>
* Allow the `<details>` element to be opened and closed (#35261)Simon Wülker2025-02-2513-56/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* servoshell: Fall back to PNG format when outputting an image (#35648)Martin Robinson2025-02-252-2/+1
| | | | | | | | | | | | | | | | | A recent change, #35538 added the ability to dump different output image formats. Unfortunately, this necessitated adding a file extension to the output image for WPT tests. This had two problems: 1. The original change never landed properly in WPT for unknown reasons. 2. It interfered with the way that temporary files were cleaned up during WPT runs. This change modifies the image dumping code to fall back to PNG format when there is no valid file extension on the output image and reverts the change made to the WPT runner. Fixes #35635. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* chore: Update wgpu (#35639)Samson2025-02-241-46/+0
| | | | | | | | | | | | | | * Update wgpu https://github.com/gfx-rs/wgpu/commit/2f255edc60e9669c8c737464c59af10d59a31126 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>
* Don't tell stylo about stylesheets that are not in a browsing context (#35606)Simon Wülker2025-02-243-21/+6
| | | | | | | | | | | | | * 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>
* Support for the `isolation` CSS property (#35552)Kingsley Yung2025-02-246-132/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* layout: Ignore indefinite `stretch` on min and max sizing properties (#35630)Oriol Brufau2025-02-2410-79/+178
| | | | | | | | 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>