| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 if (m_closing || !m_page || !m_page->mainFrame() || | 463 if (m_closing || !m_page || !m_page->mainFrame() || |
| 464 !toLocalFrame(m_page->mainFrame())->view()) | 464 !toLocalFrame(m_page->mainFrame())->view()) |
| 465 return WebInputEventResult::NotHandled; | 465 return WebInputEventResult::NotHandled; |
| 466 if ((event.type == WebInputEvent::GestureTap || | 466 if ((event.type == WebInputEvent::GestureTap || |
| 467 event.type == WebInputEvent::GestureTapDown) && | 467 event.type == WebInputEvent::GestureTapDown) && |
| 468 !isViewportPointInWindow(event.x, event.y)) { | 468 !isViewportPointInWindow(event.x, event.y)) { |
| 469 cancel(); | 469 cancel(); |
| 470 return WebInputEventResult::NotHandled; | 470 return WebInputEventResult::NotHandled; |
| 471 } | 471 } |
| 472 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); | 472 LocalFrame& frame = *toLocalFrame(m_page->mainFrame()); |
| 473 return frame.eventHandler().handleGestureEvent( | 473 WebGestureEvent scaledEvent = ScaleWebGestureEvent(frame.view(), event); |
| 474 PlatformGestureEventBuilder(frame.view(), event)); | 474 return frame.eventHandler().handleGestureEvent(scaledEvent); |
| 475 } | 475 } |
| 476 | 476 |
| 477 void WebPagePopupImpl::handleMouseDown(LocalFrame& mainFrame, | 477 void WebPagePopupImpl::handleMouseDown(LocalFrame& mainFrame, |
| 478 const WebMouseEvent& event) { | 478 const WebMouseEvent& event) { |
| 479 if (isViewportPointInWindow(event.x, event.y)) | 479 if (isViewportPointInWindow(event.x, event.y)) |
| 480 PageWidgetEventHandler::handleMouseDown(mainFrame, event); | 480 PageWidgetEventHandler::handleMouseDown(mainFrame, event); |
| 481 else | 481 else |
| 482 cancel(); | 482 cancel(); |
| 483 } | 483 } |
| 484 | 484 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // A WebPagePopupImpl instance usually has two references. | 589 // A WebPagePopupImpl instance usually has two references. |
| 590 // - One owned by the instance itself. It represents the visible widget. | 590 // - One owned by the instance itself. It represents the visible widget. |
| 591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 592 // WebPagePopupImpl to close. | 592 // WebPagePopupImpl to close. |
| 593 // We need them because the closing operation is asynchronous and the widget | 593 // We need them because the closing operation is asynchronous and the widget |
| 594 // can be closed while the WebViewImpl is unaware of it. | 594 // can be closed while the WebViewImpl is unaware of it. |
| 595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace blink | 598 } // namespace blink |
| OLD | NEW |