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

Side by Side Diff: Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h

Issue 15425005: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: touch adjustment in window.internals also needs layout Created 7 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void gestureScrollUpdate(const CppArgumentList&, CppVariant*); 115 void gestureScrollUpdate(const CppArgumentList&, CppVariant*);
116 void gestureScrollUpdateWithoutPropagation(const CppArgumentList&, CppVarian t*); 116 void gestureScrollUpdateWithoutPropagation(const CppArgumentList&, CppVarian t*);
117 void gestureTap(const CppArgumentList&, CppVariant*); 117 void gestureTap(const CppArgumentList&, CppVariant*);
118 void gestureTapDown(const CppArgumentList&, CppVariant*); 118 void gestureTapDown(const CppArgumentList&, CppVariant*);
119 void gestureTapCancel(const CppArgumentList&, CppVariant*); 119 void gestureTapCancel(const CppArgumentList&, CppVariant*);
120 void gestureLongPress(const CppArgumentList&, CppVariant*); 120 void gestureLongPress(const CppArgumentList&, CppVariant*);
121 void gestureLongTap(const CppArgumentList&, CppVariant*); 121 void gestureLongTap(const CppArgumentList&, CppVariant*);
122 void gestureTwoFingerTap(const CppArgumentList&, CppVariant*); 122 void gestureTwoFingerTap(const CppArgumentList&, CppVariant*);
123 void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&); 123 void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&);
124 124
125 // Setting this to false makes EventSender not force layout() calls.
126 // This makes it possible to test the standard WebCore event dispatch.
127 CppVariant forceLayoutOnEvents;
128
125 // Unimplemented stubs 129 // Unimplemented stubs
126 void enableDOMUIEventLogging(const CppArgumentList&, CppVariant*); 130 void enableDOMUIEventLogging(const CppArgumentList&, CppVariant*);
127 void fireKeyboardEventsToElement(const CppArgumentList&, CppVariant*); 131 void fireKeyboardEventsToElement(const CppArgumentList&, CppVariant*);
128 void clearKillRing(const CppArgumentList&, CppVariant*); 132 void clearKillRing(const CppArgumentList&, CppVariant*);
129 133
130 // Properties used in layout tests. 134 // Properties used in layout tests.
131 #if defined(OS_WIN) 135 #if defined(OS_WIN)
132 CppVariant wmKeyDown; 136 CppVariant wmKeyDown;
133 CppVariant wmKeyUp; 137 CppVariant wmKeyUp;
134 CppVariant wmChar; 138 CppVariant wmChar;
135 CppVariant wmDeadChar; 139 CppVariant wmDeadChar;
136 CppVariant wmSysKeyDown; 140 CppVariant wmSysKeyDown;
137 CppVariant wmSysKeyUp; 141 CppVariant wmSysKeyUp;
138 CppVariant wmSysChar; 142 CppVariant wmSysChar;
139 CppVariant wmSysDeadChar; 143 CppVariant wmSysDeadChar;
140 #endif 144 #endif
141 145
142 WebTaskList* taskList() { return &m_taskList; } 146 WebTaskList* taskList() { return &m_taskList; }
143 147
144 private: 148 private:
145 WebKit::WebView* webview() { return m_webView; } 149 WebKit::WebView* webview() { return m_webView; }
146 150
147 // Returns true if dragMode is true. 151 // Returns true if dragMode is true.
148 bool isDragMode() { return dragMode.isBool() && dragMode.toBoolean(); } 152 bool isDragMode() { return dragMode.isBool() && dragMode.toBoolean(); }
149 153
154 bool shouldForceLayoutOnEvents() const { return forceLayoutOnEvents.isBool() && forceLayoutOnEvents.toBoolean(); }
155
150 // Sometimes we queue up mouse move and mouse up events for drag drop 156 // Sometimes we queue up mouse move and mouse up events for drag drop
151 // handling purposes. These methods dispatch the event. 157 // handling purposes. These methods dispatch the event.
152 void doMouseMove(const WebKit::WebMouseEvent&); 158 void doMouseMove(const WebKit::WebMouseEvent&);
153 void doMouseUp(const WebKit::WebMouseEvent&); 159 void doMouseUp(const WebKit::WebMouseEvent&);
154 static void doLeapForward(int milliseconds); 160 static void doLeapForward(int milliseconds);
155 void replaySavedEvents(); 161 void replaySavedEvents();
156 162
157 // Helper to return the button type given a button code 163 // Helper to return the button type given a button code
158 static WebKit::WebMouseEvent::Button getButtonTypeFromButtonNumber(int); 164 static WebKit::WebMouseEvent::Button getButtonTypeFromButtonNumber(int);
159 165
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 198
193 // The last button number passed to mouseDown and mouseUp. 199 // The last button number passed to mouseDown and mouseUp.
194 // Used to determine whether the click count continues to 200 // Used to determine whether the click count continues to
195 // increment or not. 201 // increment or not.
196 static WebKit::WebMouseEvent::Button lastButtonType; 202 static WebKit::WebMouseEvent::Button lastButtonType;
197 }; 203 };
198 204
199 } 205 }
200 206
201 #endif // EventSender_h 207 #endif // EventSender_h
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698