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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 dragStatus = WebDragStatusLeave; | 813 dragStatus = WebDragStatusLeave; |
814 else if (event->type() == EventTypeNames::dragover) | 814 else if (event->type() == EventTypeNames::dragover) |
815 dragStatus = WebDragStatusOver; | 815 dragStatus = WebDragStatusOver; |
816 else if (event->type() == EventTypeNames::drop) | 816 else if (event->type() == EventTypeNames::drop) |
817 dragStatus = WebDragStatusDrop; | 817 dragStatus = WebDragStatusDrop; |
818 | 818 |
819 if (dragStatus == WebDragStatusUnknown) | 819 if (dragStatus == WebDragStatusUnknown) |
820 return; | 820 return; |
821 | 821 |
822 DataTransfer* dataTransfer = event->dataTransfer(); | 822 DataTransfer* dataTransfer = event->dataTransfer(); |
823 WebDragData dragData(dataTransfer->dataObject()); | 823 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); |
824 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); | 824 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); |
825 WebPoint dragScreenLocation(event->screenX(), event->screenY()); | 825 WebPoint dragScreenLocation(event->screenX(), event->screenY()); |
826 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); | 826 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); |
827 | 827 |
828 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); | 828 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); |
829 } | 829 } |
830 | 830 |
831 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) | 831 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) |
832 { | 832 { |
833 WebMouseWheelEventBuilder webEvent(this, m_element->renderer(), *event); | 833 WebMouseWheelEventBuilder webEvent(this, m_element->renderer(), *event); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 | 994 |
995 return clipRect; | 995 return clipRect; |
996 } | 996 } |
997 | 997 |
998 bool WebPluginContainerImpl::pluginShouldPersist() const | 998 bool WebPluginContainerImpl::pluginShouldPersist() const |
999 { | 999 { |
1000 return m_webPlugin->shouldPersist(); | 1000 return m_webPlugin->shouldPersist(); |
1001 } | 1001 } |
1002 | 1002 |
1003 } // namespace blink | 1003 } // namespace blink |
OLD | NEW |