OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EventHandlingUtil_h | 5 #ifndef EventHandlingUtil_h |
6 #define EventHandlingUtil_h | 6 #define EventHandlingUtil_h |
7 | 7 |
8 #include "core/frame/LocalFrame.h" | |
9 #include "core/layout/HitTestResult.h" | 8 #include "core/layout/HitTestResult.h" |
| 9 #include "core/page/EventWithHitTestResults.h" |
10 #include "platform/geometry/LayoutPoint.h" | 10 #include "platform/geometry/LayoutPoint.h" |
11 #include "public/platform/WebInputEventResult.h" | 11 #include "public/platform/WebInputEventResult.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
| 15 class LocalFrame; |
| 16 class ScrollableArea; |
| 17 class PaintLayer; |
| 18 |
15 namespace EventHandlingUtil { | 19 namespace EventHandlingUtil { |
16 | 20 |
17 HitTestResult hitTestResultInFrame( | 21 HitTestResult hitTestResultInFrame( |
18 LocalFrame*, | 22 LocalFrame*, |
19 const LayoutPoint&, | 23 const LayoutPoint&, |
20 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | | 24 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | |
21 HitTestRequest::Active); | 25 HitTestRequest::Active); |
22 | 26 |
23 WebInputEventResult mergeEventResult(WebInputEventResult resultA, | 27 WebInputEventResult mergeEventResult(WebInputEventResult resultA, |
24 WebInputEventResult resultB); | 28 WebInputEventResult resultB); |
25 WebInputEventResult toWebInputEventResult(DispatchEventResult); | 29 WebInputEventResult toWebInputEventResult(DispatchEventResult); |
26 | 30 |
| 31 PaintLayer* layerForNode(Node*); |
| 32 ScrollableArea* associatedScrollableArea(const PaintLayer*); |
| 33 |
| 34 ContainerNode* parentForClickEvent(const Node&); |
| 35 |
| 36 LayoutPoint contentPointFromRootFrame(LocalFrame*, |
| 37 const IntPoint& pointInRootFrame); |
| 38 |
| 39 MouseEventWithHitTestResults performMouseEventHitTest( |
| 40 LocalFrame*, |
| 41 const HitTestRequest&, |
| 42 const PlatformMouseEvent&); |
| 43 |
27 } // namespace EventHandlingUtil | 44 } // namespace EventHandlingUtil |
28 | 45 |
29 } // namespace blink | 46 } // namespace blink |
30 | 47 |
31 #endif // EventHandlingUtil_h | 48 #endif // EventHandlingUtil_h |
OLD | NEW |