summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/CachedFrame.cpp
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2009-12-02 20:25:10 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-02 20:25:10 -0800
commitdd9d17696b11b2aa8c501387fef01fb5ee4656d5 (patch)
treebd8f465a5a697bf2a64f68841a259ceea91b971f /WebKit/android/nav/CachedFrame.cpp
parent8b6af12a5ceacdb3ab887398da1837bd0638630c (diff)
parentb50d4472b389f7d51a80b6082ba1f5cfceead194 (diff)
downloadexternal_webkit-dd9d17696b11b2aa8c501387fef01fb5ee4656d5.zip
external_webkit-dd9d17696b11b2aa8c501387fef01fb5ee4656d5.tar.gz
external_webkit-dd9d17696b11b2aa8c501387fef01fb5ee4656d5.tar.bz2
am b50d4472: am 96070103: nav to container if it wants key events
Merge commit 'b50d4472b389f7d51a80b6082ba1f5cfceead194' * commit 'b50d4472b389f7d51a80b6082ba1f5cfceead194': nav to container if it wants key events
Diffstat (limited to 'WebKit/android/nav/CachedFrame.cpp')
-rw-r--r--WebKit/android/nav/CachedFrame.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp
index 54c295d..8a05cd6 100644
--- a/WebKit/android/nav/CachedFrame.cpp
+++ b/WebKit/android/nav/CachedFrame.cpp
@@ -753,7 +753,7 @@ int CachedFrame::frameNodeCommon(BestData& testData, const CachedNode* test, Bes
int CachedFrame::framePartCommon(BestData& testData,
const CachedNode* test, BestData* bestData, const CachedNode* cursor) const
{
- if (cursor && testData.mNodeBounds.contains(cursor->bounds())) {
+ if (cursor && testData.mNodeBounds.contains(cursor->bounds()) && !test->wantsKeyEvents()) {
testData.mNode->setCondition(CachedNode::NOT_ENCLOSING_CURSOR);
return REJECT_TEST;
}
@@ -1144,7 +1144,7 @@ bool CachedFrame::BestData::setDownDirection(const CachedHistory* history)
int inNavBottom = navBounds.bottom() - mNodeBounds.bottom();
setNavInclusion(testRight - navBounds.right(), navBounds.x() - testX);
bool subsumes = navBounds.height() > 0 && inOrSubsumesNav();
- if (inNavTop <= 0 && inNavBottom <= 0 && subsumes) {
+ if (inNavTop <= 0 && inNavBottom <= 0 && subsumes && !mNode->wantsKeyEvents()) {
mNode->setCondition(CachedNode::NOT_ENCLOSING_CURSOR);
return REJECT_TEST;
}
@@ -1184,7 +1184,7 @@ bool CachedFrame::BestData::setLeftDirection(const CachedHistory* history)
int inNavLeft = mNodeBounds.x() - navBounds.x();
setNavInclusion(navBounds.y() - testY, testBottom - navBounds.bottom());
bool subsumes = navBounds.width() > 0 && inOrSubsumesNav();
- if (inNavLeft <= 0 && inNavRight <= 0 && subsumes) {
+ if (inNavLeft <= 0 && inNavRight <= 0 && subsumes && !mNode->wantsKeyEvents()) {
mNode->setCondition(CachedNode::NOT_ENCLOSING_CURSOR);
return REJECT_TEST;
}
@@ -1224,7 +1224,7 @@ bool CachedFrame::BestData::setRightDirection(const CachedHistory* history)
int inNavRight = navBounds.right() - mNodeBounds.right();
setNavInclusion(testBottom - navBounds.bottom(), navBounds.y() - testY);
bool subsumes = navBounds.width() > 0 && inOrSubsumesNav();
- if (inNavLeft <= 0 && inNavRight <= 0 && subsumes) {
+ if (inNavLeft <= 0 && inNavRight <= 0 && subsumes && !mNode->wantsKeyEvents()) {
mNode->setCondition(CachedNode::NOT_ENCLOSING_CURSOR);
return REJECT_TEST;
}
@@ -1264,7 +1264,7 @@ bool CachedFrame::BestData::setUpDirection(const CachedHistory* history)
int inNavTop = mNodeBounds.y() - navBounds.y();
setNavInclusion(navBounds.x() - testX, testRight - navBounds.right());
bool subsumes = navBounds.height() > 0 && inOrSubsumesNav();
- if (inNavTop <= 0 && inNavBottom <= 0 && subsumes) {
+ if (inNavTop <= 0 && inNavBottom <= 0 && subsumes && !mNode->wantsKeyEvents()) {
mNode->setCondition(CachedNode::NOT_ENCLOSING_CURSOR);
return REJECT_TEST;
}