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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 months 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
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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 dragLocation, dragScreenLocation); 760 dragLocation, dragScreenLocation);
761 } 761 }
762 762
763 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) { 763 void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) {
764 WebFloatPoint absoluteRootFrameLocation = 764 WebFloatPoint absoluteRootFrameLocation =
765 event->nativeEvent().positionInRootFrame(); 765 event->nativeEvent().positionInRootFrame();
766 IntPoint localPoint = 766 IntPoint localPoint =
767 roundedIntPoint(m_element->layoutObject()->absoluteToLocal( 767 roundedIntPoint(m_element->layoutObject()->absoluteToLocal(
768 absoluteRootFrameLocation, UseTransforms)); 768 absoluteRootFrameLocation, UseTransforms));
769 WebMouseWheelEvent translatedEvent = event->nativeEvent().flattenTransform(); 769 WebMouseWheelEvent translatedEvent = event->nativeEvent().flattenTransform();
770 translatedEvent.x = localPoint.x(); 770 translatedEvent.setPositionInWidget(localPoint.x(), localPoint.y());
771 translatedEvent.y = localPoint.y();
772 771
773 WebCursorInfo cursorInfo; 772 WebCursorInfo cursorInfo;
774 if (m_webPlugin->handleInputEvent(translatedEvent, cursorInfo) != 773 if (m_webPlugin->handleInputEvent(translatedEvent, cursorInfo) !=
775 WebInputEventResult::NotHandled) 774 WebInputEventResult::NotHandled)
776 event->setDefaultHandled(); 775 event->setDefaultHandled();
777 } 776 }
778 777
779 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) { 778 void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) {
780 WebKeyboardEventBuilder webEvent(*event); 779 WebKeyboardEventBuilder webEvent(*event);
781 if (webEvent.type() == WebInputEvent::Undefined) 780 if (webEvent.type() == WebInputEvent::Undefined)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 // frame view. 985 // frame view.
987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 986 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
988 } 987 }
989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 988 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
990 // Convert to the plugin position. 989 // Convert to the plugin position.
991 for (size_t i = 0; i < cutOutRects.size(); i++) 990 for (size_t i = 0; i < cutOutRects.size(); i++)
992 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 991 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
993 } 992 }
994 993
995 } // namespace blink 994 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPagePopupImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698