| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 #include "platform/PopupMenuClient.h" | 105 #include "platform/PopupMenuClient.h" |
| 106 #include "platform/RuntimeEnabledFeatures.h" | 106 #include "platform/RuntimeEnabledFeatures.h" |
| 107 #include "platform/TraceEvent.h" | 107 #include "platform/TraceEvent.h" |
| 108 #include "platform/UserGestureIndicator.h" | 108 #include "platform/UserGestureIndicator.h" |
| 109 #include "platform/exported/WebActiveGestureAnimation.h" | 109 #include "platform/exported/WebActiveGestureAnimation.h" |
| 110 #include "platform/fonts/FontCache.h" | 110 #include "platform/fonts/FontCache.h" |
| 111 #include "platform/graphics/Color.h" | 111 #include "platform/graphics/Color.h" |
| 112 #include "platform/graphics/FirstPaintInvalidationTracking.h" | 112 #include "platform/graphics/FirstPaintInvalidationTracking.h" |
| 113 #include "platform/graphics/Image.h" | 113 #include "platform/graphics/Image.h" |
| 114 #include "platform/graphics/ImageBuffer.h" | 114 #include "platform/graphics/ImageBuffer.h" |
| 115 #include "platform/scheduler/Scheduler.h" | |
| 116 #include "platform/scroll/ScrollbarTheme.h" | 115 #include "platform/scroll/ScrollbarTheme.h" |
| 117 #include "platform/weborigin/SchemeRegistry.h" | 116 #include "platform/weborigin/SchemeRegistry.h" |
| 118 #include "public/platform/Platform.h" | 117 #include "public/platform/Platform.h" |
| 119 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" | 118 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" |
| 120 #include "public/platform/WebDragData.h" | 119 #include "public/platform/WebDragData.h" |
| 121 #include "public/platform/WebFloatPoint.h" | 120 #include "public/platform/WebFloatPoint.h" |
| 122 #include "public/platform/WebGestureCurve.h" | 121 #include "public/platform/WebGestureCurve.h" |
| 123 #include "public/platform/WebImage.h" | 122 #include "public/platform/WebImage.h" |
| 124 #include "public/platform/WebLayerTreeView.h" | 123 #include "public/platform/WebLayerTreeView.h" |
| 125 #include "public/platform/WebURLRequest.h" | 124 #include "public/platform/WebURLRequest.h" |
| (...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 } | 1834 } |
| 1836 | 1835 |
| 1837 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) | 1836 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) |
| 1838 { | 1837 { |
| 1839 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); | 1838 TRACE_EVENT0("blink", "WebViewImpl::beginFrame"); |
| 1840 | 1839 |
| 1841 WebBeginFrameArgs validFrameTime(frameTime); | 1840 WebBeginFrameArgs validFrameTime(frameTime); |
| 1842 if (!validFrameTime.lastFrameTimeMonotonic) | 1841 if (!validFrameTime.lastFrameTimeMonotonic) |
| 1843 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); | 1842 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); |
| 1844 | 1843 |
| 1845 Scheduler::shared()->willBeginFrame(validFrameTime.lastFrameTimeMonotonic +
validFrameTime.interval); | |
| 1846 | |
| 1847 // Create synthetic wheel events as necessary for fling. | 1844 // Create synthetic wheel events as necessary for fling. |
| 1848 if (m_gestureAnimation) { | 1845 if (m_gestureAnimation) { |
| 1849 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) | 1846 if (m_gestureAnimation->animate(validFrameTime.lastFrameTimeMonotonic)) |
| 1850 scheduleAnimation(); | 1847 scheduleAnimation(); |
| 1851 else { | 1848 else { |
| 1852 endActiveFlingAnimation(); | 1849 endActiveFlingAnimation(); |
| 1853 | 1850 |
| 1854 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, | 1851 PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
| 1855 m_positionOnFlingStart, m_globalPositionOnFlingStart, | 1852 m_positionOnFlingStart, m_globalPositionOnFlingStart, |
| 1856 IntSize(), 0, false, false, false, false, | 1853 IntSize(), 0, false, false, false, false, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1868 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton
ic, *m_page->deprecatedLocalMainFrame()); | 1865 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton
ic, *m_page->deprecatedLocalMainFrame()); |
| 1869 | 1866 |
| 1870 if (m_continuousPaintingEnabled) { | 1867 if (m_continuousPaintingEnabled) { |
| 1871 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); | 1868 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO
verlays.get()); |
| 1872 m_client->scheduleAnimation(); | 1869 m_client->scheduleAnimation(); |
| 1873 } | 1870 } |
| 1874 } | 1871 } |
| 1875 | 1872 |
| 1876 void WebViewImpl::didCommitFrameToCompositor() | 1873 void WebViewImpl::didCommitFrameToCompositor() |
| 1877 { | 1874 { |
| 1878 Scheduler::shared()->didCommitFrameToCompositor(); | 1875 // TODO: Remove this function. |
| 1879 } | 1876 } |
| 1880 | 1877 |
| 1881 void WebViewImpl::layout() | 1878 void WebViewImpl::layout() |
| 1882 { | 1879 { |
| 1883 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1880 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
| 1884 if (!localFrameRootTemporary()) | 1881 if (!localFrameRootTemporary()) |
| 1885 return; | 1882 return; |
| 1886 | 1883 |
| 1887 PageWidgetDelegate::layout(*m_page, *localFrameRootTemporary()->frame()); | 1884 PageWidgetDelegate::layout(*m_page, *localFrameRootTemporary()->frame()); |
| 1888 updateLayerTreeBackgroundColor(); | 1885 updateLayerTreeBackgroundColor(); |
| (...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4466 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4463 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4467 | 4464 |
| 4468 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4465 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4469 return false; | 4466 return false; |
| 4470 | 4467 |
| 4471 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4468 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4472 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4469 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4473 } | 4470 } |
| 4474 | 4471 |
| 4475 } // namespace blink | 4472 } // namespace blink |
| OLD | NEW |