diff options
author | Cary Clark <cary@android.com> | 2009-12-03 11:02:54 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2009-12-04 12:57:34 -0500 |
commit | 1d330120b6c2ee2d3f1c25300d0e3d446ef8c640 (patch) | |
tree | 5e127bc6852405eb389fcc3779a9e10caf6dec9a /WebKit/android/nav/CachedFrame.h | |
parent | 472affe311f3854aaac7cca73d398d36a9eefaf3 (diff) | |
download | external_webkit-1d330120b6c2ee2d3f1c25300d0e3d446ef8c640.zip external_webkit-1d330120b6c2ee2d3f1c25300d0e3d446ef8c640.tar.gz external_webkit-1d330120b6c2ee2d3f1c25300d0e3d446ef8c640.tar.bz2 |
move input-related fields out of CachedNode to expand
Some of the fields in CachedNode are relevant only to input
fields and text areas. Move these into their own vector
so that we can add more data without making all CacheNodes
bigger.
Remove CacheNode entries that are no longer used, or can
be consolidated into the node type. Alphabetize some interfaces
and implementations. Update the debugging output.
part of http://b/2299660
Diffstat (limited to 'WebKit/android/nav/CachedFrame.h')
-rw-r--r-- | WebKit/android/nav/CachedFrame.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/WebKit/android/nav/CachedFrame.h b/WebKit/android/nav/CachedFrame.h index 0062424..f0996f7 100644 --- a/WebKit/android/nav/CachedFrame.h +++ b/WebKit/android/nav/CachedFrame.h @@ -26,6 +26,7 @@ #ifndef CachedFrame_H #define CachedFrame_H +#include "CachedInput.h" #include "CachedNode.h" #include "IntRect.h" #include "SkFixed.h" @@ -66,6 +67,7 @@ public: CURSOR_SET = 0 }; CachedFrame() {} + void add(CachedInput& input) { mCachedTextInputs.append(input); } void add(CachedNode& node) { mCachedNodes.append(node); } void addFrame(CachedFrame& child) { mCachedFrames.append(child); } bool checkVisited(const CachedNode* , CachedFrame::Direction ) const; @@ -123,6 +125,10 @@ public: void setFocusIndex(int index) { mFocusIndex = index; } void setLocalViewBounds(const WebCore::IntRect& bounds) { mLocalViewBounds = bounds; } int size() { return mCachedNodes.size(); } + const CachedInput* textInput(const CachedNode* node) const { + return node->isTextInput() ? &mCachedTextInputs[node->textInputIndex()] + : 0; + } const CachedNode* validDocument() const; protected: struct BestData { @@ -206,6 +212,7 @@ protected: WebCore::IntRect mViewBounds; WTF::Vector<CachedNode> mCachedNodes; WTF::Vector<CachedFrame> mCachedFrames; + WTF::Vector<CachedInput> mCachedTextInputs; void* mFrame; // WebCore::Frame*, used only to compare pointers CachedFrame* mParent; int mCursorIndex; |