Simplify code for getting selected text.
Simplify code for getting selected text.

As suggested by rniwa in review
https://chromiumcodereview.appspot.com/18041002/

This will match the corresponding change in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=118684

BUG=none
TEST=layouttest

Review URL: https://chromiumcodereview.appspot.com/19357002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@154331 bbb929c8-8fbe-4397-9dbb-9b2b20218538

axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk