| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 #include "platform/exported/WebActiveGestureAnimation.h" | 103 #include "platform/exported/WebActiveGestureAnimation.h" |
| 104 #include "platform/fonts/FontCache.h" | 104 #include "platform/fonts/FontCache.h" |
| 105 #include "platform/graphics/Color.h" | 105 #include "platform/graphics/Color.h" |
| 106 #include "platform/graphics/Image.h" | 106 #include "platform/graphics/Image.h" |
| 107 #include "platform/graphics/ImageBuffer.h" | 107 #include "platform/graphics/ImageBuffer.h" |
| 108 #include "platform/scroll/ScrollbarTheme.h" | 108 #include "platform/scroll/ScrollbarTheme.h" |
| 109 #include "platform/weborigin/SchemeRegistry.h" | 109 #include "platform/weborigin/SchemeRegistry.h" |
| 110 #include "public/platform/Platform.h" | 110 #include "public/platform/Platform.h" |
| 111 #include "public/platform/WebDragData.h" | 111 #include "public/platform/WebDragData.h" |
| 112 #include "public/platform/WebFloatPoint.h" | 112 #include "public/platform/WebFloatPoint.h" |
| 113 #include "public/platform/WebFrameTime.h" |
| 113 #include "public/platform/WebGestureCurve.h" | 114 #include "public/platform/WebGestureCurve.h" |
| 114 #include "public/platform/WebImage.h" | 115 #include "public/platform/WebImage.h" |
| 115 #include "public/platform/WebLayerTreeView.h" | 116 #include "public/platform/WebLayerTreeView.h" |
| 116 #include "public/platform/WebVector.h" | 117 #include "public/platform/WebVector.h" |
| 117 #include "public/web/WebAXObject.h" | 118 #include "public/web/WebAXObject.h" |
| 118 #include "public/web/WebActiveWheelFlingParameters.h" | 119 #include "public/web/WebActiveWheelFlingParameters.h" |
| 119 #include "public/web/WebAutofillClient.h" | 120 #include "public/web/WebAutofillClient.h" |
| 120 #include "public/web/WebFrameClient.h" | 121 #include "public/web/WebFrameClient.h" |
| 121 #include "public/web/WebHitTestResult.h" | 122 #include "public/web/WebHitTestResult.h" |
| 122 #include "public/web/WebInputElement.h" | 123 #include "public/web/WebInputElement.h" |
| (...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 void WebViewImpl::willExitFullScreen() | 1692 void WebViewImpl::willExitFullScreen() |
| 1692 { | 1693 { |
| 1693 m_fullscreenController->willExitFullScreen(); | 1694 m_fullscreenController->willExitFullScreen(); |
| 1694 } | 1695 } |
| 1695 | 1696 |
| 1696 void WebViewImpl::didExitFullScreen() | 1697 void WebViewImpl::didExitFullScreen() |
| 1697 { | 1698 { |
| 1698 m_fullscreenController->didExitFullScreen(); | 1699 m_fullscreenController->didExitFullScreen(); |
| 1699 } | 1700 } |
| 1700 | 1701 |
| 1701 void WebViewImpl::animate(double monotonicFrameBeginTime) | 1702 void WebViewImpl::animate(WebFrameTime frameTime) |
| 1702 { | 1703 { |
| 1703 TRACE_EVENT0("blink", "WebViewImpl::animate"); | 1704 TRACE_EVENT0("blink", "WebViewImpl::animate"); |
| 1704 | 1705 |
| 1705 if (!monotonicFrameBeginTime) | |
| 1706 monotonicFrameBeginTime = monotonicallyIncreasingTime(); | |
| 1707 | |
| 1708 // Create synthetic wheel events as necessary for fling. | 1706 // Create synthetic wheel events as necessary for fling. |
| 1709 if (m_gestureAnimation) { | 1707 if (m_gestureAnimation) { |
| 1710 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) | 1708 if (m_gestureAnimation->animate(frameTime)) |
| 1711 scheduleAnimation(); | 1709 scheduleAnimation(); |
| 1712 else { | 1710 else { |
| 1713 endActiveFlingAnimation(); | 1711 endActiveFlingAnimation(); |
| 1714 | 1712 |
| 1715 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1713 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1716 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1714 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1717 IntSize(), 0, false, false, false, false, | 1715 IntSize(), 0, false, false, false, false, |
| 1718 0, 0, 0, 0); | 1716 0, 0, 0, 0); |
| 1719 | 1717 |
| 1720 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1718 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
| 1721 } | 1719 } |
| 1722 } | 1720 } |
| 1723 | 1721 |
| 1724 if (!m_page) | 1722 if (!m_page) |
| 1725 return; | 1723 return; |
| 1726 | 1724 |
| 1727 PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime); | 1725 PageWidgetDelegate::animate(m_page.get(), frameTime); |
| 1728 | 1726 |
| 1729 if (m_continuousPaintingEnabled) { | 1727 if (m_continuousPaintingEnabled) { |
| 1730 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); | 1728 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); |
| 1731 m_client->scheduleAnimation(); | 1729 m_client->scheduleAnimation(); |
| 1732 } | 1730 } |
| 1733 } | 1731 } |
| 1734 | 1732 |
| 1735 void WebViewImpl::layout() | 1733 void WebViewImpl::layout() |
| 1736 { | 1734 { |
| 1737 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1735 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
| (...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4179 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4177 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4180 | 4178 |
| 4181 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4179 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4182 return false; | 4180 return false; |
| 4183 | 4181 |
| 4184 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4182 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4185 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4183 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4186 } | 4184 } |
| 4187 | 4185 |
| 4188 } // namespace blink | 4186 } // namespace blink |
| OLD | NEW |