| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #include "platform/exported/WebActiveGestureAnimation.h" | 101 #include "platform/exported/WebActiveGestureAnimation.h" |
| 102 #include "platform/fonts/FontCache.h" | 102 #include "platform/fonts/FontCache.h" |
| 103 #include "platform/graphics/Color.h" | 103 #include "platform/graphics/Color.h" |
| 104 #include "platform/graphics/Image.h" | 104 #include "platform/graphics/Image.h" |
| 105 #include "platform/graphics/ImageBuffer.h" | 105 #include "platform/graphics/ImageBuffer.h" |
| 106 #include "platform/scroll/ScrollbarTheme.h" | 106 #include "platform/scroll/ScrollbarTheme.h" |
| 107 #include "platform/weborigin/SchemeRegistry.h" | 107 #include "platform/weborigin/SchemeRegistry.h" |
| 108 #include "public/platform/Platform.h" | 108 #include "public/platform/Platform.h" |
| 109 #include "public/platform/WebDragData.h" | 109 #include "public/platform/WebDragData.h" |
| 110 #include "public/platform/WebFloatPoint.h" | 110 #include "public/platform/WebFloatPoint.h" |
| 111 #include "public/platform/WebFrameTime.h" |
| 111 #include "public/platform/WebGestureCurve.h" | 112 #include "public/platform/WebGestureCurve.h" |
| 112 #include "public/platform/WebImage.h" | 113 #include "public/platform/WebImage.h" |
| 113 #include "public/platform/WebLayerTreeView.h" | 114 #include "public/platform/WebLayerTreeView.h" |
| 114 #include "public/platform/WebVector.h" | 115 #include "public/platform/WebVector.h" |
| 115 #include "public/web/WebAXObject.h" | 116 #include "public/web/WebAXObject.h" |
| 116 #include "public/web/WebActiveWheelFlingParameters.h" | 117 #include "public/web/WebActiveWheelFlingParameters.h" |
| 117 #include "public/web/WebAutofillClient.h" | 118 #include "public/web/WebAutofillClient.h" |
| 118 #include "public/web/WebFrameClient.h" | 119 #include "public/web/WebFrameClient.h" |
| 119 #include "public/web/WebHitTestResult.h" | 120 #include "public/web/WebHitTestResult.h" |
| 120 #include "public/web/WebInputElement.h" | 121 #include "public/web/WebInputElement.h" |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 void WebViewImpl::willExitFullScreen() | 1674 void WebViewImpl::willExitFullScreen() |
| 1674 { | 1675 { |
| 1675 m_fullscreenController->willExitFullScreen(); | 1676 m_fullscreenController->willExitFullScreen(); |
| 1676 } | 1677 } |
| 1677 | 1678 |
| 1678 void WebViewImpl::didExitFullScreen() | 1679 void WebViewImpl::didExitFullScreen() |
| 1679 { | 1680 { |
| 1680 m_fullscreenController->didExitFullScreen(); | 1681 m_fullscreenController->didExitFullScreen(); |
| 1681 } | 1682 } |
| 1682 | 1683 |
| 1683 void WebViewImpl::animate(double monotonicFrameBeginTime) | 1684 void WebViewImpl::animate(WebFrameTime frameTime) |
| 1684 { | 1685 { |
| 1685 TRACE_EVENT0("webkit", "WebViewImpl::animate"); | 1686 TRACE_EVENT0("webkit", "WebViewImpl::animate"); |
| 1686 | 1687 |
| 1687 if (!monotonicFrameBeginTime) | |
| 1688 monotonicFrameBeginTime = monotonicallyIncreasingTime(); | |
| 1689 | |
| 1690 // Create synthetic wheel events as necessary for fling. | 1688 // Create synthetic wheel events as necessary for fling. |
| 1691 if (m_gestureAnimation) { | 1689 if (m_gestureAnimation) { |
| 1692 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) | 1690 if (m_gestureAnimation->animate(frameTime)) |
| 1693 scheduleAnimation(); | 1691 scheduleAnimation(); |
| 1694 else { | 1692 else { |
| 1695 endActiveFlingAnimation(); | 1693 endActiveFlingAnimation(); |
| 1696 | 1694 |
| 1697 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1695 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1698 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1696 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1699 IntSize(), 0, false, false, false, false, | 1697 IntSize(), 0, false, false, false, false, |
| 1700 0, 0, 0, 0); | 1698 0, 0, 0, 0); |
| 1701 | 1699 |
| 1702 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1700 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
| 1703 } | 1701 } |
| 1704 } | 1702 } |
| 1705 | 1703 |
| 1706 if (!m_page) | 1704 if (!m_page) |
| 1707 return; | 1705 return; |
| 1708 | 1706 |
| 1709 PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime); | 1707 PageWidgetDelegate::animate(m_page.get(), frameTime); |
| 1710 | 1708 |
| 1711 if (m_continuousPaintingEnabled) { | 1709 if (m_continuousPaintingEnabled) { |
| 1712 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); | 1710 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); |
| 1713 m_client->scheduleAnimation(); | 1711 m_client->scheduleAnimation(); |
| 1714 } | 1712 } |
| 1715 } | 1713 } |
| 1716 | 1714 |
| 1717 void WebViewImpl::layout() | 1715 void WebViewImpl::layout() |
| 1718 { | 1716 { |
| 1719 TRACE_EVENT0("webkit", "WebViewImpl::layout"); | 1717 TRACE_EVENT0("webkit", "WebViewImpl::layout"); |
| (...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4101 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4099 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4102 | 4100 |
| 4103 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4101 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4104 return false; | 4102 return false; |
| 4105 | 4103 |
| 4106 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4104 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4107 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4105 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4108 } | 4106 } |
| 4109 | 4107 |
| 4110 } // namespace blink | 4108 } // namespace blink |
| OLD | NEW |