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

Unified Diff: ui/webui/resources/js/cr/ui/touch_handler.js

Issue 620663004: Revert of All changes to ui/webui/ from bookmarks CL that block other CLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/webui/resources/js/cr/ui/splitter.js ('k') | ui/webui/resources/js/cr/ui/tree.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/touch_handler.js
diff --git a/ui/webui/resources/js/cr/ui/touch_handler.js b/ui/webui/resources/js/cr/ui/touch_handler.js
index acc12afe1f5df22177c23106e0bc89487927cace..8155a1fc3230f369bc7f2e41f11f09c2bf6b398a 100644
--- a/ui/webui/resources/js/cr/ui/touch_handler.js
+++ b/ui/webui/resources/js/cr/ui/touch_handler.js
@@ -130,7 +130,6 @@
/**
* The type of event sent by TouchHandler
* @constructor
- * @extends {Event}
* @param {string} type The type of event (one of cr.ui.Grabber.EventType).
* @param {boolean} bubbles Whether or not the event should bubble.
* @param {number} clientX The X location of the touch.
@@ -789,8 +788,7 @@
// Dispatch to the LONG_PRESS
this.dispatchEventXY_(TouchHandler.EventType.LONG_PRESS, this.element_,
- /** @type {number} */(this.startTouchX_),
- /** @type {number} */(this.startTouchY_));
+ this.startTouchX_, this.startTouchY_);
},
/**
@@ -822,13 +820,12 @@
// since the common implementation of touch dragging relies on it). Since
// touch is our primary scenario (which we want to emulate with mouse),
// we'll treat both cases the same and not depend on the target.
- /** @type {Element} */
var touchedElement;
if (eventType == TouchHandler.EventType.TOUCH_START) {
- touchedElement = assertInstanceof(touch.target, Element);
+ touchedElement = touch.target;
} else {
- touchedElement = assert(this.element_.ownerDocument.
- elementFromPoint(touch.clientX, touch.clientY));
+ touchedElement = this.element_.ownerDocument.
+ elementFromPoint(touch.clientX, touch.clientY);
}
return this.dispatchEventXY_(eventType, touchedElement, touch.clientX,
@@ -838,9 +835,8 @@
/**
* Dispatch a TouchHandler event to the element
* @param {string} eventType The event to dispatch.
- * @param {!Element} touchedElement
- * @param {number} clientX The X location for the event.
- * @param {number} clientY The Y location for the event.
+ @param {number} clientX The X location for the event.
+ @param {number} clientY The Y location for the event.
* @return {boolean|undefined} The value of enableDrag after dispatching
* the event.
* @private
« no previous file with comments | « ui/webui/resources/js/cr/ui/splitter.js ('k') | ui/webui/resources/js/cr/ui/tree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698