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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |