OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 struct SameSizeAsWebMouseEvent : public SameSizeAsWebInputEvent { | 53 struct SameSizeAsWebMouseEvent : public SameSizeAsWebInputEvent { |
54 int mouse_data[16]; | 54 int mouse_data[16]; |
55 }; | 55 }; |
56 | 56 |
57 struct SameSizeAsWebMouseWheelEvent : public SameSizeAsWebMouseEvent { | 57 struct SameSizeAsWebMouseWheelEvent : public SameSizeAsWebMouseEvent { |
58 int mousewheel_data[12]; | 58 int mousewheel_data[12]; |
59 }; | 59 }; |
60 | 60 |
61 struct SameSizeAsWebGestureEvent : public SameSizeAsWebInputEvent { | 61 struct SameSizeAsWebGestureEvent : public SameSizeAsWebInputEvent { |
62 int gesture_data[15]; | 62 int gesture_data[16]; |
63 }; | 63 }; |
64 | 64 |
65 struct SameSizeAsWebTouchEvent : public SameSizeAsWebInputEvent { | 65 struct SameSizeAsWebTouchEvent : public SameSizeAsWebInputEvent { |
66 WebTouchPoint touch_points[WebTouchEvent::kTouchesLengthCap]; | 66 WebTouchPoint touch_points[WebTouchEvent::kTouchesLengthCap]; |
67 int touch_data[4]; | 67 int touch_data[4]; |
68 }; | 68 }; |
69 | 69 |
70 static_assert(sizeof(WebInputEvent) == sizeof(SameSizeAsWebInputEvent), | 70 static_assert(sizeof(WebInputEvent) == sizeof(SameSizeAsWebInputEvent), |
71 "WebInputEvent should not have gaps"); | 71 "WebInputEvent should not have gaps"); |
72 static_assert(sizeof(WebKeyboardEvent) == sizeof(SameSizeAsWebKeyboardEvent), | 72 static_assert(sizeof(WebKeyboardEvent) == sizeof(SameSizeAsWebKeyboardEvent), |
73 "WebKeyboardEvent should not have gaps"); | 73 "WebKeyboardEvent should not have gaps"); |
74 static_assert(sizeof(WebMouseEvent) == sizeof(SameSizeAsWebMouseEvent), | 74 static_assert(sizeof(WebMouseEvent) == sizeof(SameSizeAsWebMouseEvent), |
75 "WebMouseEvent should not have gaps"); | 75 "WebMouseEvent should not have gaps"); |
76 static_assert(sizeof(WebMouseWheelEvent) == | 76 static_assert(sizeof(WebMouseWheelEvent) == |
77 sizeof(SameSizeAsWebMouseWheelEvent), | 77 sizeof(SameSizeAsWebMouseWheelEvent), |
78 "WebMouseWheelEvent should not have gaps"); | 78 "WebMouseWheelEvent should not have gaps"); |
79 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), | 79 static_assert(sizeof(WebGestureEvent) == sizeof(SameSizeAsWebGestureEvent), |
80 "WebGestureEvent should not have gaps"); | 80 "WebGestureEvent should not have gaps"); |
81 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), | 81 static_assert(sizeof(WebTouchEvent) == sizeof(SameSizeAsWebTouchEvent), |
82 "WebTouchEvent should not have gaps"); | 82 "WebTouchEvent should not have gaps"); |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
OLD | NEW |