script: Fire scroll event whenever JS scrolled (#38321)

Implement JS scroll event firing compliant to
https://drafts.csswg.org/cssom-view/#scrolling-events. Basically
whenever, the an element or the viewport is scrolled, we will fire a
scroll event. The changes push a scroll event whenever an API causes a
scroll position to change.

Testing: New WPT tests for basic APIs.
Part of: https://github.com/servo/servo/issues/31665

---------

Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
This commit is contained in:
Jo Steven Novaryo 2025-08-01 15:30:22 +08:00 committed by GitHub
parent 372e5eae59
commit a063b5e78a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 407 additions and 74 deletions

View file

@ -467655,6 +467655,10 @@
"5df4fa279363798f2f471467ed674c092c7a1749",
[]
],
"large-dimension-document.sub.html": [
"5d29f7be0bbb77e6303598aef833a810e84b6e80",
[]
],
"prefixed-animation-event-tests.js": [
"021b6bb9dfdc422d1a6c3c9c4a1a039f89a901d5",
[]
@ -633745,6 +633749,20 @@
}
]
],
"scroll-event-fired-to-element.html": [
"3484a2ec92b2bd8faa1d5147568f13a83b8c59d9",
[
null,
{}
]
],
"scroll-event-fired-to-iframe.html": [
"2ff3de79d33fa0a676a0eda4f109b6d0e634cc9d",
[
null,
{}
]
],
"scrollend-event-fired-after-sequence-of-scrolls.tentative.html": [
"dab6dcc9bd8d67a514ca95daf3e1d64b10a45188",
[