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