Last Comment Bug 708538 - [Gonk] Update the 'b2g' directory with changes since last import
: [Gonk] Update the 'b2g' directory with changes since last import
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: ARM Gonk (Firefox OS)
: -- normal (vote)
: mozilla11
Assigned To: Philipp von Weitershausen [:philikon]
:
Mentors:
Depends on: 709469
Blocks: 709468
  Show dependency treegraph
 
Reported: 2011-12-08 00:17 PST by Philipp von Weitershausen [:philikon]
Modified: 2011-12-10 05:58 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1 (v1): Add a local http server on the device at http://localhost:8888 (6.18 KB, patch)
2011-12-08 00:23 PST, Philipp von Weitershausen [:philikon]
cjones.bugs: review+
Details | Diff | Review
Part 2 (v1): Use setTimeout(..., 0) to send the click event from touch.js (1.58 KB, patch)
2011-12-08 00:24 PST, Philipp von Weitershausen [:philikon]
cjones.bugs: review+
Details | Diff | Review

Description Philipp von Weitershausen [:philikon] 2011-12-08 00:17:33 PST
vingtetun snuck in a few more changes to the 'b2g' dir since the import.
Comment 1 Philipp von Weitershausen [:philikon] 2011-12-08 00:23:41 PST
Created attachment 579980 [details] [diff] [review]
Part 1 (v1): Add a local http server on the device at http://localhost:8888

Equivalent of commit https://github.com/cgjones/mozilla-central/commit/fd49e332dcf60b03bed3336675c7d295bbd66a04

Asking cjones for rubberstamping.
Comment 2 Philipp von Weitershausen [:philikon] 2011-12-08 00:24:33 PST
Created attachment 579981 [details] [diff] [review]
Part 2 (v1): Use setTimeout(..., 0) to send the click event from touch.js

Equivalent of https://github.com/cgjones/mozilla-central/commit/481bca37d01509fd2ddf74589bd5a45b55c4c6b0

Asking cjones for rubberstamping.
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-12-08 09:55:58 PST
Comment on attachment 579981 [details] [diff] [review]
Part 2 (v1): Use setTimeout(..., 0) to send the click event from touch.js

I don't understand this patch but OK :).
Comment 5 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2011-12-09 03:30:56 PST
(In reply to Chris Jones [:cjones] [:warhammer] from comment #3)
> Comment on attachment 579981 [details] [diff] [review]
> Part 2 (v1): Use setTimeout(..., 0) to send the click event from touch.js
> 
> I don't understand this patch but OK :).

setTimeout(function() {}, 0) is often used to get out of the event loop.
In this case it is used to ensure the click event dispatch is finished and so we can start to fire a new mouse events sequence.
Comment 6 Tim Guan-tin Chien [:timdream] (please needinfo; OOO and on leave until July) 2011-12-09 06:35:01 PST
(In reply to Vivien Nicolas (:vingtetun) from comment #5)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #3)
> > Comment on attachment 579981 [details] [diff] [review]
> > Part 2 (v1): Use setTimeout(..., 0) to send the click event from touch.js
> > 
> > I don't understand this patch but OK :).
> 
> setTimeout(function() {}, 0) is often used to get out of the event loop.
> In this case it is used to ensure the click event dispatch is finished and
> so we can start to fire a new mouse events sequence.

Keep in mind that setTimeout(function() {}, 0) comes with ~5ms delay. Not a big deal though.
Comment 7 Andreas Gal :gal 2011-12-09 06:39:47 PST
How about postMessage instead?
Comment 9 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2011-12-09 19:05:17 PST
(In reply to Andreas Gal :gal from comment #7)
> How about postMessage instead?

I really want to fire events - because of gaia but also because of others that are creating their own UI.
Comment 10 Andreas Gal :gal 2011-12-09 19:07:25 PST
No, I meant instead of setTimeout(0) send yourself a postmessage. That has no 5ms delay.
Comment 11 Philipp von Weitershausen [:philikon] 2011-12-10 05:58:42 PST
(In reply to Andreas Gal :gal from comment #10)
> No, I meant instead of setTimeout(0) send yourself a postmessage. That has
> no 5ms delay.

Since this bug is closed already, I filed bug 709469 to investigate this.

Note You need to log in before you can comment on or make changes to this bug.