OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 switch (gestureEvent.type()) { | 320 switch (gestureEvent.type()) { |
321 case PlatformEvent::GestureTap: { | 321 case PlatformEvent::GestureTap: { |
322 PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.g
lobalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 1, gestur
eEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.m
etaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 322 PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.g
lobalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 1, gestur
eEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.m
etaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
323 PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.g
lobalPosition(), LeftButton, PlatformEvent::MousePressed, /* clickCount */ 1, ge
stureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEve
nt.metaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 323 PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.g
lobalPosition(), LeftButton, PlatformEvent::MousePressed, /* clickCount */ 1, ge
stureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEve
nt.metaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
324 PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.glo
balPosition(), LeftButton, PlatformEvent::MouseReleased, /* clickCount */ 1, ges
tureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEven
t.metaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 324 PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.glo
balPosition(), LeftButton, PlatformEvent::MouseReleased, /* clickCount */ 1, ges
tureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEven
t.metaKey(), PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
325 // handleMouseMoveEvent(fakeMouseMove); | 325 // handleMouseMoveEvent(fakeMouseMove); |
326 handleMouseDownEvent(fakeMouseDown); | 326 handleMouseDownEvent(fakeMouseDown); |
327 handleMouseReleaseEvent(fakeMouseUp); | 327 handleMouseReleaseEvent(fakeMouseUp); |
328 return true; | 328 return true; |
329 } | 329 } |
330 case PlatformEvent::GestureScrollUpdate: | 330 case PlatformEvent::GestureScrollUpdate: { |
331 case PlatformEvent::GestureScrollUpdateWithoutPropagation: { | |
332 PlatformWheelEvent syntheticWheelEvent(gestureEvent.position(), gestureE
vent.globalPosition(), gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEven
t.deltaX() / 120.0f, gestureEvent.deltaY() / 120.0f, ScrollByPixelWheelEvent, ge
stureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEve
nt.metaKey()); | 331 PlatformWheelEvent syntheticWheelEvent(gestureEvent.position(), gestureE
vent.globalPosition(), gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEven
t.deltaX() / 120.0f, gestureEvent.deltaY() / 120.0f, ScrollByPixelWheelEvent, ge
stureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEve
nt.metaKey()); |
333 handleWheelEvent(syntheticWheelEvent); | 332 handleWheelEvent(syntheticWheelEvent); |
334 return true; | 333 return true; |
335 } | 334 } |
336 case PlatformEvent::GestureScrollBegin: | 335 case PlatformEvent::GestureScrollBegin: |
337 case PlatformEvent::GestureScrollEnd: | 336 case PlatformEvent::GestureScrollEnd: |
338 case PlatformEvent::GestureTapDown: | 337 case PlatformEvent::GestureTapDown: |
339 case PlatformEvent::GestureShowPress: | 338 case PlatformEvent::GestureShowPress: |
340 break; | 339 break; |
341 default: | 340 default: |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 558 } |
560 | 559 |
561 IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint&
point) const | 560 IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint&
point) const |
562 { | 561 { |
563 IntPoint newPoint = point; | 562 IntPoint newPoint = point; |
564 newPoint.moveBy(-child->location()); | 563 newPoint.moveBy(-child->location()); |
565 return newPoint; | 564 return newPoint; |
566 } | 565 } |
567 | 566 |
568 } // namespace blink | 567 } // namespace blink |
OLD | NEW |