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

Side by Side Diff: ui/webui/resources/js/cr/ui/touch_handler.js

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Touch Handler. Class that handles all touch events and 6 * @fileoverview Touch Handler. Class that handles all touch events and
7 * uses them to interpret higher level gestures and behaviors. TouchEvent is a 7 * uses them to interpret higher level gestures and behaviors. TouchEvent is a
8 * built in mobile safari type: 8 * built in mobile safari type:
9 * http://developer.apple.com/safari/library/documentation/UserExperience/Refere nce/TouchEventClassReference/TouchEvent/TouchEvent.html. 9 * http://developer.apple.com/safari/library/documentation/UserExperience/Refere nce/TouchEventClassReference/TouchEvent/TouchEvent.html.
10 * This class is intended to work with all webkit browsers, tested on Chrome and 10 * This class is intended to work with all webkit browsers, tested on Chrome and
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 onEnd_: function(e) { 674 onEnd_: function(e) {
675 var that = this; 675 var that = this;
676 assert(this.activeTouch_ !== undefined, 'Expect to already be touching'); 676 assert(this.activeTouch_ !== undefined, 'Expect to already be touching');
677 677
678 // If the touch we're tracking isn't changing here, ignore this touch end. 678 // If the touch we're tracking isn't changing here, ignore this touch end.
679 var touch = this.findActiveTouch_(e.changedTouches); 679 var touch = this.findActiveTouch_(e.changedTouches);
680 if (!touch) { 680 if (!touch) {
681 // In most cases, our active touch will be in the 'touches' collection, 681 // In most cases, our active touch will be in the 'touches' collection,
682 // but we can't assert that because occasionally two touchend events can 682 // but we can't assert that because occasionally two touchend events can
683 // occur at almost the same time with both having empty 'touches' lists. 683 // occur at almost the same time with both having empty 'touches' lists.
684 // I.e., 'touches' seems like it can be a bit more up-to-date than the 684 // I.e., 'touches' seems like it can be a bit more up to date than the
685 // current event. 685 // current event.
686 return; 686 return;
687 } 687 }
688 688
689 // This is touchEnd for the touch we're monitoring 689 // This is touchEnd for the touch we're monitoring
690 assert(!this.findActiveTouch_(e.touches), 690 assert(!this.findActiveTouch_(e.touches),
691 'Touch ended also still active'); 691 'Touch ended also still active');
692 692
693 // Indicate that touching has finished 693 // Indicate that touching has finished
694 this.stopTouching_(); 694 this.stopTouching_();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 872
873 this.element_.dispatchEvent(event); 873 this.element_.dispatchEvent(event);
874 return event.enableDrag; 874 return event.enableDrag;
875 } 875 }
876 }; 876 };
877 877
878 return { 878 return {
879 TouchHandler: TouchHandler 879 TouchHandler: TouchHandler
880 }; 880 };
881 }); 881 });
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698