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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 syntheticGestureEvent.data.scrollUpdate.inertial = true; | 670 syntheticGestureEvent.data.scrollUpdate.inertial = true; |
671 | 671 |
672 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) | 672 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) |
673 return handleGestureEvent(syntheticGestureEvent); | 673 return handleGestureEvent(syntheticGestureEvent); |
674 } | 674 } |
675 return false; | 675 return false; |
676 } | 676 } |
677 | 677 |
678 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) | 678 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
679 { | 679 { |
| 680 if (!m_client) |
| 681 return false; |
| 682 |
680 bool eventSwallowed = false; | 683 bool eventSwallowed = false; |
681 bool eventCancelled = false; // for disambiguation | 684 bool eventCancelled = false; // for disambiguation |
682 | 685 |
683 // Special handling for slow-path fling gestures. | 686 // Special handling for slow-path fling gestures. |
684 switch (event.type) { | 687 switch (event.type) { |
685 case WebInputEvent::GestureFlingStart: { | 688 case WebInputEvent::GestureFlingStart: { |
686 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures
()) | 689 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures
()) |
687 break; | 690 break; |
688 m_client->cancelScheduledContentIntents(); | 691 m_client->cancelScheduledContentIntents(); |
689 m_positionOnFlingStart = WebPoint(event.x, event.y); | 692 m_positionOnFlingStart = WebPoint(event.x, event.y); |
(...skipping 3999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4689 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4692 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4690 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4693 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4691 } | 4694 } |
4692 | 4695 |
4693 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4696 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4694 { | 4697 { |
4695 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4698 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4696 } | 4699 } |
4697 | 4700 |
4698 } // namespace blink | 4701 } // namespace blink |
OLD | NEW |