diff options
-rw-r--r-- | WebKit/android/jni/WebCoreFrameBridge.cpp | 11 | ||||
-rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedInput.h | 6 |
3 files changed, 9 insertions, 10 deletions
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index d6dd4bc..8a55e15 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -1619,8 +1619,7 @@ static jboolean HasPasswordField(JNIEnv *env, jobject obj) for (size_t i = 0; i< size && !found; i++) { WebCore::HTMLFormControlElement* e = elements[i]; if (e->hasLocalName(WebCore::HTMLNames::inputTag)) { - if (((WebCore::HTMLInputElement*)e)->inputType() == - WebCore::HTMLInputElement::PASSWORD) + if (static_cast<WebCore::HTMLInputElement*>(e)->isPasswordField()) found = true; } } @@ -1653,9 +1652,9 @@ static jobjectArray GetUsernamePassword(JNIEnv *env, jobject obj) WebCore::HTMLInputElement* input = (WebCore::HTMLInputElement*)e; if (input->autoComplete() == false) continue; - if (input->inputType() == WebCore::HTMLInputElement::PASSWORD) + if (input->isPasswordField()) password = input->value(); - else if (input->inputType() == WebCore::HTMLInputElement::TEXT || input->inputType() == WebCore::HTMLInputElement::EMAIL) + else if (input->isTextField() || input->isEmailField()) username = input->value(); if (!username.isNull() && !password.isNull()) found = true; @@ -1699,9 +1698,9 @@ static void SetUsernamePassword(JNIEnv *env, jobject obj, WebCore::HTMLInputElement* input = (WebCore::HTMLInputElement*)e; if (input->autoComplete() == false) continue; - if (input->inputType() == WebCore::HTMLInputElement::PASSWORD) + if (input->isPasswordField()) passwordEle = input; - else if (input->inputType() == WebCore::HTMLInputElement::TEXT || input->inputType() == WebCore::HTMLInputElement::EMAIL) + else if (input->isTextField() || input->isEmailField()) usernameEle = input; if (usernameEle != NULL && passwordEle != NULL) found = true; diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 10ad2da..8d9730f 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1258,7 +1258,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, } if (node->hasTagName(WebCore::HTMLNames::inputTag)) { HTMLInputElement* input = static_cast<HTMLInputElement*>(node); - HTMLInputElement::InputType inputType = input->inputType(); + HTMLInputElement::DeprecatedInputType inputType = input->deprecatedInputType(); if (input->isTextField()) { type = TEXT_INPUT_CACHEDNODETYPE; cachedInput.init(); diff --git a/WebKit/android/nav/CachedInput.h b/WebKit/android/nav/CachedInput.h index 4ce8182..f7e26b1 100644 --- a/WebKit/android/nav/CachedInput.h +++ b/WebKit/android/nav/CachedInput.h @@ -40,13 +40,13 @@ public: } void* formPointer() const { return mForm; } void init(); - WebCore::HTMLInputElement::InputType inputType() const { return mInputType; } + WebCore::HTMLInputElement::DeprecatedInputType inputType() const { return mInputType; } bool isRtlText() const { return mIsRtlText; } bool isTextField() const { return mIsTextField; } int maxLength() const { return mMaxLength; }; const WTF::String& name() const { return mName; } void setFormPointer(void* form) { mForm = form; } - void setInputType(WebCore::HTMLInputElement::InputType type) { mInputType = type; } + void setInputType(WebCore::HTMLInputElement::DeprecatedInputType type) { mInputType = type; } void setIsRtlText(bool isRtlText) { mIsRtlText = isRtlText; } void setIsTextField(bool isTextField) { mIsTextField = isTextField; } void setMaxLength(int maxLength) { mMaxLength = maxLength; } @@ -58,7 +58,7 @@ private: WTF::String mName; int mMaxLength; int mTextSize; - WebCore::HTMLInputElement::InputType mInputType; + WebCore::HTMLInputElement::DeprecatedInputType mInputType; bool mIsRtlText : 1; bool mIsTextField : 1; #if DUMP_NAV_CACHE |