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

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

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments of aelias 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
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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 synthesizeMouseEventIfPossible(event); 916 synthesizeMouseEventIfPossible(event);
917 return; 917 return;
918 } 918 }
919 } 919 }
920 920
921 static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDir ection positiveDirection, ScrollDirection negativeDirection, float delta) 921 static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDir ection positiveDirection, ScrollDirection negativeDirection, float delta)
922 { 922 {
923 if (!delta) 923 if (!delta)
924 return false; 924 return false;
925 float absDelta = delta > 0 ? delta : -delta; 925 float absDelta = delta > 0 ? delta : -delta;
926 return scrollbarGroup->scroll(delta < 0 ? negativeDirection : positiveDirect ion, ScrollByPrecisePixel, absDelta); 926 return scrollbarGroup->scroll(delta < 0 ? negativeDirection : positiveDirect ion, ScrollByPrecisePixel, absDelta).didScroll;
927 } 927 }
928 928
929 void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event) 929 void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event)
930 { 930 {
931 WebGestureEventBuilder webEvent(this, m_element->layoutObject(), *event); 931 WebGestureEventBuilder webEvent(this, m_element->layoutObject(), *event);
932 if (webEvent.type == WebInputEvent::Undefined) 932 if (webEvent.type == WebInputEvent::Undefined)
933 return; 933 return;
934 if (event->type() == EventTypeNames::gesturetapdown) 934 if (event->type() == EventTypeNames::gesturetapdown)
935 focusPlugin(); 935 focusPlugin();
936 WebCursorInfo cursorInfo; 936 WebCursorInfo cursorInfo;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 for (size_t i = 0; i < cutOutRects.size(); i++) 1011 for (size_t i = 0; i < cutOutRects.size(); i++)
1012 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 1012 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
1013 } 1013 }
1014 1014
1015 bool WebPluginContainerImpl::pluginShouldPersist() const 1015 bool WebPluginContainerImpl::pluginShouldPersist() const
1016 { 1016 {
1017 return m_webPlugin->shouldPersist(); 1017 return m_webPlugin->shouldPersist();
1018 } 1018 }
1019 1019
1020 } // namespace blink 1020 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698