Skip to content

Commit

Permalink
Revert commit 2344ff1 for IE
Browse files Browse the repository at this point in the history
The changes to the obscured element algorithm were incorrect. Any value
other than 'none' for the pointerEvents CSS property on a non-SVG element
will result in the element receiving pointer events.
  • Loading branch information
jimevans committed Dec 31, 2018
1 parent 2e0fa40 commit 95e31e4
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions cpp/iedriver/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,6 @@ bool Element::IsObscured(LocationInfo* click_location,
break;
}

bool is_list_element_svg = false;
CComPtr<ISVGElement> list_svg_element;
hr = element_in_list->QueryInterface<ISVGElement>(&list_svg_element);
if (SUCCEEDED(hr) && list_svg_element) {
is_list_element_svg = true;
}

bool is_list_element_displayed;
Element list_element_wrapper(element_in_list,
this->containing_window_handle_);
Expand Down Expand Up @@ -393,15 +386,7 @@ bool Element::IsObscured(LocationInfo* click_location,
// may be technically obscuring this element, but manipulating
// it with the pointer device has no effect, so it is effectively
// not obscuring this element.
// It is possible for the pointer-events value to be set to
// values other than "none" or "auto" for SVG elements. Since
// we are currently throwing up our hands with SVG elements,
// if the value is anything other than "auto", assume the
// element is not obscured.
if (list_element_pointer_events_value == L"auto" &&
!is_list_element_svg) {
is_obscured = true;
}
is_obscured = true;
}
} else {
// We were unable to retrieve the computed style, so we must assume
Expand Down

0 comments on commit 95e31e4

Please sign in to comment.