| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It also updates the FetchResponseListener to process CSP violations to
ensure that iframe elements (amongst others) properly generate the CSP
events. These iframe elements are used in the Trusted Types tests
themselves and weren't propagating the violations before.
However, the tests themselves are still not passing since they also use
Websockets, which currently aren't using the fetch machinery itself.
That is fixed as part of [1].
[1]: https://github.com/servo/servo/issues/35028
---------
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
| |
Automated downstream sync of changes from upstream as of 13-04-2025
[no-wpt-sync]
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move parsing of Refresh values to Document.
Send Refresh header to Document and have meta tags reuse the logic.
I transplanted the existing Regex and made some updates so that it
passed all the existing parser tests.
I added the comments that made sense but it is not very clean to add
many comments within the regex.
Testing: There are existing WPT tests
---------
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src in resource selection algorithm. (#36408)
Set the `htmlmediaelement`'s `currenSrc` in
resource-selection-algorithm.
Change the `htmlsourceelement`'s src and srcset to USVString type.
According to
[Spec](https://html.spec.whatwg.org/multipage/media.html#concept-media-load-algorithm),
Step 9.3 for mode is children, should set the `currentSrc` to `src` of
children `htmlsourceelement`.
Also, In the `htmlsourceelement` [interface
definition](https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element),
the `src` and `srcset` attribute should be type `USVString`.
Testing: More WPT tests related to resource selection algorithm are
passing.
Fix: Some spec fix
[Try](https://github.com/rayguo17/servo/actions/runs/14347535616)
cc @xiaochengh
Signed-off-by: rayguo17 <rayguo17@gmail.com>
|
|
|
|
|
|
| |
Automated downstream sync of changes from upstream as of 06-04-2025
[no-wpt-sync]
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
| |
b'efce5c7cd31b0e1add4f41758504c767b56abeed' (#36222)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
| |
Signed-off-by: Barigbue <barigbuenbira@gmail.com>
|
|
|
|
|
| |
b'9d20f3ae600d00673a27a69f69e13d4cd8eca443' (#36195)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
| |
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
|
|
|
| |
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
b'18fda923cafeb4e3e0546ffcfb2302c3b1b11f98' (#36019)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement declarative shadow dom
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Set allowDeclarativeShadowRoots false for innerHTML
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Enable allowDeclarativeShadowRoots for Document
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Expose HTMLTemplateElement to js
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Implemenet setHTMLUnsafe and add more test cases
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Declarative shadow dom: minor updates and expected test result update
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Shadow-dom: add more test cases
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Update comments according to the spec
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
* Bump html5ever version
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
---------
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
b'c23b0ad587af296087067b48a2f2101233589a8f' (#35869)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
b'fc557e215e11221c91de4f283539725ef2f35928' (#35741)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
| |
Signed-off-by: Delan Azabani <dazabani@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
This makes some common functionality in HTMLAreaElement and
HTMLAnchorElement shared code.
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
|
|
|
|
|
| |
b'de61904887c13679551c32e5e3e70b4dc870c98a' (#35480)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
| |
b'1a5b13545ae58e468ed11e4c21912a3faf3355ea' (#35384)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make traverse_preorder follow children of shadow hosts
Children of shadow hosts are not displayed, but they
still exist in the DOM and must be traversed.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix traverse_preorder over shadow roots
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>
|
|
|
|
|
| |
b'f630424a79c1ae17deaaf27a21efdbca1378af0e' (#35258)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
| |
b'e5e7dab5e72edd352b17105acce2b8f443face10' (#35174)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously tried to implement the [table specification algorithm] for
distributing the inline size of cells with `rowspan` > 1. This algorithm
isn't great though, so this change starts switching Servo to using an
algorithm like the one used in LayoutNG from blink. This leads to
improvements in test results.
Limitations:
- Currently, non-fixed layout mode is handled, but a followup change will
very likely addressed fixed mode tables.
- Column merging is not handled at all.
Fixes #6578.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement slot-related algorithms
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Hook up slot elements to DOM creation logic
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Set a slot assignment mode for servo-internal shadow roots
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Assign slots when a slottable's slot attribute changes
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Properly compute slot name
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ./mach test-tidy
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update <slot> name when name attribute changes
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement fast path for Node::assign_slottables_for_a_tree
assign_slottables_for_a_tree traverses all descendants of the node
and is potentially very expensive. If the node is not a shadow root
then assigning slottables to it won't have any effect, so we
take a fast path out.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Move slottable data into ElementRareData
This shrinks all element descendants back to their
original size.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Address review comments
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>
|
|
|
|
|
| |
b'8f3f629756d7351867a8be36d5f217608b9adc61' (#35065)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable WPT tests for several supported/in progress features.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Enable more preferences for all WPT tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update test expectations.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Disable AbortController preference for tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update WPT expectations.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
| |
b'475127f90be9926867796ff98717b621a358af52' (#34956)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
| |
This refactors some of the code that is shared with toDataURL, and
updates the webidl definition to match the current spec (using a default
value for the mime type).
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
| |
b'c72ee0c082d350b8b44f7a6bac1f028752b13527' (#34837)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update web-platform-tests to revision b'8fcb1f1e9519117f68699b8257c6b79d0f6e70e8'
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Update iframe-nosrc.html.ini
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* Update api-and-duplicate-headers.any.js.ini
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Implement node insertion post-connection hook. Ensure script elements only run scripts when the DOM has stabilized.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make iframe element use post-connection steps when handling initial document insertion.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use a delayed task when running post-connection steps.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Add explanatory comment.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Tidy.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
| |
b'979291d49c1a8e3d811df117d9e6b5d399a6deb2' (#34733)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
| |
b'38623a53d6598cb7aab4be8a810102b352a652df' (#34622)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
| |
b'7b6f075f0ec3c52d92c61fb9f35ce0ec927b17b2' (#34525)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
| |
b'bf49dde84c5f05613115d6146d109f0ec3900694' (#34483)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't falsely register Shadow Roots as connected
Previously, a shadowroot would be registered as connected
during the shadow hosts bind_to_tree call, even if the host
was being bound to an element that was not itself
connected to a document.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Move bind/unbind methods into a VirtualMethod impl
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add DocumentFragment/Shadowroot to vtable_for
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add datatransfer interfaces
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* implement DataTransfer interface
implemented Constructor, setter and getter for drop_effect and effect_allowed, Items and SetDragImage
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* implement DataTransferItem interface
Implemented Kind, Type, GetAsString, GetAsFile.
Marked DataTransfer as weakReferenceable to access its field
inside DataTransferItemList and DataTransferItem.
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* implement DataTransferItemList interface
implemented Lenght, Getter, Add, Remove, Clear
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* added DataTransfer's old interface
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* DataTransfer: implemented GetData, SetData, SetData
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* set Weakref to DataTransfer in DataTransferItemList and DataTransferItem
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* DataTransfer: implemented Types and Files
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* cleanup get_data, set_data, clear_data
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix clippy warning
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* add drag data store
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix DataTransfer's Types() behaviour
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* DataTransferItem: use the underlying drag data store
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix DataTransferItemList's getter and remove
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix clippy warnings
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* update test expectations
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
|
|
|
|
|
| |
b'6d461cc41e1a9951e1991a94f651e389b0ca24ba' (#34360)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement Element.shadowRoot attribute
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove comments about shadowdom not being exposed for web content
This is obviously not the case anymore.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Include non-shadowdom children of shadow hosts in style calculation
This was previously causing crashes because the layout nodes
of those children would never be assigned style data by 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>
|