mirror of
https://github.com/servo/servo.git
synced 2025-08-26 07:38:21 +01:00
webdriver: Consider shadow including descendant when computing "obscured" step of “element click” (#38841)
Testing: WebDriver Conformance test. In addition to fixing all "Element Intercepted" errors in https://github.com/yezhizhen/servo/actions/runs/17142506541, we are able to fix many other tests. Fixes: #38837 --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
cae8d22823
commit
66adf2bf9f
4 changed files with 10 additions and 28 deletions
|
@ -1904,7 +1904,7 @@ pub(crate) fn handle_element_click(
|
||||||
// `paint_tree` is guaranteed not empty as element is "in view".
|
// `paint_tree` is guaranteed not empty as element is "in view".
|
||||||
if !container
|
if !container
|
||||||
.upcast::<Node>()
|
.upcast::<Node>()
|
||||||
.Contains(Some(paint_tree[0].upcast::<Node>()))
|
.is_shadow_including_inclusive_ancestor_of(paint_tree[0].upcast::<Node>())
|
||||||
{
|
{
|
||||||
return Err(ErrorStatus::ElementClickIntercepted);
|
return Err(ErrorStatus::ElementClickIntercepted);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,3 +10,12 @@
|
||||||
|
|
||||||
[test_link_closes_window]
|
[test_link_closes_window]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[test_link_from_nested_context_with_target[\]]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[test_link_from_nested_context_with_target[_blank\]]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[test_link_from_nested_context_with_target[_self\]]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -13,21 +13,3 @@
|
||||||
|
|
||||||
[test_out_of_view_dropdown]
|
[test_out_of_view_dropdown]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[test_click_multiple_option]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_click_preselected_multiple_option]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_click_multiple_does_not_deselect_others]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_click_selected_multiple_option]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_out_of_view_multiple]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_option_disabled]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[shadow_dom.py]
|
|
||||||
[test_shadow_element_click[host_element\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_nested_shadow_element_click[outer_element\]]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test_nested_shadow_element_click[inner_element\]]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue