| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 button = static_cast<Button>(event.button()); | 575 button = static_cast<Button>(event.button()); |
| 576 clickCount = event.clickCount(); | 576 clickCount = event.clickCount(); |
| 577 } | 577 } |
| 578 | 578 |
| 579 WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const
WebCore::RenderObject* renderObject, const WheelEvent& event) | 579 WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const
WebCore::RenderObject* renderObject, const WheelEvent& event) |
| 580 { | 580 { |
| 581 if (event.type() != eventNames().wheelEvent && event.type() != eventNames().
mousewheelEvent) | 581 if (event.type() != eventNames().wheelEvent && event.type() != eventNames().
mousewheelEvent) |
| 582 return; | 582 return; |
| 583 type = WebInputEvent::MouseWheel; | 583 type = WebInputEvent::MouseWheel; |
| 584 updateWebMouseEventFromWebCoreMouseEvent(event, *widget, *renderObject, *thi
s); | 584 updateWebMouseEventFromWebCoreMouseEvent(event, *widget, *renderObject, *thi
s); |
| 585 deltaX = static_cast<float>(event.rawDeltaX()); | 585 deltaX = -event.deltaX(); |
| 586 deltaY = static_cast<float>(event.rawDeltaY()); | 586 deltaY = -event.deltaY(); |
| 587 wheelTicksX = static_cast<float>(event.wheelDeltaX()) / WheelEvent::TickMult
iplier; | 587 wheelTicksX = event.ticksX(); |
| 588 wheelTicksY = static_cast<float>(event.wheelDeltaY()) / WheelEvent::TickMult
iplier; | 588 wheelTicksY = event.ticksY(); |
| 589 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; | 589 scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE; |
| 590 } | 590 } |
| 591 | 591 |
| 592 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) | 592 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) |
| 593 { | 593 { |
| 594 if (event.type() == eventNames().keydownEvent) | 594 if (event.type() == eventNames().keydownEvent) |
| 595 type = KeyDown; | 595 type = KeyDown; |
| 596 else if (event.type() == eventNames().keyupEvent) | 596 else if (event.type() == eventNames().keyupEvent) |
| 597 type = WebInputEvent::KeyUp; | 597 type = WebInputEvent::KeyUp; |
| 598 else if (event.type() == eventNames().keypressEvent) | 598 else if (event.type() == eventNames().keypressEvent) |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 modifiers = getWebInputModifiers(event); | 738 modifiers = getWebInputModifiers(event); |
| 739 | 739 |
| 740 globalX = event.screenX(); | 740 globalX = event.screenX(); |
| 741 globalY = event.screenY(); | 741 globalY = event.screenY(); |
| 742 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 742 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
| 743 x = localPoint.x(); | 743 x = localPoint.x(); |
| 744 y = localPoint.y(); | 744 y = localPoint.y(); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace WebKit | 747 } // namespace WebKit |
| OLD | NEW |