Commit graph

10520 commits

Author SHA1 Message Date
Tim van der Lippe
6bb087e381
Implement trusted types url setter (#36596)
We now check the sink of script.src for trusted types. This is the first
attribute that we check, other sinks will be implemented in follow-up
changes.

The algorithms currently hardcode various parts. That's because I need
to refactor a couple of algorithms already present in TrustedTypePolicy.
They use callbacks at the moment, which made sense for their initial
use. However, for these new algorithms they don't work. Therefore, I
will align them with the specification by taking in an enum. However,
since that's a bigger refactoring, I left that out of this PR (which is
already quite big).

The other trusted types support (createScript and createHTML) will also
be implemented separately.

Part of #36258

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-21 06:56:40 +00:00
Josh Matthews
76ee127af8
Eagerly define interfaces on non-Window globals (#36604)
These changes make us match Gecko's setup for how Window and non-Window
globals are initialized. Since Window globals are much more common than
Worker globals, using lazy interface definitions can be a useful memory
optimization at the expense of increased complexity for property
lookups.

Also adds the MayResolve hook for all globals, which is an optimization
for the JIT to avoid calling resolve hooks unnecessarily.

Testing: Existing test coverage on global interfaces should suffice.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-21 03:32:21 +00:00
saku
436dee8450
Fix: Slot Assignment mode according to the spec (#36620)
When parsing a Declarative Shadow DOM, the slot assignment isn't being
triggered as mentioned in the
[spec](https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead:~:text=Attach%20a%20shadow%20root%20with%20declarative%20shadow%20host%20element%2C%20mode%2C%20clonable%2C%20serializable%2C%20delegatesFocus%2C%20%22named%22%2C%20and%20registry.).

When creating a shadow root declaratively, SlotAssignment mode was set
to "manual" instead of "named".

Tests: The followings should get fully passed with this change, so
`.ini`s are removed.
 - `declarative-shadow-dom-basic.html` 
 - `declarative-shadow-dom-write-to-iframe.html`
 - `declarative-shadow-dom-repeats.html`

Fixes: #36100

---------

Signed-off-by: saku <saku@email.sakupi01.com>
2025-04-20 16:09:31 +00:00
elomscansio
2366a67260
Fix missing settings in script module requests (#36606)
This PR resolves [#36592](https://github.com/servo/servo/issues/36592)
by updating the `RequestBuilder` used in `script_module.rs` to include:
- `insecure_requests_policy`
- `has_trustworthy_ancestor_origin`
- `policy_container`

These fields are critical for enforcing proper fetch behavior under
modern web security models, and were previously omitted from module
script requests.

This change ensures that scripts loaded via `<script type="module">` or
dynamic `import()` correctly reflect the calling document’s security
environment.

---
<!-- 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 #36592

<!-- Either: -->
- [X] There are tests for these changes

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
2025-04-20 11:54:20 +00:00
Servo WPT Sync
c915bf05fc
Sync WPT with upstream (20-04-2025) (#36618)
Automated downstream sync of changes from upstream as of 20-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-04-20 01:47:50 +00:00
elomscansio
d05496277e
htmlvideoelement: Include security settings in poster image request (#36605)
This PR addresses [#36593](https://github.com/servo/servo/issues/36593),
where the poster image request for `<video>` elements lacked several
settings introduced in `RequestBuilder`. These settings —
`insecure_requests_policy`, `has_trustworthy_ancestor_origin`, and
`policy_container` — are now forwarded from the document, aligning
poster requests with other fetches using the correct policy container
and trust assessment.

This ensures that poster images are requested under the same security
assumptions as other media or resource loads.

---
<!-- 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 #36593

<!-- Either: -->
- [X] There are tests for these changes

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-20 01:46:09 +00:00
Josh Matthews
3ab5b8c447
script: Only register one image callback per CSS image in use. (#36612)
When layout encounters a CSS image, the script thread is responsible for
fetching the image from the image cache. When the image is not yet
available, the script thread creates image cache listeners to perform
actions in response to future updates from the image cache.

In the current implementation, a cache listener would iterate over all
nodes using a particular image and mark them as dirty. However, we
mistakenly added one cache listener per node, leading to n^2 runtime
while performing lots of redundant work. For cases like #36480 with over
1000 elements using the same image, this led to a completely
unresponsive script thread.

Testing: Manual testing on the provided testcase, and a new WPT test
that times out without this PR's changes.
Fixes: #36480

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-19 06:09:03 +00:00
Siddhant N Trivedi
7ee9d07a9a
content/dom: set navigator.onLine attribute to true (#36560)
Sets the navigator.onLine attribute to true.

Testing:
Ran `./mach run https://pinterest.com
--enable-experimental-web-platform-features`. This doesn't show the
"Hmm..you're not connected to the internet" text anymore.
<img width="1027" alt="Screenshot 2025-04-16 at 11 31 02 AM"
src="https://github.com/user-attachments/assets/3745077b-dc51-42ce-88a0-38d5f157fc0c"
/>


part of: #36554

---------

Signed-off-by: Siddhant N. Trivedi <sidntrivedi012@gmail.com>
Signed-off-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-19 01:34:13 +00:00
Gregory Terzian
fc201927ae
Streams: make writable streams transferrable (#36588)
Making writable streams transferrable, part of
https://github.com/servo/servo/issues/34676

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-04-18 08:33:36 +00:00
sagudev
05b5268061
chore: Update wgpu to v25 (#36486)
Updates wgpu to v25 and remove some verbose logging from CTS (that also
causes OOM).

Testing: WebGPU CTS

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-18 07:49:06 +00:00
Tim van der Lippe
2a81987590
Check CSP for inline event handlers (#36510)
This also ensures that document now reports all violations and we set
the correct directive.

With these changes, all `script-src-attr-elem` WPT tests pass.

Part of #36437 

Requires servo/rust-content-security-policy#3 to land first

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-17 21:11:25 +00:00
Oriol Brufau
bb440717b2
Fix /css/css-flexbox/gap-007-* WPT tests (#36585)
These tests were locally failing for me, both on Servo and Gecko,
because these browsers choose a different default font than Blink,
making the flex items a bit bigger, and thus only fitting 2 items on the
first flex line, instead of 3 items.

Manually setting the `line-height` provides consistent results.

Testing: This doesn't affect CI, but fixes the local problem for me.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-17 16:39:40 +00:00
Oriol Brufau
939355645e
layout: Always floor the max-content size by the min-content size (#36571)
This is a follow-up to #36518, which only addressed inline formatting
contexts. However, flex formatting contexts had the same problem, so it
seems safer to address it in general.

Testing: this makes a WPT test pass
Fixes: #36570

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-17 15:36:05 +00:00
Josh Matthews
30390f8c5e
Fix crash when enumerating properties of global object (#36491)
These changes make our implementation of the enumeration hook for
globals [match
Gecko's](https://searchfox.org/mozilla-central/rev/1f65969e57c757146e3e548614b49d3a4168eeb8/dom/base/nsGlobalWindowInner.cpp#3297),
fixing an assertion failure that occurred in the previous
implementation.

Our enumeration hook is supposed to fill a vector with names of
properties on the global object without modifying the global in any way;
instead we were defining all of the missing webidl interfaces. We now do
much less work and crash less.

Testing: New crashtest based on manual testcase.
Fixes: #34686

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-17 03:32:53 +00:00
Taym Haddadi
f2ee40e40b
fix writablestream assertion crash when getting chunk size following spec change (#36566)
One-line change to align with the new spec and avoid a crash.
fix #36565

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-04-16 18:26:38 +00:00
Josh Matthews
9aa09d73b5
Fix crash when setting custom property on Location (#36494)
The JS engine uses types like `Handle<Maybe<PropertyDescriptor>>` in
various places and our automated bindings are not able to handle the
Maybe type. We have hand-written bindings that use outparams to indicate
a PropertyDescriptor value is actually the Nothing type, but that data
was getting lost when we passed the property descriptor to
SetPropertyIgnoringNamedGetter, which assumed that the property
descriptor was always valid.

Depends on https://github.com/servo/mozjs/pull/579.

Testing: Manual testing on testcase from
https://github.com/servo/servo/issues/34709, and new crashtest added.
Fixes: #34709

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-16 06:52:48 +00:00
TIN TUN AUNG
f5e6eb289a
media element: support seekable attribute (#36541)
support seekable attribute in `htmlmediaelement`, modify `seek`
algorithm to use `seekable` attribute.

related
[specs](https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable)
Testing: Run WPT Test
Fixes: https://github.com/servo/servo/issues/22297

Will wait for https://github.com/servo/media/pull/435 before turning
this to ready for review.
cc @jdm @xiaochengh

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-04-16 05:52:19 +00:00
webbeef
98884a5081
Switch to data_url::mime for document content type (#36522)
The data_url Mime parser has a more conformant behavior in most cases,
including dealing with charsets.

Testing: wpt expectations with new passes are updated.

Signed-off-by: webbeef <me@webbeef.org>
2025-04-15 17:12:48 +00:00
Andrei Volykhin
6b38289584
canvas: Add "EnforceRange" attribute to CanvasImageData interface (#36546)
Add missing "EnforceRange" attribute to interface methods
https://html.spec.whatwg.org/multipage/canvas.html#canvasimagedata

--
- [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/html/canvas/element/pixel-manipulation/2d.imageData*
tests/wpt/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData*

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-04-15 14:44:44 +00:00
Oriol Brufau
10f6f50c61
script: Implement CSSStyleSheet constructor (#36521)
https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssstylesheet

Testing: covered by WPT
This is part of #36162

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-15 14:05:13 +00:00
Kingsley Yung
dacd951c9f
Make DOMException serializable (#36535)
Follow the implementation of making DOMPoint and DOMPointReadOnly
serializable in PR #35989

Testing: Passed a test previously expected to fail.
Fixes: #36463

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-04-15 13:25:31 +00:00
Gregory Terzian
f8b6b9f7b6
Transfer ReadableStream (#36181)
<!-- Please describe your changes on the following line: -->

Add transfer support to ReadableStream. Part of
https://github.com/servo/servo/issues/34676

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

<!-- Either: -->
- [ ] 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: gterzian <2792687+gterzian@users.noreply.github.com>
2025-04-15 07:39:26 +00:00
Oriol Brufau
7171d18e96
Run all tests with --enable-experimental-web-platform-features (#36335)
Fixes: #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 23:14:47 +00:00
Oriol Brufau
428e8f7dd8
Enable all experimental web platform features on all testsuites (#36519)
This affects the following testsuites:
 - tests/wpt/tests/
 - tests/wpt/mozilla/tests/
 - tests/wpt/webgl/tests/
 - tests/wpt/webgpu/tests/

Testing: Several tests improve
This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 18:33:38 +00:00
Oriol Brufau
c7502a99f0
layout: Floor the max-content size by the min-content size (#36518)
It's typically a given that the min-content size can't exceed the
max-content size. However, it was possible to break that assumption when
an inline formatting context had contents with a negative outer size
(due to margins). This could lead to assert failures.

This patch avoids the problem by flooring the max-content size to not be
smaller than the min-content size. Note there is no interoperability:
https://github.com/w3c/csswg-drafts/issues/12076

Testing: adding new reftest and crashtest
Fixes: #36481

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 18:00:32 +00:00
Tim van der Lippe
4e1ea81992
Implement CSP check for Trusted Types (#36363)
The algorithm [1] is implemented in the content-security-policy
package.

Requires
https://github.com/rust-ammonia/rust-content-security-policy/pull/56
This is part of #36258

[1]:
https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-should-trusted-type-policy-creation-be-blocked-by-content-security-policy

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-14 16:44:50 +00:00
Gae24
2bab5d8d52
async clipboard: implement writeText (#36498)
Implement enough of the Clipboard API to have a working `writeText`.

Testing: Unfortunately many clipboard-apis tests require testdriver, so
only idlharness ones will pass now.

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-04-14 13:49:43 +00:00
Oriol Brufau
f1417c4e75
layout: Let getComputedStyle resolve auto min size as 0px when needed (#36430)
The initial value of `min-width` and `min-height` was 0px in CSS2.
However, CSS3 changed it to `auto`, so for backwards compatibility,
`getComputedStyle` needs to resolve it to 0px in a bunch of cases.

Testing: covered by WPT

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 10:31:48 +00:00
Tim van der Lippe
85e4a2b5c7
Update FetchTaskTarget to propagate CSP violations. (#36409)
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>
2025-04-13 20:54:59 +00:00
Tim van der Lippe
dcc88b53aa
Implement "Create a Trusted Type" algorithm (#36454)
This algorithm is quite straightforward written in the specification,
but leads to some type awkwardness in Rust. Most notably, the callbacks
have different types and cannot be unified easily. They also return
different string types. Similarly, the returning objects are all unique
types and don't have a common denominator.

Therefore, rather than implementing it in 1-to-1 fashion with the
specification text, it instead uses callbacks to instruct the type
system of what to call when.

This is further complicated by the fact that the callback can exist
or not, as well as return a value or not. This requires multiple
unwrangling, combined with the fact that the algorithm should throw
or not.

All in all, the number of lines is relatively low compared to the
specification algorithm and the Rust compiler does a lot of heavy
lifting figuring out which type is what.

Part of https://github.com/servo/servo/issues/36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-13 03:55:23 +00:00
Servo WPT Sync
0c045fc247
Sync WPT with upstream (13-04-2025) (#36488)
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>
2025-04-13 02:52:15 +00:00
Sebastian C
85bd0918f2
Update ProgressEvent to use doubles (#36487)
See: https://github.com/whatwg/xhr/pull/394

Testing: WPT tests exist for this

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-13 01:41:39 +00:00
Oriol Brufau
64fe52e918
layout: Enforce min-content min main size of flex-level tables (#36469)
Additionally to the minimum specified in min-width or min-height, tables
also enforce a `min-content` minimum.

This was handled in `Sizes::resolve()`, but flex items don't use that.
So this patch moves the logic into `Size::resolve_for_min()`.

Testing: Covered by WPT

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-12 14:22:37 +00:00
Oriol Brufau
fc2eb7bff2
Enable dom_svg_enabled on all tests (#36475)
This feature is part of --enable-experimental-web-platform-features, so
it should be enabled on all tests.

This causes some new failures, but mostly it's because the tests were
timing out instead of running the failing subtests.

This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-11 18:46:00 +00:00
Sebastian C
2d2cfade36
fix: File to FormData not correctly handling name and lastModified (#36458)
Set File's lastModified when reconstructing from Blob for FormData
Remove special character replacement in fileName (spec removed this
step)

Testing: WPT tests exist
Fixes: #22744 (if I undertand the issue correctly the filename issue was
already fixed and now this fixes the lastModified part)

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-11 17:59:03 +00:00
Sebastian C
87c40b4168
Manually concatenate ACRH headers to not include a space (#36455)
headers library will join values with `, ` (comma space) but
Access-Control-Request-Headers specifies that it does not use the normal
combining algorithm and values should be joined with `,` (comma).

Testing: WPT tests exist
Fixes: temporary fix for #36451 until hyperium/headers#207 is fixed

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-11 17:01:55 +00:00
Tim van der Lippe
0aa08042d5
Implement attribute and property lookup for Trusted Types (#36422)
These algorithms are used to check whether an attribute/property can
accept a Trusted Type.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-11 08:38:00 +00:00
Sebastian C
2c7aeca404
Handle HTTP Refresh header (#36393)
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>
2025-04-11 07:25:37 +00:00
DK Liao
5df4c760d3
fix: Crashing due to input element hack (#36461)
This PR addresses a crash in text input element due to a hack to prevent
text input being trimmed.

The updated behavior will only add `zero width space` unicode character
to the node if there's no text content instead of adding it constantly.
Also by adding the same `zero width space` unicode character to text
area when there's no text content within will allow text area element to
properly display caret.

<img width="197" alt="截圖 2025-04-11 中午12 51 00"
src="https://github.com/user-attachments/assets/10bc7314-9aa3-49df-baac-ef26d39a96d8"
/>

This PR also addresses issues with multiple glyph runs:


https://github.com/user-attachments/assets/658db56f-b166-47ec-bc77-c6c13114d669

Testing: This PR is tested using:
- `./mach run -d 'data:text/html,<input id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`
- `./mach run -d 'data:text/html,<textarea id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`

without causing crashes, while the results should be covered by WPT
tests

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

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-04-11 06:51:52 +00:00
TIN TUN AUNG
972ca77ce1
dom: should change media element's currentSrc to children source element's 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](1434753561)
cc @xiaochengh

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-04-11 06:32:34 +00:00
Oriol Brufau
2d40fb7fe2
Implement disabled attribute for <link rel="stylesheet"> (#36446)
Adds support for both the content and the IDL attribute.
Note this doesn't cover dynamic updates to `document.styleSheets` and
the owner node of the sheet.

Testing: Covered by WPT
Fixes: #26739

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-10 16:28:01 +00:00
DK Liao
e62aecb103
feat: Implement display for text selection and caret (#35830)
This PR introduces an initial, straightforward implementation for
displaying text selection and the caret.

This is achieved by passing the selection range and insertion point
index down to `TextFragment`, along with the starting offset of each
`TextFragment` to determine the proper range for displaying the caret
and text selection. Additionally, the `selected_style` was passed into
`TextFragment` to specify the background color.

During the final build phase, although whitespace is typically ignored
when constructing glyphs, we still need to retrieve it to render both
the caret and text selection at the correct location. This ensures that
whitespace is not overlooked when the `TextFragment` contains an
insertion point or selection range.

There are several improvements yet to be made, including:

- The caret is static and does not flash.
- The caret is not rendered when the input field is empty. (I suppose
there should be an easy fix somewhere but I haven't found it yet)

**Working Examples**

macOS


https://github.com/user-attachments/assets/f3622cbe-9fa6-40c0-b2d8-b3a8f9842c28

Windows


https://github.com/user-attachments/assets/9b008a0d-0011-4c76-a2e2-0e35869a216c

Linux

[Screencast from 03-07-2025 11_05_41
AM.webm](https://github.com/user-attachments/assets/09a311ad-f975-4450-a66c-b20be525a5ed)



---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #33237 (But the cursor isn't blinking
yet)
- [x] These changes do not require tests because there's no behavior
change

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-04-10 14:40:38 +00:00
Josh Matthews
c16ca22970
Run all CSP tests in CI by default. (#36436)
Extending the original set from #36402 since there are additional tests
relevant to the work happening in #36409 and #36363.

Testing: New tests in CI.
Fixes: Part of https://github.com/servo/servo/issues/4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-10 08:09:23 +00:00
Gae24
64b401696a
script: Correctly convert a jsval to a Promise (#36403)
Fixes an oversight of #36097, in which converting to a Promise would
fail if the value passed wasn't actually a Promise, while in binding
code we actually call `Promise::new_resolved` on the value.

Testing: There are wpt tests that should pass now

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-04-09 16:35:35 +00:00
Josh Matthews
ce4ca9ee98
Run subset of CSP tests by default. (#36402)
This will establish a baseline for the changes from #36363.

Testing: New tests in CI.
Fixes: Part of #4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-08 14:46:25 +00:00
Sebastian C
9bdc46d66b
fix: meta referrer updating to follow spec (#36390)
Previously the referrer policy used tree order but the spec only cares
about the most-recently-updated or most-recently-added meta referrer.

Testing: change has existing WPT tests

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-07 22:29:12 +00:00
Simon Wülker
8f1c23692e
Create a parser for URLPatterns (#36382)
This change implements the pattern parser, completing the "parsing
pipeline" for URL patterns.

Testing: Primarily `urlpattern/urlpattern-hasregexpgroups.any.js`, some
other subtests start to pass too.

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 18:08:22 +00:00
Martin Robinson
2b63e60e8f
layout: Add initial support for the ::marker pseudo-element (#36317)
This change adds support for the `::marker` pseudo-element and ensure
that
markers are cached into the box tree. This is only initial support,
there are a few
things missing such as animations, transitions, and support the
`content` CSS
property.

Testing: There are WPT tests for this change.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-07 17:49:05 +00:00
Manuel Rego
777b74252a
wpt: Unskip acid folder as most tests are passing (#36340)
Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2025-04-07 15:46:41 +00:00
Euclid Ye
3242592f34
Fix transition toggle & cancellation & delay (#35978)
More details in Stylo PR: https://github.com/servo/stylo/pull/145

---
<!-- 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 
- fixes https://github.com/servo/servo/issues/35833
- fixes https://github.com/servo/servo/issues/35982

<!-- Either: -->
- [x] There are new passing test: `css/css-logical/animation-004.html:
Transitions from physical to logical update when the direction is
changed`

Created new test files as well: 

1. `css-transitions/transition-remove-and-change-immediate.html`
2.  `css-transitions/transition-zero-duration-with-delay.html`
3. `css-transitions/transitioncancel-003.html`

<!-- 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. -->

cc @Asun0204  @xiaochengh @stevennovaryo

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-04-07 14:51:32 +00:00