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)
committerandroid-merger <android-merger@google.com>
Fri, 24 Dec 2010 00:18:26 +0000 (16:18 -0800)
commit9af72e6bb7d4c24f070d6b7a8c839ac92b971568
tree37f3e7ef1f51d05ff3674fd5661d96b831e24310
parent7f66e2d8f8607ddf0b001d6bcda5a0d07ac1a819
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