remove unused text parameters from WebView
The additional parameters are no longer used.
This commit is contained in:
@@ -205,7 +205,6 @@ public class WebView extends AbsoluteLayout
|
||||
// true means redraw the screen all-the-time. Only with AUTO_REDRAW_HACK
|
||||
private boolean mAutoRedraw;
|
||||
|
||||
// keep debugging parameters near the top of the file
|
||||
static final String LOGTAG = "webview";
|
||||
|
||||
private static class ExtendedZoomControls extends FrameLayout {
|
||||
@@ -2923,8 +2922,7 @@ public class WebView extends AbsoluteLayout
|
||||
*/
|
||||
/* package */ void deleteSelection(int start, int end) {
|
||||
mTextGeneration++;
|
||||
mWebViewCore.sendMessage(EventHub.DELETE_SELECTION, start, end,
|
||||
cursorData());
|
||||
mWebViewCore.sendMessage(EventHub.DELETE_SELECTION, start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2934,8 +2932,7 @@ public class WebView extends AbsoluteLayout
|
||||
* @param end End of selection.
|
||||
*/
|
||||
/* package */ void setSelection(int start, int end) {
|
||||
mWebViewCore.sendMessage(EventHub.SET_SELECTION, start, end,
|
||||
cursorData());
|
||||
mWebViewCore.sendMessage(EventHub.SET_SELECTION, start, end);
|
||||
}
|
||||
|
||||
// Called by JNI when a touch event puts a textfield into focus.
|
||||
@@ -3133,7 +3130,7 @@ public class WebView extends AbsoluteLayout
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mShiftIsPressed == false && nativeFocusNodeWantsKeyEvents() == false
|
||||
if (mShiftIsPressed == false && nativeCursorWantsKeyEvents() == false
|
||||
&& (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT
|
||||
|| keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT)) {
|
||||
mExtendSelection = false;
|
||||
@@ -3217,7 +3214,7 @@ public class WebView extends AbsoluteLayout
|
||||
}
|
||||
|
||||
// TODO: should we pass all the keys to DOM or check the meta tag
|
||||
if (nativeFocusNodeWantsKeyEvents() || true) {
|
||||
if (nativeCursorWantsKeyEvents() || true) {
|
||||
// pass the key to DOM
|
||||
mWebViewCore.sendMessage(EventHub.KEY_DOWN, event);
|
||||
// return true as DOM handles the key
|
||||
@@ -3326,7 +3323,7 @@ public class WebView extends AbsoluteLayout
|
||||
}
|
||||
|
||||
// TODO: should we pass all the keys to DOM or check the meta tag
|
||||
if (nativeFocusNodeWantsKeyEvents() || true) {
|
||||
if (nativeCursorWantsKeyEvents() || true) {
|
||||
// pass the key to DOM
|
||||
mWebViewCore.sendMessage(EventHub.KEY_UP, event);
|
||||
// return true as DOM handles the key
|
||||
@@ -4559,7 +4556,6 @@ public class WebView extends AbsoluteLayout
|
||||
/* package */ void replaceTextfieldText(int oldStart, int oldEnd,
|
||||
String replace, int newStart, int newEnd) {
|
||||
HashMap arg = new HashMap();
|
||||
arg.put("focusData", cursorData());
|
||||
arg.put("replace", replace);
|
||||
arg.put("start", Integer.valueOf(newStart));
|
||||
arg.put("end", Integer.valueOf(newEnd));
|
||||
@@ -4569,7 +4565,6 @@ public class WebView extends AbsoluteLayout
|
||||
|
||||
/* package */ void passToJavaScript(String currentText, KeyEvent event) {
|
||||
HashMap arg = new HashMap();
|
||||
arg.put("focusData", cursorData());
|
||||
arg.put("event", event);
|
||||
arg.put("currentText", currentText);
|
||||
// Increase our text generation number, and pass it to webcore thread
|
||||
@@ -5269,6 +5264,7 @@ public class WebView extends AbsoluteLayout
|
||||
private native boolean nativeCursorIsAnchor();
|
||||
private native boolean nativeCursorIsTextInput();
|
||||
private native String nativeCursorText();
|
||||
private native boolean nativeCursorWantsKeyEvents();
|
||||
private native void nativeDebugDump();
|
||||
private native void nativeDestroy();
|
||||
private native void nativeDrawCursorRing(Canvas content);
|
||||
@@ -5293,7 +5289,6 @@ public class WebView extends AbsoluteLayout
|
||||
* Returns true if the native focus nodes says it wants to handle key events
|
||||
* (ala plugins). This can only be called if mNativeClass is non-zero!
|
||||
*/
|
||||
private native boolean nativeFocusNodeWantsKeyEvents();
|
||||
private native Rect nativeGetCursorRingBounds();
|
||||
private native Region nativeGetSelection();
|
||||
private native boolean nativeHasCursorNode();
|
||||
|
||||
@@ -359,11 +359,10 @@ final class WebViewCore {
|
||||
private native int nativeGetContentMinPrefWidth();
|
||||
|
||||
// Start: functions that deal with text editing
|
||||
private native void nativeReplaceTextfieldText(int frame, int node, int x,
|
||||
int y, int oldStart, int oldEnd, String replace, int newStart,
|
||||
int newEnd);
|
||||
private native void nativeReplaceTextfieldText(
|
||||
int oldStart, int oldEnd, String replace, int newStart, int newEnd);
|
||||
|
||||
private native void passToJs(int frame, int node, int x, int y, int gen,
|
||||
private native void passToJs(int gen,
|
||||
String currentText, int keyCode, int keyValue, boolean down,
|
||||
boolean cap, boolean fn, boolean sym);
|
||||
|
||||
@@ -409,8 +408,7 @@ final class WebViewCore {
|
||||
* @param start Beginning of selection to delete.
|
||||
* @param end End of selection to delete.
|
||||
*/
|
||||
private native void nativeDeleteSelection(int frame, int node, int x, int y,
|
||||
int start, int end);
|
||||
private native void nativeDeleteSelection(int start, int end);
|
||||
|
||||
/**
|
||||
* Set the selection to (start, end) in the focused textfield. If start and
|
||||
@@ -418,8 +416,7 @@ final class WebViewCore {
|
||||
* @param start Beginning of selection.
|
||||
* @param end End of selection.
|
||||
*/
|
||||
private native void nativeSetSelection(int frame, int node, int x, int y,
|
||||
int start, int end);
|
||||
private native void nativeSetSelection(int start, int end);
|
||||
|
||||
private native String nativeGetSelection(Region sel);
|
||||
|
||||
@@ -871,26 +868,22 @@ final class WebViewCore {
|
||||
|
||||
case REPLACE_TEXT:
|
||||
HashMap jMap = (HashMap) msg.obj;
|
||||
CursorData fData = (CursorData) jMap.get("focusData");
|
||||
String replace = (String) jMap.get("replace");
|
||||
int newStart =
|
||||
((Integer) jMap.get("start")).intValue();
|
||||
int newEnd =
|
||||
((Integer) jMap.get("end")).intValue();
|
||||
nativeReplaceTextfieldText(fData.mFrame,
|
||||
fData.mNode, fData.mX, fData.mY, msg.arg1,
|
||||
nativeReplaceTextfieldText(msg.arg1,
|
||||
msg.arg2, replace, newStart, newEnd);
|
||||
break;
|
||||
|
||||
case PASS_TO_JS: {
|
||||
HashMap jsMap = (HashMap) msg.obj;
|
||||
CursorData fDat = (CursorData) jsMap.get("focusData");
|
||||
KeyEvent evt = (KeyEvent) jsMap.get("event");
|
||||
int keyCode = evt.getKeyCode();
|
||||
int keyValue = evt.getUnicodeChar();
|
||||
int generation = msg.arg1;
|
||||
passToJs(fDat.mFrame, fDat.mNode, fDat.mX, fDat.mY,
|
||||
generation,
|
||||
passToJs(generation,
|
||||
(String) jsMap.get("currentText"),
|
||||
keyCode,
|
||||
keyValue,
|
||||
@@ -999,17 +992,11 @@ final class WebViewCore {
|
||||
break;
|
||||
|
||||
case DELETE_SELECTION:
|
||||
CursorData delData = (CursorData) msg.obj;
|
||||
nativeDeleteSelection(delData.mFrame,
|
||||
delData.mNode, delData.mX,
|
||||
delData.mY, msg.arg1, msg.arg2);
|
||||
nativeDeleteSelection(msg.arg1, msg.arg2);
|
||||
break;
|
||||
|
||||
case SET_SELECTION:
|
||||
CursorData selData = (CursorData) msg.obj;
|
||||
nativeSetSelection(selData.mFrame,
|
||||
selData.mNode, selData.mX,
|
||||
selData.mY, msg.arg1, msg.arg2);
|
||||
nativeSetSelection(msg.arg1, msg.arg2);
|
||||
break;
|
||||
|
||||
case LISTBOX_CHOICES:
|
||||
|
||||
Reference in New Issue
Block a user