diff --git a/cpp/iedriver/Element.cpp b/cpp/iedriver/Element.cpp index 5caf0895cad8b..b0614f4655864 100644 --- a/cpp/iedriver/Element.cpp +++ b/cpp/iedriver/Element.cpp @@ -347,7 +347,6 @@ bool Element::IsObscured(LocationInfo* click_location, } } - bool is_obscured = false; CComPtr elements_doc; hr = doc.QueryInterface(&elements_doc); if (FAILED(hr)) { @@ -358,7 +357,7 @@ bool Element::IsObscured(LocationInfo* click_location, return false; } - long top_most_element_index = -1; + bool is_obscured = false; CComPtr elements_hit; hr = elements_doc->elementsFromPoint(static_cast(x), static_cast(y), @@ -409,13 +408,11 @@ bool Element::IsObscured(LocationInfo* click_location, // it with the pointer device has no effect, so it is effectively // not obscuring this element. is_obscured = true; - break; } } else { // We were unable to retrieve the computed style, so we must assume // the other element is obscuring this one. is_obscured = true; - break; } } else { // Repeating the immediate-child-of-inline-element hack from above for