From d2966aa787e0dcc4d26a10b6f0dc9f3a2f51abe4 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Tue, 14 Dec 2010 08:04:18 -0500 Subject: improve text selection LayerAndroid.* Adjust the hit-test (x,y) by the layer position. Keep track of the adjusted (x,y) and store the best to be returned when the best layer is found. CachedRoot.cpp Remove code that adjusted (x,y) by layer bounds. SelectText.* Detect columns of text and prefer new characters in the same column as the existing selection. Don't extend the selection until the tap point moves past the word anchors. There's more work to do on selecting text in layers. bug:3275625 bug:3271730 bug:3191699 Change-Id: Ib3c2b35e5eebe30c6032f484cf76d388e94293e0 --- WebKit/android/nav/CachedRoot.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'WebKit/android/nav/CachedRoot.cpp') diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index 7f4f06f..7bedd4f 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -1674,16 +1674,12 @@ SkPicture* CachedRoot::pictureAt(int* xPtr, int* yPtr, int* id) const { #if USE(ACCELERATED_COMPOSITING) if (mRootLayer) { - const LayerAndroid* layer = mRootLayer->find(*xPtr, *yPtr, mPicture); + const LayerAndroid* layer = mRootLayer->find(xPtr, yPtr, mPicture); if (layer) { SkPicture* picture = layer->picture(); DBG_NAV_LOGD("layer %d picture=%p (%d,%d)", layer->uniqueId(), picture, picture ? picture->width() : 0, picture ? picture->height() : 0); - SkRect localBounds; - layer->bounds(&localBounds); - *xPtr -= localBounds.fLeft; - *yPtr -= localBounds.fTop; if (picture) { if (id) *id = layer->uniqueId(); -- cgit v1.1