-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
webdriver: Improve "element click" by using container + Upgrade outdated test #38436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 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( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, sounds fair :)
tests/wpt/tests/webdriver/tests/classic/element_click/interactability.py
Show resolved
Hide resolved
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#54120) title and body. |
1 similar comment
✍ 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>
tests/wpt/tests/webdriver/tests/classic/element_click/interactability.py
Outdated
Show resolved
Hide resolved
.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( |
There was a problem hiding this comment.
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>
28ef3e3
to
fccf17c
Compare
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#54120). |
.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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, sounds fair :)
…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}]}
test_element_intercepted_no_pointer_events
inelement_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>
.