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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 else if (event->type() == EventTypeNames::dragleave) | 778 else if (event->type() == EventTypeNames::dragleave) |
779 dragStatus = WebDragStatusLeave; | 779 dragStatus = WebDragStatusLeave; |
780 else if (event->type() == EventTypeNames::dragover) | 780 else if (event->type() == EventTypeNames::dragover) |
781 dragStatus = WebDragStatusOver; | 781 dragStatus = WebDragStatusOver; |
782 else if (event->type() == EventTypeNames::drop) | 782 else if (event->type() == EventTypeNames::drop) |
783 dragStatus = WebDragStatusDrop; | 783 dragStatus = WebDragStatusDrop; |
784 | 784 |
785 if (dragStatus == WebDragStatusUnknown) | 785 if (dragStatus == WebDragStatusUnknown) |
786 return; | 786 return; |
787 | 787 |
788 DataTransfer* dataTransfer = event->dataTransfer(); | 788 DataTransfer* dataTransfer = event->getDataTransfer(); |
789 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); | 789 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); |
790 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); | 790 WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>
(dataTransfer->sourceOperation()); |
791 WebPoint dragScreenLocation(event->screenX(), event->screenY()); | 791 WebPoint dragScreenLocation(event->screenX(), event->screenY()); |
792 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); | 792 WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event-
>absoluteLocation().y() - location().y()); |
793 | 793 |
794 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); | 794 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
dragLocation, dragScreenLocation); |
795 } | 795 } |
796 | 796 |
797 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) | 797 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) |
798 { | 798 { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 // frame view. | 977 // frame view. |
978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
979 } | 979 } |
980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
981 // Convert to the plugin position. | 981 // Convert to the plugin position. |
982 for (size_t i = 0; i < cutOutRects.size(); i++) | 982 for (size_t i = 0; i < cutOutRects.size(); i++) |
983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
984 } | 984 } |
985 | 985 |
986 } // namespace blink | 986 } // namespace blink |
OLD | NEW |