Stop using encode/decodeBytes for WebEvent subclasses
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Oct 2010 23:45:09 +0000 (23:45 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Oct 2010 23:45:09 +0000 (23:45 +0000)
commita83a4d1fb5ef2703e53f57c2fc99ceb1c35e7714
tree4329e627dd2a1021d46eae2cd3328ee0d396be7e
parentffe2af7236742d8eda67f64e81af925d611bf576
Stop using encode/decodeBytes for WebEvent subclasses

The use of encode/decodeBytes was making these classes sensitive to
differences in padding on different architectures (e.g., 32-bit vs.
64-bit). By encoding each data member explicitly we remove this
sensitivity, allowing these classes to be passed between processes
with different padding.

Fixes <http://webkit.org/b/48552> <rdar://problem/8606571> Mouse
events never reach Flash in WebKit2 on Mac (asserts in Debug builds)

Reviewed by Anders Carlsson.

* Platform/CoreIPC/Arguments.h:
(CoreIPC::Arguments8::Arguments8):
(CoreIPC::Arguments8::encode):
(CoreIPC::Arguments8::decode):
(CoreIPC::In):
(CoreIPC::Out):
Added Arguments8, the biggest Arguments yet.

* Shared/WebEvent.cpp:
(WebKit::WebEvent::encode):
(WebKit::WebEvent::decode):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::encode):
(WebKit::WebTouchEvent::decode):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
Changed all encode/decode function to use CoreIPC::In/Out to
encode/decode data members individually.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/Platform/CoreIPC/Arguments.h
WebKit2/Shared/WebEvent.cpp
WebKit2/Shared/WebKeyboardEvent.cpp
WebKit2/Shared/WebMouseEvent.cpp
WebKit2/Shared/WebPlatformTouchPoint.cpp
WebKit2/Shared/WebTouchEvent.cpp
WebKit2/Shared/WebWheelEvent.cpp