Commit cb66a54e authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Remove obsolete OOPIF code

Remove obsolete code that was intended to handle OOPIF on m65 and below.

Change-Id: I1e3a7fbe23a0c9b472fb6da3310cd80a63458ca9
Reviewed-on: https://chromium-review.googlesource.com/1211110Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590474}
parent 858e7734
...@@ -662,18 +662,8 @@ Status ScrollElementRegionIntoView( ...@@ -662,18 +662,8 @@ Status ScrollElementRegionIntoView(
" return document.evaluate(xpath, document, null," " return document.evaluate(xpath, document, null,"
" XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;" " XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;"
"}"; "}";
bool needs_special_oopif_handling =
!session->chrome->GetBrowserInfo()->is_android &&
session->chrome->GetBrowserInfo()->major_version <= 65;
bool has_saved_region_offset = false;
WebPoint saved_region_offset;
for (std::list<FrameInfo>::reverse_iterator rit = session->frames.rbegin(); for (std::list<FrameInfo>::reverse_iterator rit = session->frames.rbegin();
rit != session->frames.rend(); ++rit) { rit != session->frames.rend(); ++rit) {
if (needs_special_oopif_handling && !has_saved_region_offset &&
web_view->IsOOPIF(rit->frame_id)) {
saved_region_offset = region_offset;
has_saved_region_offset = true;
}
base::ListValue args; base::ListValue args;
args.AppendString( args.AppendString(
base::StringPrintf("//*[@cd_frame_id_ = '%s']", base::StringPrintf("//*[@cd_frame_id_ = '%s']",
...@@ -707,8 +697,6 @@ Status ScrollElementRegionIntoView( ...@@ -707,8 +697,6 @@ Status ScrollElementRegionIntoView(
if (status.IsError()) if (status.IsError())
return status; return status;
} }
if (has_saved_region_offset)
region_offset = saved_region_offset;
*location = region_offset; *location = region_offset;
return Status(kOk); return Status(kOk);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment