Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 2406263003: Make PointerEvent coordinates fractional for touch (Closed)
Patch Set: Rebased. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 dragStatus = WebDragStatusDrop; 746 dragStatus = WebDragStatusDrop;
747 747
748 if (dragStatus == WebDragStatusUnknown) 748 if (dragStatus == WebDragStatusUnknown)
749 return; 749 return;
750 750
751 DataTransfer* dataTransfer = event->getDataTransfer(); 751 DataTransfer* dataTransfer = event->getDataTransfer();
752 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); 752 WebDragData dragData = dataTransfer->dataObject()->toWebDragData();
753 WebDragOperationsMask dragOperationMask = 753 WebDragOperationsMask dragOperationMask =
754 static_cast<WebDragOperationsMask>(dataTransfer->sourceOperation()); 754 static_cast<WebDragOperationsMask>(dataTransfer->sourceOperation());
755 WebPoint dragScreenLocation(event->screenX(), event->screenY()); 755 WebPoint dragScreenLocation(event->screenX(), event->screenY());
756 WebPoint dragLocation( 756 WebPoint dragLocation(event->absoluteLocation().x() - location().x(),
757 (event->absoluteLocation().x() - location().x()).toInt(), 757 event->absoluteLocation().y() - location().y());
758 (event->absoluteLocation().y() - location().y()).toInt());
759 758
760 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask, 759 m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask,
761 dragLocation, dragScreenLocation); 760 dragLocation, dragScreenLocation);
762 } 761 }
763 762
764 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) { 763 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) {
765 WebMouseWheelEventBuilder webEvent( 764 WebMouseWheelEventBuilder webEvent(
766 this, LayoutItem(m_element->layoutObject()), *event); 765 this, LayoutItem(m_element->layoutObject()), *event);
767 if (webEvent.type == WebInputEvent::Undefined) 766 if (webEvent.type == WebInputEvent::Undefined)
768 return; 767 return;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 // frame view. 972 // frame view.
974 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 973 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
975 } 974 }
976 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 975 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
977 // Convert to the plugin position. 976 // Convert to the plugin position.
978 for (size_t i = 0; i < cutOutRects.size(); i++) 977 for (size_t i = 0; i < cutOutRects.size(); i++)
979 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 978 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
980 } 979 }
981 980
982 } // namespace blink 981 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698