| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2666 return false; | 2666 return false; |
| 2667 | 2667 |
| 2668 // If not a FrameView, then probably a plugin widget. Those will receive | 2668 // If not a FrameView, then probably a plugin widget. Those will receive |
| 2669 // the event via an EventTargetNode dispatch when this returns false. | 2669 // the event via an EventTargetNode dispatch when this returns false. |
| 2670 if (!widget->isFrameView()) | 2670 if (!widget->isFrameView()) |
| 2671 return false; | 2671 return false; |
| 2672 | 2672 |
| 2673 return toFrameView(widget)->frame().eventHandler().handleWheelEvent(wheelEve
nt); | 2673 return toFrameView(widget)->frame().eventHandler().handleWheelEvent(wheelEve
nt); |
| 2674 } | 2674 } |
| 2675 | 2675 |
| 2676 // TODO(esprehn): Remove this. |
| 2676 bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestR
esults& event) | 2677 bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestR
esults& event) |
| 2677 { | 2678 { |
| 2678 // Figure out which view to send the event to. | |
| 2679 if (!event.targetNode() || !event.targetNode()->renderer() || !event.targetN
ode()->renderer()->isWidget()) | |
| 2680 return false; | |
| 2681 return false; | 2679 return false; |
| 2682 } | 2680 } |
| 2683 | 2681 |
| 2684 void EventHandler::focusDocumentView() | 2682 void EventHandler::focusDocumentView() |
| 2685 { | 2683 { |
| 2686 Page* page = m_frame->page(); | 2684 Page* page = m_frame->page(); |
| 2687 if (!page) | 2685 if (!page) |
| 2688 return; | 2686 return; |
| 2689 page->focusController().focusDocumentView(m_frame); | 2687 page->focusController().focusDocumentView(m_frame); |
| 2690 } | 2688 } |
| 2691 | 2689 |
| 2692 unsigned EventHandler::accessKeyModifiers() | 2690 unsigned EventHandler::accessKeyModifiers() |
| 2693 { | 2691 { |
| 2694 #if OS(MACOSX) | 2692 #if OS(MACOSX) |
| 2695 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 2693 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 2696 #else | 2694 #else |
| 2697 return PlatformEvent::AltKey; | 2695 return PlatformEvent::AltKey; |
| 2698 #endif | 2696 #endif |
| 2699 } | 2697 } |
| 2700 | 2698 |
| 2701 } // namespace blink | 2699 } // namespace blink |
| OLD | NEW |