8000 webdriver: Improve "element click" by using container + Upgrade outdated test by yezhizhen · Pull Request #38436 · servo/servo · GitHub
[go: up one dir, main page]

Skip to content

Conversation

yezhizhen
Copy link
Member
@yezhizhen yezhizhen commented Aug 3, 2025
  • According to spec, we should use container instead of element itself to determine "in-view".
  • Updated test_element_intercepted_no_pointer_events in element_click/interactability.py to expect "element not interactable". This was outdated with spec as original test was written 7 years ago add webdriver element_click tests web-platform-tests/wpt#11453.

Testing: new passing cases for <option>, <select>.

@servo-wpt-sync
Copy link
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#54120) with upstreamable changes.

.find_document(pipeline)
.expect("Document existence guaranteed by `get_known_element`");
if !is_element_in_view(&element, &document, can_gc) {
let paint_tree = get_element_pointer_interactable_paint_tree(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caching paint_tree to be used for "Step 7. is obscured?" later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid building the paint tree when pointer-events: none?

Copy link
Member Author
@yezhizhen yezhizhen Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking pointer-events: none is part of is_element_in_view happening at next step, which is expected to be reused in the future. In heuristic, I prefer current way as we rarely have pointer-events: none for early return.

I tried a bit with LazyCell with no luck, as "closures can only be coerced to fn types if they do not capture any variables".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sounds fair :)

@servo-wpt-sync
Copy link
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#54120) title and body.

1 similar comment
@servo-wpt-sync
Copy link
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#54120) title and body.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
.find_document(pipeline)
.expect("Document existence guaranteed by `get_known_element`");
if !is_element_in_view(&element, &document, can_gc) {
let paint_tree = get_element_pointer_interactable_paint_tree(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid building the paint tree when pointer-events: none?

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
@servo-wpt-sync
Copy link
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#54120).

@yezhizhen yezhizhen requested a review from xiaochengh August 4, 2025 07:44
.find_document(pipeline)
.expect("Document existence guaranteed by `get_known_element`");
if !is_element_in_view(&element, &document, can_gc) {
let paint_tree = get_element_pointer_interactable_paint_tree(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sounds fair :)

@xiaochengh xiaochengh added this pull request to the merge queue Aug 4, 2025
Merged via the queue into servo:main with commit c59ee57 Aug 4, 2025
21 checks passed
@yezhizhen yezhizhen deleted the container-change branch August 4, 2025 08:46
PotatoCP added a commit to PotatoCP/servo that referenced this pull request Aug 6, 2025
…ted test (servo#38436) (wd)

{"fail_fast": false, "matrix": [{"name": "Linux (WPT)", "workflow": "linux", "wpt": true, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "build_args": "", "wpt_args": "./tests/wpt/tests/webdriver/tests/classic/ --product servodriver --headless --processes 1", "number_of_wpt_chunks": 2}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0