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 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4005 m_doubleTapZoomPending = false; | 4005 m_doubleTapZoomPending = false; |
4006 visualViewport.userDidChangeScale(); | 4006 visualViewport.userDidChangeScale(); |
4007 } | 4007 } |
4008 | 4008 |
4009 m_elasticOverscroll += elasticOverscrollDelta; | 4009 m_elasticOverscroll += elasticOverscrollDelta; |
4010 | 4010 |
4011 if (mainFrameImpl() && mainFrameImpl()->frameView()) | 4011 if (mainFrameImpl() && mainFrameImpl()->frameView()) |
4012 mainFrameImpl()->frameView()->didUpdateElasticOverscroll(); | 4012 mainFrameImpl()->frameView()->didUpdateElasticOverscroll(); |
4013 } | 4013 } |
4014 | 4014 |
| 4015 void WebViewImpl::recordWheelAndTouchScrollingCount(bool hasScrolledByWheel, |
| 4016 bool hasScrolledByTouch) { |
| 4017 if (!page() || !page()->mainFrame()) |
| 4018 return; |
| 4019 |
| 4020 if (hasScrolledByWheel) |
| 4021 UseCounter::count(page()->mainFrame(), UseCounter::ScrollByWheel); |
| 4022 if (hasScrolledByTouch) |
| 4023 UseCounter::count(page()->mainFrame(), UseCounter::ScrollByTouch); |
| 4024 } |
| 4025 |
4015 void WebViewImpl::updateLayerTreeViewport() { | 4026 void WebViewImpl::updateLayerTreeViewport() { |
4016 if (!page() || !m_layerTreeView) | 4027 if (!page() || !m_layerTreeView) |
4017 return; | 4028 return; |
4018 | 4029 |
4019 m_layerTreeView->setPageScaleFactorAndLimits( | 4030 m_layerTreeView->setPageScaleFactorAndLimits( |
4020 pageScaleFactor(), minimumPageScaleFactor(), maximumPageScaleFactor()); | 4031 pageScaleFactor(), minimumPageScaleFactor(), maximumPageScaleFactor()); |
4021 } | 4032 } |
4022 | 4033 |
4023 void WebViewImpl::updateLayerTreeBackgroundColor() { | 4034 void WebViewImpl::updateLayerTreeBackgroundColor() { |
4024 if (!m_layerTreeView) | 4035 if (!m_layerTreeView) |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4184 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
4174 return nullptr; | 4185 return nullptr; |
4175 return focusedFrame; | 4186 return focusedFrame; |
4176 } | 4187 } |
4177 | 4188 |
4178 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4189 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
4179 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4190 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4180 } | 4191 } |
4181 | 4192 |
4182 } // namespace blink | 4193 } // namespace blink |
OLD | NEW |