| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 WebInputEventResult WebPagePopupImpl::handleCharEvent( | 449 WebInputEventResult WebPagePopupImpl::handleCharEvent( |
| 450 const WebKeyboardEvent& event) { | 450 const WebKeyboardEvent& event) { |
| 451 return handleKeyEvent(event); | 451 return handleKeyEvent(event); |
| 452 } | 452 } |
| 453 | 453 |
| 454 WebInputEventResult WebPagePopupImpl::handleGestureEvent( | 454 WebInputEventResult WebPagePopupImpl::handleGestureEvent( |
| 455 const WebGestureEvent& event) { | 455 const WebGestureEvent& event) { |
| 456 if (m_closing || !m_page || !m_page->mainFrame() || | 456 if (m_closing || !m_page || !m_page->mainFrame() || |
| 457 !toLocalFrame(m_page->mainFrame())->view()) | 457 !toLocalFrame(m_page->mainFrame())->view()) |
| 458 return WebInputEventResult::NotHandled; | 458 return WebInputEventResult::NotHandled; |
| 459 if ((event.type == WebInputEvent::GestureTap || | 459 if ((event.type() == WebInputEvent::GestureTap || |
| 460 event.type == WebInputEvent::GestureTapDown) && | 460 event.type() == WebInputEvent::GestureTapDown) && |
| 461 !isViewportPointInWindow(event.x, event.y)) { | 461 !isViewportPointInWindow(event.x, event.y)) { |
| 462 cancel(); | 462 cancel(); |
| 463 return WebInputEventResult::NotHandled; | 463 return WebInputEventResult::NotHandled; |
| 464 } | 464 } |
| 465 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); | 465 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); |
| 466 return frame.eventHandler().handleGestureEvent( | 466 return frame.eventHandler().handleGestureEvent( |
| 467 PlatformGestureEventBuilder(frame.view(), event)); | 467 PlatformGestureEventBuilder(frame.view(), event)); |
| 468 } | 468 } |
| 469 | 469 |
| 470 void WebPagePopupImpl::handleMouseDown(LocalFrame& mainFrame, | 470 void WebPagePopupImpl::handleMouseDown(LocalFrame& mainFrame, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // A WebPagePopupImpl instance usually has two references. | 582 // A WebPagePopupImpl instance usually has two references. |
| 583 // - One owned by the instance itself. It represents the visible widget. | 583 // - One owned by the instance itself. It represents the visible widget. |
| 584 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 584 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 585 // WebPagePopupImpl to close. | 585 // WebPagePopupImpl to close. |
| 586 // We need them because the closing operation is asynchronous and the widget | 586 // We need them because the closing operation is asynchronous and the widget |
| 587 // can be closed while the WebViewImpl is unaware of it. | 587 // can be closed while the WebViewImpl is unaware of it. |
| 588 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 588 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 589 } | 589 } |
| 590 | 590 |
| 591 } // namespace blink | 591 } // namespace blink |
| OLD | NEW |