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

Side by Side Diff: webkit/api/src/win/WebInputEventFactory.cpp

Issue 115479: Fix typo. The right button is pressed when MK_RBUTTON is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006-2009 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 WebMouseEvent result; //(WebInputEvent::Uninitialized()); 163 WebMouseEvent result; //(WebInputEvent::Uninitialized());
164 164
165 switch (message) { 165 switch (message) {
166 case WM_MOUSEMOVE: 166 case WM_MOUSEMOVE:
167 result.type = WebInputEvent::MouseMove; 167 result.type = WebInputEvent::MouseMove;
168 if (wparam & MK_LBUTTON) 168 if (wparam & MK_LBUTTON)
169 result.button = WebMouseEvent::ButtonLeft; 169 result.button = WebMouseEvent::ButtonLeft;
170 else if (wparam & MK_MBUTTON) 170 else if (wparam & MK_MBUTTON)
171 result.button = WebMouseEvent::ButtonMiddle; 171 result.button = WebMouseEvent::ButtonMiddle;
172 else if (wparam & MK_RBUTTON) 172 else if (wparam & MK_RBUTTON)
173 result.button = WebMouseEvent::ButtonMiddle; 173 result.button = WebMouseEvent::ButtonRight;
174 else 174 else
175 result.button = WebMouseEvent::ButtonNone; 175 result.button = WebMouseEvent::ButtonNone;
176 break; 176 break;
177 case WM_MOUSELEAVE: 177 case WM_MOUSELEAVE:
178 result.type = WebInputEvent::MouseLeave; 178 result.type = WebInputEvent::MouseLeave;
179 result.button = WebMouseEvent::ButtonNone; 179 result.button = WebMouseEvent::ButtonNone;
180 // set the current mouse position (relative to the client area of the 180 // set the current mouse position (relative to the client area of the
181 // current window) since none is specified for this event 181 // current window) since none is specified for this event
182 lparam = GetRelativeCursorPos(hwnd); 182 lparam = GetRelativeCursorPos(hwnd);
183 break; 183 break;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 result.wheelTicksX = wheelDelta; 395 result.wheelTicksX = wheelDelta;
396 } else { 396 } else {
397 result.deltaY = scrollDelta; 397 result.deltaY = scrollDelta;
398 result.wheelTicksY = wheelDelta; 398 result.wheelTicksY = wheelDelta;
399 } 399 }
400 400
401 return result; 401 return result;
402 } 402 }
403 403
404 } // namespace WebKit 404 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698