diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 18:20:47 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 18:20:47 +0000 |
commit | cd9694081920898abccbf9e5dcf8624ad8223c63 (patch) | |
tree | 9ae5ed2c39d64b432e2b41ed39d3fc25f2e3a3e1 /webkit/api/public | |
parent | 797f5d1d995bd5f31fbb811785b15fbccecafbd4 (diff) | |
download | chromium_src-cd9694081920898abccbf9e5dcf8624ad8223c63.zip chromium_src-cd9694081920898abccbf9e5dcf8624ad8223c63.tar.gz chromium_src-cd9694081920898abccbf9e5dcf8624ad8223c63.tar.bz2 |
Implement the triple click for the Mac.
Review URL: http://codereview.chromium.org/99104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api/public')
-rw-r--r-- | webkit/api/public/WebInputEvent.h | 12 | ||||
-rw-r--r-- | webkit/api/public/win/WebInputEventFactory.h | 14 |
2 files changed, 16 insertions, 10 deletions
diff --git a/webkit/api/public/WebInputEvent.h b/webkit/api/public/WebInputEvent.h index 93350a5..f232ce5 100644 --- a/webkit/api/public/WebInputEvent.h +++ b/webkit/api/public/WebInputEvent.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -72,8 +72,6 @@ namespace WebKit { MouseUp, MouseMove, MouseLeave, - MouseDoubleClick, - MouseTripleClick, // WebMouseWheelEvent MouseWheel, @@ -186,7 +184,7 @@ namespace WebKit { int globalX; int globalY; double timeStampSeconds; // Seconds since epoch. - int layoutTestClickCount; // Only used during layout tests. + int clickCount; WebMouseEvent() : button(ButtonNone) @@ -195,7 +193,7 @@ namespace WebKit { , globalX(0) , globalY(0) , timeStampSeconds(0.0) - , layoutTestClickCount(0) + , clickCount(0) { } }; diff --git a/webkit/api/public/win/WebInputEventFactory.h b/webkit/api/public/win/WebInputEventFactory.h index c353ed4..b94adbd 100644 --- a/webkit/api/public/win/WebInputEventFactory.h +++ b/webkit/api/public/win/WebInputEventFactory.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -46,6 +46,14 @@ namespace WebKit { WEBKIT_API static WebKeyboardEvent keyboardEvent(HWND, UINT, WPARAM, LPARAM); WEBKIT_API static WebMouseEvent mouseEvent(HWND, UINT, WPARAM, LPARAM); WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(HWND, UINT, WPARAM, LPARAM); + + // Windows only provides information on whether a click was a single or + // double click, while we need to know the click count past two. The + // WebInputEventFactory keeps internal state to allow it to synthesize + // that information. In some cases, like fast-running tests, that + // information is known to be stale and needs to be reset; that is the + // function of resetLastClickState(). + WEBKIT_API static void resetLastClickState(); }; } // namespace WebKit |