diff options
Diffstat (limited to 'Source/WebKit/android')
| -rw-r--r-- | Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit/android/jni/WebCoreViewBridge.h | 9 | ||||
| -rw-r--r-- | Source/WebKit/android/jni/WebSettings.cpp | 12 | ||||
| -rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 5 |
4 files changed, 17 insertions, 11 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index 961497b..1fdb671 100644 --- a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -166,7 +166,7 @@ void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle mFormManager->FindFormWithFormControlElement(formFieldElement, FormManager::REQUIRE_AUTOCOMPLETE, form); mQueryMap[mQueryId] = new FormDataAndField(form, formField); - bool suggestions = mAutoFillManager->OnQueryFormFieldAutoFillWrapper(0, *form, *formField); // First param not used on Android + bool suggestions = mAutoFillManager->OnQueryFormFieldAutoFillWrapper(*form, *formField); mQueryId++; if (!suggestions) { diff --git a/Source/WebKit/android/jni/WebCoreViewBridge.h b/Source/WebKit/android/jni/WebCoreViewBridge.h index f247602..b04a0f9 100644 --- a/Source/WebKit/android/jni/WebCoreViewBridge.h +++ b/Source/WebKit/android/jni/WebCoreViewBridge.h @@ -38,7 +38,14 @@ namespace WebCore class WebCoreViewBridge : public WebCoreRefObject { public: - WebCoreViewBridge() { } + WebCoreViewBridge() + { + m_bounds.setWidth(320); + m_bounds.setHeight(240); + m_visibleBounds = m_bounds; + m_windowBounds = m_bounds; + } + virtual ~WebCoreViewBridge() { } virtual void draw(WebCore::GraphicsContext* ctx, diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp index 468e7b0..7ba5e96 100644 --- a/Source/WebKit/android/jni/WebSettings.cpp +++ b/Source/WebKit/android/jni/WebSettings.cpp @@ -67,8 +67,7 @@ struct FieldIds { FieldIds(JNIEnv* env, jclass clazz) { mLayoutAlgorithm = env->GetFieldID(clazz, "mLayoutAlgorithm", "Landroid/webkit/WebSettings$LayoutAlgorithm;"); - mTextSize = env->GetFieldID(clazz, "mTextSize", - "Landroid/webkit/WebSettings$TextSize;"); + mTextSize = env->GetFieldID(clazz, "mTextSize", "I"); mStandardFontFamily = env->GetFieldID(clazz, "mStandardFontFamily", "Ljava/lang/String;"); mFixedFontFamily = env->GetFieldID(clazz, "mFixedFontFamily", @@ -195,11 +194,6 @@ struct FieldIds { mOrdinal = env->GetMethodID(enumClass, "ordinal", "()I"); LOG_ASSERT(mOrdinal, "Could not find method ordinal"); env->DeleteLocalRef(enumClass); - - jclass textSizeClass = env->FindClass("android/webkit/WebSettings$TextSize"); - LOG_ASSERT(textSizeClass, "Could not find TextSize enum"); - mTextSizeValue = env->GetFieldID(textSizeClass, "value", "I"); - env->DeleteLocalRef(textSizeClass); } // Field ids @@ -347,8 +341,8 @@ public: } } #endif - jobject textSize = env->GetObjectField(obj, gFieldIds->mTextSize); - float zoomFactor = env->GetIntField(textSize, gFieldIds->mTextSizeValue) / 100.0f; + jint textSize = env->GetIntField(obj, gFieldIds->mTextSize); + float zoomFactor = textSize / 100.0f; if (pFrame->textZoomFactor() != zoomFactor) pFrame->setTextZoomFactor(zoomFactor); diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 4e20ca1..96045c6 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -1251,6 +1251,11 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height, int textWrapWidth, float scale, int screenWidth, int screenHeight, int anchorX, int anchorY, bool ignoreHeight) { + // Ignore the initial empty document. + const WebCore::KURL& url = m_mainFrame->document()->url(); + if (url.isEmpty()) + return; + WebCoreViewBridge* window = m_mainFrame->view()->platformWidget(); int ow = window->width(); int oh = window->height(); |
