Closed
Bug 864892
Opened 12 years ago
Closed 12 years ago
dom/browser-element/BrowserElementPanning.js kinetic panning does not work with hand made touch events
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: vingtetun, Assigned: vingtetun)
References
Details
Attachments
(1 file, 1 obsolete file)
1.47 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Let's normalize them.
Assignee: nobody → 21
Attachment #740939 -
Flags: review?(fabrice)
Comment 2•12 years ago
|
||
Comment on attachment 740939 [details] [diff] [review]
Patch
Review of attachment 740939 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/browser-element/BrowserElementPanning.js
@@ +681,5 @@
>
> + _getTime: function kp_getTime(time) {
> + // Touch events generated by the platform or hand-made have different
> + // timestamps values. Let's normalize them.
> + if (time > 2 * Date.now()) {
that's quite... ugly no? time > Date.now() is not enough?
@@ +685,5 @@
> + if (time > 2 * Date.now()) {
> + return Math.floor(time / 1000);
> + } else {
> + return time;
> + }
Nit: You have a bunch of trailing whitespace at almost every line.
Attachment #740939 -
Flags: review?(fabrice)
Assignee | ||
Comment 3•12 years ago
|
||
The right fix for this would be bug 77992. In the meantime I will address your comments and land that.
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #740939 -
Attachment is obsolete: true
Attachment #747940 -
Flags: review?(fabrice)
Comment 5•12 years ago
|
||
Comment on attachment 747940 [details] [diff] [review]
Patch
Review of attachment 747940 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/browser-element/BrowserElementPanning.js
@@ +681,5 @@
>
> momentums: [],
> record: function kp_record(delta, timestamp) {
> + this.momentums.push({ 'time': this._getTime(timestamp),
> + 'dx' : delta.x, 'dy' : delta.y });
nit: align 'dx' with 'time'
@@ +686,5 @@
> this.distance.add(delta.x, delta.y);
> },
>
> + _getTime: function kp_getTime(time) {
> + // Touch events generated by the platform or hand-made have are defined in
nit: s/have//
Attachment #747940 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•