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