OSDN Git Service

use copies of matrix, paint instead of references
authorCary Clark <cary@android.com>
Mon, 20 Dec 2010 17:33:36 +0000 (12:33 -0500)
committerCary Clark <cary@android.com>
Wed, 22 Dec 2010 18:18:12 +0000 (13:18 -0500)
commit9432ba4878ebf79acd4424398b344c154f452db2
tree37f3e7ef1f51d05ff3674fd5661d96b831e24310
parentc5be2c45ac53063054dddaffbacada021cd6491f
use copies of matrix, paint instead of references

The matrix and paint may be gone when later referenced
to determine the width of spaces. Replace the references
with copies.

When widening the initial selection to a word, the first
or last glyph could be skipped if the tap was one
glyph away. Detect this include the final glyph.

The bitmap used to detect a space between glyphs could
be too small for the test; make it as large as possible.

The test for finding the closest glyph when the test point
is inside the glyph's bounds should be triggered only
if the best glyph found so far is also a match.

If the initial hit point doesn't touch a word, abort.

Only measure the distance for test points if the test
text and best text have the same column state or if
the test point is outside of the current column.

The initial word selection needs to work differently from
extending the selection. Make the clip small for the
initial detect and widen it for the word expansion.

Build the selection region before expanding the word
since the column selection uses that data.

There is a companion bug fix in frameworks/base triggered
by this code, but neither is dependent on the other.

bug:3293330
Change-Id: If9d1a3bd7ec5d1642b63dbab1845d2f3735ddc81
WebKit/android/nav/SelectText.cpp
WebKit/android/nav/SelectText.h
WebKit/android/nav/WebView.cpp