summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-04-27 16:47:28 +0100
committerLeon Scroggins <scroggo@google.com>2010-04-27 16:47:28 +0100
commitdaef1e675c1c6ebcf304236d68375b611c3871e7 (patch)
treee59d65e01591b78bd020a9f60c3165a310ee990e /WebKit/android/nav
parent377929b9f78a89a370a95834beb8f32b2ed494b4 (diff)
downloadexternal_webkit-daef1e675c1c6ebcf304236d68375b611c3871e7.zip
external_webkit-daef1e675c1c6ebcf304236d68375b611c3871e7.tar.gz
external_webkit-daef1e675c1c6ebcf304236d68375b611c3871e7.tar.bz2
Do not hide the cursor ring when clicking on a <select> element.
Add a CachedNodeType for <select> elements. If the cursor node is a <select> element, do not call setFollowedLink, which would hide the cursor ring. Bug 1694023 Change-Id: I2df2e70391b5f5969683b71b1e69bc24cba8946f
Diffstat (limited to 'WebKit/android/nav')
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp2
-rw-r--r--WebKit/android/nav/CachedNode.h1
-rw-r--r--WebKit/android/nav/CachedNodeType.h3
-rw-r--r--WebKit/android/nav/WebView.cpp12
4 files changed, 13 insertions, 5 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 7ee2a16..b98b31f 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -1216,6 +1216,8 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
if (!href.isEmpty() && !WebCore::protocolIsJavaScript(href.string()))
// Set the exported string for all non-javascript anchors.
exported = href.string().threadsafeCopy();
+ } else if (node->hasTagName(HTMLNames::selectTag)) {
+ type = SELECT_CACHEDNODETYPE;
}
if (type == TEXT_INPUT_CACHEDNODETYPE) {
RenderTextControl* renderText =
diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h
index f3cfd98..b707ac1 100644
--- a/WebKit/android/nav/CachedNode.h
+++ b/WebKit/android/nav/CachedNode.h
@@ -118,6 +118,7 @@ public:
return clip.intersects(bounds(frame));
}
bool isPlugin() const { return mType == PLUGIN_CACHEDNODETYPE; }
+ bool isSelect() const { return mType == SELECT_CACHEDNODETYPE; }
bool isSyntheticLink() const {
return mType >= ADDRESS_CACHEDNODETYPE && mType <= PHONE_CACHEDNODETYPE;
}
diff --git a/WebKit/android/nav/CachedNodeType.h b/WebKit/android/nav/CachedNodeType.h
index 21e2d40..8334b2f 100644
--- a/WebKit/android/nav/CachedNodeType.h
+++ b/WebKit/android/nav/CachedNodeType.h
@@ -37,7 +37,8 @@ enum CachedNodeType {
AREA_CACHEDNODETYPE,
FRAME_CACHEDNODETYPE,
PLUGIN_CACHEDNODETYPE,
- TEXT_INPUT_CACHEDNODETYPE
+ TEXT_INPUT_CACHEDNODETYPE,
+ SELECT_CACHEDNODETYPE
};
enum CachedNodeBits {
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index bdcafbf..d5c0758 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -882,7 +882,8 @@ bool motionUp(int x, int y, int slop)
viewInvalidate();
if (!result->isTextInput()) {
clearTextEntry();
- setFollowedLink(true);
+ if (!result->isSelect())
+ setFollowedLink(true);
if (syntheticLink)
overrideUrlLoading(result->getExport());
}
@@ -1634,9 +1635,12 @@ static void nativeSetFindIsEmpty(JNIEnv *env, jobject obj)
static void nativeSetFollowedLink(JNIEnv *env, jobject obj, bool followed)
{
- WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
- view->setFollowedLink(followed);
+ const CachedNode* cursor = getCursorNode(env, obj);
+ if (cursor && !cursor->isSelect()) {
+ WebView* view = GET_NATIVE_VIEW(env, obj);
+ LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ view->setFollowedLink(followed);
+ }
}
static void nativeSetHeightCanMeasure(JNIEnv *env, jobject obj, bool measure)