Re: How to reliably make an ArrayBufferView wrapped?

2019-03-25 Thread violet . bugreport
Thank you for the detailed explanation! It works.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement and ship: Gamepad Extensions `multi touch` and `light indicator`

2019-03-25 Thread dmu
On Friday, March 22, 2019 at 9:56:20 AM UTC-7, Martin Thomson wrote:
> On Thu, Mar 21, 2019 at 1:11 PM Tom Ritter  wrote:
> 
> > Okay, good, not making this data available until the user activity
> > engages with the gamepad/VR controller (mostly) assuages my concerns
> > on this component. My remaining concern is around the sensitivity of
> > axis movement. If I have my controller on my desk, and I am
> > typing/bumping it - I am curious if that would cause the controller to
> > suddenly activate.  I don't think I have a gamepad to test with
> > though.
> >
> 
> There's a research question that suggests: gamepad accelerometers are
> pretty good, can they be used to recover what someone is typing based on
> those vibrations?  Setting a minimum activation threshold to start using
> the controller might be wise.  A button press is guaranteed to activate it,
> so we can be a little less sensitive for that.

This is a good thought although not every gamepad has vibrate function. We can 
do this enhancement for the devices own this functionality.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement and ship: Gamepad Extensions `multi touch` and `light indicator`

2019-03-25 Thread dmu
On Wednesday, March 20, 2019 at 7:10:54 PM UTC-7, Tom Ritter wrote:
> > > > Example 1: Let’s say touchId is currently set to 0 and no fingers are 
> > > > touching the touchpad.  When a finger touches the touchpad, touchId of 
> > > > this event would be 1.  As that finger moves around the touchpad, new 
> > > > touch events are added with updated coordinates, however, the touchId 
> > > > is still 1 to denote that the finger has not been lifted from the 
> > > > touchpad.  If the finger is released and touches again, the touchId 
> > > > would then be 2.
> > > >
> > > > Example 2: In the case of multi touch, the first finger that touches 
> > > > the touchpad would have a touchId of 1.  The next finger that touches 
> > > > the touchpad before the first finger is released would have a touchId 
> > > > of 2.  If the first touch finger is released and touches again, that 
> > > > touchId would be 3.  This way, the application can distinguish between 
> > > > different touches that have or haven’t been removed from the touchpad.
> > >
> > >
> > > In this situation, it seems like the actual value of the field doesn't
> > > matter, only that it is increasing relative to the last value. So it
> > > should be possible to have separate values based on the origin.
> > >
> > > Not doing so creates a cross-origin tracking and fingerprinting vector.
> > >
> >
> > Thanks for your feedback!
> >
> > First of all. I am not quite sure I understand the cross-origin tracking 
> > mean, the `touchId` will increase when there is a new touch on the 
> > touchpad. It is exactly increasing relative to the last value, I would like 
> > to know why it would be an issue. We also have some APIs like timestamp 
> > that are also increased relative to the last value. If you suggest to 
> > separate the value, what is the possible approach?
> 
> Any state that is shared and exposed to unrelated origins becomes a
> potential vector for either directly tracking or otherwise correlating
> a user.  For example:
> 
> a) A heavy gamer may rack up a touchid in the millions during a
> browser session. When visiting sites a.com and b.com, they see that
> one person in particular has a gigantic touchid. They have a good idea
> it is the same visitor to both sites.
> 
> b) A user leaves a game on a.com and starts a game on b.com. By
> comparing timestamps and touchid, the sites are quite certain it is
> the same user who left with touchid 400 and appeared with touchid 401.
> 
> As far as separating the value; it kind of depends on how you
> implement it; but let's say you were going to use a static uint64_t or
> something like that.  Instead of heaving a static uint64_t, create a
> Dictionary and look up the uint64_t using
> the OriginAttrbutes of the top level page.
> 


Regarding to `touchid, IIUC, it is a data member of a Gamepad, that means the 
attribute wouldn't be accessed across other pages. For examples, a gamepad 
whose `touchid` is 6 and `timestamp` is 5000 in a gamepad tab, when visiting to 
an another Gamepad tab, we will spawn a new gamepad object for this tab and its 
`touchid` and `timestamp` are 0. Therefore, I could not finding the possible 
usage case of OriginAttrbutes.

 

> Also, as Ehsan mentioned, we should change the spec so that touchId is
> keyed by the top level domain.
> 
> > In our implementation, we will wait until users' first intention like 
> > button press, axis movement. Then, Firefox will fire a 
> > `gamepadconnected`[1]. Chrome also does the same restriction although the 
> > spec doesn't describe this is a must.
> >
> > Regarding to GamepadPose, we only implement it for VR controllers, we only 
> > can start to poll input events once users confirm they wanna enter the VR 
> > mode. Then, keep waiting for the first event like button press, axis 
> > movement, or pose change. Lastly, we will fire a `gamepadconnected`. Also, 
> > once they switch the VR tab to the background, we will close this VR 
> > session and don't listen to VR input events any more.
> 
> Okay, good, not making this data available until the user activity
> engages with the gamepad/VR controller (mostly) assuages my concerns
> on this component. My remaining concern is around the sensitivity of
> axis movement. If I have my controller on my desk, and I am
> typing/bumping it - I am curious if that would cause the controller to
> suddenly activate.  I don't think I have a gamepad to test with
> though.
> 
> -tom


For the sensitivity of axis movement, I aware Firefox needs do adjustments for 
this part. The axis of gamepad in Firefox always gives its first intent once 
its value is not 0. That means if some Gamepad axes value are not 0 even they 
are idle, the gamepad will be activated immediately. I will fix this issue 
shortly, I think 0.5 [0~1] threshold is a good value. (Chrome did the same 
threadhold from my tests.)


Cheers,
Daosheng Mu.

___
dev-platform mailing list

Re: sccache as ccache

2019-03-25 Thread Jonathan Watt
On 26/07/2017 16:19, Botond Ballo wrote:
> On Wed, Jul 26, 2017 at 9:05 AM, Ted Mielczarek  wrote:
>> If you build Firefox on Linux or OS X you can (and
>> should) use sccache in place of ccache for local development.
> 
> Can sccache be used in conjunction with icecc [1]?
> 
> I currently use the two together by having the following in my .mozconfig:
> 
>   ac_add_options --with-ccache
>   mk_add_options 'export CCACHE_PREFIX=icecc'
>   mk_add_options 'export CCACHE_CPP2=yes'
> 
> Is there an equivalent / similar setup with sccache?

This is an old thread, but since I looked this up I'll circle back and note that
the issues seems to be:

https://github.com/mozilla/sccache/issues/132
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to reliably make an ArrayBufferView wrapped?

2019-03-25 Thread Boris Zbarsky

On 3/25/19 11:22 AM, violet.bugrep...@gmail.com wrote:

I think it should be a browser test, because I need to call IndexedDB.


OK, makes sense.

In that case, the simplest option is to pick a browser test that 
involves Xray wrappers and modify it so you have an Xray to an 
ArrayBufferView.


If IndexedDB works in system-principal pages, you could take something 
like 
https://searchfox.org/mozilla-central/source/js/xpconnect/tests/chrome/test_xrayToJS.xul 
and use a similar setup.  So create a mochitest-chrome test that loads 
file_empty.html or equivalent in a subframe, then do:


  var view = new 
(document.getElementById('ifr').contentWindow.Int32Array)(5);


or so and go on from there.

If you run into trouble, please feel free to ping me on IRC ("bz" on 
#content or #developers) or mail me, or post here.


-Boris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to reliably make an ArrayBufferView wrapped?

2019-03-25 Thread violet . bugreport
> Are you trying to write a JS shell test or a browser test?

I think it should be a browser test, because I need to call IndexedDB.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to reliably make an ArrayBufferView wrapped?

2019-03-25 Thread Boris Zbarsky

On 3/25/19 4:22 AM, violet.bugrep...@gmail.com wrote:

In the test, I want to make sure the object is indeed a wrapped one. Is there a 
reliable way to write JavaScript code to achieve this?


Are you trying to write a JS shell test or a browser test?

-Boris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


hg/git hooks for clang-format

2019-03-25 Thread Sylvestre Ledru

We have now clang format hooks/extension for hg and git.

Both work in the same way: at commit phase, they will automatically run 
"mach clang-format 
" 
(which is now executing in parallel 
) on the files 
added as part of the commit operation. The reformatting will be done 
also during a commit --amend.


The hg extension (provided by version-control-tools) is automatically 
installed as part of the mach bootstrap process or can be done by hand 
by adding the following line in .hgrc:


format-source = ~/.mozbuild/version-control-tools/hgext/format-source


For git, running this command should be enough:

$ ln -s $(pwd)/tools/lint/hooks_clang_format.py .git/hooks/pre-commit


However, for git, because of limitations in this vcs, we aren't able to 
manage the git add -p case for now.



The goal is to have more and more people use these hooks to avoid the 
task of regularly reformatting the tree 
.



Bugs should be reported here :

https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20Build%20System=Lint%20and%20Formatting


Implementations:

hg: 
https://hg.mozilla.org/hgcustom/version-control-tools/file/tip/hgext/clang-format/__init__.py


git: 
https://hg.mozilla.org/mozilla-central/file/tip/tools/lint/hooks_clang_format.py


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


How to reliably make an ArrayBufferView wrapped?

2019-03-25 Thread violet . bugreport
When solving this bug https://phabricator.services.mozilla.com/D24009. I need 
to write a test. The bug is basically caused by overlooking the possible 
wrapper around an ArrayBufferView that is checked by 
JS_IsArrayBufferViewObject().

See 
https://searchfox.org/mozilla-central/source/js/src/vm/ArrayBufferViewObject.cpp#164,
 the check will return true if canUnwrapAs(), it's 
possible that the object itself is not an ArrayBufferView.

In the test, I want to make sure the object is indeed a wrapped one. Is there a 
reliable way to write JavaScript code to achieve this?

Thanks!
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


[desktop] Bugs logged by Desktop Release QA in the last 7 days

2019-03-25 Thread Mihai Boldan

Hello,

Here's the list of new issues found and filed by the Desktop Release QA 
team in the last 7 days.
Additional details on the team's priorities last week, as well as the 
plans for the current week are available at: http://tinyurl.com/yycedh6z.

Bugs logged by Desktop Release QA in the last 7 days:

Firefox: Private Browsing
NEW - https://bugzil.la/1536402 - Private browsing - dotted border in 
about:downloads section


Firefox: Device Permissions
NEW - https://bugzil.la/1536418 - [WIN] Mouse cursor flickers when 
choosing the screen option from getUserMedia test page


Firefox: Session Restore
NEW - https://bugzil.la/1536493 - Firefox window size should be 
preserved after a session restore or restart after using the touch keyboard


Firefox: Toolbars and Customization
NEW - https://bugzil.la/1537738 - Keyboard navigation selection is not 
working inside Customize


Firefox: Tabbed Browser
NEW - https://bugzil.la/1537872 - [macOS] Draging any tab in 
the tab strip to change its position leaves a random tab in hovered state


Firefox: Distributions
NEW - https://bugzil.la/1538147 - [WIN] - Acer Build update from 62.0 
ignores distribution-localisation


Toolkit: Add-ons Manager
NEW - https://bugzil.la/1537735 - [macOS] After vertical resize content 
from themes reappears only with mouse hover


Toolkit: Startup and Profile    System
NEW - https://bugzil.la/1538184 - The path for Local Directory is not 
created in about:profiles if by creating a new profile, the user chooses 
where the data should be stored.


This is available as a Bugzilla bug list as well: 
http://tinyurl.com/yycedh6z.


Regards,
Mihai Boldan

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform