Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698