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

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

Issue 1147283002: Add ScrollDirectionPhysical enum in Scroll types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a conflict on EventHandler Created 5 years, 7 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
« no previous file with comments | « Source/web/WebFrameWidgetImpl.cpp ('k') | Source/web/WebPluginScrollbarImpl.cpp » ('j') | 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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 event->setDefaultHandled(); 915 event->setDefaultHandled();
916 // FIXME: Can a plugin change the cursor from a touch-event callback? 916 // FIXME: Can a plugin change the cursor from a touch-event callback?
917 return; 917 return;
918 } 918 }
919 case TouchEventRequestTypeSynthesizedMouse: 919 case TouchEventRequestTypeSynthesizedMouse:
920 synthesizeMouseEventIfPossible(event); 920 synthesizeMouseEventIfPossible(event);
921 return; 921 return;
922 } 922 }
923 } 923 }
924 924
925 static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDir ection positiveDirection, ScrollDirection negativeDirection, float delta) 925 static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDir ectionPhysical positiveDirection, ScrollDirectionPhysical negativeDirection, flo at delta)
926 { 926 {
927 if (!delta) 927 if (!delta)
928 return false; 928 return false;
929 float absDelta = delta > 0 ? delta : -delta; 929 float absDelta = delta > 0 ? delta : -delta;
930 return scrollbarGroup->scroll(delta < 0 ? negativeDirection : positiveDirect ion, ScrollByPrecisePixel, absDelta); 930 return scrollbarGroup->scroll(delta < 0 ? negativeDirection : positiveDirect ion, ScrollByPrecisePixel, absDelta);
931 } 931 }
932 932
933 void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event) 933 void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event)
934 { 934 {
935 WebGestureEventBuilder webEvent(m_element->layoutObject(), *event); 935 WebGestureEventBuilder webEvent(m_element->layoutObject(), *event);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 for (size_t i = 0; i < cutOutRects.size(); i++) 1015 for (size_t i = 0; i < cutOutRects.size(); i++)
1016 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 1016 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
1017 } 1017 }
1018 1018
1019 bool WebPluginContainerImpl::pluginShouldPersist() const 1019 bool WebPluginContainerImpl::pluginShouldPersist() const
1020 { 1020 {
1021 return m_webPlugin->shouldPersist(); 1021 return m_webPlugin->shouldPersist();
1022 } 1022 }
1023 1023
1024 } // namespace blink 1024 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebFrameWidgetImpl.cpp ('k') | Source/web/WebPluginScrollbarImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698