| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 static_cast<const WebMouseEvent&>(inputEvent)); | 261 static_cast<const WebMouseEvent&>(inputEvent)); |
| 262 | 262 |
| 263 if (mouseEvent.type() == PlatformEvent::MouseMoved) | 263 if (mouseEvent.type() == PlatformEvent::MouseMoved) |
| 264 handled = handleMouseMove(mouseEvent); | 264 handled = handleMouseMove(mouseEvent); |
| 265 else if (mouseEvent.type() == PlatformEvent::MousePressed) | 265 else if (mouseEvent.type() == PlatformEvent::MousePressed) |
| 266 handled = handleMousePress(); | 266 handled = handleMousePress(); |
| 267 | 267 |
| 268 if (handled) | 268 if (handled) |
| 269 return true; | 269 return true; |
| 270 | 270 |
| 271 if (mouseEvent.type() == PlatformEvent::MouseMoved) | 271 if (mouseEvent.type() == PlatformEvent::MouseMoved) { |
| 272 handled = overlayMainFrame()->eventHandler().handleMouseMoveEvent( | 272 handled = overlayMainFrame()->eventHandler().handleMouseMoveEvent( |
| 273 mouseEvent) != WebInputEventResult::NotHandled; | 273 mouseEvent, createPlatformMouseEventVector( |
| 274 m_frameImpl->frameView(), |
| 275 std::vector<const WebInputEvent*>())) != |
| 276 WebInputEventResult::NotHandled; |
| 277 } |
| 274 if (mouseEvent.type() == PlatformEvent::MousePressed) | 278 if (mouseEvent.type() == PlatformEvent::MousePressed) |
| 275 handled = overlayMainFrame()->eventHandler().handleMousePressEvent( | 279 handled = overlayMainFrame()->eventHandler().handleMousePressEvent( |
| 276 mouseEvent) != WebInputEventResult::NotHandled; | 280 mouseEvent) != WebInputEventResult::NotHandled; |
| 277 if (mouseEvent.type() == PlatformEvent::MouseReleased) | 281 if (mouseEvent.type() == PlatformEvent::MouseReleased) |
| 278 handled = overlayMainFrame()->eventHandler().handleMouseReleaseEvent( | 282 handled = overlayMainFrame()->eventHandler().handleMouseReleaseEvent( |
| 279 mouseEvent) != WebInputEventResult::NotHandled; | 283 mouseEvent) != WebInputEventResult::NotHandled; |
| 280 } | 284 } |
| 281 | 285 |
| 282 if (WebInputEvent::isTouchEventType(inputEvent.type)) { | 286 if (WebInputEvent::isTouchEventType(inputEvent.type)) { |
| 283 PlatformTouchEvent touchEvent = PlatformTouchEventBuilder( | 287 PlatformTouchEvent touchEvent = PlatformTouchEventBuilder( |
| 284 m_frameImpl->frameView(), | 288 m_frameImpl->frameView(), |
| 285 static_cast<const WebTouchEvent&>(inputEvent)); | 289 static_cast<const WebTouchEvent&>(inputEvent)); |
| 286 handled = handleTouchEvent(touchEvent); | 290 handled = handleTouchEvent(touchEvent); |
| 287 if (handled) | 291 if (handled) |
| 288 return true; | 292 return true; |
| 289 overlayMainFrame()->eventHandler().handleTouchEvent(touchEvent); | 293 overlayMainFrame()->eventHandler().handleTouchEvent( |
| 294 touchEvent, |
| 295 createPlatformTouchEventVector(m_frameImpl->frameView(), |
| 296 std::vector<const WebInputEvent*>())); |
| 290 } | 297 } |
| 291 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { | 298 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { |
| 292 overlayMainFrame()->eventHandler().keyEvent( | 299 overlayMainFrame()->eventHandler().keyEvent( |
| 293 static_cast<const WebKeyboardEvent&>(inputEvent)); | 300 static_cast<const WebKeyboardEvent&>(inputEvent)); |
| 294 } | 301 } |
| 295 | 302 |
| 296 if (inputEvent.type == WebInputEvent::MouseWheel) { | 303 if (inputEvent.type == WebInputEvent::MouseWheel) { |
| 297 PlatformWheelEvent wheelEvent = PlatformWheelEventBuilder( | 304 PlatformWheelEvent wheelEvent = PlatformWheelEventBuilder( |
| 298 m_frameImpl->frameView(), | 305 m_frameImpl->frameView(), |
| 299 static_cast<const WebMouseWheelEvent&>(inputEvent)); | 306 static_cast<const WebMouseWheelEvent&>(inputEvent)); |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 !node->isElementNode() || !node->ownerDocument()->isActive() || | 874 !node->isElementNode() || !node->ownerDocument()->isActive() || |
| 868 !m_cssAgent || !m_domAgent) | 875 !m_cssAgent || !m_domAgent) |
| 869 return; | 876 return; |
| 870 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgent, | 877 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgent, |
| 871 &overlayMainFrame()->script()); | 878 &overlayMainFrame()->script()); |
| 872 toChromeClientImpl(m_frameImpl->frame()->host()->chromeClient()) | 879 toChromeClientImpl(m_frameImpl->frame()->host()->chromeClient()) |
| 873 .setCursorOverridden(true); | 880 .setCursorOverridden(true); |
| 874 } | 881 } |
| 875 | 882 |
| 876 } // namespace blink | 883 } // namespace blink |
| OLD | NEW |