| 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 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) | 1815 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) |
| 1816 { | 1816 { |
| 1817 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); | 1817 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); |
| 1818 | 1818 |
| 1819 WebBeginFrameArgs validFrameTime(frameTime); | 1819 WebBeginFrameArgs validFrameTime(frameTime); |
| 1820 if (!validFrameTime.lastFrameTimeMonotonic) | 1820 if (!validFrameTime.lastFrameTimeMonotonic) |
| 1821 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); | 1821 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); |
| 1822 | 1822 |
| 1823 Scheduler::shared()->willBeginFrame(validFrameTime); | 1823 Scheduler::shared()->willBeginFrame(validFrameTime.lastFrameTimeMonotonic +
validFrameTime.interval); |
| 1824 | 1824 |
| 1825 // Create synthetic wheel events as necessary for fling. | 1825 // Create synthetic wheel events as necessary for fling. |
| 1826 if (m_gestureAnimation) { | 1826 if (m_gestureAnimation) { |
| 1827 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) | 1827 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) |
| 1828 scheduleAnimation(); | 1828 scheduleAnimation(); |
| 1829 else { | 1829 else { |
| 1830 endActiveFlingAnimation(); | 1830 endActiveFlingAnimation(); |
| 1831 | 1831 |
| 1832 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1832 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1833 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1833 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| (...skipping 2609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4444 | 4444 |
| 4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4446 return false; | 4446 return false; |
| 4447 | 4447 |
| 4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4449 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4449 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4450 } | 4450 } |
| 4451 | 4451 |
| 4452 } // namespace blink | 4452 } // namespace blink |
| OLD | NEW |