Change frame tree node traversal in FindRequestManager

There's a bug in TraverseNext that might cause a node to traverse back
to itself, even though it should've traversed to another node, triggering
an infinite loop. This is caused by treating inner WebContents as
children of the main frame, and potentially adding the same node as
a child of multiple nodes.

This CL changes the child/parent frame tree node traversal in
FindManager, such that we won't encounter these cases anymore.

Bug: 942346
Change-Id: I030492cb4c8a2aa330c71a15f9f337eb7ed0f3b6
Commit-Queue: Rakina Zata Amni <>
Reviewed-by: Alex Moshchuk <>
Reviewed-by: Ehsan Karamad <>
Cr-Commit-Position: refs/heads/master@{#652459}
8 files changed