OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3653 static_cast<DragOperation>(m_operationsAllowed)); | 3653 static_cast<DragOperation>(m_operationsAllowed)); |
3654 | 3654 |
3655 m_page->dragController().dragExited(&dragData); | 3655 m_page->dragController().dragExited(&dragData); |
3656 | 3656 |
3657 // FIXME: why is the drag scroll timer not stopped here? | 3657 // FIXME: why is the drag scroll timer not stopped here? |
3658 | 3658 |
3659 m_dragOperation = WebDragOperationNone; | 3659 m_dragOperation = WebDragOperationNone; |
3660 m_currentDragData = nullptr; | 3660 m_currentDragData = nullptr; |
3661 } | 3661 } |
3662 | 3662 |
3663 void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint, | 3663 void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint&
clientPoint, |
3664 const WebPoint& screenPoint, | 3664 const WebPoint& screenPoint, |
3665 int modifiers) | 3665 int modifiers) |
3666 { | 3666 { |
3667 DCHECK(m_currentDragData); | 3667 DCHECK(m_currentDragData); |
| 3668 m_currentDragData = DataObject::create(webDragData); |
3668 | 3669 |
3669 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; | 3670 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; |
3670 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); | 3671 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); |
3671 | 3672 |
3672 // If this webview transitions from the "drop accepting" state to the "not | 3673 // If this webview transitions from the "drop accepting" state to the "not |
3673 // accepting" state, then our IPC message reply indicating that may be in- | 3674 // accepting" state, then our IPC message reply indicating that may be in- |
3674 // flight, or else delayed by javascript processing in this webview. If a | 3675 // flight, or else delayed by javascript processing in this webview. If a |
3675 // drop happens before our IPC reply has reached the browser process, then | 3676 // drop happens before our IPC reply has reached the browser process, then |
3676 // the browser forwards the drop to this webview. So only allow a drop to | 3677 // the browser forwards the drop to this webview. So only allow a drop to |
3677 // proceed if our webview m_dragOperation state is not DragOperationNone. | 3678 // proceed if our webview m_dragOperation state is not DragOperationNone. |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4594 { | 4595 { |
4595 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4596 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4596 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4597 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4597 if (!page()) | 4598 if (!page()) |
4598 return 1; | 4599 return 1; |
4599 | 4600 |
4600 return page()->deviceScaleFactor(); | 4601 return page()->deviceScaleFactor(); |
4601 } | 4602 } |
4602 | 4603 |
4603 } // namespace blink | 4604 } // namespace blink |
OLD | NEW |