summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/CachedNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/nav/CachedNode.h')
-rw-r--r--WebKit/android/nav/CachedNode.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h
index f3cfd98..db48a66 100644
--- a/WebKit/android/nav/CachedNode.h
+++ b/WebKit/android/nav/CachedNode.h
@@ -26,12 +26,13 @@
#ifndef CachedNode_H
#define CachedNode_H
-#include "AtomicString.h"
#include "CachedDebug.h"
#include "CachedNodeType.h"
#include "IntRect.h"
#include "PlatformString.h"
-#include "wtf/Vector.h"
+
+#include <wtf/Vector.h>
+#include <wtf/text/AtomicString.h>
class SkPicture;
@@ -95,12 +96,13 @@ public:
WTF::Vector<WebCore::IntRect>* rings);
bool clip(const WebCore::IntRect& );
bool clippedOut() { return mClippedOut; }
+ int colorIndex() const { return mColorIndex; }
WebCore::IntRect cursorRingBounds(const CachedFrame* ) const;
void cursorRings(const CachedFrame* , WTF::Vector<WebCore::IntRect>* ) const;
bool disabled() const { return mDisabled; }
const CachedNode* document() const { return &this[-mIndex]; }
void fixUpCursorRects(const CachedFrame* frame);
- const WebCore::String& getExport() const { return mExport; }
+ const WTF::String& getExport() const { return mExport; }
bool hasCursorRing() const { return mHasCursorRing; }
bool hasMouseOver() const { return mHasMouseOver; }
void hideCursor(CachedFrame* );
@@ -108,6 +110,7 @@ public:
int index() const { return mIndex; }
void init(WebCore::Node* node);
bool isAnchor() const { return mType == ANCHOR_CACHEDNODETYPE; }
+ bool isContentEditable() const { return mType == CONTENT_EDITABLE_CACHEDNODETYPE; }
bool isCursor() const { return mIsCursor; }
bool isArea() const { return mType == AREA_CACHEDNODETYPE; }
bool isFocus() const { return mIsFocus; }
@@ -118,6 +121,7 @@ public:
return clip.intersects(bounds(frame));
}
bool isPlugin() const { return mType == PLUGIN_CACHEDNODETYPE; }
+ bool isSelect() const { return mType == SELECT_CACHEDNODETYPE; }
bool isSyntheticLink() const {
return mType >= ADDRESS_CACHEDNODETYPE && mType <= PHONE_CACHEDNODETYPE;
}
@@ -145,10 +149,11 @@ public:
WebCore::IntRect ring(const CachedFrame* , size_t part) const;
void setBounds(const WebCore::IntRect& bounds) { mBounds = bounds; }
void setClippedOut(bool clipped) { mClippedOut = clipped; }
+ void setColorIndex(int index) { mColorIndex = index; }
void setCondition(Condition condition) const { mCondition = condition; }
void setDataIndex(int index) { mDataIndex = index; }
void setDisabled(bool disabled) { mDisabled = disabled; }
- void setExport(const WebCore::String& exported) { mExport = exported; }
+ void setExport(const WTF::String& exported) { mExport = exported; }
void setHasCursorRing(bool hasRing) { mHasCursorRing = hasRing; }
void setHasMouseOver(bool hasMouseOver) { mHasMouseOver = hasMouseOver; }
void setHitBounds(const WebCore::IntRect& bounds) { mHitBounds = bounds; }
@@ -173,10 +178,10 @@ public:
const CachedNode* traverseNextNode() const { return mLast ? NULL : &this[1]; }
bool useBounds() const { return mUseBounds; }
bool useHitBounds() const { return mUseHitBounds; }
- bool wantsKeyEvents() const { return isTextInput() || isPlugin(); }
+ bool wantsKeyEvents() const { return isTextInput() || isPlugin() || isContentEditable(); }
private:
friend class CacheBuilder;
- WebCore::String mExport;
+ WTF::String mExport;
WebCore::IntRect mBounds;
WebCore::IntRect mHitBounds;
WebCore::IntRect mOriginalAbsoluteBounds;
@@ -188,6 +193,7 @@ private:
int mNavableRects; // FIXME: could be bitfield once I limit max number of rects
int mParentIndex;
int mTabIndex;
+ int mColorIndex; // index to ring color and other stylable properties
mutable Condition mCondition : 5; // why the node was not chosen on the first pass
CachedNodeType mType : 4;
bool mClippedOut : 1;