script: Improve webdriver_handler::get_element_in_view_center_point (#38058)

1. Some rounding was wrongly used which can be a source of inaccuracy. 
2. Use `window.InnerWidth` instead of `body.ClientWidth` according to
spec.

Testing: Many new passing cases.
Fixes: Part of #38042.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-07-15 08:14:17 +08:00 committed by GitHub
parent f13311a00e
commit 8877adccf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 63 additions and 69 deletions

View file

@ -40,3 +40,6 @@
[test_add_cookie_with_invalid_samesite_flag]
expected: FAIL
[test_add_cookie_with_expiry_in_the_future]
expected: FAIL

View file

@ -1,30 +1,3 @@
[scroll_into_view.py]
[test_scroll_into_view]
expected: FAIL
[test_partially_visible_does_not_scroll[9\]]
expected: FAIL
[test_partially_visible_does_not_scroll[8\]]
expected: FAIL
[test_partially_visible_does_not_scroll[7\]]
expected: FAIL
[test_partially_visible_does_not_scroll[6\]]
expected: FAIL
[test_partially_visible_does_not_scroll[5\]]
expected: FAIL
[test_partially_visible_does_not_scroll[4\]]
expected: FAIL
[test_partially_visible_does_not_scroll[3\]]
expected: FAIL
[test_partially_visible_does_not_scroll[2\]]
expected: FAIL
[test_partially_visible_does_not_scroll[1\]]
expected: FAIL

View file

@ -10,3 +10,6 @@
[test_seen_nodes[https coop\]]
expected: FAIL
[test_removed_iframe]
expected: FAIL

View file

@ -4,6 +4,3 @@
[test_control_click[\\ue051-ctrlKey\]]
expected: FAIL
[test_release_control_click]
expected: FAIL

View file

@ -1,9 +1,3 @@
[pointer_origin.py]
[test_element_center_point]
expected: FAIL
[test_element_center_point_with_offset]
expected: FAIL
[test_element_larger_than_viewport]
expected: FAIL

View file

@ -43,3 +43,21 @@
[test_no_change[rect19\]]
expected: FAIL
[test_partial_input[rect2\]]
expected: FAIL
[test_partial_input[rect3\]]
expected: FAIL
[test_partial_input[rect4\]]
expected: FAIL
[test_partial_input[rect5\]]
expected: FAIL
[test_partial_input[rect6\]]
expected: FAIL
[test_partial_input[rect7\]]
expected: FAIL