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 =
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;
}
viewInvalidate();
if (!result->isTextInput()) {
clearTextEntry();
- setFollowedLink(true);
+ if (!result->isSelect())
+ setFollowedLink(true);
if (syntheticLink)
overrideUrlLoading(result->getExport());
}
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)