| 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 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) | 1837 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) |
| 1838 { | 1838 { |
| 1839 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); | 1839 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); |
| 1840 | 1840 |
| 1841 WebBeginFrameArgs validFrameTime(frameTime); | 1841 WebBeginFrameArgs validFrameTime(frameTime); |
| 1842 if (!validFrameTime.lastFrameTimeMonotonic) | 1842 if (!validFrameTime.lastFrameTimeMonotonic) |
| 1843 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); | 1843 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); |
| 1844 | 1844 |
| 1845 Scheduler::shared()->willBeginFrame(validFrameTime.lastFrameTimeMonotonic +
validFrameTime.interval); | |
| 1846 | |
| 1847 // Create synthetic wheel events as necessary for fling. | 1845 // Create synthetic wheel events as necessary for fling. |
| 1848 if (m_gestureAnimation) { | 1846 if (m_gestureAnimation) { |
| 1849 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) | 1847 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) |
| 1850 scheduleAnimation(); | 1848 scheduleAnimation(); |
| 1851 else { | 1849 else { |
| 1852 endActiveFlingAnimation(); | 1850 endActiveFlingAnimation(); |
| 1853 | 1851 |
| 1854 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1852 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1855 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1853 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1856 IntSize(), 0, false, false, false, false, | 1854 IntSize(), 0, false, false, false, false, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1868 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton
ic, *m_page->deprecatedLocalMainFrame()); | 1866 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton
ic, *m_page->deprecatedLocalMainFrame()); |
| 1869 | 1867 |
| 1870 if (m_continuousPaintingEnabled) { | 1868 if (m_continuousPaintingEnabled) { |
| 1871 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); | 1869 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); |
| 1872 m_client->scheduleAnimation(); | 1870 m_client->scheduleAnimation(); |
| 1873 } | 1871 } |
| 1874 } | 1872 } |
| 1875 | 1873 |
| 1876 void WebViewImpl::didCommitFrameToCompositor() | 1874 void WebViewImpl::didCommitFrameToCompositor() |
| 1877 { | 1875 { |
| 1878 Scheduler::shared()->didCommitFrameToCompositor(); | 1876 // TODO: Remove this function. |
| 1879 } | 1877 } |
| 1880 | 1878 |
| 1881 void WebViewImpl::layout() | 1879 void WebViewImpl::layout() |
| 1882 { | 1880 { |
| 1883 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1881 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
| 1884 if (!localFrameRootTemporary()) | 1882 if (!localFrameRootTemporary()) |
| 1885 return; | 1883 return; |
| 1886 | 1884 |
| 1887 PageWidgetDelegate::layout(*m_page, *localFrameRootTemporary()->frame()); | 1885 PageWidgetDelegate::layout(*m_page, *localFrameRootTemporary()->frame()); |
| 1888 updateLayerTreeBackgroundColor(); | 1886 updateLayerTreeBackgroundColor(); |
| (...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4466 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4464 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4467 | 4465 |
| 4468 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4466 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4469 return false; | 4467 return false; |
| 4470 | 4468 |
| 4471 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4469 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4472 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4470 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4473 } | 4471 } |
| 4474 | 4472 |
| 4475 } // namespace blink | 4473 } // namespace blink |
| OLD | NEW |