| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/ClientRect.h" | 5 #include "core/dom/ClientRect.h" |
| 6 #include "core/frame/BrowserControls.h" | 6 #include "core/frame/BrowserControls.h" |
| 7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/RootFrameViewport.h" | 9 #include "core/frame/RootFrameViewport.h" |
| 10 #include "core/frame/VisualViewport.h" | 10 #include "core/frame/VisualViewport.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int deltaX = 0, | 142 int deltaX = 0, |
| 143 int deltaY = 0) { | 143 int deltaY = 0) { |
| 144 return generateGestureEvent(type, WebGestureDeviceTouchpad, deltaX, deltaY); | 144 return generateGestureEvent(type, WebGestureDeviceTouchpad, deltaX, deltaY); |
| 145 } | 145 } |
| 146 | 146 |
| 147 protected: | 147 protected: |
| 148 WebGestureEvent generateGestureEvent(WebInputEvent::Type type, | 148 WebGestureEvent generateGestureEvent(WebInputEvent::Type type, |
| 149 WebGestureDevice device, | 149 WebGestureDevice device, |
| 150 int deltaX, | 150 int deltaX, |
| 151 int deltaY) { | 151 int deltaY) { |
| 152 WebGestureEvent event; | 152 WebGestureEvent event(type, WebInputEvent::NoModifiers, |
| 153 event.type = type; | 153 WebInputEvent::TimeStampForTesting); |
| 154 event.sourceDevice = device; | 154 event.sourceDevice = device; |
| 155 event.x = 100; | 155 event.x = 100; |
| 156 event.y = 100; | 156 event.y = 100; |
| 157 if (type == WebInputEvent::GestureScrollUpdate) { | 157 if (type == WebInputEvent::GestureScrollUpdate) { |
| 158 event.data.scrollUpdate.deltaX = deltaX; | 158 event.data.scrollUpdate.deltaX = deltaX; |
| 159 event.data.scrollUpdate.deltaY = deltaY; | 159 event.data.scrollUpdate.deltaY = deltaY; |
| 160 } | 160 } |
| 161 return event; | 161 return event; |
| 162 } | 162 } |
| 163 | 163 |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 // FrameView without a layout. | 1245 // FrameView without a layout. |
| 1246 iframe->remove(); | 1246 iframe->remove(); |
| 1247 | 1247 |
| 1248 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), | 1248 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), |
| 1249 &mainFrameView()->getRootFrameViewport()->layoutViewport()); | 1249 &mainFrameView()->getRootFrameViewport()->layoutViewport()); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace | 1252 } // namespace |
| 1253 | 1253 |
| 1254 } // namespace blink | 1254 } // namespace blink |
| OLD | NEW |