OLD | NEW |
---|---|
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 Loading... | |
720 case WebInputEvent::GestureScrollBegin: | 720 case WebInputEvent::GestureScrollBegin: |
721 m_client->cancelScheduledContentIntents(); | 721 m_client->cancelScheduledContentIntents(); |
722 case WebInputEvent::GestureScrollEnd: | 722 case WebInputEvent::GestureScrollEnd: |
723 case WebInputEvent::GestureScrollUpdate: | 723 case WebInputEvent::GestureScrollUpdate: |
724 case WebInputEvent::GestureFlingStart: | 724 case WebInputEvent::GestureFlingStart: |
725 // Scrolling-related gesture events invoke EventHandler recursively for each frame down | 725 // Scrolling-related gesture events invoke EventHandler recursively for each frame down |
726 // the chain, doing a single-frame hit-test per frame. This matches hand leWheelEvent. | 726 // the chain, doing a single-frame hit-test per frame. This matches hand leWheelEvent. |
727 // Perhaps we could simplify things by rewriting scroll handling to work inner frame | 727 // Perhaps we could simplify things by rewriting scroll handling to work inner frame |
728 // out, and then unify with other gesture events. | 728 // out, and then unify with other gesture events. |
729 eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureS crollEvent(platformEvent); | 729 eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureS crollEvent(platformEvent); |
730 { | |
731 FloatPoint unusedDelta = mainFrameImpl()->frame()->eventHandler().un usedDelta(); | |
732 if (unusedDelta != FloatPoint() && (event.type == WebInputEvent::Ges tureScrollUpdate)) { | |
733 FloatPoint accumaltedRootOverScroll = mainFrameImpl()->frame()-> eventHandler().accumulatedRootOverScroll(); | |
734 m_client->didOverScrollOnMainThread(unusedDelta.x(), unusedDelta .y(), accumaltedRootOverScroll.x(), accumaltedRootOverScroll.y(), platformEvent. position().x(), platformEvent.position().y(), platformEvent.velocityX(), platfor mEvent.velocityY()); | |
aelias_OOO_until_Jul13
2015/05/01 04:45:04
Can this be called directly from handleGestureScro
MuVen
2015/05/04 09:04:18
Done.
| |
735 } | |
736 } | |
730 m_client->didHandleGestureEvent(event, eventCancelled); | 737 m_client->didHandleGestureEvent(event, eventCancelled); |
731 return eventSwallowed; | 738 return eventSwallowed; |
732 case WebInputEvent::GesturePinchBegin: | 739 case WebInputEvent::GesturePinchBegin: |
733 case WebInputEvent::GesturePinchEnd: | 740 case WebInputEvent::GesturePinchEnd: |
734 case WebInputEvent::GesturePinchUpdate: | 741 case WebInputEvent::GesturePinchUpdate: |
735 return false; | 742 return false; |
736 default: | 743 default: |
737 break; | 744 break; |
738 } | 745 } |
739 | 746 |
(...skipping 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4467 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4474 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4468 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4475 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4469 } | 4476 } |
4470 | 4477 |
4471 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4478 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4472 { | 4479 { |
4473 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4480 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4474 } | 4481 } |
4475 | 4482 |
4476 } // namespace blink | 4483 } // namespace blink |
OLD | NEW |