Commit graph

34 commits

Author SHA1 Message Date
Kelechi Ebiri
1a3f10bba4
feat: implement ShadowRoot::setHTMLUnsafe (#36240)
Implements #36166

---------

Signed-off-by: TG <ebiritg@gmail.com>
2025-05-01 15:19:41 +00:00
Fuguo
0c0ee04b8e
Improve inter-document focus handling (#36649)
*Describe the changes that this pull request makes here. This will be
the commit message.*
rewritten the PR #28571
Implement
[Window#focus](https://html.spec.whatwg.org/multipage/#dom-window-focus),
[Window#blur](https://html.spec.whatwg.org/multipage/#dom-window-blur)
Testing: WPT
Fixes: #8981 #9421

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
Co-authored-by: yvt <i@yvt.jp>
2025-04-30 04:37:53 +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
Andrei Volykhin
5f5bf87eee
dom: Track "removed" event listener status (#36163)
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>
2025-03-28 23:34:04 +00:00
batu_hoang
28c8c1df0c
Implement declarative shadow dom (#34964)
* 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>
2025-03-17 09:41:34 +00:00
webbeef
44d1e2ae0d
Implement HTMLCanvasElement.toBlob (#34938)
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>
2025-01-10 19:04:42 +00:00
Servo WPT Sync
3aa9e00e4e
Sync WPT with upstream (29-12-2024) (#34789)
* 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>
2024-12-29 07:01:24 +00:00
Josh Matthews
4242ff9626
Make traverse_preorder follow shadow roots (#34503)
* script: Ensure shadow-inclusve preorder traversals follow hosted shadow roots.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Handle unregistering element id/name values inside of a shadow root.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Merge shadow root tree iteration logic.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-12-07 04:28:34 +00:00
Servo WPT Sync
dca33f681a
Update web-platform-tests to revision b'6cf69a4f431581e9438681abc776029308ee8a8c' (#34265)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-11-17 01:49:15 +00:00
Servo WPT Sync
4da378a987
Update web-platform-tests to revision b'8686b7a6d288d3b2c22b5ddb5a21773619b22b85' (#34202)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-11-10 01:42:44 +00:00
Josh Matthews
a2af619009
Enable more DOM preferences for unofficial WPT test runs (#34116)
* Enable some DOM prefs for all WPT tests.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Update expected results.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-03 15:36:13 +00:00
Servo WPT Sync
63b2f813af
Update web-platform-tests to revision b'73d6bd0d61f0ad5341d0c2303a7638e3aa12a594' (#34029)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-10-27 01:31:51 +00:00
Servo WPT Sync
f8933a5735
Sync WPT with upstream (06-10-2024) (#33668)
* Update web-platform-tests to revision b'9448ab31f11e671a8b069e3407b4f6279bea698e'

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>

* Remove intermittent failure.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2024-10-06 02:45:43 +00:00
Servo WPT Sync
013473f1d5
Sync WPT with upstream (29-09-2024) (#33580)
* Update web-platform-tests to revision b'16d17064d2122cfa83b22f8bab32c96e6514c034'

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>

* Update big5-decode-csbig5.html.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>
2024-09-29 07:54:33 +00:00
Servo WPT Sync
85823edd01
Update web-platform-tests to revision b'ec9b870fec350e59e9db48ae2858e914a07f38d6' (#33359)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-09-08 01:41:09 +00:00
Servo WPT Sync
3453d9fdad
Update web-platform-tests to revision b'5d8ec746ed021738e7ee0cee92ad1a1814ba00fe' (#33274)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2024-09-01 01:40:45 +00:00
Servo WPT Sync
d439faf6fb
Update web-platform-tests to revision b'ed9e9309618bdf76de06ff85757edbc8e1d7da82' (#32512)
Signed-off-by: WPT Sync Bot <josh+wptsync@joshmatthews.net>
2024-06-16 04:41:02 +00:00
Servo WPT Sync
855f32013f
Update web-platform-tests to revision b'68f7e630c2646830a3ee274e21a3efcb001fbd65' (#32464) 2024-06-09 05:48:28 +00:00
Servo WPT Sync
f3c2edb743
Update web-platform-tests to revision b'015f19c5b653f51f2e38ebe97ec0ff62523f57de' (#32121) 2024-04-21 05:02:25 +00:00
Servo WPT Sync
5083f3c4fb
Update web-platform-tests to revision b'daa07cf3c47652ed67e637f2a39bbc34f91cfe10' (#32071) 2024-04-14 04:39:35 +00:00
Servo WPT Sync
05f1bbf0a9
Update web-platform-tests to revision b'b73a0a32890ff293961eb55bb90ba57a5a711f48' (#32010) 2024-04-07 02:58:36 +00:00
Servo WPT Sync
6c67fa8b9e
Update web-platform-tests to revision b'504dbb9401e985461bdc3fb534cb26fd5bb9d9ad' (#31372) 2024-02-18 04:56:46 +00:00
Servo WPT Sync
03ac032798
Sync WPT with upstream (11-02-2024) (#31309)
* Update web-platform-tests to revision b'33d11f1db34802fda00e64ddeb0b7ef040cf65be'

* Update expectations

---------

Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-02-11 08:01:56 +00:00
Servo WPT Sync
e7d2d23e1e
Update web-platform-tests to revision b'5049a31d2a7eebd7bca08317e56664021a8bd36c' (#31085) 2024-01-14 04:22:04 +00:00
Servo WPT Sync
527119aebb
Sync WPT with upstream (07-01-2024) (#31018)
* Update web-platform-tests to revision b'ecbab417501c89bca2265314e35719a950b07e02'

* update expectation for service-worker-registration.https.html.ini

The expectation of CRASH was added during the import
seemingly due to an intermittent crash in CI. The test is
no longer crashing.

---------

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-01-08 05:36:08 +00:00
Servo WPT Sync
914fe64fc7
Sync WPT with upstream (03-12-2023) (#30814)
* Update web-platform-tests to revision b'dd47ca67f55ac9df45235b2335200fb885dd1357'

* Update test expectations

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-12-06 17:45:20 +00:00
Servo WPT Sync
3fc584d1a1
Sync WPT with upstream (12-11-2023) (#30724)
* Update web-platform-tests to revision b'46476776fdbf0a62522621002ba8af68e4d478b6'

* wpt import: update expectation

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-11-15 05:55:31 +00:00
Servo WPT Sync
4ea042cb14
Sync WPT with upstream (29-10-2023) (#30641)
* Update web-platform-tests to revision b'9f24a7061dc47c00ffe3f0f6dda5822a9b15c2a5'

* Update expectations

---------

Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-10-31 05:06:17 +00:00
Servo WPT Sync
65beca94cd
Sync WPT with upstream (24-10-2023) (#30607)
* wpt sync: adapt code for new TestRoot class

Fixes #30558

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* temp change to allow wpt sync build to pass

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* Update web-platform-tests to revision b'0d5028f200c8651b17bb224657d6e1065adcff37'

* Revert "temp change to allow wpt sync build to pass"

This reverts commit bad72c7f87.

* revert metadata update for intermittent timeouts

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-10-25 07:26:53 +00:00
Servo WPT Sync
5eed4e978c
Sync WPT with upstream (08-10-2023) (#30516)
* Update web-platform-tests to revision b'3d46548c5fbeb3c1b5f6bc5ae0854e0a1a0462ff'

* Revert expectation for column-count-crash.https.html

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-10-08 16:57:16 +00:00
Servo WPT Sync
c06ec90151
Sync WPT with upstream (04-10-2023) (#30493)
* Update web-platform-tests to revision b'dfda99176a5d552fb1129fa353b7e4c69f6ed92c'

* fix linter errors after WPT import

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* Update expectations

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2023-10-06 00:51:48 +00:00
Servo WPT Sync
5cfa80e86f
Sync WPT with upstream (20-08-2023) (#30143)
* Update web-platform-tests to revision b'50e91f3cfd1140cafc188516488f2dca289239af'

* Delete flaky result for css2/linebox/vertical-align-baseline-002

* Delete flaky result for html/rendering/bindings/the-textarea-element-0/cols-default.html.ini

* Delete flaky result for CSS2/lists/list-style-applies-to-001.xht.ini

---------

Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-08-22 11:36:48 +00:00
Oriol Brufau
963104e5fc
Run same tests for layout-2020 and layout-2013 (#30092)
Most tests were only being run for layout-2013, not for layout-2020.
This wasn't great since layout-2020 is now the default.

So this patch unifies the lists of included tests for both layouts.
For layout-2013 this implies adding css/css-content/, css/css-logical/
and css/css-masking/clip/.
For layout-2020 this implies adding several additional css tests, and
also tests like dom/, js/, html/, etc.
2023-08-15 00:28:32 +00:00
Martin Robinson
f4578afdfe
Rename metadata directories
This renames:
 - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout`
 - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta`
 - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout`
 - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`
2023-06-22 21:15:41 +02:00