aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt
Commit message (Collapse)AuthorAgeFilesLines
* wpt: Unskip webaudio tests as most are passing (#36334)Manuel Rego2025-04-0417-141/+105
| | | Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
* wpt: Unskip old-tests/ folder as most tests are passing (#36333)Manuel Rego2025-04-046-3/+16
| | | Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
* layout: Restrict stretch alignment to flex items with computed auto size ↵Oriol Brufau2025-04-043-3/+30
| | | | | | | | | | | | | | | | | | | | (#36288) We were allowing `align-self: stretch` to stretch flex items whose cross size behaves as `auto`, including cyclic percentages. However, https://github.com/w3c/csswg-drafts/issues/4525 resolved that stretching should only happen when the cross size computes to `auto`. So this patch exposes this information in `ContentBoxSizesAndPBM`, and refactors the flexbox stretching logic. Fixes: #36285 Testing: - `/css/css-flexbox/quirks-auto-block-size-with-percentage-item.html` - `/css/css-flexbox/stretch-requires-computed-auto-size.html` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* wpt: Unskip css/css-text/i18n as many tests are passing there (#36314)Manuel Rego2025-04-0430-2/+1598
| | | | | | This patch unskips `css/css-text/i18n` WPT tests as many tests on that folder are already passing in Servo. Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
* Ignore cert errors when running wdspec tests. (#36327)Josh Matthews2025-04-042-1/+4
| | | | | | | | | | | This change makes the wdspec configuration match our other browser configurations to account for #30080. Testing: Tested locally, since we don't run webdriver conformance tests in CI yet. The STR from the issue do not reproduce the same problem any longer. Fixes: #36326. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix: `display: inline-grid` considered an atomic inline (#36298)Barigbue Nbira2025-04-0310-18/+2
| | | | | | | | | | | | | | | | | | This change ensures that `display: inline-grid` is considered an atomic inline - Add `is_atomic_inline_level()` logic to `box_fragment.rs` to improve accuracy. - Update `stacking_context.rs` to use the new `is_atomic_inline_level()` method instead of the one from stylo. - Update `repeat-auto-fill-005.html` test expectation. - Remove .ini expectations for tests that are no longer failing. Testing: covered by WPT Fixes: #35310 --------- Signed-off-by: Barigbue <barigbuenbira@gmail.com>
* Enable layout_grid_enabled pref for all tests (#36316)Oriol Brufau2025-04-0381-479/+123
| | | | | | This is part of #36315 Testing: This improves several tests that rely on this feature Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* fix: root element not establishing stacking context (#35390) (#36174)Michael Rees2025-04-033-0/+30
| | | | | | | | | | | | | | | | | - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #35390 - [X] There are tests for these changes [Successful WPT run](https://github.com/reesmichael1/servo/actions/runs/14097679625) (which includes the new test files) (I didn't make the formatting changes intentionally--those came from `mach format` following `mach test-tidy`.) --------- Signed-off-by: Michael Rees <mrees@noeontheend.com>
* script: Implement deprecated CSSStyleSheet members (#36313)Oriol Brufau2025-04-0313-306/+0
| | | | | | | | | | | | | | | | | | | | | | | Implements `rules`, `addRule()` and `removeRule()` for `CSSStyleSheet`. https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members This is part of #36162 Testing: - `/css/css-cascade/at-scope-parsing.html` - `/css/css-conditional/at-supports-whitespace.html` - `/css/css-nesting/invalidation-004.html` - `/css/css-nesting/parsing.html` - `/css/css-nesting/serialize-group-rules-with-decls.html` - `/css/css-syntax/custom-property-rule-ambiguity.html` - `/css/css-syntax/invalid-nested-rules.html` - `/css/css-syntax/trailing-braces.html` - `/css/css-syntax/var-with-blocks.html` - `/css/css-transitions/parsing/starting-style-parsing.html` - `/css/cssom/CSSStyleSheet.html` - `/css/cssom/idlharness.html` - `/css/cssom/insertRule-across-context.html` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Improve style conversion for Taffy (#36311)Oriol Brufau2025-04-037-69/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | This imports the following changes from Blitz: - Map position:sticky to relative rather than absolute position https://github.com/DioxusLabs/blitz/commit/16a7c1654455bee62e83854f83304a2931b29a0d - Map left and right alignment from Stylo https://github.com/DioxusLabs/blitz/commit/c71cc681d8c877dbd30853b3c4a2a7449c6450e4 - Improve mapping of align-items/self https://github.com/DioxusLabs/blitz/commit/7bf2a25e756c1310a9e4603b4757e20548b961e2 Fixes: #35998 Testing: - `/css/css-grid/alignment/grid-align-justify-margin-border-padding.html` - `/css/css-grid/alignment/grid-align.html` - `/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html` - `/css/css-grid/alignment/grid-gutters-and-alignment.html` - `/css/css-grid/alignment/grid-item-alignment-with-orthogonal-flows.html` - `/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html` - `/css/css-grid/alignment/grid-self-alignment.html` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Support single-value `<select>` elements (#35684)Simon Wülker2025-04-0318-28/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/user-attachments/assets/9aba75ff-4190-4a85-89ed-d3f3aa53d3b0 Among other things this adds a new `EmbedderMsg::ShowSelectElementMenu` to tell the embedder to display a select popup at the given location. This is a draft because some small style adjustments need to be made: * the select element should always have the width of the largest option * the border should be part of the shadow tree Apart from that, it's mostly ready for review. <details><summary>HTML for demo video</summary> ```html <html> <body> <select id="c" name="choice"> <option value="first">First Value</option> <option value="second">Second Value</option> <option value="third">Third Value</option> </select> </body> </html> ``` </details> --- <!-- 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] Part of https://github.com/servo/servo/issues/3551 - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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: Simon Wülker <simon.wuelker@arcor.de>
* script: Create `CSSStyleOwner::Null` for `getComputedStyle` (#36272)Martin Robinson2025-04-0218-216/+103
| | | | | | | | | | | | | | | | | | | | This new `CSSStyleOwner` variant is used when the pseudo-element argument fails to parse properly or is for some unknown or unsupported pseudo-element. Testing: There are tests for this change. Various tests start to pass and some start to fail. New failures are due to partial or fully missing support for pseudo-elements such as: - `::selection` - `::first-letter` and `::first-line` - `::marker` 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>
* layout: Allow collapsing bottom margins with any indefinite block size (#36278)Oriol Brufau2025-04-026-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to CSS2, the bottom margin of a block container can collapse with the bottom margin of its last in-flow child if `height` computes to `auto`. However, according to CSS Sizing, that was "legacy spec prose" and should be interpreted as "behaves as `auto`". Therefore, cyclic percentages and intrinsic keywords like `min-content` shouldn't prevent margin collapse, because they behave as `auto`. This change aligns Servo with Gecko and Blink, but diverges from WebKit. https://www.w3.org/TR/CSS22/box.html#collapsing-margins https://www.w3.org/TR/css-sizing/#behave-auto Testing: - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-001.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-002.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-003.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-004.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-005.html` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* dom: Firing "click" event as synthetic pointer event (#36274)Andrei Volykhin2025-04-022-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to specification https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-click-event "Firing a click event at target means firing a synthetic pointer event named click at target" So need to replace synthetic mouse event with "click" type to pointer event. https://w3c.github.io/pointerevents/#the-click-auxclick-and-contextmenu-events https://www.w3.org/TR/uievents/#event-type-click Firing "click" event could be triggered from script or by UA: - element.click() (https://html.spec.whatwg.org/multipage/interaction.html#dom-click) - form implicit submission (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission) - keyboard activation (space) --- - [x] ./mach build -d does not report any errors - [x] ./mach test-tidy does not report any errors - [x] There are tests for these changes tests/wpt/tests/shadow-dom/event-composed.html tests/wpt/tests/uievents/interface/click-event.htm Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
* Remove meta-legacy-layout wpt tests (#36281)Tim van der Lippe2025-04-0110-20/+0
| | | | | | | | | These tests were related to the legacy layout engine which has been removed. Therefore, they are considered leftover and can be removed. Fixes #36277 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
* Turn `CSSStyleRule` into a `CSSGroupingRule` subclass (#36254)Oriol Brufau2025-04-012-33/+0
| | | | | | | | | | | | | | | Note that `StyleRule` may not have the `CssRules` readily available, they may need to be created. So the previous approach of providing `CSSGroupingRule` with the `CssRules` is no good: it would require writing them in advance, just in case they end up being used. Therefore, this removes the `CSSGroupingRule::rules` field. Instead, they are lazily obtained in `CSSGroupingRule::rulelist()` by downcasting and calling the appropriate method for the subclass. Testing: covered by WPT Fixes: #36245 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* canvas: Implement line dash setters and getters (#36257)Steven Novaryo2025-04-0112-89/+0
| | | | | | | | | | | Implement `setLineDash`, `getLineDash`, and `lineDashOffset` from `CanvasPathDrawingStyles` mixin, according to the spec https://html.spec.whatwg.org/multipage/canvas.html#canvaspathdrawingstyles. Testing: Existing WPT. --------- Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
* Implement CSSNestedDeclarations (#36248)Oriol Brufau2025-04-012-1/+2
| | | | | | | | | | | This is the CSSOM interface that represents a nested declarations rule. https://drafts.csswg.org/css-nesting/#the-cssnestrule Testing: `/_mozilla/mozilla/interfaces.https.html`. And once `CSSStyleRule` becomes a `CSSGroupingRule` subclass, this will be further covered by `/css/css-nestting/`. This is part of #36245 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Enable CSS parent selector (`&`) (#36249)Oriol Brufau2025-04-0110-53/+0
| | | | | | | | | | Bumps Stylo to servo/stylo#164 Changelog: https://github.com/servo/stylo/compare/bc4717c7842ad59243f00ae76ba23f998c749b94...600b5c42970fdbe301f18c013a0f0ca4ed5f08db Testing: covered by WPT This is part of https://github.com/servo/servo/issues/36245 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fix null realm assertion when activating a service worker (#36256)Josh Matthews2025-04-0149-111/+574
| | | | | | | | | | | Ensure there is an active realm when dispatching the `activation` DOM event to the ServiceWorker global. Testing: Existing WPT coverage. Fixes: #36114 Fixes: #36235 Fixes: #36231 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use `RegExpFlag_UnicodeSets` when validating regular expressions in ↵MDCODE2472025-04-012-30/+0
| | | | | | | | | | | | | | | `HTMLInputElement` (#36236) Changed `RegExpFlag_Unicode` to `RegExpFlag_UnicodeSets` in all instances. Testing: Ran `./mach test-wpt tests/wpt/tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html` and all tests passed successfully. Fixes: #36075 --------- Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com>
* Enable css-nesting WPT tests (#36246)Oriol Brufau2025-03-3125-1/+217
| | | | | | | | So that we can see the improvement when enabling the feature. Testing: This PR enables tests This is part of #36245 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* dom: Set "composed" flag on construction for some event types (#36239)Andrei Volykhin2025-03-316-18/+12
| | | | | | | | | | | | | | | | | | | | "Composed" flag (https://dom.spec.whatwg.org/#composed-flag) should be properly set on event construction phase from optional "EventInit" dictionary (https://dom.spec.whatwg.org/#dom-eventinit-composed). The limited set of event types (Custom/Error/Focus/Mouse) will be affected by this CL (used in WPT tests). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are WPT shadow-dom tests which have new issues related to event "relatedTarget" property tests/wpt/tests/shadow-dom/event-composed-path-with-related-target.html tests/wpt/tests/shadow-dom/event-with-related-target.html Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
* script: Fix resize observer depth calculation for Shadow DOM. (#36230)Josh Matthews2025-03-311-5/+0
| | | | | | | | | Follow the specification more closely by using the flat tree when calculating depth for the resize observer. Testing: Newly passing WPT test. Fixes: #36092 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Enable service worker WPT tests. (#36221)Josh Matthews2025-03-31314-35/+5348
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update web-platform-tests to revision ↵Servo WPT Sync2025-03-30121-717/+4208
| | | | | b'efce5c7cd31b0e1add4f41758504c767b56abeed' (#36222) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* layout: Implement support for `image-set()` notation (#36210)chocolate-pie2025-03-2925-50/+0
| | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
* layout: Simplify and generalize the usage of pseudo-elements (#36202)Martin Robinson2025-03-292-18/+0
| | | | | | | | | | | | | | | | | | | | | - Remove the last remaining Servo-specific PseudoElement enum from layout. This was made to select `::before` and `::after` (both eager pseudo-elements), but now `traverse_pseudo_element` is called `traverse_eager_pseudo_element` and should work on any eager pseudo element. - Expose a single way of getting psuedo-element variants of ThreadSafeLayoutElement in the Layout DOM, which returns `None` when the pseudo-element doesn't apply (not defined for eager pseudo-elements or when trying to get `<details>` related pseudo-elements on elements that they don't apply to). - Ensure that NodeAndStyleInfo always refers to a node. This is done by making sure that anonymous boxes are all associated with their originating node. These changes are prepatory work for implementation of the `::marker` pseudo-element as well as ensuring that all anonymous boxes can be cached into the box tree eventually. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* dom: Track "removed" event listener status (#36163)Andrei Volykhin2025-03-282-9/+0
| | | | | | | | | | | | | | | | | The DOM event listener "removed" status should be supported to track the following situations (with immediate effect of listener removal): - Removing a later event listener while an earlier listener for the same event is running - Nested usage (recursively dispatch another event) of "once" listeners https://dom.spec.whatwg.org/#event-listener-removed During event dispatching requires to clone event listeners list on "invoke" step https://dom.spec.whatwg.org/#concept-event-listener-invoke and the lowercase "event listener" concept in Servo is EventListenerEntry https://dom.spec.whatwg.org/#concept-event-listener Bug: #25479, #25090 Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
* Consume BOM in the `text()` method of fetch bodies (#36192)Andreu Botella2025-03-282-60/+0
| | | | | | | | | In the fetch spec, the `text()` method of `Body` (an interface mixin implemented by both `Request` and `Response`) consumes the body with the Encoding spec "UTF-8 decode" algorithm, which skips the UTF-8 BOM if it is present at the beginning of the body. Servo's implementation does not do that. This patch fixes this. Signed-off-by: Andreu Botella <abotella@igalia.com>
* Fix content-type when creating a `Request` with `FormData` body (#36194)Andreu Botella2025-03-286-25/+6
| | | | | | | | | | | | | | | | When you create a `Request` object with a `FormData` body, the spec says that the `Content-Type` header should start with `multipart/form-data; boundary=`. However, in Servo's implementation it started with `multipart/form-data;boundary=`, without the space. While all reasonable servers should be able to that headers whether the space is present or not, this brings Servo closer to the spec, and also makes some WPT tests pass. Note that submitting a form with `enctype="multipart/form-data"` does produce a `Content-Type` header with the space (see `HTMLFormElement::submit_entity_body`). Signed-off-by: Andreu Botella <abotella@igalia.com>
* fix: prevent missing value error for radio button inputs without a name (#36197)Barigbue Nbira2025-03-281-5/+0
| | | Signed-off-by: Barigbue <barigbuenbira@gmail.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2025-03-28734-5393/+24398
| | | | | b'9d20f3ae600d00673a27a69f69e13d4cd8eca443' (#36195) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* fix(parser): Set shadow’s available to element internals in ↵elomscansio2025-03-271-3/+0
| | | | | | | | | | | | | | | attach_declarative_shadow (#36173) Aligns the implementation with step 8.5 of the HTML spec for parsing a <template> element in the InHead state by setting shadow_root.set_available_to_element_internals(true) after assigning the shadow root to the template’s contents. Also removes tests/wpt/meta/shadow-dom/declarative/declarative-shadow-dom-available-to-element-internals.html.ini since the test expectations are now updated accordingly. Spec reference: https://html.spec.whatwg.org/multipage/#parsing-main-inhead Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
* Start implementing the `URLPattern` API (#36144)Simon Wülker2025-03-277-184/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start working on a basic URLPattern implementation This is API part of Interop 2025, so we should definitely support it! This change implements the basic workflow for parsing and compiling URL patterns. Parts of it are stubbed out and will be implemented later. For now the API is preference-gated behind "dom_urlpattern_enabled". Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Preference-gate the URLPattern API Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix full wildcard value (Should be ".*" not "*") Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Make DOMPoint and DOMPointReadOnly serializable (#35989)Josh Matthews2025-03-271-24/+0
| | | | | | | | | | | | | | | | | | | | | | | * script: Make DOMPointReadOnly serializable. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Make DOMPoint serializable. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Shrink worker script event. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update components/script/dom/dompoint.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Add `Path2D` (#35783)Lukas Lihotzki2025-03-2636-185/+44
| | | Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
* Fix check in get_array_index_from_id to return early on ASCII char (#36136)Michael Rees2025-03-253-12/+0
| | | | | | | | | | | | | * fix: wrong ascii check in get_array_index_from_id Signed-off-by: Michael Rees <mrees@noeontheend.com> * Update WPT expectations Signed-off-by: Michael Rees <mrees@noeontheend.com> --------- Signed-off-by: Michael Rees <mrees@noeontheend.com>
* Import URLPattern tests (#36145)Simon Wülker2025-03-256-0/+4540
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* layout: Ensure compatible positioning context during flexbox block content ↵Martin Robinson2025-03-252-0/+20
| | | | | | | | | | | | | | | sizing calculation (#36123) Sometimes column Flexbox needs to do an early layout pass to determine the preferred block content size of flex items. Previously the absolutely positioned children created during this pass were discarded, but now they are cached to be possibly used during the final layout phase of the flex item. Since they are not thrown away, it is necessary that the `PositioningContext` used to collect them is compatible with their final `PositioningContext`. Fixes #36121. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fix: radio input element don't trigger validity state (#36103)Jerens Lensun2025-03-232-15/+0
| | | Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
* script: Implement `Element::GetHTML` and `ShadowRoot::GetHTML` (#36106)Simon Wülker2025-03-233-15835/+5
| | | | | | | | | | | | | | | | | | | | | * Serialize html fragments without going through html5ever Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement ShadowRoot::GetHtml / Element::GetHtml Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Propagate CanGc annotations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* layout: Implement the `fit-content()` sizing function (#36056)Oriol Brufau2025-03-2326-134/+0
| | | | | | | | | | | | | | Spec: https://drafts.csswg.org/css-sizing-3/#funcdef-width-fit-content It's similar to the `fit-content` keyword but, instead of clamping the stretch size between `min-content` and `max-content`, it clamps the provided argument. So now that we support `fit-content`, it's quite straightforward to add. It's just not completely clear what should happen when the argument has a cyclic percentage, so this may need some further adjustments depending on the outcome of https://github.com/w3c/csswg-drafts/issues/11805 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Don't clear children of declarative shadow hosts when imperatively attaching ↵Simon Wülker2025-03-232-105/+0
| | | | | | | | | | | | | | | | | another shadow root (#36104) * Don't remove a declarative shadow hosts children when attaching an imperative shadow root Instead we should remove all children of the 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>
* Make input element display-inside always flow-root (#35908)Kenzie Raditya Tirtarahardja2025-03-234-0/+74
| | | | Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com> Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
* Max assign outer block size to cell measures (#36064)Kenzie Raditya Tirtarahardja2025-03-231-6/+0
| | | | Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com> Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
* Fix form validation for readonly inputs and update WPT expectations (#36090)elomscansio2025-03-221-9/+0
| | | | | | | | | | | | | | | | | | | The HTML specification states that an input element with the `readonly` attribute must be barred from constraint validation. Our implementation previously included an extra check (`does_readonly_apply()`) to verify if `readonly` applies to the input type, which is unnecessary. This caused three test failures in: tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini - Removed `does_readonly_apply()` as it is not required for validation. - Removed `tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini` since the test now passes. To update the Web Platform Test expectations, see: https://book.servo.org/hacking/testing.html#updating-web-platform-test-expectations Fixes servo/servo#36076 Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
* Make Element::attach_shadow() and ShadowRoot closer to spec (#36024)batu_hoang2025-03-198-139/+0
| | | Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* layout: Stop ignoring containing block padding for the static position (#36051)Oriol Brufau2025-03-1941-1341/+31
| | | | | | | | The static position rect is calculated assuming that the containing block would be established by the content box of some ancestor, but the actual containing block is established by the padding box. So we need to add the padding of that ancestor. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Obey sizing keywords in `layout_for_block_content_size()` (#36015)Oriol Brufau2025-03-192-0/+30
| | | | | | We were ignoring sizing keywords on the min and max sizing properties. With this, flexbox layout has full support for sizing keywords. Signed-off-by: Oriol Brufau <obrufau@igalia.com>