| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 syntheticWheel.y = m_positionOnFlingStart.y; | 615 syntheticWheel.y = m_positionOnFlingStart.y; |
| 616 syntheticWheel.globalX = m_globalPositionOnFlingStart.x; | 616 syntheticWheel.globalX = m_globalPositionOnFlingStart.x; |
| 617 syntheticWheel.globalY = m_globalPositionOnFlingStart.y; | 617 syntheticWheel.globalY = m_globalPositionOnFlingStart.y; |
| 618 syntheticWheel.modifiers = m_flingModifier; | 618 syntheticWheel.modifiers = m_flingModifier; |
| 619 | 619 |
| 620 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) | 620 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) |
| 621 return handleMouseWheel(*m_page->deprecatedLocalMainFrame(), synthet
icWheel); | 621 return handleMouseWheel(*m_page->deprecatedLocalMainFrame(), synthet
icWheel); |
| 622 } else { | 622 } else { |
| 623 WebGestureEvent syntheticGestureEvent; | 623 WebGestureEvent syntheticGestureEvent; |
| 624 | 624 |
| 625 syntheticGestureEvent.type = WebInputEvent::GestureScrollUpdateWithoutPr
opagation; | 625 syntheticGestureEvent.type = WebInputEvent::GestureScrollUpdate; |
| 626 syntheticGestureEvent.data.scrollUpdate.preventPropagation = true; |
| 626 syntheticGestureEvent.data.scrollUpdate.deltaX = delta.width; | 627 syntheticGestureEvent.data.scrollUpdate.deltaX = delta.width; |
| 627 syntheticGestureEvent.data.scrollUpdate.deltaY = delta.height; | 628 syntheticGestureEvent.data.scrollUpdate.deltaY = delta.height; |
| 628 syntheticGestureEvent.x = m_positionOnFlingStart.x; | 629 syntheticGestureEvent.x = m_positionOnFlingStart.x; |
| 629 syntheticGestureEvent.y = m_positionOnFlingStart.y; | 630 syntheticGestureEvent.y = m_positionOnFlingStart.y; |
| 630 syntheticGestureEvent.globalX = m_globalPositionOnFlingStart.x; | 631 syntheticGestureEvent.globalX = m_globalPositionOnFlingStart.x; |
| 631 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y; | 632 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y; |
| 632 syntheticGestureEvent.modifiers = m_flingModifier; | 633 syntheticGestureEvent.modifiers = m_flingModifier; |
| 633 syntheticGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; | 634 syntheticGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; |
| 634 | 635 |
| 635 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) | 636 if (m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame()
&& m_page->deprecatedLocalMainFrame()->view()) |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 // Create synthetic wheel events as necessary for fling. | 1847 // Create synthetic wheel events as necessary for fling. |
| 1847 if (m_gestureAnimation) { | 1848 if (m_gestureAnimation) { |
| 1848 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) | 1849 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) |
| 1849 scheduleAnimation(); | 1850 scheduleAnimation(); |
| 1850 else { | 1851 else { |
| 1851 endActiveFlingAnimation(); | 1852 endActiveFlingAnimation(); |
| 1852 | 1853 |
| 1853 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1854 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1854 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1855 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1855 IntSize(), 0, false, false, false, false, | 1856 IntSize(), 0, false, false, false, false, |
| 1856 0, 0, 0, 0); | 1857 0, 0, 0, 0, false); |
| 1857 | 1858 |
| 1858 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1859 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
| 1859 } | 1860 } |
| 1860 } | 1861 } |
| 1861 | 1862 |
| 1862 if (!m_page) | 1863 if (!m_page) |
| 1863 return; | 1864 return; |
| 1864 | 1865 |
| 1865 // FIXME: This should probably be using the local root? | 1866 // FIXME: This should probably be using the local root? |
| 1866 if (m_page->mainFrame()->isLocalFrame()) | 1867 if (m_page->mainFrame()->isLocalFrame()) |
| (...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4513 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4514 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4514 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4515 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4515 } | 4516 } |
| 4516 | 4517 |
| 4517 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4518 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4518 { | 4519 { |
| 4519 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4520 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4520 } | 4521 } |
| 4521 | 4522 |
| 4522 } // namespace blink | 4523 } // namespace blink |
| OLD | NEW |