blob: 8fb72b800e2d3c6c85bde9aa6c705cb0a8ffade0 [file] [log] [blame]
/*
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
* Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "EventHandler.h"
#include "ClipboardBlackBerry.h"
#include "FocusController.h"
#include "Frame.h"
#include "KeyboardEvent.h"
#include "MouseEventWithHitTestResults.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
#include "Widget.h"
namespace WebCore {
bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
{
notImplemented();
return false;
}
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler()->handleMousePressEvent(mev.event());
return true;
}
bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler()->handleMouseReleaseEvent(mev.event());
return true;
}
bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent&, Widget*)
{
notImplemented();
return false;
}
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&)
{
notImplemented();
return false;
}
bool EventHandler::tabsToAllFormControls(KeyboardEvent*) const
{
return true;
}
unsigned EventHandler::accessKeyModifiers()
{
return PlatformEvent::AltKey;
}
void EventHandler::focusDocumentView()
{
Page* page = m_frame->page();
if (!page)
return;
page->focusController()->setFocusedFrame(m_frame);
}
#if ENABLE(DRAG_SUPPORT)
WTF::PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
return ClipboardBlackBerry::create(ClipboardWritable);
}
#endif
} // namespace WebCore