diff options
Diffstat (limited to 'WebKit/android/nav/CachedRoot.h')
| -rw-r--r-- | WebKit/android/nav/CachedRoot.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/WebKit/android/nav/CachedRoot.h b/WebKit/android/nav/CachedRoot.h index ab1b823..38ab2d8 100644 --- a/WebKit/android/nav/CachedRoot.h +++ b/WebKit/android/nav/CachedRoot.h @@ -27,8 +27,9 @@ #define CachedRoot_H #include "CachedFrame.h" -#include "IntPoint.h" +#include "IntRect.h" #include "SkPicture.h" +#include "wtf/Vector.h" class SkRect; @@ -43,20 +44,19 @@ public: bool findClosest); int checkForCenter(int x, int y) const; void checkForJiggle(int* ) const; + bool checkRings(const WTF::Vector<WebCore::IntRect>& rings, + const WebCore::IntRect& bounds) const; + WebCore::IntPoint cursorLocation() const; int documentHeight() { return mContents.height(); } int documentWidth() { return mContents.width(); } const CachedNode* findAt(const WebCore::IntRect& , const CachedFrame** , - int* x, int* y) const; + int* x, int* y, bool checkForHidden) const; const WebCore::IntRect& focusBounds() const { return mFocusBounds; } - bool focusChild() const { return mFocusChild; } WebCore::IntPoint focusLocation() const; - int generation() const { return mGeneration; } SkPicture* getPicture() { return mPicture; } int getAndResetSelectionEnd(); int getAndResetSelectionStart(); -// const WebCore::IntRect& navClipBounds() const { return mClippedBounds; } - void getSimulatedMousePosition(WebCore::IntPoint* ); -// bool hasNavClipBounds() { return mClippedBounds.isEmpty() == false; } + void getSimulatedMousePosition(WebCore::IntPoint* ) const; void init(WebCore::Frame* , CachedHistory* ); bool innerDown(const CachedNode* , BestData* ) const; bool innerLeft(const CachedNode* , BestData* ) const; @@ -66,39 +66,34 @@ public: bool innerUp(const CachedNode* , BestData* ) const; WebCore::String imageURI(int x, int y) const; bool maskIfHidden(BestData* ) const; - const CachedNode* moveFocus(Direction , const CachedFrame** , WebCore::IntPoint* scroll); + const CachedNode* moveCursor(Direction , const CachedFrame** , WebCore::IntPoint* scroll); void reset(); -// void resetNavClipBounds() { mClippedBounds = WebCore::IntRect(-1, -1, 0, 0); } CachedHistory* rootHistory() const { return mHistory; } - bool scrollDelta(WebCore::IntRect& focusRingBounds, Direction , int* delta); + bool scrollDelta(WebCore::IntRect& cursorRingBounds, Direction , int* delta); const WebCore::IntRect& scrolledBounds() const { return mScrolledBounds; } + void setCursor(CachedFrame* , CachedNode* ); void setCachedFocus(CachedFrame* , CachedNode* ); void setFocusBounds(const WebCore::IntRect& r) { mFocusBounds = r; } - void setGeneration(int generation) { mGeneration = generation; } void setTextGeneration(int textGeneration) { mTextGeneration = textGeneration; } - void setFocusChild(bool state) const { mFocusChild = state; } void setMaxScroll(int x, int y) { mMaxXScroll = x; mMaxYScroll = y; } -// void setNavClipBounds(const WebCore::IntRect& r) { mClippedBounds = r; } void setPicture(SkPicture* picture) { mPicture = picture; } void setScrollOnly(bool state) { mScrollOnly = state; } void setSelection(int start, int end) { mSelectionStart = start; mSelectionEnd = end; } - void setupScrolledBounds() const; + void setupScrolledBounds() const { mScrolledBounds = mViewBounds; } void setVisibleRect(const WebCore::IntRect& r) { mViewBounds = r; } int textGeneration() const { return mTextGeneration; } int width() const { return mPicture ? mPicture->width() : 0; } private: CachedHistory* mHistory; SkPicture* mPicture; - WebCore::IntRect mFocusBounds; // chosen focus ring + WebCore::IntRect mFocusBounds; // dom text input focus node bounds mutable WebCore::IntRect mScrolledBounds; // view bounds + amount visible as result of scroll - int mGeneration; int mTextGeneration; int mMaxXScroll; int mMaxYScroll; // These two are ONLY used when the tree is rebuilt and the focus is a textfield/area int mSelectionStart; int mSelectionEnd; - mutable bool mFocusChild; // temporary state set if walked nodes are children of focus bool mScrollOnly; #if DUMP_NAV_CACHE public: |
