Chromium Code Reviews| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 #include "public/platform/Platform.h" | 112 #include "public/platform/Platform.h" |
| 113 #include "public/platform/WebDragData.h" | 113 #include "public/platform/WebDragData.h" |
| 114 #include "public/platform/WebFloatPoint.h" | 114 #include "public/platform/WebFloatPoint.h" |
| 115 #include "public/platform/WebGestureCurve.h" | 115 #include "public/platform/WebGestureCurve.h" |
| 116 #include "public/platform/WebImage.h" | 116 #include "public/platform/WebImage.h" |
| 117 #include "public/platform/WebLayerTreeView.h" | 117 #include "public/platform/WebLayerTreeView.h" |
| 118 #include "public/platform/WebVector.h" | 118 #include "public/platform/WebVector.h" |
| 119 #include "public/web/WebAXObject.h" | 119 #include "public/web/WebAXObject.h" |
| 120 #include "public/web/WebActiveWheelFlingParameters.h" | 120 #include "public/web/WebActiveWheelFlingParameters.h" |
| 121 #include "public/web/WebAutofillClient.h" | 121 #include "public/web/WebAutofillClient.h" |
| 122 #include "public/web/WebBeginFrameArgs.h" | |
| 122 #include "public/web/WebFrameClient.h" | 123 #include "public/web/WebFrameClient.h" |
| 123 #include "public/web/WebHitTestResult.h" | 124 #include "public/web/WebHitTestResult.h" |
| 124 #include "public/web/WebInputElement.h" | 125 #include "public/web/WebInputElement.h" |
| 125 #include "public/web/WebMediaPlayerAction.h" | 126 #include "public/web/WebMediaPlayerAction.h" |
| 126 #include "public/web/WebNode.h" | 127 #include "public/web/WebNode.h" |
| 127 #include "public/web/WebPlugin.h" | 128 #include "public/web/WebPlugin.h" |
| 128 #include "public/web/WebPluginAction.h" | 129 #include "public/web/WebPluginAction.h" |
| 129 #include "public/web/WebRange.h" | 130 #include "public/web/WebRange.h" |
| 130 #include "public/web/WebTextInputInfo.h" | 131 #include "public/web/WebTextInputInfo.h" |
| 131 #include "public/web/WebViewClient.h" | 132 #include "public/web/WebViewClient.h" |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1693 void WebViewImpl::willExitFullScreen() | 1694 void WebViewImpl::willExitFullScreen() |
| 1694 { | 1695 { |
| 1695 m_fullscreenController->willExitFullScreen(); | 1696 m_fullscreenController->willExitFullScreen(); |
| 1696 } | 1697 } |
| 1697 | 1698 |
| 1698 void WebViewImpl::didExitFullScreen() | 1699 void WebViewImpl::didExitFullScreen() |
| 1699 { | 1700 { |
| 1700 m_fullscreenController->didExitFullScreen(); | 1701 m_fullscreenController->didExitFullScreen(); |
| 1701 } | 1702 } |
| 1702 | 1703 |
| 1703 void WebViewImpl::animate(double monotonicFrameBeginTime) | 1704 void WebViewImpl::beginFrame(WebBeginFrameArgs frameTime) |
| 1704 { | 1705 { |
| 1705 TRACE_EVENT0("blink", "WebViewImpl::animate"); | 1706 TRACE_EVENT0("blink", "WebViewImpl::animate"); |
|
Sami
2014/07/16 10:41:15
Please update this trace event too.
mithro-old
2014/07/16 14:26:49
Done.
| |
| 1706 | 1707 |
| 1707 if (!monotonicFrameBeginTime) | |
| 1708 monotonicFrameBeginTime = monotonicallyIncreasingTime(); | |
| 1709 | |
| 1710 // Create synthetic wheel events as necessary for fling. | 1708 // Create synthetic wheel events as necessary for fling. |
| 1711 if (m_gestureAnimation) { | 1709 if (m_gestureAnimation) { |
| 1712 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) | 1710 if (m_gestureAnimation->animate(frameTime.lastFrameTime)) |
| 1713 scheduleAnimation(); | 1711 scheduleAnimation(); |
| 1714 else { | 1712 else { |
| 1715 endActiveFlingAnimation(); | 1713 endActiveFlingAnimation(); |
| 1716 | 1714 |
| 1717 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1715 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1718 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1716 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1719 IntSize(), 0, false, false, false, false, | 1717 IntSize(), 0, false, false, false, false, |
| 1720 0, 0, 0, 0); | 1718 0, 0, 0, 0); |
| 1721 | 1719 |
| 1722 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); | 1720 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); |
| 1723 } | 1721 } |
| 1724 } | 1722 } |
| 1725 | 1723 |
| 1726 if (!m_page) | 1724 if (!m_page) |
| 1727 return; | 1725 return; |
| 1728 | 1726 |
| 1729 PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime); | 1727 PageWidgetDelegate::animate(m_page.get(), frameTime.lastFrameTime); |
| 1730 | 1728 |
| 1731 if (m_continuousPaintingEnabled) { | 1729 if (m_continuousPaintingEnabled) { |
| 1732 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); | 1730 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); |
| 1733 m_client->scheduleAnimation(); | 1731 m_client->scheduleAnimation(); |
| 1734 } | 1732 } |
| 1735 } | 1733 } |
| 1736 | 1734 |
| 1737 void WebViewImpl::layout() | 1735 void WebViewImpl::layout() |
| 1738 { | 1736 { |
| 1739 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1737 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
| (...skipping 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4214 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4212 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
| 4215 | 4213 |
| 4216 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4214 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4217 return false; | 4215 return false; |
| 4218 | 4216 |
| 4219 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4217 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4220 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4218 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4221 } | 4219 } |
| 4222 | 4220 |
| 4223 } // namespace blink | 4221 } // namespace blink |
| OLD | NEW |