| 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y; | 590 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y; |
| 591 syntheticGestureEvent.modifiers = m_flingModifier; | 591 syntheticGestureEvent.modifiers = m_flingModifier; |
| 592 syntheticGestureEvent.sourceDevice = WebGestureEvent::Touchscreen; | 592 syntheticGestureEvent.sourceDevice = WebGestureEvent::Touchscreen; |
| 593 | 593 |
| 594 if (m_page && m_page->mainFrame() && m_page->mainFrame()->view()) | 594 if (m_page && m_page->mainFrame() && m_page->mainFrame()->view()) |
| 595 return handleGestureEvent(syntheticGestureEvent); | 595 return handleGestureEvent(syntheticGestureEvent); |
| 596 } | 596 } |
| 597 return false; | 597 return false; |
| 598 } | 598 } |
| 599 | 599 |
| 600 void WebViewImpl::scrollBy(const WebFloatSize& delta) | |
| 601 { | |
| 602 scrollBy(delta, WebFloatSize()); | |
| 603 } | |
| 604 | |
| 605 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) | 600 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
| 606 { | 601 { |
| 607 bool eventSwallowed = false; | 602 bool eventSwallowed = false; |
| 608 bool eventCancelled = false; // for disambiguation | 603 bool eventCancelled = false; // for disambiguation |
| 609 | 604 |
| 610 // Special handling for slow-path fling gestures. | 605 // Special handling for slow-path fling gestures. |
| 611 switch (event.type) { | 606 switch (event.type) { |
| 612 case WebInputEvent::GestureFlingStart: { | 607 case WebInputEvent::GestureFlingStart: { |
| 613 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures
()) | 608 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures
()) |
| 614 break; | 609 break; |
| (...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3981 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 3976 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 3982 | 3977 |
| 3983 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 3978 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 3984 return false; | 3979 return false; |
| 3985 | 3980 |
| 3986 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 3981 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 3987 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 3982 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 3988 } | 3983 } |
| 3989 | 3984 |
| 3990 } // namespace blink | 3985 } // namespace blink |
| OLD | NEW |