DevTools: Fix default search query for read-only editors.

Apparently read only editor has some differences in processing selection and showing search bar might change the selection.
This patch makes sure that default query candidate is calculated before doing any action that could change current selection.

R=apavlov, pfeldman, lushnikov
NOTRY=true

Review URL: https://codereview.chromium.org/251793002

git-svn-id: svn://svn.chromium.org/blink/trunk@172636 bbb929c8-8fbe-4397-9dbb-9b2b20218538