Automated import from //branches/master/...@142632,142632

This commit is contained in:
Leon Scroggins
2009-03-25 15:15:24 -07:00
committed by The Android Open Source Project
parent 1badb712b9
commit 6e3835ff4a
2 changed files with 9 additions and 20 deletions

View File

@@ -341,18 +341,17 @@ import java.util.ArrayList;
// trackball or auto-correct.
mWebView.setSelection(start, start + before);
}
updateCachedTextfield();
if (cannotUseKeyEvents) {
return;
}
int length = events.length;
for (int i = 0; i < length; i++) {
// We never send modifier keys to native code so don't send them
// here either.
if (!KeyEvent.isModifierKey(events[i].getKeyCode())) {
sendDomEvent(events[i]);
if (!cannotUseKeyEvents) {
int length = events.length;
for (int i = 0; i < length; i++) {
// We never send modifier keys to native code so don't send them
// here either.
if (!KeyEvent.isModifierKey(events[i].getKeyCode())) {
sendDomEvent(events[i]);
}
}
}
updateCachedTextfield();
}
@Override

View File

@@ -3607,9 +3607,6 @@ public class WebView extends AbsoluteLayout
WebViewCore.pauseUpdate(mWebViewCore);
int contentX = viewToContent((int) x + mScrollX);
int contentY = viewToContent((int) y + mScrollY);
if (inEditingMode()) {
mTextEntry.updateCachedTextfield();
}
nativeClearFocus(contentX, contentY);
// remove the zoom anchor if there is any
if (mZoomScale != 0) {
@@ -3787,9 +3784,6 @@ public class WebView extends AbsoluteLayout
mTouchMode = TOUCH_DONE_MODE;
int contentX = viewToContent((int) mLastTouchX + mScrollX);
int contentY = viewToContent((int) mLastTouchY + mScrollY);
if (inEditingMode()) {
mTextEntry.updateCachedTextfield();
}
nativeClearFocus(contentX, contentY);
break;
}
@@ -4276,10 +4270,6 @@ public class WebView extends AbsoluteLayout
int contentY = viewToContent((int) mLastTouchY + mScrollY);
Rect rect = new Rect(contentX - mNavSlop, contentY - mNavSlop,
contentX + mNavSlop, contentY + mNavSlop);
// If we were already focused on a textfield, update its cache.
if (inEditingMode()) {
mTextEntry.updateCachedTextfield();
}
nativeSelectBestAt(rect);
}