| 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 DCHECK(curve); | 961 DCHECK(curve); |
| 962 m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(std::mo
ve(curve), this, parameters.startTime); | 962 m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(std::mo
ve(curve), this, parameters.startTime); |
| 963 DCHECK_NE(parameters.sourceDevice, WebGestureDeviceUninitialized); | 963 DCHECK_NE(parameters.sourceDevice, WebGestureDeviceUninitialized); |
| 964 m_flingSourceDevice = parameters.sourceDevice; | 964 m_flingSourceDevice = parameters.sourceDevice; |
| 965 scheduleAnimation(); | 965 scheduleAnimation(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 bool WebViewImpl::endActiveFlingAnimation() | 968 bool WebViewImpl::endActiveFlingAnimation() |
| 969 { | 969 { |
| 970 if (m_gestureAnimation) { | 970 if (m_gestureAnimation) { |
| 971 m_gestureAnimation.clear(); | 971 m_gestureAnimation.reset(); |
| 972 m_flingSourceDevice = WebGestureDeviceUninitialized; | 972 m_flingSourceDevice = WebGestureDeviceUninitialized; |
| 973 if (m_layerTreeView) | 973 if (m_layerTreeView) |
| 974 m_layerTreeView->didStopFlinging(); | 974 m_layerTreeView->didStopFlinging(); |
| 975 return true; | 975 return true; |
| 976 } | 976 } |
| 977 return false; | 977 return false; |
| 978 } | 978 } |
| 979 | 979 |
| 980 bool WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, bool u
seAnchor, float newScale, double durationInSeconds) | 980 bool WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, bool u
seAnchor, float newScale, double durationInSeconds) |
| 981 { | 981 { |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2760 return m_paintArtifactCompositor.rootLayer(); | 2760 return m_paintArtifactCompositor.rootLayer(); |
| 2761 | 2761 |
| 2762 return m_rootLayer; | 2762 return m_rootLayer; |
| 2763 } | 2763 } |
| 2764 | 2764 |
| 2765 void WebViewImpl::willCloseLayerTreeView() | 2765 void WebViewImpl::willCloseLayerTreeView() |
| 2766 { | 2766 { |
| 2767 if (m_linkHighlightsTimeline) { | 2767 if (m_linkHighlightsTimeline) { |
| 2768 m_linkHighlights.clear(); | 2768 m_linkHighlights.clear(); |
| 2769 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 2769 detachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
| 2770 m_linkHighlightsTimeline.clear(); | 2770 m_linkHighlightsTimeline.reset(); |
| 2771 } | 2771 } |
| 2772 | 2772 |
| 2773 if (m_layerTreeView) | 2773 if (m_layerTreeView) |
| 2774 page()->willCloseLayerTreeView(*m_layerTreeView); | 2774 page()->willCloseLayerTreeView(*m_layerTreeView); |
| 2775 | 2775 |
| 2776 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2776 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 2777 detachPaintArtifactCompositor(); | 2777 detachPaintArtifactCompositor(); |
| 2778 else | 2778 else |
| 2779 setRootGraphicsLayer(nullptr); | 2779 setRootGraphicsLayer(nullptr); |
| 2780 | 2780 |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4126 | 4126 |
| 4127 void WebViewImpl::setZoomFactorOverride(float zoomFactor) | 4127 void WebViewImpl::setZoomFactorOverride(float zoomFactor) |
| 4128 { | 4128 { |
| 4129 m_zoomFactorOverride = zoomFactor; | 4129 m_zoomFactorOverride = zoomFactor; |
| 4130 setZoomLevel(zoomLevel()); | 4130 setZoomLevel(zoomLevel()); |
| 4131 } | 4131 } |
| 4132 | 4132 |
| 4133 void WebViewImpl::setPageOverlayColor(WebColor color) | 4133 void WebViewImpl::setPageOverlayColor(WebColor color) |
| 4134 { | 4134 { |
| 4135 if (m_pageColorOverlay) | 4135 if (m_pageColorOverlay) |
| 4136 m_pageColorOverlay.clear(); | 4136 m_pageColorOverlay.reset(); |
| 4137 | 4137 |
| 4138 if (color == Color::transparent) | 4138 if (color == Color::transparent) |
| 4139 return; | 4139 return; |
| 4140 | 4140 |
| 4141 m_pageColorOverlay = PageOverlay::create(this, new ColorOverlay(color)); | 4141 m_pageColorOverlay = PageOverlay::create(this, new ColorOverlay(color)); |
| 4142 m_pageColorOverlay->update(); | 4142 m_pageColorOverlay->update(); |
| 4143 } | 4143 } |
| 4144 | 4144 |
| 4145 WebPageImportanceSignals* WebViewImpl::pageImportanceSignals() | 4145 WebPageImportanceSignals* WebViewImpl::pageImportanceSignals() |
| 4146 { | 4146 { |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4556 { | 4556 { |
| 4557 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4557 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4558 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4558 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4559 if (!page()) | 4559 if (!page()) |
| 4560 return 1; | 4560 return 1; |
| 4561 | 4561 |
| 4562 return page()->deviceScaleFactor(); | 4562 return page()->deviceScaleFactor(); |
| 4563 } | 4563 } |
| 4564 | 4564 |
| 4565 } // namespace blink | 4565 } // namespace blink |
| OLD | NEW |