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

Side by Side Diff: Source/core/input/EventHandler.cpp

Issue 1192563002: Pass real tilt information to PointerEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Spelling, passing expected.txt Created 5 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after
3525 3525
3526 const AtomicString& eventName = pointerEventNameForTouchPointState(point State); 3526 const AtomicString& eventName = pointerEventNameForTouchPointState(point State);
3527 3527
3528 bool isEnterOrLeave = false; 3528 bool isEnterOrLeave = false;
3529 3529
3530 PointerEventInit pointerEventInit; 3530 PointerEventInit pointerEventInit;
3531 pointerEventInit.setPointerId(pointerId); 3531 pointerEventInit.setPointerId(pointerId);
3532 pointerEventInit.setWidth(touchInfo.adjustedRadius.width()); 3532 pointerEventInit.setWidth(touchInfo.adjustedRadius.width());
3533 pointerEventInit.setHeight(touchInfo.adjustedRadius.height()); 3533 pointerEventInit.setHeight(touchInfo.adjustedRadius.height());
3534 pointerEventInit.setPressure(point.force()); 3534 pointerEventInit.setPressure(point.force());
3535 pointerEventInit.setTiltX(point.pointerProperties().tiltX);
3536 pointerEventInit.setTiltY(point.pointerProperties().tiltY);
3535 pointerEventInit.setPointerType(PointerTypeStrForTouch); 3537 pointerEventInit.setPointerType(PointerTypeStrForTouch);
3536 pointerEventInit.setIsPrimary(m_pointerIdManager.isPrimary(PointerIdMana ger::PointerTypeTouch, pointerId)); 3538 pointerEventInit.setIsPrimary(m_pointerIdManager.isPrimary(PointerIdMana ger::PointerTypeTouch, pointerId));
3537 pointerEventInit.setScreenX(point.screenPos().x()); 3539 pointerEventInit.setScreenX(point.screenPos().x());
3538 pointerEventInit.setScreenY(point.screenPos().y()); 3540 pointerEventInit.setScreenY(point.screenPos().y());
3539 pointerEventInit.setClientX(touchInfo.adjustedPagePoint.x()); 3541 pointerEventInit.setClientX(touchInfo.adjustedPagePoint.x());
3540 pointerEventInit.setClientY(touchInfo.adjustedPagePoint.y()); 3542 pointerEventInit.setClientY(touchInfo.adjustedPagePoint.y());
3541 pointerEventInit.setButton(0); 3543 pointerEventInit.setButton(0);
3542 pointerEventInit.setButtons(pointerReleasedOrCancelled ? 0 : 1); 3544 pointerEventInit.setButtons(pointerReleasedOrCancelled ? 0 : 1);
3543 3545
3544 pointerEventInit.setCtrlKey(event.ctrlKey()); 3546 pointerEventInit.setCtrlKey(event.ctrlKey());
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3995 unsigned EventHandler::accessKeyModifiers() 3997 unsigned EventHandler::accessKeyModifiers()
3996 { 3998 {
3997 #if OS(MACOSX) 3999 #if OS(MACOSX)
3998 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4000 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3999 #else 4001 #else
4000 return PlatformEvent::AltKey; 4002 return PlatformEvent::AltKey;
4001 #endif 4003 #endif
4002 } 4004 }
4003 4005
4004 } // namespace blink 4006 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698