diff options
Diffstat (limited to 'WebKit/android')
| -rw-r--r-- | WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp | 2 | ||||
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 2 | ||||
| -rw-r--r-- | WebKit/android/jni/WebViewCore.h | 2 | ||||
| -rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 13 | ||||
| -rw-r--r-- | WebKit/android/nav/CachedNode.h | 3 | ||||
| -rw-r--r-- | WebKit/android/nav/WebView.cpp | 21 |
6 files changed, 23 insertions, 20 deletions
diff --git a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp index 6c9ea49..5860bd2 100644 --- a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp +++ b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp @@ -357,6 +357,8 @@ void MediaPlayerPrivate::onPrepared(int duration, int width, int height) { } void MediaPlayerPrivate::onEnded() { + m_currentTime = duration(); + m_player->timeChanged(); m_paused = true; m_currentTime = 0; m_networkState = MediaPlayer::Idle; diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 5b30d0a..6ca1e4b 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -218,7 +218,6 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m m_popupReply = 0; m_moveGeneration = 0; - m_generation = 0; m_lastGeneration = 0; m_touchGeneration = 0; m_blockTextfieldUpdates = false; @@ -326,7 +325,6 @@ void WebViewCore::reset(bool fromConstructor) m_focusBoundsChanged = false; m_lastFocusedSelStart = 0; m_lastFocusedSelEnd = 0; - m_lastMoveGeneration = 0; clearContent(); m_updatedFrameCache = true; m_frameCacheOutOfDate = true; diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 39eca61..88031d0 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -420,7 +420,6 @@ namespace android { static Mutex gFrameCacheMutex; CachedRoot* m_frameCacheKit; // nav data being built by webcore SkPicture* m_navPictureKit; - int m_generation; // copy of the number bumped by WebViewNative int m_moveGeneration; // copy of state in WebViewNative triggered by move int m_touchGeneration; // copy of state in WebViewNative triggered by touch int m_lastGeneration; // last action using up to date cache @@ -463,7 +462,6 @@ namespace android { WebCore::IntRect m_lastFocusedBounds; int m_lastFocusedSelStart; int m_lastFocusedSelEnd; - int m_lastMoveGeneration; static Mutex m_contentMutex; // protects ui/core thread pictureset access PictureSet m_content; // the set of pictures to draw (accessed by UI too) SkRegion m_addInval; // the accumulated inval region (not yet drawn) diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index b7a650b..39f0053 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -94,14 +94,11 @@ Frame* CacheBuilder::FrameAnd(const CacheBuilder* cacheBuilder) { #if DUMP_NAV_CACHE static bool hasEventListener(Node* node, const AtomicString& eventType) { - const RegisteredEventListenerVector& listeners = node->eventListeners(); - size_t size = listeners.size(); - for (size_t i = 0; i < size; ++i) { - const RegisteredEventListener& r = *listeners[i]; - if (r.eventType() == eventType) - return true; - } - return false; + if (!node->isElementNode()) + return false; + Element* element = static_cast<Element*>(node); + EventListener* listener = element->getAttributeEventListener(eventType); + return 0 != listener; } #define DEBUG_BUFFER_SIZE 256 diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h index 540ba49..f5f5787 100644 --- a/WebKit/android/nav/CachedNode.h +++ b/WebKit/android/nav/CachedNode.h @@ -102,7 +102,7 @@ public: const WebCore::IntRect& getBounds() const { return mBounds; } void getBounds(WebCore::IntRect* bounds) const { *bounds = mBounds; } const WebCore::String& getExport() const { return mExport; } - bool hasCursorRing() const { return !mIsHidden && mHasCursorRing; } + bool hasCursorRing() const { return mHasCursorRing; } bool hasMouseOver() const { return mHasMouseOver; } void hideCursor(CachedFrame* ); const WebCore::IntRect& hitBounds() const { return mHitBounds; } @@ -113,6 +113,7 @@ public: bool isArea() const { return mIsArea; } bool isFocus() const { return mIsFocus; } bool isFrame() const { return mChildFrameIndex >= 0 ; } + bool isHidden() const { return mIsHidden; } bool isNavable(const WebCore::IntRect& clip) const { return clip.intersects(mBounds); } diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 0b1a4cf..8fff1b9 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -437,8 +437,8 @@ void drawCursorRing(SkCanvas* canvas) resetCursorRing(); return; } - if (!node->hasCursorRing()) { - DBG_NAV_LOG("!node->hasCursorRing()"); + if (node->isHidden()) { + DBG_NAV_LOG("node->isHidden()"); m_viewImpl->m_hasCursorBounds = false; return; } @@ -486,13 +486,12 @@ void drawCursorRing(SkCanvas* canvas) setPluginReceivesEvents(false); return; } + if (!node->hasCursorRing() || (m_pluginReceivesEvents && node->isPlugin())) + return; CursorRing::Flavor flavor = CursorRing::NORMAL_FLAVOR; if (!isButton) { flavor = node->type() != NORMAL_CACHEDNODETYPE ? CursorRing::FAKE_FLAVOR : CursorRing::NORMAL_FLAVOR; - if (m_pluginReceivesEvents && node->isPlugin()) { - return; - } if (m_followedLink) { flavor = static_cast<CursorRing::Flavor> (flavor + CursorRing::NORMAL_ANIMATING); @@ -737,7 +736,7 @@ void updateCursorBounds(const CachedRoot* root, const CachedFrame* cachedFrame, LOG_ASSERT(cachedNode, "updateCursorBounds: cachedNode cannot be null"); LOG_ASSERT(cachedFrame, "updateCursorBounds: cachedFrame cannot be null"); m_viewImpl->gCursorBoundsMutex.lock(); - m_viewImpl->m_hasCursorBounds = cachedNode->hasCursorRing(); + m_viewImpl->m_hasCursorBounds = !cachedNode->isHidden(); // If m_viewImpl->m_hasCursorBounds is false, we never look at the other // values, so do not bother setting them. if (m_viewImpl->m_hasCursorBounds) { @@ -1232,7 +1231,7 @@ void sendMoveMouseIfLatest(bool disableFocusController) void sendMotionUp( WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y) { - m_viewImpl->m_touchGeneration = m_viewImpl->m_generation = ++m_generation; + m_viewImpl->m_touchGeneration = ++m_generation; DBG_NAV_LOGD("m_generation=%d framePtr=%p nodePtr=%p x=%d y=%d", m_generation, framePtr, nodePtr, x, y); LOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!"); @@ -1566,6 +1565,12 @@ static bool nativeCursorIsAnchor(JNIEnv *env, jobject obj) return node ? node->isAnchor() : false; } +static bool nativeCursorIsReadOnly(JNIEnv *env, jobject obj) +{ + const CachedNode* node = getCursorNode(env, obj); + return node ? node->isReadOnly() : false; +} + static bool nativeCursorIsTextInput(JNIEnv *env, jobject obj) { const CachedNode* node = getCursorNode(env, obj); @@ -2099,6 +2104,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeCursorIntersects }, { "nativeCursorIsAnchor", "()Z", (void*) nativeCursorIsAnchor }, + { "nativeCursorIsReadOnly", "()Z", + (void*) nativeCursorIsReadOnly }, { "nativeCursorIsTextInput", "()Z", (void*) nativeCursorIsTextInput }, { "nativeCursorPosition", "()Landroid/graphics/Point;", |
