OSDN Git Service

handle out of order selections
authorCary Clark <cary@android.com>
Thu, 8 Jul 2010 21:02:39 +0000 (17:02 -0400)
committerCary Clark <cary@android.com>
Fri, 9 Jul 2010 19:45:46 +0000 (15:45 -0400)
commitc69490c357eedc0e672a7a88aae8a543ea3bebe7
treec871a42d098df9c63eb3140424ff4607ae4a9d62
parente32ff802ed0d82511f12c353a1e84bf49b1a284b
handle out of order selections

Usually, the text on a webpage is drawn from top to bottom but
sometimes it is drawn out of order. In these cases the picture
finds the select end before it finds the select start.

When the select start and end are ordered, all of the text in
the picture between the two are selected. This allows selecting
all of the text on the page, even if the start isn't spacially
before the end.

When the select start and end are flipped, select the text
spacially between the two.

The flipped page scenario was found by
http://code.google.com/p/android/issues/detail?id=8533

Change-Id: Ia22d49396d68fefc3d64fad438c4b0c02f668c1c
WebKit/android/nav/SelectText.cpp
WebKit/android/nav/SelectText.h