| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const WebRect& rect, | 110 const WebRect& rect, |
| 111 LocalFrame& root) { | 111 LocalFrame& root) { |
| 112 paintInternal(page, canvas, rect, root, GlobalPaintFlattenCompositingLayers); | 112 paintInternal(page, canvas, rect, root, GlobalPaintFlattenCompositingLayers); |
| 113 } | 113 } |
| 114 | 114 |
| 115 WebInputEventResult PageWidgetDelegate::handleInputEvent( | 115 WebInputEventResult PageWidgetDelegate::handleInputEvent( |
| 116 PageWidgetEventHandler& handler, | 116 PageWidgetEventHandler& handler, |
| 117 const WebCoalescedInputEvent& coalescedEvent, | 117 const WebCoalescedInputEvent& coalescedEvent, |
| 118 LocalFrame* root) { | 118 LocalFrame* root) { |
| 119 const WebInputEvent& event = coalescedEvent.event(); | 119 const WebInputEvent& event = coalescedEvent.event(); |
| 120 if (event.modifiers & WebInputEvent::IsTouchAccessibility && | 120 if (event.modifiers() & WebInputEvent::IsTouchAccessibility && |
| 121 WebInputEvent::isMouseEventType(event.type)) { | 121 WebInputEvent::isMouseEventType(event.type())) { |
| 122 PlatformMouseEventBuilder pme(root->view(), | 122 PlatformMouseEventBuilder pme(root->view(), |
| 123 static_cast<const WebMouseEvent&>(event)); | 123 static_cast<const WebMouseEvent&>(event)); |
| 124 | 124 |
| 125 IntPoint docPoint(root->view()->rootFrameToContents(pme.position())); | 125 IntPoint docPoint(root->view()->rootFrameToContents(pme.position())); |
| 126 HitTestResult result = root->eventHandler().hitTestResultAtPoint( | 126 HitTestResult result = root->eventHandler().hitTestResultAtPoint( |
| 127 docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 127 docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 128 result.setToShadowHostIfInUserAgentShadowRoot(); | 128 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 129 if (result.innerNodeFrame()) { | 129 if (result.innerNodeFrame()) { |
| 130 Document* document = result.innerNodeFrame()->document(); | 130 Document* document = result.innerNodeFrame()->document(); |
| 131 if (document) { | 131 if (document) { |
| 132 AXObjectCache* cache = document->existingAXObjectCache(); | 132 AXObjectCache* cache = document->existingAXObjectCache(); |
| 133 if (cache) | 133 if (cache) |
| 134 cache->onTouchAccessibilityHover( | 134 cache->onTouchAccessibilityHover( |
| 135 result.roundedPointInInnerNodeFrame()); | 135 result.roundedPointInInnerNodeFrame()); |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 switch (event.type) { | 140 switch (event.type()) { |
| 141 // FIXME: WebKit seems to always return false on mouse events processing | 141 // FIXME: WebKit seems to always return false on mouse events processing |
| 142 // methods. For now we'll assume it has processed them (as we are only | 142 // methods. For now we'll assume it has processed them (as we are only |
| 143 // interested in whether keyboard events are processed). | 143 // interested in whether keyboard events are processed). |
| 144 // FIXME: Why do we return HandleSuppressed when there is no root or | 144 // FIXME: Why do we return HandleSuppressed when there is no root or |
| 145 // the root is detached? | 145 // the root is detached? |
| 146 case WebInputEvent::MouseMove: | 146 case WebInputEvent::MouseMove: |
| 147 if (!root || !root->view()) | 147 if (!root || !root->view()) |
| 148 return WebInputEventResult::HandledSuppressed; | 148 return WebInputEventResult::HandledSuppressed; |
| 149 handler.handleMouseMove(*root, static_cast<const WebMouseEvent&>(event), | 149 handler.handleMouseMove(*root, static_cast<const WebMouseEvent&>(event), |
| 150 coalescedEvent.getCoalescedEventsPointers()); | 150 coalescedEvent.getCoalescedEventsPointers()); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 WebInputEventResult PageWidgetEventHandler::handleTouchEvent( | 259 WebInputEventResult PageWidgetEventHandler::handleTouchEvent( |
| 260 LocalFrame& mainFrame, | 260 LocalFrame& mainFrame, |
| 261 const WebTouchEvent& event, | 261 const WebTouchEvent& event, |
| 262 const std::vector<const WebInputEvent*>& coalescedEvents) { | 262 const std::vector<const WebInputEvent*>& coalescedEvents) { |
| 263 return mainFrame.eventHandler().handleTouchEvent( | 263 return mainFrame.eventHandler().handleTouchEvent( |
| 264 PlatformTouchEventBuilder(mainFrame.view(), event), | 264 PlatformTouchEventBuilder(mainFrame.view(), event), |
| 265 createPlatformTouchEventVector(mainFrame.view(), coalescedEvents)); | 265 createPlatformTouchEventVector(mainFrame.view(), coalescedEvents)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace blink | 268 } // namespace blink |
| OLD | NEW |