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

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

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 } 720 }
721 // GestureDoubleTap is currently only used by Android for zooming. For W ebCore, 721 // GestureDoubleTap is currently only used by Android for zooming. For W ebCore,
722 // GestureTap with tap count = 2 is used instead. So we drop GestureDoub leTap here. 722 // GestureTap with tap count = 2 is used instead. So we drop GestureDoub leTap here.
723 eventSwallowed = true; 723 eventSwallowed = true;
724 m_client->didHandleGestureEvent(event, eventCancelled); 724 m_client->didHandleGestureEvent(event, eventCancelled);
725 return eventSwallowed; 725 return eventSwallowed;
726 case WebInputEvent::GestureScrollBegin: 726 case WebInputEvent::GestureScrollBegin:
727 m_client->cancelScheduledContentIntents(); 727 m_client->cancelScheduledContentIntents();
728 case WebInputEvent::GestureScrollEnd: 728 case WebInputEvent::GestureScrollEnd:
729 case WebInputEvent::GestureScrollUpdate: 729 case WebInputEvent::GestureScrollUpdate:
730 case WebInputEvent::GestureFlingStart: 730 case WebInputEvent::GestureFlingStart: {
731 // Scrolling-related gesture events invoke EventHandler recursively for each frame down 731 // Scrolling-related gesture events invoke EventHandler recursively for each frame down
732 // the chain, doing a single-frame hit-test per frame. This matches hand leWheelEvent. 732 // the chain, doing a single-frame hit-test per frame. This matches hand leWheelEvent.
733 // Perhaps we could simplify things by rewriting scroll handling to work inner frame 733 // Perhaps we could simplify things by rewriting scroll handling to work inner frame
734 // out, and then unify with other gesture events. 734 // out, and then unify with other gesture events.
735 eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureS crollEvent(platformEvent); 735 eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureS crollEvent(platformEvent);
736 IntPoint unusedDelta = mainFrameImpl()->frame()->eventHandler().unusedDe lta();
737 if (unusedDelta != IntPoint() && (event.type == WebInputEvent::GestureSc rollUpdate)) {
738 IntPoint accumaltedRootOverScroll = mainFrameImpl()->frame()->eventH andler().accumaltedRootOverScroll();
739 m_client->didOverScrollOnMainThread(unusedDelta.x(), unusedDelta.y() , accumaltedRootOverScroll.x(), accumaltedRootOverScroll.y(), platformEvent.posi tion().x(), platformEvent.position().y(), platformEvent.velocityX(), platformEve nt.velocityY());
740 }
majidvp 2015/04/23 18:25:09 Overscroll should be reported on both gesture and
736 m_client->didHandleGestureEvent(event, eventCancelled); 741 m_client->didHandleGestureEvent(event, eventCancelled);
737 return eventSwallowed; 742 return eventSwallowed;
743 }
738 case WebInputEvent::GesturePinchBegin: 744 case WebInputEvent::GesturePinchBegin:
739 case WebInputEvent::GesturePinchEnd: 745 case WebInputEvent::GesturePinchEnd:
740 case WebInputEvent::GesturePinchUpdate: 746 case WebInputEvent::GesturePinchUpdate:
741 return false; 747 return false;
742 default: 748 default:
743 break; 749 break;
744 } 750 }
745 751
746 // Hit test across all frames and do touch adjustment as necessary for the e vent type. 752 // Hit test across all frames and do touch adjustment as necessary for the e vent type.
747 GestureEventWithHitTestResults targetedEvent = 753 GestureEventWithHitTestResults targetedEvent =
(...skipping 3709 matching lines...) Expand 10 before | Expand all | Expand 10 after
4457 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4463 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4458 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4464 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4459 } 4465 }
4460 4466
4461 void WebViewImpl::forceNextWebGLContextCreationToFail() 4467 void WebViewImpl::forceNextWebGLContextCreationToFail()
4462 { 4468 {
4463 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4469 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4464 } 4470 }
4465 4471
4466 } // namespace blink 4472 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698