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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 | 1758 |
1759 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1759 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
1760 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1760 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
1761 IntSize(), 0, false, false, false, false, | 1761 IntSize(), 0, false, false, false, false, |
1762 0, 0, 0, 0); | 1762 0, 0, 0, 0); |
1763 | 1763 |
1764 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1764 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
1765 } | 1765 } |
1766 } | 1766 } |
1767 | 1767 |
1768 WTF_LOG(ScriptedAnimationController, "WebViewImpl::beginFrame: page = %d", !
m_page ? 0 : 1); | |
1769 if (!m_page) | 1768 if (!m_page) |
1770 return; | 1769 return; |
1771 | 1770 |
1772 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonoto
nic); | 1771 PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonoto
nic); |
1773 | 1772 |
1774 if (m_continuousPaintingEnabled) { | 1773 if (m_continuousPaintingEnabled) { |
1775 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); | 1774 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); |
1776 m_client->scheduleAnimation(); | 1775 m_client->scheduleAnimation(); |
1777 } | 1776 } |
1778 } | 1777 } |
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4030 m_layerTreeView->registerForAnimations(layer); | 4029 m_layerTreeView->registerForAnimations(layer); |
4031 } | 4030 } |
4032 | 4031 |
4033 GraphicsLayer* WebViewImpl::rootGraphicsLayer() | 4032 GraphicsLayer* WebViewImpl::rootGraphicsLayer() |
4034 { | 4033 { |
4035 return m_rootGraphicsLayer; | 4034 return m_rootGraphicsLayer; |
4036 } | 4035 } |
4037 | 4036 |
4038 void WebViewImpl::scheduleAnimation() | 4037 void WebViewImpl::scheduleAnimation() |
4039 { | 4038 { |
4040 WTF_LOG(ScriptedAnimationController, "WebViewImpl::scheduleAnimation: accele
rated = %d", isAcceleratedCompositingActive() ? 1 : 0); | |
4041 if (isAcceleratedCompositingActive()) { | 4039 if (isAcceleratedCompositingActive()) { |
4042 ASSERT(m_layerTreeView); | 4040 ASSERT(m_layerTreeView); |
4043 m_layerTreeView->setNeedsAnimate(); | 4041 m_layerTreeView->setNeedsAnimate(); |
4044 return; | 4042 return; |
4045 } | 4043 } |
4046 if (m_client) | 4044 if (m_client) |
4047 m_client->scheduleAnimation(); | 4045 m_client->scheduleAnimation(); |
4048 } | 4046 } |
4049 | 4047 |
4050 void WebViewImpl::initializeLayerTreeView() | 4048 void WebViewImpl::initializeLayerTreeView() |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4315 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4313 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4316 | 4314 |
4317 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4315 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4318 return false; | 4316 return false; |
4319 | 4317 |
4320 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4318 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4321 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4319 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4322 } | 4320 } |
4323 | 4321 |
4324 } // namespace blink | 4322 } // namespace blink |
OLD | NEW |