OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 dragStatus = WebDragStatusLeave; | 814 dragStatus = WebDragStatusLeave; |
815 else if (event->type() == EventTypeNames::dragover) | 815 else if (event->type() == EventTypeNames::dragover) |
816 dragStatus = WebDragStatusOver; | 816 dragStatus = WebDragStatusOver; |
817 else if (event->type() == EventTypeNames::drop) | 817 else if (event->type() == EventTypeNames::drop) |
818 dragStatus = WebDragStatusDrop; | 818 dragStatus = WebDragStatusDrop; |
819 | 819 |
820 if (dragStatus == WebDragStatusUnknown) | 820 if (dragStatus == WebDragStatusUnknown) |
821 return; | 821 return; |
822 | 822 |
823 DataTransfer* dataTransfer = event->dataTransfer(); | 823 DataTransfer* dataTransfer = event->dataTransfer(); |
824 WebDragData dragData(dataTransfer->dataObject()); | 824 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); |
825 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); | 825 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); |
826 WebPoint dragScreenLocation(event->screenX(), event->screenY()); | 826 WebPoint dragScreenLocation(event->screenX(), event->screenY()); |
827 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); | 827 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); |
828 | 828 |
829 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); | 829 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); |
830 } | 830 } |
831 | 831 |
832 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) | 832 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) |
833 { | 833 { |
834 WebMouseWheelEventBuilder webEvent(this, m_element->renderer(), *event); | 834 WebMouseWheelEventBuilder webEvent(this, m_element->renderer(), *event); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 995 |
996 return clipRect; | 996 return clipRect; |
997 } | 997 } |
998 | 998 |
999 bool WebPluginContainerImpl::pluginShouldPersist() const | 999 bool WebPluginContainerImpl::pluginShouldPersist() const |
1000 { | 1000 { |
1001 return m_webPlugin->shouldPersist(); | 1001 return m_webPlugin->shouldPersist(); |
1002 } | 1002 } |
1003 | 1003 |
1004 } // namespace blink | 1004 } // namespace blink |
OLD | NEW |