summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/rendering/RenderLayer.cpp3
-rw-r--r--WebKit/android/jni/WebViewCore.cpp19
-rw-r--r--WebKit/android/jni/WebViewCore.h8
-rw-r--r--WebKit/android/nav/WebView.cpp23
4 files changed, 17 insertions, 36 deletions
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 4787152..e68db1e 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2174,7 +2174,8 @@ RenderLayer::updateScrollInfoAfterLayout()
updateOverflowStatus(horizontalOverflow, verticalOverflow);
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
- bool hasOverflowScroll = (horizontalOverflow && m_hBar) || (verticalOverflow && m_vBar);
+ bool hasOverflowScroll = ((horizontalOverflow && m_hBar) || (verticalOverflow && m_vBar))
+ && !renderer()->isTextArea();
if (hasOverflowScroll != m_hasOverflowScroll) {
m_hasOverflowScroll = hasOverflowScroll;
dirtyZOrderLists();
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index ef4cf66..c8f2479 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -3100,7 +3100,7 @@ void WebViewCore::click(WebCore::Frame* frame, WebCore::Node* node, bool fake) {
= static_cast<EditorClientAndroid*>(
m_mainFrame->editor()->client());
client->setShouldChangeSelectedRange(false);
- handleMouseClick(frame, node, fake, -1);
+ handleMouseClick(frame, node, fake);
client->setShouldChangeSelectedRange(true);
}
}
@@ -3179,7 +3179,7 @@ bool WebViewCore::handleTouchEvent(int action, Vector<int>& ids, Vector<IntPoint
}
void WebViewCore::touchUp(int touchGeneration,
- WebCore::Frame* frame, WebCore::Node* node, int x, int y, int scrollY)
+ WebCore::Frame* frame, WebCore::Node* node, int x, int y)
{
if (touchGeneration == 0) {
// m_mousePos should be set in getTouchHighlightRects()
@@ -3206,7 +3206,7 @@ void WebViewCore::touchUp(int touchGeneration,
}
DBG_NAV_LOGD("touchGeneration=%d handleMouseClick frame=%p node=%p"
" x=%d y=%d", touchGeneration, frame, node, x, y);
- handleMouseClick(frame, node, false, scrollY);
+ handleMouseClick(frame, node, false);
}
// Return the RenderLayer for the given RenderObject only if the layer is
@@ -3257,7 +3257,7 @@ static void scrollLayer(WebCore::RenderObject* renderer, WebCore::IntPoint* pos)
// Common code for both clicking with the trackball and touchUp
// Also used when typing into a non-focused textfield to give the textfield focus,
// in which case, 'fake' is set to true
-bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* nodePtr, bool fake, int scrollY)
+bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* nodePtr, bool fake)
{
bool valid = framePtr == NULL
|| CacheBuilder::validNode(m_mainFrame, framePtr, nodePtr);
@@ -3312,10 +3312,7 @@ bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* node
DBG_NAV_LOG("list box");
return true;
}
- if (scrollY != -1 && renderer && renderer->isTextArea())
- static_cast<RenderTextControl*>(renderer)->setScrollTop(scrollY);
- else
- scrollLayer(renderer, &m_mousePos);
+ scrollLayer(renderer, &m_mousePos);
}
if (!valid || !framePtr)
framePtr = m_mainFrame;
@@ -4135,7 +4132,7 @@ static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jintArra
}
static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
- jint frame, jint node, jint x, jint y, jint scrollY)
+ jint frame, jint node, jint x, jint y)
{
#ifdef ANDROID_INSTRUMENT
TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
@@ -4143,7 +4140,7 @@ static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->touchUp(touchGeneration,
- (WebCore::Frame*) frame, (WebCore::Node*) node, x, y, scrollY);
+ (WebCore::Frame*) frame, (WebCore::Node*) node, x, y);
}
static jstring RetrieveHref(JNIEnv *env, jobject obj, jint x, jint y)
@@ -4557,7 +4554,7 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) FindAddress },
{ "nativeHandleTouchEvent", "(I[I[I[III)Z",
(void*) HandleTouchEvent },
- { "nativeTouchUp", "(IIIIII)V",
+ { "nativeTouchUp", "(IIIII)V",
(void*) TouchUp },
{ "nativeRetrieveHref", "(II)Ljava/lang/String;",
(void*) RetrieveHref },
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index a32ce49..1457089 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -346,11 +346,9 @@ namespace android {
* @param node Pointer to Node that was touched.
* @param x x-position of the touch.
* @param y y-position of the touch.
- * @param scrollY Only used for <textarea>s (otherwise -1). Scroll position
- * of the <textarea> so the touch point is used properly.
*/
void touchUp(int touchGeneration, WebCore::Frame* frame,
- WebCore::Node* node, int x, int y, int scrollY);
+ WebCore::Node* node, int x, int y);
/**
* Sets the index of the label from a popup
@@ -667,10 +665,8 @@ namespace android {
* @param node Pointer to the Node that was clicked on.
* @param fake This is a fake mouse click, used to put a textfield into focus. Do not
* open the IME.
- * @param scrollY Used only when the node clicked on is a <textarea> (otherwise use
- * -1). Scroll the <textarea> before handling the click.
*/
- bool handleMouseClick(WebCore::Frame*, WebCore::Node*, bool fake, int scrollY);
+ bool handleMouseClick(WebCore::Frame*, WebCore::Node*, bool fake);
WebCore::HTMLAnchorElement* retrieveAnchorElement(int x, int y);
WebCore::HTMLElement* retrieveElement(int x, int y,
const WebCore::QualifiedName& );
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 0fecf4f..f84f8b0 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -149,7 +149,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl) :
m_javaGlue.m_sendMoveFocus = GetJMethod(env, clazz, "sendMoveFocus", "(II)V");
m_javaGlue.m_sendMoveMouse = GetJMethod(env, clazz, "sendMoveMouse", "(IIII)V");
m_javaGlue.m_sendMoveMouseIfLatest = GetJMethod(env, clazz, "sendMoveMouseIfLatest", "(Z)V");
- m_javaGlue.m_sendMotionUp = GetJMethod(env, clazz, "sendMotionUp", "(IIIIII)V");
+ m_javaGlue.m_sendMotionUp = GetJMethod(env, clazz, "sendMotionUp", "(IIIII)V");
m_javaGlue.m_domChangedFocus = GetJMethod(env, clazz, "domChangedFocus", "()V");
m_javaGlue.m_getScaledMaxXScroll = GetJMethod(env, clazz, "getScaledMaxXScroll", "()I");
m_javaGlue.m_getScaledMaxYScroll = GetJMethod(env, clazz, "getScaledMaxYScroll", "()I");
@@ -971,7 +971,7 @@ bool motionUp(int x, int y, int slop)
pageScrolled = true;
}
sendMotionUp(frame ? (WebCore::Frame*) frame->framePointer() : 0,
- 0, x, y, -1);
+ 0, x, y);
viewInvalidate();
return pageScrolled;
}
@@ -988,22 +988,9 @@ bool motionUp(int x, int y, int slop)
if (result->isSyntheticLink())
overrideUrlLoading(result->getExport());
else {
- int scrollY = -1;
-#if USE(ACCELERATED_COMPOSITING)
- if (result->isTextInput()) {
- const CachedInput* input = frame->textInput(result);
- if (input && input->isTextArea()) {
- // Need to find out by how much this was scrolled
- SkIRect layerRect, bounds;
- int layerId = scrollableLayer(rx, ry, &layerRect, &bounds);
- if (layerId != 0)
- scrollY = layerRect.fTop;
- }
- }
-#endif // ACCELERATED_COMPOSITING
sendMotionUp(
(WebCore::Frame*) frame->framePointer(),
- (WebCore::Node*) result->nodePointer(), rx, ry, scrollY);
+ (WebCore::Node*) result->nodePointer(), rx, ry);
}
if (result->isTextInput() || result->isSelect()
|| result->isContentEditable()) {
@@ -1222,7 +1209,7 @@ void sendMoveMouseIfLatest(bool clearTextEntry)
}
void sendMotionUp(
- WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y, int scrollY)
+ WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y)
{
m_viewImpl->m_touchGeneration = ++m_generation;
DBG_NAV_LOGD("m_generation=%d framePtr=%p nodePtr=%p x=%d y=%d",
@@ -1230,7 +1217,7 @@ void sendMotionUp(
LOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
env->CallVoidMethod(m_javaGlue.object(env).get(), m_javaGlue.m_sendMotionUp,
- m_generation, (jint) framePtr, (jint) nodePtr, x, y, scrollY);
+ m_generation, (jint) framePtr, (jint) nodePtr, x, y);
checkException(env);
}