summaryrefslogtreecommitdiffstats
path: root/webkit/glue/event_conversion.cc
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 17:41:34 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 17:41:34 +0000
commit044dc48ab959e37a5f9960a46e7ffeeaf201fb54 (patch)
tree25d3b3fb7ecb5bbcf3836fb293f2265c1d9a7fbb /webkit/glue/event_conversion.cc
parentab6513714d7bd8e5b13d99f89c2bff468b8dcce5 (diff)
downloadchromium_src-044dc48ab959e37a5f9960a46e7ffeeaf201fb54.zip
chromium_src-044dc48ab959e37a5f9960a46e7ffeeaf201fb54.tar.gz
chromium_src-044dc48ab959e37a5f9960a46e7ffeeaf201fb54.tar.bz2
Hook up mouse events with the correct coordinates. Make sure they are view-local and flipped.
Review URL: http://codereview.chromium.org/8150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/event_conversion.cc')
-rw-r--r--webkit/glue/event_conversion.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index 84db42f..517e8c2 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -38,11 +38,9 @@ uint32 MakePlatformMouseEvent::last_click_time_ = 0;
MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget,
const WebMouseEvent& e) {
-#if defined(OS_WIN) || defined(OS_LINUX)
// TODO(mpcomplete): widget is always toplevel, unless it's a popup. We
// may be able to get rid of this once we abstract popups into a WebKit API.
m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y));
-#endif
m_globalPosition = IntPoint(e.global_x, e.global_y);
m_button = static_cast<MouseButton>(e.button);
m_shiftKey = (e.modifiers & WebInputEvent::SHIFT_KEY) != 0;
@@ -114,9 +112,7 @@ MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget,
MakePlatformWheelEvent::MakePlatformWheelEvent(Widget* widget,
const WebMouseWheelEvent& e)
{
-#if defined(OS_WIN) || defined(OS_LINUX)
m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y));
-#endif
m_globalPosition = IntPoint(e.global_x, e.global_y);
m_deltaX = static_cast<float>(e.delta_x);
m_deltaY = static_cast<float>(e.delta_y);