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 3618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3629 static_cast<DragOperation>(m_operationsAllowed)); | 3629 static_cast<DragOperation>(m_operationsAllowed)); |
3630 | 3630 |
3631 m_page->dragController().dragExited(&dragData); | 3631 m_page->dragController().dragExited(&dragData); |
3632 | 3632 |
3633 // FIXME: why is the drag scroll timer not stopped here? | 3633 // FIXME: why is the drag scroll timer not stopped here? |
3634 | 3634 |
3635 m_dragOperation = WebDragOperationNone; | 3635 m_dragOperation = WebDragOperationNone; |
3636 m_currentDragData = nullptr; | 3636 m_currentDragData = nullptr; |
3637 } | 3637 } |
3638 | 3638 |
3639 void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint, | 3639 void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint& clientPoint, |
3640 const WebPoint& screenPoint, | 3640 const WebPoint& screenPoint, |
3641 int modifiers) | 3641 int modifiers) |
3642 { | 3642 { |
3643 ASSERT(m_currentDragData); | 3643 ASSERT(m_currentDragData); |
3644 if (!webDragData.isNull()) { | |
aelias_OOO_until_Jul13
2016/03/02 00:03:19
nit: no braces for one-line clauses in Blink style
hush (inactive)
2016/03/02 02:35:11
Done.
| |
3645 m_currentDragData = DataObject::create(webDragData); | |
3646 } | |
3644 | 3647 |
3645 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof illClient() : 0; | 3648 WebAutofillClient* autofillClient = mainFrameImpl() ? mainFrameImpl()->autof illClient() : 0; |
3646 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); | 3649 UserGestureNotifier notifier(autofillClient, &m_userGestureObserved); |
3647 | 3650 |
3648 // If this webview transitions from the "drop accepting" state to the "not | 3651 // If this webview transitions from the "drop accepting" state to the "not |
3649 // accepting" state, then our IPC message reply indicating that may be in- | 3652 // accepting" state, then our IPC message reply indicating that may be in- |
3650 // flight, or else delayed by javascript processing in this webview. If a | 3653 // flight, or else delayed by javascript processing in this webview. If a |
3651 // drop happens before our IPC reply has reached the browser process, then | 3654 // drop happens before our IPC reply has reached the browser process, then |
3652 // the browser forwards the drop to this webview. So only allow a drop to | 3655 // the browser forwards the drop to this webview. So only allow a drop to |
3653 // proceed if our webview m_dragOperation state is not DragOperationNone. | 3656 // proceed if our webview m_dragOperation state is not DragOperationNone. |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4569 { | 4572 { |
4570 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than | 4573 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than |
4571 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4574 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4572 if (!page()) | 4575 if (!page()) |
4573 return 1; | 4576 return 1; |
4574 | 4577 |
4575 return page()->deviceScaleFactor(); | 4578 return page()->deviceScaleFactor(); |
4576 } | 4579 } |
4577 | 4580 |
4578 } // namespace blink | 4581 } // namespace blink |
OLD | NEW |