Re: u2f

2018-01-26 Thread Daniel Veditz
On Fri, Jan 26, 2018 at 6:06 PM, greyhorseman  wrote:

> question is when, if ever, Firefox is going to support this standard fully
> and allow me to use my ubikeys?
>

https://hacks.mozilla.org/2018/01/using-hardware-token-based-2fa-with-the-webauthn-api/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


u2f

2018-01-26 Thread greyhorseman
question is when, if ever, Firefox is going to support this standard fully and 
allow me to use my ubikeys?
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


PSA: service worker code has moved

2018-01-26 Thread Ben Kelly
Hi all,

Just FYI, we have moved the service worker code and tests from:

  dom/workers
  dom/workers/test/serviceworkers

To:

  dom/serviceworkers
  dom/serviceworkers/test

We did this because the service worker feature is about much more than just
spawning a thread in the current process.  Its really a cross-process
feature with hooks throughout the browser.  It was growing in size and
cluttering things up in dom/workers.

This change is now in mozilla-inbound now.  It was landed in:

https://bugzilla.mozilla.org/show_bug.cgi?id=1430139

Sorry for any harshed patches or confusion over intermittent bug title
matching.

Let me know if there are problems.  Thanks.

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


BCP47 normalization of Language Tags in Gecko/Firefox

2018-01-26 Thread Zibi Braniecki (Gandalf)
Hi all!

A couple changes just landed in Gecko that will tighten our handling of
language tags and locales to BCP47 standard.

tl;dr:
 - Use mozilla::locale::Locale for any operations on Locale codes in C++
 - Expect LocaleService::NegotiateLanguages to return canonicalized BCP47
langauge tags

== Locale ==

We gained mozilla::intl::Locale class [0] which allows any C++ code to
validate, normalize and parse language tags.

Please, start using this code whenever you find yourself having to work
with language tags and analyze them.

For example instead of trying to write `langTag.Substring(0,
2).Equals("en")` which is insanely brittle, use:

```
Locale loc = Locale(langTag);
loc.GetLanguage().Equals("en");
```

You can also compare directly `loc == loc2` or using `.Match` which can
take ranges (to make `en` be treated as `en-*-*-*` and match `en-US`)

For JS code, we just advanced the `Intl.Locale` proposal to Stage 3 [0] at
this weeks TC39 meeting and will implement it in SpiderMonkey soon [1].

The locale class implements a direct subset of BCP47 and will be expanded
over time to handle more (all?) of it.

As we will want to start using Unicode Extension Keys around the codebase,
it becomes important that we can rely on all language tags being correctly
parsed and that means that we don't have DIY code around our codebase that
attempts to parse them on its own.

== Language Negotiation ==

There is also a change to our language negotiation handled by
mozilla::locale::LocaleService::NegotiateLanguages and
`Services.locale.negotiateLanguages`.

We now canonicalize the output (because we use the Locale class mentioned
above). That means that if you pass `ES-es` language tag, we'll return
`es-ES`.

It is important that we conform our codebase to the BCP47 standard and if
you expect to face non-canonicalized code, you can always use Locale class
or `Intl.getCanonicalLocales` ECMA402 API to get the canonicalized version
of any locale list.

If you have any questions, please, let me know!
zb.
p.s. We still support *one* extension to BCP47 which is 3-letter variants,
and we do this exclusively for the `ja-JP-mac` case. There's a conversation
about how to get rid of it [3] as it's the sole reason we have to maintain
both `LocaleService::GetAppLocalesAsLangTags` and
`LocaleService::GetAppLocalesAsBCP47`.


[0]
https://hg.mozilla.org/integration/autoland/file/tip/intl/locale/MozLocale.h#l16
[1] https://github.com/tc39/proposal-intl-locale/
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1433303
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1424953
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform