diff options
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 24 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CacheBuilder.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedInput.h | 3 | ||||
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 8 |
4 files changed, 36 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 17a8bc5..134408a 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -675,6 +675,13 @@ void WebViewCore::recordPictureSet(PictureSet* content) if (cacheBuilder().pictureSetDisabled()) content->clear(); +#if USE(ACCELERATED_COMPOSITING) + // Detects if the content size has changed + bool contentSizeChanged = false; + if (content->width() != width || content->height() != height) + contentSizeChanged = true; +#endif + content->setDimensions(width, height, &m_addInval); // Add the current inval rects to the PictureSet, and rebuild it. @@ -694,8 +701,25 @@ void WebViewCore::recordPictureSet(PictureSet* content) m_addInval.setRect(r); } + // Rebuild the pictureset (webkit repaint) rebuildPictureSet(content); +#if USE(ACCELERATED_COMPOSITING) + // We repainted the pictureset, but the invals are not always correct when + // the content size did change. For now, let's just reset the + // inval we will pass to the UI so that it invalidates the entire + // content -- tiles will be marked dirty and will have to be repainted. + // FIXME: the webkit invals ought to have been enough... + if (contentSizeChanged) { + SkIRect r; + r.fLeft = 0; + r.fTop = 0; + r.fRight = width; + r.fBottom = height; + m_addInval.setRect(r); + } +#endif + } // WebViewCoreRecordTimeCounter WebCore::Node* oldFocusNode = currentFocus(); diff --git a/Source/WebKit/android/nav/CacheBuilder.cpp b/Source/WebKit/android/nav/CacheBuilder.cpp index 3ec15f3..a4bc758 100644 --- a/Source/WebKit/android/nav/CacheBuilder.cpp +++ b/Source/WebKit/android/nav/CacheBuilder.cpp @@ -1246,6 +1246,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, type = TEXT_INPUT_CACHEDNODETYPE; cachedInput.init(); cachedInput.setAutoComplete(input->autoComplete()); + cachedInput.setSpellcheck(input->spellcheck()); cachedInput.setFormPointer(input->form()); cachedInput.setIsTextField(true); exported = input->value().threadsafeCopy(); diff --git a/Source/WebKit/android/nav/CachedInput.h b/Source/WebKit/android/nav/CachedInput.h index a3eabc7..77ae57b 100644 --- a/Source/WebKit/android/nav/CachedInput.h +++ b/Source/WebKit/android/nav/CachedInput.h @@ -78,7 +78,9 @@ public: void setPaddingLeft(int left) { mPaddingLeft = left; } void setPaddingRight(int right) { mPaddingRight = right; } void setPaddingTop(int top) { mPaddingTop = top; } + void setSpellcheck(bool spellcheck) { mSpellcheck = spellcheck; } void setTextSize(float textSize) { mTextSize = textSize; } + bool spellcheck() const { return mSpellcheck; } float textSize() const { return mTextSize; } private: @@ -94,6 +96,7 @@ private: float mTextSize; Type mType; bool mAutoComplete : 1; + bool mSpellcheck : 1; bool mIsRtlText : 1; bool mIsTextField : 1; bool mIsTextArea : 1; diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 1dcc7c4..d062db3 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -2125,6 +2125,12 @@ static jint nativeFocusCandidatePointer(JNIEnv *env, jobject obj) return reinterpret_cast<int>(node ? node->nodePointer() : 0); } +static jint nativeFocusCandidateIsSpellcheck(JNIEnv *env, jobject obj) +{ + const CachedInput* input = getInputCandidate(env, obj); + return input ? input->spellcheck() : false; +} + static jobject nativeFocusCandidateText(JNIEnv *env, jobject obj) { const CachedNode* node = getFocusCandidate(env, obj, 0); @@ -2835,6 +2841,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeFocusCandidateMaxLength }, { "nativeFocusCandidateIsAutoComplete", "()Z", (void*) nativeFocusCandidateIsAutoComplete }, + { "nativeFocusCandidateIsSpellcheck", "()Z", + (void*) nativeFocusCandidateIsSpellcheck }, { "nativeFocusCandidateName", "()Ljava/lang/String;", (void*) nativeFocusCandidateName }, { "nativeFocusCandidateNodeBounds", "()Landroid/graphics/Rect;", |