| 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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) | 1813 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) |
| 1814 { | 1814 { |
| 1815 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); | 1815 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); |
| 1816 | 1816 |
| 1817 WebBeginFrameArgs validFrameTime(frameTime); | 1817 WebBeginFrameArgs validFrameTime(frameTime); |
| 1818 if (!validFrameTime.lastFrameTimeMonotonic) | 1818 if (!validFrameTime.lastFrameTimeMonotonic) |
| 1819 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); | 1819 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); |
| 1820 | 1820 |
| 1821 Scheduler::shared()->willBeginFrame(validFrameTime); | 1821 Scheduler::shared()->willBeginFrame( |
| 1822 validFrameTime.lastFrameTimeMonotonic + validFrameTime.interval); |
| 1822 | 1823 |
| 1823 // Create synthetic wheel events as necessary for fling. | 1824 // Create synthetic wheel events as necessary for fling. |
| 1824 if (m_gestureAnimation) { | 1825 if (m_gestureAnimation) { |
| 1825 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) | 1826 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) |
| 1826 scheduleAnimation(); | 1827 scheduleAnimation(); |
| 1827 else { | 1828 else { |
| 1828 endActiveFlingAnimation(); | 1829 endActiveFlingAnimation(); |
| 1829 | 1830 |
| 1830 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1831 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1831 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1832 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| (...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4414 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4415 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4415 | 4416 |
| 4416 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4417 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4417 return false; | 4418 return false; |
| 4418 | 4419 |
| 4419 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4420 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4420 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4421 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4421 } | 4422 } |
| 4422 | 4423 |
| 4423 } // namespace blink | 4424 } // namespace blink |
| OLD | NEW |