Commit graph

28894 commits

Author SHA1 Message Date
Kenzie Raditya Tirtarahardja
d95dd69e3c
script(webdriver): Check if element is keyboard interactable in element send keys (#38235)
Step 7.6 of remote end steps of [Element Send
Keys](https://w3c.github.io/webdriver/#element-send-keys)
> If element is not
[keyboard-interactable](https://w3c.github.io/webdriver/#dfn-keyboard-interactable),
return [error](https://w3c.github.io/webdriver/#dfn-error) with [error
code](https://w3c.github.io/webdriver/#dfn-error-code) [element not
interactable](https://w3c.github.io/webdriver/#dfn-element-not-interactable).

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-24 04:32:46 +00:00
Euclid Ye
f726737f24
Reduce redundancy in servoshell webdriver message forwarding and add log for script::handle_send_keys_non_typeable (#38238)
There was a new commit for after
https://github.com/servo/servo/pull/38189#discussion_r2224805172, but
that does not seem to update/stop MQ.
Also removed `forward_webdriver_command` in servoshell according to
https://github.com/servo/servo/pull/38212#discussion_r2221854327.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-24 04:22:04 +00:00
Narfinger
6ace7ad577
OHOS: Clean up some compile warnings (#38240)
This cleans up some compile warnings about unused functions.

Testing: Does not change functionality, OHOS and Linux still compile
(hopefully the other builds too).

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-07-24 03:29:49 +00:00
Euclid Ye
0e4b2bfef0
cargo: Remove unused dependency (#38239)
Remove unused `Cargo.toml` dependency to reduce binary size.

Testing: Can still compile in different platforms.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-23 13:32:50 +00:00
shuppy
52f53f61e1
script: Add support for creating globals in isolated compartments (#38236)
to use the [SpiderMonkey Debugger
API](https://firefox-source-docs.mozilla.org/js/Debugger/), we need to
call it from an internal debugger script that we will supply. this
script must run in the same runtime as the debuggee(s), but in a
separate
[compartment](https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Compartments)
([more
details](https://hacks.mozilla.org/2020/03/future-proofing-firefoxs-javascript-debugger-implementation/)).

when creating two globals in the same runtime, Servo will generally try
to reuse an existing compartment for the second global, and there are
other places in script where we rely on this reuse. but for the debugger
script, we can’t do this.

this patch adds a `use_system_compartment` flag to global object
descriptors, which isolates the global in its own compartment in both
possible directions:
- it forces the global to create a new compartment, preventing the reuse
of any debuggee’s compartment
- it fails the check in select_compartment(), preventing future
debuggees from reusing the global’s compartment

Testing: manually tested working in devtools debugger patch (#37667),
where it will undergo automated tests

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-07-23 11:34:37 +00:00
Kenzie Raditya Tirtarahardja
0970a99b7c
webdriver: Implement element send keys command for non-typeable form control (#38189)
Implement Step 8 of remote end steps of [Element Send
keys](https://w3c.github.io/webdriver/#element-send-keys), specifically
for non-typeable form control.

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-23 09:11:44 +00:00
Jo Steven Novaryo
3cb16eb864
Reland Input type=text Shadow DOM With Performance Improvement (#37483)
Depends on #37427.

In addition to the changes introduced by
https://github.com/servo/servo/pull/37065, there are several performance
improvements and nits as follows:
- Use the internal pseudo element for style matching, this will reduce
the performance regression by ~66%.
- Manual construction of the `Text` node inside a text container. This
is followed by the modification of the inner `Text` node instead of
using `SetTextContent` which is more expensive.
- Use `implemented_pseudo_element` instead of
`text_control_inner_editor` `NodeFlag` to handle the special cases that
these elements should follow, specifically the:
  - focus delegation workaround;
  - selections; and
  - line height resolving.
- More documentation.

Servo's side of: https://github.com/servo/stylo/pull/217

Testing: No new unexpected WPT failure, except for the one introduced by
https://github.com/servo/servo/pull/37065/.
Fixes: #36307 #37205

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-07-23 09:08:24 +00:00
Jo Steven Novaryo
f523445fc3
script: Implement DocumentOrShadowDOM.adoptedStylesheet with FrozenArray (#38163)
Spec:
https://drafts.csswg.org/cssom/#dom-documentorshadowroot-adoptedstylesheets

Implement `DocumentOrShadowDOM.adoptedStylesheet`. Due to
`ObservableArray` being a massive issue on its own, it will be as it was
a `FrozenArray` at first. This approach is similar to how Gecko
implement adopted stylesheet. See
https://phabricator.services.mozilla.com/D144547#change-IXyOzxxFn8sU.

All of the changes will be gated behind a preference
`dom_adoptedstylesheet_enabled`.

Adopted stylesheet is implemented by adding the setter and getter of it.
While the getter works like a normal attribute getter, the setter need
to consider the inner working of document and shadow root StylesheetSet,
specifically the ordering and the invalidations. Particularly for
setter, we will clear all of the adopted stylesheet within the
StylesheetSet and readd them. Possible optimization exist, but the focus
should be directed to implementing `ObservableArray`.

More context about the implementations
https://hackmd.io/vtJAn4UyS_O0Idvk5dCO_w.

Testing: Existing WPT Coverage
Fixes: https://github.com/servo/servo/issues/37561

---------

Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
2025-07-23 08:16:01 +00:00
Euclid Ye
d2e5137201
constellation: Eliminate long-standing inactive code path for WebDriverData (#38221)
Cleaning up some dead code which has been here for 9 years. They are
never detected by Lint because we still initialize them as `None` but
never change afterwards.

Testing: No regression.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-07-23 06:50:20 +00:00
JoeDow
b8a1df2bc2
script: Use NodeDamage::ContentOrHeritage for slot changes (#38198)
This change aims to reduce the scope of incremental box tree
construction. Previously, when children of slot node changed, the slot
would always be marked as requiring box tree reconstruction; now, it is
adjusted to only mark the slot node as needing to recollect its box tree
children.

Testing: This should not change observable behavior and is thus covered
by existing WPT tests.

Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
2025-07-23 03:36:32 +00:00
Euclid Ye
4ff6b1d4a7
Implement setting position through webdriver for headed window (#38209)
Previously, we pretend we are able to set position in response. Now we
can really do it.

Testing: Able to set position accurately when tested locally.
Fixes: Task 5 of #37804.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-22 18:26:37 +00:00
Kenzie Raditya Tirtarahardja
9e29ca2047
WebDriver: Will Send Keys add documentation and modularize input file (#38165)
Add comment for better documentation of `will_send_keys` and extract
file input handling to a function.

Testing: No behaviour change

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-22 17:30:22 +00:00
sagudev
cd340fa8b9
canvas: Make script/canvas thread boundry mostly stateless (#38164)
This PR removes all `Set*` commands as we will send needed options on
each request. This will allow us to remove most of state handling from
canvas paint thread (currently it's still stateful).

Testing: Existing WPT tests
work towards #38022

try run: https://github.com/sagudev/servo/actions/runs/16413823963

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-22 12:30:15 +00:00
JoeDow
8a1cc69717
Layout: minor optimizations and bugfix for non-functional details (#38197)
This change adds some minor optimizations and bugfix for non-functional
details with seperated commits:
- fix the omission that stop use `Rayon` in single-thread mode
- add trace for incremental box tree construction
- fix the bug that failed to skip reflow entirely when there is no need
for `restyle` and a fragment tree has already been built.
- add trace for stylist preparation during reflow. In certain scenarios,
this phase might take up a significant amount of time, such as when
there are a large number of shadow trees.

Testing: This should not change observable behavior and is thus covered
by existing WPT tests.

---------

Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
2025-07-22 10:56:52 +00:00
Euclid Ye
57fc569818
Remove Webdriver Server's access to Constellation (#38212)
`WebDriverCommandMsg::TakeScreenshot` was the last thing blocking us
from removing constellation access in webdriver server. Now we can
happily remove it.

Surprisingly, this reduces binary size by 185KB for release profile in
Windows. #37737 removes a net total of 300 lines, but only reduced 98KB.

Testing: No regression after testing.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-22 10:17:19 +00:00
sagudev
61df7ab127
chore: Update kurbo to 0.11.3 (#38210)
Some of the code we wrote is now also in upstream, mainly
`BezPath.current_position` and euclid types conversions.

Testing: Code is covered by existing WPT tests.

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
2025-07-22 08:23:13 +00:00
Jonathan Schwender
97f544aa20
dom: Optimize IFrameCollection::validate (#38196)
The `IFrameCollection` was previously rebuilt too often. This PR tries
to address the todo, to only rebuild the IFrameCollection when
necessary.

Testing: `CSS Selector Invalidation: :has() invalidation should not be
O(n^2)` wpt-test changed status from timeout to failed.
Fixes: #38131 (IFrameCollection::validate accounts for 30% of script
time in DOM heavy scenarios)


Co-authored-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-07-22 03:54:16 +00:00
Euclid Ye
b0a29393a9
WebDriver: Wait focus to complete when switching window (#38160)
Previously the webdriver do not wait for focus to complete, which can
cause some instability.

No matter interact as human or webdriver, the focus chain always goes
as: Embedder forwards -> Constellation (do some updates) -> Embedder (do
some updates).

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-21 04:18:21 +00:00
webbeef
7c96084298
Adjust CSP for top-level image documents (#38186)
Allows loading of document images even when they have a sandbox CSP rule
to align with other browsers.

Testing: No wpt failures:
https://github.com/webbeef/servo/actions/runs/16403138806
Fixes: #38180

Signed-off-by: webbeef <me@webbeef.org>
2025-07-20 21:07:47 +00:00
Tim van der Lippe
e24acc5fe5
Add warning for reporting CSP violations (#38181)
This should help debug cases like #38180

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-07-20 16:06:04 +00:00
Josh Matthews
b8a6600e9a
compositing: Remove unused dependency. (#38179)
There are no uses of `net` within the `compositing` crate.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-07-20 16:05:31 +00:00
Tim van der Lippe
20386d9854
Forward CSP violations from load_whole_resource to parent event loop (#38048)
Any CSP violations happening when loading a worker should be reported
on the global of the document that creates the worker. Since workers
run in different threads, we can't pass in this parent global into
the worker global scope. Instead, we need to send a message to the
parent event loop to report it on the correct global.

Part of https://github.com/servo/servo/issues/4577
Fixes https://github.com/servo/servo/issues/37027

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-07-20 16:00:28 +00:00
Kingsley Yung
0537c29064
devtools: Use request destination as cause_type in NetworkEventActor (#38162)
The cause_type in NetworkEventActor was derived from a hard-coded
pattern match on the request URL file extension.

This patch replaces the hard-coded pattern matching with the Destination
field of Request, to provide a better alignment with the Fetch
specification.

Testing: Updated unit tests.
Fixes: #38151

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-07-18 22:20:26 +00:00
Simon Wülker
329e8cfbb3
Implement allow_declarative_shadow_roots for async html parser (#38150)
This method was previously unimplemented, so attaching declarative
shadow roots was always allowed.

Testing: CI does not run with the async html parser. Try run:
https://github.com/simonwuelker/servo/actions/runs/16350173930/job/46196332473
Part of https://github.com/servo/servo/issues/37418

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-07-18 12:23:01 +00:00
Kenzie Raditya Tirtarahardja
b4b9e2c515
Webdriver: Forward ErrorStatus for take element screenshot (#38134)
Based on
[spec](tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/screenshot.py.ini),
we should not expect the error to only be
`ErrorStatus::StaleElementReference`.

Testing:
`tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/screenshot.py.ini`

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-18 06:42:51 +00:00
Kenzie Raditya Tirtarahardja
39144bb013
Webdriver: Allow error when selecting file at ElementSendKeys (#38158)
Based on [spec](https://w3c.github.io/webdriver/#element-send-keys),

> 5. Verify that each file given by the user exists. If any do not,
return [error](https://w3c.github.io/webdriver/#dfn-error) with [error
code](https://w3c.github.io/webdriver/#dfn-error-code) [invalid
argument](https://w3c.github.io/webdriver/#dfn-invalid-argument).

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-18 06:40:40 +00:00
Ashwin Naren
a91625a332
Proper compare implementation for IndexedDBKeyType (#38123)
This is needed by the IndexedDBKeyRange implementation.

Doesn't fix anything since it isn't used at the moment.

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-07-18 06:26:47 +00:00
sagudev
a070f24450
canvas: Move current_default_path to script CanvasState (#38114)
This PR moves current path handling from canvas paint thread to script's
`CanvasState`. Because we used manual impl for arcto and some prechecks
for early fail before sending IPC we also needed to fix some bugs in
Path impl.

Testing: Existing WPT tests
work towards #38022
try run: https://github.com/sagudev/servo/actions/runs/16316090028

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-18 05:45:53 +00:00
Jo Steven Novaryo
bbed6cddcd
css: Refactor StyleSheetInDocument owner (#38136)
Refactor `documentotshadowroot::StyleSheetInDocument`, renaming it into
`ServoStylesheetInDocument` to avoid confusion with Stylo's
`StylesheetInDocument` trait.

To support constructed stylesheet. The `ServoStylesheetInDocument.owner`
would contains enum of:
- `Dom<Element>` - for stylesheet parsed from an element.
- `Dom<CSSStylesheet>` - for constructed stylesheet.

Testing: No WPT regression.
Fixes: #38133

---------

Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
2025-07-18 05:39:09 +00:00
Sebastian C
d671f58078
Add CookieStore pref and add baseline test expectations (#38154)
This adds a preference to control the Cookie Store feature. Also enables
the Cookie Store WPT tests with the preference and adds the expectations
as a baseline. These tests are expected to be failing because we have
not implemented the Cookie Store yet.

Testing: Enables new WPT tests.

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-07-18 02:21:34 +00:00
batu_hoang
f0e10e63e2
webdriver: Implement send alert text (#38140)
Implement webdriver `SendAlertText` command

Tests:
https://github.com/longvatrong111/servo/actions/runs/16342669929
https://github.com/longvatrong111/servo/actions/runs/16342671477

cc: @xiaochengh

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2025-07-17 21:24:50 +00:00
Jo Steven Novaryo
3ce95b2ba5
script: Impl safe from_jsval wrapper (#38149)
Implement `SafeFromJSValConvertible`, a safe wrapper for
`ToJSValConvertible`. And, replace unsafe `ToJSValConvertible` with
`SafeFromJSValConvertible` in `script/dom` to reduce the amount of
unsafe code in `script`.

This would support the implementation of `AdoptedStylesheet` where we
will need to have a setter/getter of sequence, that was implemented by
`any` types.

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

Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
2025-07-17 19:32:36 +00:00
Euclid Ye
f81ae1f57f
webdriver chore: check browsing context existence before handling user prompt when required (#38142)
Thanks to Trong with #38035, we can finally handle user prompt. This PR
is mainly dirty work:
1. Add browsing context check before handling user prompt when required,
according to spec.
2. Reduce IPC by removing redundant context existence check.
3. Add many missing docs.

Testing: New passing cases and turn some ERROR into FAIL.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-17 17:07:05 +00:00
Simon Wülker
9a5a33190d
Remove Document::set_allow_declarative_shadow_roots (#38143)
This method is unused. `rustc` didn't complain because it was marked as
`pub` (which it shouldn't have been). A few of the surrounding methods
were also `pub`, which this change fixes.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-07-17 16:43:56 +00:00
Euclid Ye
fe2c13c777
doc: Add doc for compositor/webview/embedder related to window/rect/inner_size/rendering_context (#38110)
Add docs before actually fixing #38089, #38090, #37978, #38093.

Testing: Just adding docs.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-17 13:40:28 +00:00
batu_hoang
345733a5c5
webdriver: Add handle any user prompts step for all commands (#38035)
- Add `handler any user prompt` step for all commands.
- Enable webdriver tests which were blocked by `handle any user prompt`
step.

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
2025-07-17 09:47:47 +00:00
Tim van der Lippe
18d1a62add
Inherit CSP for blob workers (#38033)
Workers created from Blobs inherit their CSP. Now we inherit the CSP and
set the correct base API url. The base API url should be used when
determining the
report-uri endpoint. Otherwise, the blob URL would be used as a base,
which is invalid and the report wouldn't be sent.

Also create a helper method to concatenate two optionals of CSPList,
which was used in several places.

Part of #4577

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-07-17 08:14:20 +00:00
Kenzie Raditya Tirtarahardja
439cb00e31
WebDriver: Set current browsing context for NavigateTo and Refresh command (#38107)
Previously we didn't change the current browsing context id in our
WebDriver Session after the commands `Navigate To` and `Refresh`

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-17 07:57:31 +00:00
Abdelrahman Hossam
c76c44d0fb
script: Ensure that keyboard modifiers, screen point, and client point are set in WheelEvents (#37947)
- Updating the WheelEvent initialization to correctly handle keyboard
modifiers when the wheel event is triggered. The changes ensure that the
modifiers (Ctrl, Alt, Shift, Meta) are properly set based on the current
state of the keyboard when the wheel event is created. This is
particularly important for scenarios where the wheel event is influenced
by key presses, such as scrolling with the Ctrl key pressed to zoom in
or out.

- Updating the `screen_point` and `client_point` as it was always 0,0
before. Now, it shows the correct position of the mouse pointer while
triggering the wheel event.

Test: Manual Test case and existing WPT tests
(classic/perform_actions/wheel.py[test_scroll_with_key_pressed])
Fixes: #37827

Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
2025-07-17 05:32:03 +00:00
Ashwin Naren
f70a4eb4ff
Move common indexeddb methods out of dom implementations (#38101)
A lot of shared functions were scattered around the dom files; I moved
them into `indexed_db.rs` for clarity.

Fixes: Nothing to my knowledge, just a cleanup

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-07-17 04:19:03 +00:00
Ashwin Naren
e10466b4c4
net: Do not print SVG tree in Debug implementation of VectorImageData (#37846)
Manually implement Debug LoadResult so that VectorImageData doesn't get
logged.

Testing: N/A
Fixes: #37771

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-07-17 04:15:23 +00:00
sagudev
b799f27817
canvas: Use stored transform instead of querying canvas paint thread (#38097)
We already store transform in context state, so let's just use this when
querying instead of using IPC to ask canvas paint thread.

Testing: Existing WPT tests
work towards #38022

try run: https://github.com/sagudev/servo/actions/runs/16299182583

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-16 14:59:10 +00:00
Gregory Terzian
b821377771
script: further use of safe to jsval (#38099)
Remove size bound from safe to jsval trait, apply to script/dom, with
the exception of windowproxy.

Second part of https://github.com/servo/servo/issues/37951

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

*Describe the changes that this pull request makes here. This will be
the commit message.*

Testing: *Describe how this pull request is tested or why it doesn't
require tests*
Fixes: *Link to an issue this pull requests fixes or remove this line if
there is no issue*
2025-07-16 14:46:10 +00:00
Euclid Ye
72a9f36c43
webdriver: Reduce IPC for viewport boundary check (#38113)
Testing: No behaviour change.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-16 10:06:49 +00:00
Kenzie Raditya Tirtarahardja
7dae7f9983
WebDriver: Implement some missing steps of wait for navigation to complete (#38079)
Based on
https://w3c.github.io/webdriver/#dfn-wait-for-navigation-to-complete. We
still have not implement the timer parameter, but I think it makes sense
to implement Step 8.4 of `Navigation To` first.

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-07-16 09:19:57 +00:00
sagudev
429b91da49
canvas: Store current path only in user space (#38098)
Before we stored path in user or device space and do conversions as
needed, but that complicated things.

So we got two options:
1. store path in device space: here we would need to add
`Option<Transform>` to each path command, and before each usage we need
to invert current transform (as current transform is already applied by
stroke/fill and we cannot just pass I, because we need scaling to make
lines thicker)
2. store path in user space and do transform whenever we change the
transform. There is no need to do inverse on uses.

I chose option 2. because it's less complicated and will probably
benefit performance (set transform typically called more rarely than
path building/fill/stroke).

In follow up PR I will move all of this to script, that's why
PathBuilderRef was not removed yet.

Testing: Existing WPT tests
work towards #38022
try run: https://github.com/sagudev/servo/actions/runs/16304221495

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-16 07:30:20 +00:00
Ashwin Naren
71e7019d45
[IndexedDB] Adhere better to the specification for idb object store related operations (#37682)
Many object store related operations require the transaction to be
checked: to ensure it is still active, and, if the operation is a write,
that the transaction is not read-only. I've added the
`check_transaction` method to perform these checks.

Additionally `Clear` was still half-implemented, so I went ahead and
implemented that.

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-07-16 02:11:06 +00:00
Euclid Ye
2e3c280f46
webdriver: improve perform pointermove & wheel actions with more accurate coordinates (#38095)
1. Create `get_origin_relative_coordinates` according to
[spec](https://w3c.github.io/webdriver/#dfn-get-coordinates-relative-to-an-origin)
to be reused
2. Add previously missing offset for PointerOrigin::Element
3. Refactor code for perform pointermove/wheel to be closer to spec.
4. Handle some issues with spec:
https://github.com/w3c/webdriver/issues/1758

Testing: Several new passing cases as we are more precise with
coordinates now.
Fixes: Part of #38042.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-16 02:03:34 +00:00
Josh Matthews
189e649222
indexeddb: Allow deleting unknown DBs. (#38076)
The current behaviour is too strict according to the spec and is the
cause of many intermittent test errors.

Testing: Existing coverage is sufficient.
Fixes: #37706

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-07-16 01:22:18 +00:00
webbeef
30b6e289e0
Refactor constellation broadcast channel (#38077)
- Move the 2 hash maps used to manage channels in their own struct.
- The constellation is still in charge of origin checks since it holds
the pipeline information required.
- BroadcastMsg is renamed to BroadcastChannelMsg for consistency.


Testing: covered by existing tests.
Fixes: #38060

Signed-off-by: webbeef <me@webbeef.org>
2025-07-15 13:57:05 +00:00