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 3708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3719 static_cast<DragOperation>(m_operationsAllowed)); | 3719 static_cast<DragOperation>(m_operationsAllowed)); |
3720 | 3720 |
3721 m_page->dragController().dragExited(&dragData); | 3721 m_page->dragController().dragExited(&dragData); |
3722 | 3722 |
3723 // FIXME: why is the drag scroll timer not stopped here? | 3723 // FIXME: why is the drag scroll timer not stopped here? |
3724 | 3724 |
3725 m_dragOperation = WebDragOperationNone; | 3725 m_dragOperation = WebDragOperationNone; |
3726 m_currentDragData = nullptr; | 3726 m_currentDragData = nullptr; |
3727 } | 3727 } |
3728 | 3728 |
3729 void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint, | 3729 void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint&
clientPoint, |
3730 const WebPoint& screenPoint, | 3730 const WebPoint& screenPoint, |
3731 int modifiers) | 3731 int modifiers) |
3732 { | 3732 { |
3733 DCHECK(m_currentDragData); | 3733 DCHECK(m_currentDragData); |
| 3734 m_currentDragData = DataObject::create(webDragData); |
3734 | 3735 |
3735 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; | 3736 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof
illClient() : 0; |
3736 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); | 3737 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); |
3737 | 3738 |
3738 // If this webview transitions from the "drop accepting" state to the "not | 3739 // If this webview transitions from the "drop accepting" state to the "not |
3739 // accepting" state, then our IPC message reply indicating that may be in- | 3740 // accepting" state, then our IPC message reply indicating that may be in- |
3740 // flight, or else delayed by javascript processing in this webview. If a | 3741 // flight, or else delayed by javascript processing in this webview. If a |
3741 // drop happens before our IPC reply has reached the browser process, then | 3742 // drop happens before our IPC reply has reached the browser process, then |
3742 // the browser forwards the drop to this webview. So only allow a drop to | 3743 // the browser forwards the drop to this webview. So only allow a drop to |
3743 // proceed if our webview m_dragOperation state is not DragOperationNone. | 3744 // proceed if our webview m_dragOperation state is not DragOperationNone. |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4566 { | 4567 { |
4567 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4568 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4568 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4569 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4569 if (!page()) | 4570 if (!page()) |
4570 return 1; | 4571 return 1; |
4571 | 4572 |
4572 return page()->deviceScaleFactor(); | 4573 return page()->deviceScaleFactor(); |
4573 } | 4574 } |
4574 | 4575 |
4575 } // namespace blink | 4576 } // namespace blink |
OLD | NEW |