From c3fe941b7eb7da66bcea91b3513053d2ea60586f Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Thu, 11 Jun 2009 08:55:27 -0400 Subject: more (browser) trackball-is-a-mouse work in progress WebViewCore.cpp: Add parameter to CachedRoot::findAt to suppress check for hidden nodes. This helps find a best match for newly built nav caches. Require that the new cursor node closely match the bounds of the prior cursor node. This may need tuning. CacheBuilder.cpp: Remove isInput flag on cached nodes (no longer used) CachedFrame.cpp: Add hideCursor to complement clearCursor. Hide prevents the cursor from drawing but does not move it. Clear removes it altogether so that the next movement starts from the viewPort edge. CachedHistory.cpp: Don't special case text fields when doing history navigation. This special casing in part allowed setting the focus to the homepage input, but since focus is no longer set by nav, it is not required. CachedNode.cpp: Add hideCursor; clean up debugging CachedRoot.cpp: Use navBounds from history instead of cursor bounds to determine next move. Clean up some obsolete code. WebView.cpp: Add hideCursor; call it when appropriate. --- WebKit/android/nav/CachedNode.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'WebKit/android/nav/CachedNode.h') diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h index 6ae1ba8..9361309 100644 --- a/WebKit/android/nav/CachedNode.h +++ b/WebKit/android/nav/CachedNode.h @@ -102,8 +102,9 @@ 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 mHasCursorRing; } + bool hasCursorRing() const { return !mIsHidden && mHasCursorRing; } bool hasMouseOver() const { return mHasMouseOver; } + void hideCursor(CachedFrame* ); const WebCore::IntRect& hitBounds() const { return mHitBounds; } int index() const { return mIndex; } void init(WebCore::Node* node); @@ -112,7 +113,6 @@ public: bool isArea() const { return mIsArea; } bool isFocus() const { return mIsFocus; } bool isFrame() const { return mChildFrameIndex >= 0 ; } - bool isInput() const { return mIsInput; } bool isNavable(const WebCore::IntRect& clip) const { return clip.intersects(mBounds); } @@ -147,7 +147,6 @@ public: void setIsArea(bool isArea) { mIsArea = isArea; } void setIsCursor(bool isCursor) { mIsCursor = isCursor; } void setIsFocus(bool isFocus) { mIsFocus = isFocus; } - void setIsInput(bool isInput) { mIsInput = isInput; } void setIsParentAnchor(bool isAnchor) { mIsParentAnchor = isAnchor; } void setIsPassword(bool isPassword) { mIsPassword = isPassword; } void setIsRtlText(bool isRtlText) { mIsRtlText = isRtlText; } @@ -165,6 +164,7 @@ public: void setTextSize(int textSize) { mTextSize = textSize; } void setType(CachedNodeType type) { mType = type; } void setWantsKeyEvents(bool wantsKeys) { mWantsKeyEvents = wantsKeys; } + void show() { mIsHidden = false; } int tabIndex() const { return mTabIndex; } const CachedNode* traverseNextNode() const { return mLast ? NULL : &this[1]; } int textSize() const { return mTextSize; } @@ -198,7 +198,7 @@ private: bool mIsArea : 1; bool mIsCursor : 1; bool mIsFocus : 1; - bool mIsInput : 1; + bool mIsHidden : 1; bool mIsParentAnchor : 1; bool mIsPassword : 1; bool mIsRtlText : 1; -- cgit v1.1