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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 if (mouseEvent.type() == PlatformEvent::MouseMoved) | 260 if (mouseEvent.type() == PlatformEvent::MouseMoved) |
261 handled = handleMouseMove(mouseEvent); | 261 handled = handleMouseMove(mouseEvent); |
262 else if (mouseEvent.type() == PlatformEvent::MousePressed) | 262 else if (mouseEvent.type() == PlatformEvent::MousePressed) |
263 handled = handleMousePress(); | 263 handled = handleMousePress(); |
264 | 264 |
265 if (handled) | 265 if (handled) |
266 return true; | 266 return true; |
267 | 267 |
268 if (mouseEvent.type() == PlatformEvent::MouseMoved) | 268 if (mouseEvent.type() == PlatformEvent::MouseMoved) |
269 handled = overlayMainFrame()->eventHandler().handleMouseMoveEvent(mo
useEvent); | 269 handled = overlayMainFrame()->eventHandler().handleMouseMoveEvent(mo
useEvent) != WebInputEventResult::NotHandled; |
270 if (mouseEvent.type() == PlatformEvent::MousePressed) | 270 if (mouseEvent.type() == PlatformEvent::MousePressed) |
271 handled = overlayMainFrame()->eventHandler().handleMousePressEvent(m
ouseEvent); | 271 handled = overlayMainFrame()->eventHandler().handleMousePressEvent(m
ouseEvent) != WebInputEventResult::NotHandled; |
272 if (mouseEvent.type() == PlatformEvent::MouseReleased) | 272 if (mouseEvent.type() == PlatformEvent::MouseReleased) |
273 handled = overlayMainFrame()->eventHandler().handleMouseReleaseEvent
(mouseEvent); | 273 handled = overlayMainFrame()->eventHandler().handleMouseReleaseEvent
(mouseEvent) != WebInputEventResult::NotHandled; |
274 } | 274 } |
275 | 275 |
276 if (WebInputEvent::isTouchEventType(inputEvent.type)) { | 276 if (WebInputEvent::isTouchEventType(inputEvent.type)) { |
277 PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(m_webViewImpl-
>mainFrameImpl()->frameView(), static_cast<const WebTouchEvent&>(inputEvent)); | 277 PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(m_webViewImpl-
>mainFrameImpl()->frameView(), static_cast<const WebTouchEvent&>(inputEvent)); |
278 handled = handleTouchEvent(touchEvent); | 278 handled = handleTouchEvent(touchEvent); |
279 if (handled) | 279 if (handled) |
280 return true; | 280 return true; |
281 overlayMainFrame()->eventHandler().handleTouchEvent(touchEvent); | 281 overlayMainFrame()->eventHandler().handleTouchEvent(touchEvent); |
282 } | 282 } |
283 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { | 283 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { |
284 PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(stati
c_cast<const WebKeyboardEvent&>(inputEvent)); | 284 PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(stati
c_cast<const WebKeyboardEvent&>(inputEvent)); |
285 overlayMainFrame()->eventHandler().keyEvent(keyboardEvent); | 285 overlayMainFrame()->eventHandler().keyEvent(keyboardEvent); |
286 } | 286 } |
287 | 287 |
288 if (inputEvent.type == WebInputEvent::MouseWheel) { | 288 if (inputEvent.type == WebInputEvent::MouseWheel) { |
289 PlatformWheelEvent wheelEvent = PlatformWheelEventBuilder(m_webViewImpl-
>mainFrameImpl()->frameView(), static_cast<const WebMouseWheelEvent&>(inputEvent
)); | 289 PlatformWheelEvent wheelEvent = PlatformWheelEventBuilder(m_webViewImpl-
>mainFrameImpl()->frameView(), static_cast<const WebMouseWheelEvent&>(inputEvent
)); |
290 handled = overlayMainFrame()->eventHandler().handleWheelEvent(wheelEvent
); | 290 handled = overlayMainFrame()->eventHandler().handleWheelEvent(wheelEvent
) != WebInputEventResult::NotHandled; |
291 } | 291 } |
292 | 292 |
293 return handled; | 293 return handled; |
294 } | 294 } |
295 | 295 |
296 void InspectorOverlay::setPausedInDebuggerMessage(const String* message) | 296 void InspectorOverlay::setPausedInDebuggerMessage(const String* message) |
297 { | 297 { |
298 m_pausedInDebuggerMessage = message ? *message : String(); | 298 m_pausedInDebuggerMessage = message ? *message : String(); |
299 scheduleUpdate(); | 299 scheduleUpdate(); |
300 } | 300 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 745 |
746 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 746 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
747 { | 747 { |
748 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) | 748 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) |
749 return; | 749 return; |
750 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); | 750 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); |
751 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); | 751 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); |
752 } | 752 } |
753 | 753 |
754 } // namespace blink | 754 } // namespace blink |
OLD | NEW |