Per comment introduced in bug 49977 by dglazkov@chromium.org, we should use DOM traversal in discovering first focusable node, rather than render tree.
A FIXME comment in setFocusedNodeIfNeeded suggest combining the traversal code with that in EventHandle::dispatchMouseEvent. I don't see how that would simplify things though as they both need to perform different additional checks on the node.
Created attachment 76456 [details] Patch
Comment on attachment 76456 [details] Patch ok.
Comment on attachment 76456 [details] Patch Clearing flags on attachment: 76456 Committed r73984: <http://trac.webkit.org/changeset/73984>
All reviewed patches have been landed. Closing bug.