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 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2065 // on the page. There is a single input event, GestureTap, which can both | 2065 // on the page. There is a single input event, GestureTap, which can both |
2066 // be the first event after page load, and cause a form submission. In that | 2066 // be the first event after page load, and cause a form submission. In that |
2067 // case, the form submission happens before the autofill client is told | 2067 // case, the form submission happens before the autofill client is told |
2068 // to unblock the password values, and so the password values are not | 2068 // to unblock the password values, and so the password values are not |
2069 // submitted. To avoid that, GestureTap is handled explicitly: | 2069 // submitted. To avoid that, GestureTap is handled explicitly: |
2070 if (inputEvent.type == WebInputEvent::GestureTap && autofillClient) { | 2070 if (inputEvent.type == WebInputEvent::GestureTap && autofillClient) { |
2071 m_userGestureObserved = true; | 2071 m_userGestureObserved = true; |
2072 autofillClient->firstUserGestureObserved(); | 2072 autofillClient->firstUserGestureObserved(); |
2073 } | 2073 } |
2074 | 2074 |
2075 page()->frameHost().visualViewport().startTrackingPinchStats(); | |
Yoav Weiss
2015/09/25 08:46:59
Would that mean that we start tracking pinch zoom
bokan
2015/09/25 17:01:48
Yes, I use it more as a signal that this is someth
| |
2076 | |
2075 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputTypeToNa me(inputEvent.type).ascii()); | 2077 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputTypeToNa me(inputEvent.type).ascii()); |
2076 // If we've started a drag and drop operation, ignore input events until | 2078 // If we've started a drag and drop operation, ignore input events until |
2077 // we're done. | 2079 // we're done. |
2078 if (m_doingDragAndDrop) | 2080 if (m_doingDragAndDrop) |
2079 return true; | 2081 return true; |
2080 | 2082 |
2081 if (m_devToolsEmulator->handleInputEvent(inputEvent)) | 2083 if (m_devToolsEmulator->handleInputEvent(inputEvent)) |
2082 return true; | 2084 return true; |
2083 | 2085 |
2084 if (InspectorOverlay* overlay = inspectorOverlay()) { | 2086 if (InspectorOverlay* overlay = inspectorOverlay()) { |
(...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4220 FrameView* frameView = mainFrameImpl()->frameView(); | 4222 FrameView* frameView = mainFrameImpl()->frameView(); |
4221 if (!frameView) | 4223 if (!frameView) |
4222 return; | 4224 return; |
4223 | 4225 |
4224 topControls().setShownRatio(topControls().shownRatio() + topControlsShownRat ioDelta); | 4226 topControls().setShownRatio(topControls().shownRatio() + topControlsShownRat ioDelta); |
4225 | 4227 |
4226 FloatPoint visualViewportOffset = page()->frameHost().visualViewport().visib leRect().location(); | 4228 FloatPoint visualViewportOffset = page()->frameHost().visualViewport().visib leRect().location(); |
4227 visualViewportOffset.move(visualViewportDelta.width, visualViewportDelta.hei ght); | 4229 visualViewportOffset.move(visualViewportDelta.width, visualViewportDelta.hei ght); |
4228 setPageScaleFactorAndLocation(pageScaleFactor() * pageScaleDelta, visualView portOffset); | 4230 setPageScaleFactorAndLocation(pageScaleFactor() * pageScaleDelta, visualView portOffset); |
4229 | 4231 |
4230 if (pageScaleDelta != 1) | 4232 if (pageScaleDelta != 1) { |
Yoav Weiss
2015/09/25 08:46:59
What's the pageScaleDelta value in non-mobile zoom
bokan
2015/09/25 17:01:48
This is the delta coming from the compositor. As s
| |
4231 m_doubleTapZoomPending = false; | 4233 m_doubleTapZoomPending = false; |
4234 page()->frameHost().visualViewport().userDidChangeScale(); | |
4235 } | |
4232 | 4236 |
4233 m_elasticOverscroll += elasticOverscrollDelta; | 4237 m_elasticOverscroll += elasticOverscrollDelta; |
4234 frameView->didUpdateElasticOverscroll(); | 4238 frameView->didUpdateElasticOverscroll(); |
4235 | 4239 |
4236 ScrollableArea* layoutViewport = frameView->layoutViewportScrollableArea(); | 4240 ScrollableArea* layoutViewport = frameView->layoutViewportScrollableArea(); |
4237 | 4241 |
4238 DoublePoint layoutViewportPosition = layoutViewport->scrollPositionDouble() | 4242 DoublePoint layoutViewportPosition = layoutViewport->scrollPositionDouble() |
4239 + DoubleSize(layoutViewportDelta.width, layoutViewportDelta.height); | 4243 + DoubleSize(layoutViewportDelta.width, layoutViewportDelta.height); |
4240 | 4244 |
4241 if (layoutViewport->scrollPositionDouble() != layoutViewportPosition) { | 4245 if (layoutViewport->scrollPositionDouble() != layoutViewportPosition) { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4429 if (m_pageColorOverlay) | 4433 if (m_pageColorOverlay) |
4430 m_pageColorOverlay->update(); | 4434 m_pageColorOverlay->update(); |
4431 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4435 if (InspectorOverlay* overlay = inspectorOverlay()) { |
4432 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4436 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4433 if (inspectorPageOverlay) | 4437 if (inspectorPageOverlay) |
4434 inspectorPageOverlay->update(); | 4438 inspectorPageOverlay->update(); |
4435 } | 4439 } |
4436 } | 4440 } |
4437 | 4441 |
4438 } // namespace blink | 4442 } // namespace blink |
OLD | NEW |