diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-08 07:45:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-08 07:45:34 -0700 |
commit | a5ffe19691eaa28e4e2f85f34b262fe9762765e3 (patch) | |
tree | 00b08aa32cf53d3f93e6503e1547fe1f4175bb45 | |
parent | 91637c8ca6b8baa16edf528ee009b228d6e6c053 (diff) | |
parent | bc0656f7505db89baea5835febb882daf32f32a6 (diff) | |
download | external_webkit-a5ffe19691eaa28e4e2f85f34b262fe9762765e3.zip external_webkit-a5ffe19691eaa28e4e2f85f34b262fe9762765e3.tar.gz external_webkit-a5ffe19691eaa28e4e2f85f34b262fe9762765e3.tar.bz2 |
Merge change 3311
* changes:
Update the language from "focus".
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 19 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 2 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 72 |
3 files changed, 36 insertions, 57 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 78681bc..7d32c46 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -291,7 +291,6 @@ void WebViewCore::reset(bool fromConstructor) clearContent(); m_updatedFrameCache = true; m_frameCacheOutOfDate = true; - m_blockFocusChange = false; m_snapAnchorNode = 0; m_useReplay = false; m_skipContentDraw = false; @@ -1156,10 +1155,6 @@ void WebViewCore::moveMouseIfLatest(int moveGeneration, DBG_NAV_LOGD("m_moveGeneration=%d moveGeneration=%d" " frame=%p node=%p x=%d y=%d", m_moveGeneration, moveGeneration, frame, node, x, y); - if (m_blockFocusChange) { - DBG_NAV_LOG("m_blockFocusChange"); - return; - } if (m_moveGeneration > moveGeneration) { DBG_NAV_LOGD("m_moveGeneration=%d > moveGeneration=%d", m_moveGeneration, moveGeneration); @@ -1657,8 +1652,6 @@ bool WebViewCore::click() { keyHandled = handleMouseClick(focusNode->document()->frame(), focusNode); WebFrame::getWebFrame(m_mainFrame)->setUserInitiatedClick(false); } - // match in moveMouse() - m_blockFocusChange = false; return keyHandled; } @@ -2245,16 +2238,6 @@ static void MoveMouseIfLatest(JNIEnv *env, jobject obj, jint moveGeneration, ignoreNullFocus); } -static void UnblockFocus(JNIEnv *env, jobject obj) -{ -#ifdef ANDROID_INSTRUMENT - TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter); -#endif - WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); - viewImpl->unblockFocus(); -} - static void UpdateFrameCache(JNIEnv *env, jobject obj) { #ifdef ANDROID_INSTRUMENT @@ -2500,8 +2483,6 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = { (void*) TouchUp }, { "nativeRetrieveHref", "(II)Ljava/lang/String;", (void*) RetrieveHref }, - { "nativeUnblockFocus", "()V", - (void*) UnblockFocus }, { "nativeUpdateFrameCache", "()V", (void*) UpdateFrameCache }, { "nativeGetContentMinPrefWidth", "()I", diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index c60a12c..e51afd4 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -276,7 +276,6 @@ namespace android { void setBackgroundColor(SkColor c); void setSnapAnchor(int x, int y); void snapToAnchor(); - void unblockFocus() { m_blockFocusChange = false; } void updateFrameCache(); void dumpDomTree(bool); void dumpRenderTree(bool); @@ -380,7 +379,6 @@ namespace android { int m_scrollOffsetY; // webview.java's current scroll in Y WebCore::IntPoint m_mousePos; bool m_frameCacheOutOfDate; - bool m_blockFocusChange; bool m_progressDone; int m_lastPassed; int m_lastVelocity; diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index e0cdd3b..bcd3622 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1228,7 +1228,7 @@ static jstring WebCoreStringToJString(JNIEnv *env, WebCore::String string) return ret; } -static void nativeClearFocus(JNIEnv *env, jobject obj, int x, int y) +static void nativeClearCursor(JNIEnv *env, jobject obj, int x, int y) { WebView* view = GET_NATIVE_VIEW(env, obj); LOG_ASSERT(view, "view not set in %s", __FUNCTION__); @@ -1424,37 +1424,37 @@ static jobject nativeImageURI(JNIEnv *env, jobject obj, jint x, jint y) return ret; } -static bool nativeFocusIsPassword(JNIEnv *env, jobject obj) +static bool nativeFocusCandidateIsPassword(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->isPassword() : false; } -static bool nativeFocusIsRtlText(JNIEnv *env, jobject obj) +static bool nativeFocusCandidateIsRtlText(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->isRtlText() : false; } -static bool nativeFocusIsTextField(JNIEnv *env, jobject obj) +static bool nativeFocusCandidateIsTextField(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->isTextField() : false; } -static bool nativeFocusIsTextInput(JNIEnv *env, jobject obj) +static bool nativeFocusCandidateIsTextInput(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->isTextField() || node->isTextArea() : false; } -static jint nativeFocusMaxLength(JNIEnv *env, jobject obj) +static jint nativeFocusCandidateMaxLength(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->maxLength() : false; } -static jobject nativeFocusName(JNIEnv *env, jobject obj) +static jobject nativeFocusCandidateName(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); if (!node) @@ -1463,7 +1463,7 @@ static jobject nativeFocusName(JNIEnv *env, jobject obj) return env->NewString((jchar*)name.characters(), name.length()); } -static jobject nativeFocusNodeBounds(JNIEnv *env, jobject obj) +static jobject nativeFocusCandidateNodeBounds(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); WebCore::IntRect bounds = node ? node->getBounds() @@ -1475,13 +1475,13 @@ static jobject nativeFocusNodeBounds(JNIEnv *env, jobject obj) return rect; } -static jint nativeFocusNodePointer(JNIEnv *env, jobject obj) +static jint nativeFocusCandidatePointer(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return reinterpret_cast<int>(node ? node->nodePointer() : 0); } -static jobject nativeFocusText(JNIEnv *env, jobject obj) +static jobject nativeFocusCandidateText(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); if (!node) @@ -1491,7 +1491,7 @@ static jobject nativeFocusText(JNIEnv *env, jobject obj) value.length()) : 0; } -static jint nativeFocusTextSize(JNIEnv *env, jobject obj) +static jint nativeFocusCandidateTextSize(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj); return node ? node->textSize() : 0; @@ -1550,7 +1550,7 @@ static bool nativeHasFocusNode(JNIEnv *env, jobject obj) return GET_NATIVE_VIEW(env, obj)->hasFocusNode(); } -static bool nativeMoveFocus(JNIEnv *env, jobject obj, +static bool nativeMoveCursor(JNIEnv *env, jobject obj, int key, int count, bool ignoreScroll) { WebView* view = GET_NATIVE_VIEW(env, obj); @@ -1759,8 +1759,8 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl) * JNI registration */ static JNINativeMethod gJavaWebViewMethods[] = { - { "nativeClearFocus", "(II)V", - (void*) nativeClearFocus }, + { "nativeClearCursor", "(II)V", + (void*) nativeClearCursor }, { "nativeCreate", "(I)V", (void*) nativeCreate }, { "nativeCursorFramePointer", "()I", @@ -1799,26 +1799,26 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeFindAll }, { "nativeFindNext", "(Z)V", (void*) nativeFindNext }, - { "nativeFocusIsPassword", "()Z", - (void*) nativeFocusIsPassword }, - { "nativeFocusIsRtlText", "()Z", - (void*) nativeFocusIsRtlText }, - { "nativeFocusIsTextField", "()Z", - (void*) nativeFocusIsTextField }, - { "nativeFocusIsTextInput", "()Z", - (void*) nativeFocusIsTextInput }, - { "nativeFocusMaxLength", "()I", - (void*) nativeFocusMaxLength }, - { "nativeFocusName", "()Ljava/lang/String;", - (void*) nativeFocusName }, - { "nativeFocusNodeBounds", "()Landroid/graphics/Rect;", - (void*) nativeFocusNodeBounds }, - { "nativeFocusNodePointer", "()I", - (void*) nativeFocusNodePointer }, - { "nativeFocusText", "()Ljava/lang/String;", - (void*) nativeFocusText }, - { "nativeFocusTextSize", "()I", - (void*) nativeFocusTextSize }, + { "nativeFocusCandidateIsPassword", "()Z", + (void*) nativeFocusCandidateIsPassword }, + { "nativeFocusCandidateIsRtlText", "()Z", + (void*) nativeFocusCandidateIsRtlText }, + { "nativeFocusCandidateIsTextField", "()Z", + (void*) nativeFocusCandidateIsTextField }, + { "nativeFocusCandidateIsTextInput", "()Z", + (void*) nativeFocusCandidateIsTextInput }, + { "nativeFocusCandidateMaxLength", "()I", + (void*) nativeFocusCandidateMaxLength }, + { "nativeFocusCandidateName", "()Ljava/lang/String;", + (void*) nativeFocusCandidateName }, + { "nativeFocusCandidateNodeBounds", "()Landroid/graphics/Rect;", + (void*) nativeFocusCandidateNodeBounds }, + { "nativeFocusCandidatePointer", "()I", + (void*) nativeFocusCandidatePointer }, + { "nativeFocusCandidateText", "()Ljava/lang/String;", + (void*) nativeFocusCandidateText }, + { "nativeFocusCandidateTextSize", "()I", + (void*) nativeFocusCandidateTextSize }, { "nativeGetCursorRingBounds", "()Landroid/graphics/Rect;", (void*) nativeGetCursorRingBounds }, { "nativeGetSelection", "()Landroid/graphics/Region;", @@ -1835,8 +1835,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeMarkNodeInvalid }, { "nativeMotionUp", "(III)Z", (void*) nativeMotionUp }, - { "nativeMoveFocus", "(IIZ)Z", - (void*) nativeMoveFocus }, + { "nativeMoveCursor", "(IIZ)Z", + (void*) nativeMoveCursor }, { "nativeMoveGeneration", "()I", (void*) nativeMoveGeneration }, { "nativeMoveSelection", "(IIZ)V", |