summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/CachedFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/nav/CachedFrame.cpp')
-rw-r--r--WebKit/android/nav/CachedFrame.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp
index 9365d06..0231394 100644
--- a/WebKit/android/nav/CachedFrame.cpp
+++ b/WebKit/android/nav/CachedFrame.cpp
@@ -287,18 +287,6 @@ int CachedFrame::compare(BestData& testData, const BestData& bestData, const Cac
return UNDECIDED;
}
-bool CachedFrame::containsFrame(const CachedFrame* test) const
-{
- if (this == test)
- return true;
- for (const CachedFrame* frame = mCachedFrames.begin();
- frame != mCachedFrames.end(); frame++) {
- if (frame->containsFrame(test))
- return true;
- }
- return false;
-}
-
const CachedNode* CachedFrame::currentFocus(const CachedFrame** framePtr) const
{
if (framePtr)
@@ -910,6 +898,16 @@ void CachedFrame::resetClippedOut()
}
}
+bool CachedFrame::sameFrame(const CachedFrame* test) const
+{
+ ASSERT(test);
+ if (mIndex != test->mIndex)
+ return false;
+ if (mIndex == -1) // index within parent's array of children, or -1 if root
+ return true;
+ return mParent->sameFrame(test->mParent);
+}
+
void CachedFrame::setData()
{
if (this != mRoot) {