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

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 1645613007: Redefined the bit WebTouchEvent.causesScrollingIfUncanceled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed an aura unittest. Created 4 years, 10 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) 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y); 416 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y);
417 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY) ); 417 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY) );
418 m_rotationAngle = point.rotationAngle; 418 m_rotationAngle = point.rotationAngle;
419 } 419 }
420 420
421 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo uchEvent& event) 421 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo uchEvent& event)
422 { 422 {
423 m_type = toPlatformTouchEventType(event.type); 423 m_type = toPlatformTouchEventType(event.type);
424 m_modifiers = event.modifiers; 424 m_modifiers = event.modifiers;
425 m_timestamp = event.timeStampSeconds; 425 m_timestamp = event.timeStampSeconds;
426 m_causesScrollingIfUncanceled = event.causesScrollingIfUncanceled; 426 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion;
427 427
428 for (unsigned i = 0; i < event.touchesLength; ++i) 428 for (unsigned i = 0; i < event.touchesLength; ++i)
429 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) ); 429 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) );
430 430
431 m_cancelable = event.cancelable; 431 m_cancelable = event.cancelable;
432 } 432 }
433 433
434 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutObject& layoutObject) 434 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutObject& layoutObject)
435 { 435 {
436 return layoutObject.absoluteToLocal(FloatPoint(location), UseTransforms); 436 return layoutObject.absoluteToLocal(FloatPoint(location), UseTransforms);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 type = TouchCancel; 677 type = TouchCancel;
678 else { 678 else {
679 ASSERT_NOT_REACHED(); 679 ASSERT_NOT_REACHED();
680 type = Undefined; 680 type = Undefined;
681 return; 681 return;
682 } 682 }
683 683
684 timeStampSeconds = event.platformTimeStamp(); 684 timeStampSeconds = event.platformTimeStamp();
685 modifiers = event.modifiers(); 685 modifiers = event.modifiers();
686 cancelable = event.cancelable(); 686 cancelable = event.cancelable();
687 causesScrollingIfUncanceled = event.causesScrollingIfUncanceled(); 687 movedBeyondSlopRegion = event.causesScrollingIfUncanceled();
688 688
689 // Currently touches[] is empty, add stationary points as-is. 689 // Currently touches[] is empty, add stationary points as-is.
690 for (unsigned i = 0; i < event.touches()->length() && i < static_cast<unsign ed>(WebTouchEvent::touchesLengthCap); ++i) { 690 for (unsigned i = 0; i < event.touches()->length() && i < static_cast<unsign ed>(WebTouchEvent::touchesLengthCap); ++i) {
691 touches[i] = toWebTouchPoint(event.touches()->item(i), layoutObject, Web TouchPoint::StateStationary); 691 touches[i] = toWebTouchPoint(event.touches()->item(i), layoutObject, Web TouchPoint::StateStationary);
692 ++touchesLength; 692 ++touchesLength;
693 } 693 }
694 // If any existing points are also in the change list, we should update 694 // If any existing points are also in the change list, we should update
695 // their state, otherwise just add the new points. 695 // their state, otherwise just add the new points.
696 addTouchPointsUpdateStateIfNecessary(toWebTouchPointState(event.type()), eve nt.changedTouches(), touches, &touchesLength, layoutObject); 696 addTouchPointsUpdateStateIfNecessary(toWebTouchPointState(event.type()), eve nt.changedTouches(), touches, &touchesLength, layoutObject);
697 } 697 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 break; 740 break;
741 case GestureSourceTouchscreen: 741 case GestureSourceTouchscreen:
742 sourceDevice = WebGestureDeviceTouchscreen; 742 sourceDevice = WebGestureDeviceTouchscreen;
743 break; 743 break;
744 case GestureSourceUninitialized: 744 case GestureSourceUninitialized:
745 ASSERT_NOT_REACHED(); 745 ASSERT_NOT_REACHED();
746 } 746 }
747 } 747 }
748 748
749 } // namespace blink 749 } // namespace blink
OLDNEW
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | third_party/WebKit/public/web/WebInputEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698