diff options
author | Grace Kloba <klobag@google.com> | 2009-07-29 18:37:07 -0700 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2009-07-30 12:04:57 -0700 |
commit | 7ed73b9c2878d611c2c6954665d21aa6f162d5cc (patch) | |
tree | f6ed6eebecca5b4abee22d14c7cc06409bc29810 /WebKit | |
parent | a47a1c89e31d5fd26298656c3e15c09e841bce83 (diff) | |
download | external_webkit-7ed73b9c2878d611c2c6954665d21aa6f162d5cc.zip external_webkit-7ed73b9c2878d611c2c6954665d21aa6f162d5cc.tar.gz external_webkit-7ed73b9c2878d611c2c6954665d21aa6f162d5cc.tar.bz2 |
Remove snapToAnchor as it is not used any more.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 62 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 3 |
2 files changed, 0 insertions, 65 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index ca3689c..da19aba 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -314,7 +314,6 @@ void WebViewCore::reset(bool fromConstructor) clearContent(); m_updatedFrameCache = true; m_frameCacheOutOfDate = true; - m_snapAnchorNode = 0; m_skipContentDraw = false; m_findIsUp = false; m_domtree_version = 0; @@ -2066,41 +2065,6 @@ void WebViewCore::clearTextEntry() m_javaGlue->m_clearTextEntry); } -void WebViewCore::setSnapAnchor(int x, int y) -{ - m_snapAnchorNode = 0; - if (!x && !y) { - return; - } - - WebCore::IntPoint point = WebCore::IntPoint(x, y); - WebCore::Node* node = m_mainFrame->eventHandler()->hitTestResultAtPoint(point, false).innerNode(); - if (node) { -// LOGD("found focus node name: %s, type %d\n", node->nodeName().utf8().data(), node->nodeType()); - while (node) { - if (node->hasTagName(WebCore::HTMLNames::divTag) || - node->hasTagName(WebCore::HTMLNames::tableTag)) { - m_snapAnchorNode = node; - return; - } -// LOGD("parent node name: %s, type %d\n", node->nodeName().utf8().data(), node->nodeType()); - node = node->parentNode(); - } - } -} - -void WebViewCore::snapToAnchor() -{ - if (m_snapAnchorNode) { - if (m_snapAnchorNode->inDocument()) { - FloatPoint pt = m_snapAnchorNode->renderer()->localToAbsolute(); - scrollTo(pt.x(), pt.y()); - } else { - m_snapAnchorNode = 0; - } - } -} - void WebViewCore::setBackgroundColor(SkColor c) { WebCore::FrameView* view = m_mainFrame->view(); @@ -2483,28 +2447,6 @@ static void SetViewportSettingsFromNative(JNIEnv *env, jobject obj) #endif } -static void SetSnapAnchor(JNIEnv *env, jobject obj, jint x, jint y) -{ -#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->setSnapAnchor(x, y); -} - -static void SnapToAnchor(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->snapToAnchor(); -} - static void SetBackgroundColor(JNIEnv *env, jobject obj, jint color) { #ifdef ANDROID_INSTRUMENT @@ -2748,10 +2690,6 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = { (void*) RecordContent }, { "setViewportSettingsFromNative", "()V", (void*) SetViewportSettingsFromNative }, - { "nativeSetSnapAnchor", "(II)V", - (void*) SetSnapAnchor }, - { "nativeSnapToAnchor", "()V", - (void*) SnapToAnchor }, { "nativeSplitContent", "()V", (void*) SplitContent }, { "nativeSetBackgroundColor", "(I)V", diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index c47be86..64f4857 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -308,8 +308,6 @@ namespace android { jobject getWebViewJavaObject(); void setBackgroundColor(SkColor c); - void setSnapAnchor(int x, int y); - void snapToAnchor(); void updateFrameCache(); void updateCacheOnNodeChange(); void dumpDomTree(bool); @@ -446,7 +444,6 @@ namespace android { int m_lastPassed; int m_lastVelocity; CachedHistory m_history; - WebCore::Node* m_snapAnchorNode; int m_screenWidth; // width of the visible rect in document coordinates int m_screenHeight;// height of the visible rect in document coordinates float m_scale; |