return result;
}
-void CachedRoot::getSimulatedMousePosition(const CachedNode* cursor,
- WebCore::IntPoint* point) const
+void CachedRoot::getSimulatedMousePosition(WebCore::IntPoint* point) const
{
#ifndef NDEBUG
ASSERT(CachedFrame::mDebug.mInUse);
int height = mouseBounds.height();
point->setX(x + (width >> 1)); // default to box center
point->setY(y + (height >> 1));
- if (cursor && cursor->bounds().contains(mHistory->mMouseBounds)) {
- if (cursor->isTextField()) // if text field, return end of line
- point->setX(x + width - 1);
- else if (cursor->isTextArea()) { // if text area, return start
- point->setX(x + 1);
- point->setY(y + 1);
- }
- }
#if DEBUG_NAV_UI
const WebCore::IntRect& navBounds = mHistory->mNavBounds;
DBG_NAV_LOGD("mHistory->mNavBounds={%d,%d,%d,%d} "
int getAndResetSelectionEnd();
int getAndResetSelectionStart();
int getBlockLeftEdge(int x, int y, float scale) const;
- void getSimulatedMousePosition(const CachedNode* , WebCore::IntPoint* ) const;
+ void getSimulatedMousePosition(WebCore::IntPoint* ) const;
void init(WebCore::Frame* , CachedHistory* );
bool innerDown(const CachedNode* , BestData* ) const;
bool innerLeft(const CachedNode* , BestData* ) const;
m_viewImpl->m_cursorBounds = cachedNode->bounds();
m_viewImpl->m_cursorHitBounds = cachedNode->hitBounds();
m_viewImpl->m_cursorFrame = cachedFrame->framePointer();
- root->getSimulatedMousePosition(cachedNode,
- &m_viewImpl->m_cursorLocation);
+ root->getSimulatedMousePosition(&m_viewImpl->m_cursorLocation);
m_viewImpl->m_cursorNode = cachedNode->nodePointer();
}
m_viewImpl->gCursorBoundsMutex.unlock();
const CachedRoot* root = view->getFrameCache(WebView::DontAllowNewer);
WebCore::IntPoint pos = WebCore::IntPoint(0, 0);
if (root)
- root->getSimulatedMousePosition(root->currentCursor(), &pos);
+ root->getSimulatedMousePosition(&pos);
jclass pointClass = env->FindClass("android/graphics/Point");
jmethodID init = env->GetMethodID(pointClass, "<init>", "(II)V");
jobject point = env->NewObject(pointClass, init, pos.x(), pos.y());
root->setCursor(const_cast<CachedFrame*>(frame),
const_cast<CachedNode*>(next));
WebCore::IntPoint pos;
- root->getSimulatedMousePosition(next, &pos);
+ root->getSimulatedMousePosition(&pos);
view->sendMoveMouse(static_cast<WebCore::Frame*>(frame->framePointer()),
static_cast<WebCore::Node*>(next->nodePointer()), pos.x(), pos.y());
view->scrollRectOnScreen(bounds.x(), bounds.y(), bounds.right(),