Some more PLDHashTable API tweaks

2015-02-04 Thread Nicholas Nethercote
Hi,

I just landed the patches in
https://bugzilla.mozilla.org/show_bug.cgi?id=1050035. They
affect PLDHashTable's API in the following ways.

- PLDHashTable now allocates its entry storage lazily. (nsTHashtable and
  friends do too, since they are just layers on top of PLDHashTable.) This is a
  nice space win because about 45% of all created PLDHashTables never get any
  elements inserted into them.

- As a result, PL_DHashTableInit() is now infallible. This is possible because
  the allocation of entry storage now only occurs on table insertion, in
  PL_DHashTableAdd().

- An infallible version of PL_DHashTableAdd() has been added. To use the
  fallible version you need a |fallible_t| argument. All the old callsites were
  updated appropriately, to keep them fallible.

- PLD_NewDHashTable() and PLD_HashTableDestroy() have been removed. You should
  now just use |new|+PL_DHashTableInit() and PLD_HashTableDestroy()+|delete|,
  which are more obvious and only slightly more verbose. (And I have plans to
  add a destructor and an initializing constructor, so in the end you'll be
  able to just use |new| and |delete|).

I prepared a comm-central update patch in
https://bugzilla.mozilla.org/show_bug.cgi?id=1129692.

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


Re: MSE WebM/VP9 enabled on nightly

2015-02-04 Thread Chris Double
ilde...@gmail.com writes:

>
> That's great news. Does it mean we can expect to see VP9 working in
> Firefox 37? Even on Linux?  Cause as for Firefox 35 on UBuntu 14.10 I
> still MSE and VP9 disabled here: http://www.youtube.com/html5

The plan for MSE has changed a bit since Anthony's post. We are
currently looking at MSE support enabled for Firefox 37 on Windows and
Mac OS X, limited to YouTube initially, and MP4 only. Linux and VP9
support will follow.

For testing, MSE support can be enabled on current nightly and aurora
using prefs:

  media.mediasource.enabled 

Codec support can be enabled or disabled via prefs:

  media.mediasource.mp4.enabled
  media.mediasource.webm.enabled

-- 
http://bluishcoder.co.nz
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Tree Status Addon

2015-02-04 Thread Jordan Santell
Probably 34, as it uses some shortcut features added then in the SDK, but
what's on AMO is 35, I believe, as I just tested up to current release

On Wed, Feb 4, 2015 at 6:52 PM, Giovanny Gongora  wrote:

> What is the minimum Firefox version? Because I am using 33 and it says on
> AMO that is not available for my Firefox version.
>
> 2015-02-04 17:13 GMT-05:00 Xidorn Quan :
>
> An addon for checking tree status is always something useful, thanks for
>> working on this!
>>
>> Comparing the two addons, I'd prefer Tree Status Addon by Jordan here,
>> because it does not request restart, which means I can enable it only when
>> I'm going to push and indeed need to monitor the tree status.
>>
>> - Xidorn
>>
>> On Thu, Feb 5, 2015 at 8:44 AM, Martin Thomson  wrote:
>>
>> > I've been using TreeStat by Adam Roach for a while:
>> > https://addons.mozilla.org/en-US/firefox/addon/treestat/?src=api
>> >
>> > On Thu, Feb 5, 2015 at 7:53 AM, Jordan Santell 
>> > wrote:
>> >
>> > > Hey all,
>> > > If anyone's interested, I made an addon that lets you select an
>> > integration
>> > > tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
>> > > updates an icon in the status bar with its status. If the state
>> changes
>> > > (from open to close, close to open), a notification pops up letting
>> you
>> > > know. Could be useful for you!
>> > >
>> > > Demo gif, lacking notification however:
>> > >
>> > >
>> >
>> https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
>> > > Addon:
>> > https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
>> > > ___
>> > > dev-platform mailing list
>> > > dev-platform@lists.mozilla.org
>> > > https://lists.mozilla.org/listinfo/dev-platform
>> > >
>> > ___
>> > dev-platform mailing list
>> > dev-platform@lists.mozilla.org
>> > https://lists.mozilla.org/listinfo/dev-platform
>> >
>> ___
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Tree Status Addon

2015-02-04 Thread Giovanny Gongora
What is the minimum Firefox version? Because I am using 33 and it says on
AMO that is not available for my Firefox version.

2015-02-04 17:13 GMT-05:00 Xidorn Quan :

> An addon for checking tree status is always something useful, thanks for
> working on this!
>
> Comparing the two addons, I'd prefer Tree Status Addon by Jordan here,
> because it does not request restart, which means I can enable it only when
> I'm going to push and indeed need to monitor the tree status.
>
> - Xidorn
>
> On Thu, Feb 5, 2015 at 8:44 AM, Martin Thomson  wrote:
>
> > I've been using TreeStat by Adam Roach for a while:
> > https://addons.mozilla.org/en-US/firefox/addon/treestat/?src=api
> >
> > On Thu, Feb 5, 2015 at 7:53 AM, Jordan Santell 
> > wrote:
> >
> > > Hey all,
> > > If anyone's interested, I made an addon that lets you select an
> > integration
> > > tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
> > > updates an icon in the status bar with its status. If the state changes
> > > (from open to close, close to open), a notification pops up letting you
> > > know. Could be useful for you!
> > >
> > > Demo gif, lacking notification however:
> > >
> > >
> >
> https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
> > > Addon:
> > https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
> > > ___
> > > dev-platform mailing list
> > > dev-platform@lists.mozilla.org
> > > https://lists.mozilla.org/listinfo/dev-platform
> > >
> > ___
> > dev-platform mailing list
> > dev-platform@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: HTTP/2 and User-Agent strings?

2015-02-04 Thread Karl Dubost
Gervase,

Le 4 févr. 2015 à 18:53, Gervase Markham  a écrit :
> Hmm. I'm surprised that having managed to trim down the UA for IE 11 to
> be "not old IE, standards compliant stuff please", they then take the
> opposite approach with Spartan, when they want to send basically the
> same message. 

Maybe something we can discuss soon: Feb 18, 2015. Some Microsoft people will 
be there.
https://wiki.mozilla.org/WebCompat_Summit_%282015%29#Summit_Schedule


-- 
Karl Dubost, Mozilla
http://www.la-grange.net/karl/moz

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


Re: Tree Status Addon

2015-02-04 Thread Xidorn Quan
An addon for checking tree status is always something useful, thanks for
working on this!

Comparing the two addons, I'd prefer Tree Status Addon by Jordan here,
because it does not request restart, which means I can enable it only when
I'm going to push and indeed need to monitor the tree status.

- Xidorn

On Thu, Feb 5, 2015 at 8:44 AM, Martin Thomson  wrote:

> I've been using TreeStat by Adam Roach for a while:
> https://addons.mozilla.org/en-US/firefox/addon/treestat/?src=api
>
> On Thu, Feb 5, 2015 at 7:53 AM, Jordan Santell 
> wrote:
>
> > Hey all,
> > If anyone's interested, I made an addon that lets you select an
> integration
> > tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
> > updates an icon in the status bar with its status. If the state changes
> > (from open to close, close to open), a notification pops up letting you
> > know. Could be useful for you!
> >
> > Demo gif, lacking notification however:
> >
> >
> https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
> > Addon:
> https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
> > ___
> > dev-platform mailing list
> > dev-platform@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to ship: CSS display:contents

2015-02-04 Thread Mats Palmgren

On 02/04/2015 08:20 PM, cmzieba...@gmail.com wrote:

I am trying to set up a CodePen to test this feature:

http://codepen.io/WebDevCA/pen/vEeMjx

If I understand "display:contents" properly then if it is working the
green border around the DIV can't be seen but the contents of the H1
inside that DIV can be seen?


Right, the H1 will be displayed in DIV's parent and the DIV itself will
not be displayed.  However, H1 still inherit style from the DIV so you
can do "h1 {border:inherit}" to get a green border.  And the DOM and
CSS selectors works normally, so it still matches "div h1 {}" etc.

Developer documentation for this feature is forthcoming, but for now
I suggest you download Firefox Developer Edition and play with it:
https://www.mozilla.org/en-US/firefox/channel/#developer

Thanks for your interest!

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


Re: Intent to ship: CSS display:contents

2015-02-04 Thread Daniel Holbert
Correct.

Conceptually, the  exists in the style tree (so e.g. your
"text-align:center" style gets inherited to the h1, via the style
system, and any other inherited properties or "div > * {" style rules
would affect the children as well).  But the  does not exist in the
box tree.  It's replaced there with its children (just the  in this
case).  So, the border doesn't show up, and the 'width' & 'margin' also
have no effect since they're styling a box that doesn't exist.

~Daniel


On 02/04/2015 12:20 PM, cmzieba...@gmail.com wrote:
> I am trying to set up a CodePen to test this feature:
> 
> http://codepen.io/WebDevCA/pen/vEeMjx
> 
> If I understand "display:contents" properly then if it is working the green 
> border around the DIV can't be seen but the contents of the H1 inside that 
> DIV can be seen?
> 
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to ship: CSS display:contents

2015-02-04 Thread Jonas Sicking
On Mon, Feb 2, 2015 at 1:33 PM, L. David Baron  wrote:
> On Monday 2015-02-02 11:27 -0800, paul.ir...@gmail.com wrote:
>> Hey Mats, the use cases are not obvious to me, but I didn't follow the 
>> original www-style threads on this so I'm lacking context. (A the spec 
>> doesn't help either)
>>
>> Can you help explain why a developer would use `display:contents`?
>>
>> I think it'd help to have it described a bit. Thanks!
>
> The key use case is being able to work with CSS layout systems that
> aren't transparent to extra elements in the markup (as block and
> inline layout mostly are) without being forced to remove elements
> from the markup.  This is important with systems like flexbox and
> (particularly) grid.
>
> So it's not about being able to do things that you can't otherwise
> do.  All the things that are doable with display:contents could be
> done before.
>
> It's just about being able to do those things without deleting
> "extra" elements from the markup in order to make the tree conform
> to what the CSS layout model expects.  Since what it does is
> essentially delete an element from the tree as far as CSS is
> concerned, while leaving its children; that is, you stop displaying
> the element but still display its contents.  Put another way, it's
> half of display:none without the other half (where display:none is,
> likewise, a feature that doesn't add any capabilities not present in
> other ways).

Another instance where this becomes useful is for WebComponents.

It's easy to create a WebComponent which renders as a single row in a
table. Just make your element be styled as "display: table-row". Then
make the component's shadow content be styled as "display:
table-cell".

However if you want your component to render as two rows, you are out
of luck. So if you want your component to render as one row which
contains a headline, and one row that contains a data entry, then
you're stuck. Or one row that contains a group headline and a second
row which contains headlines for each table column.

But with this feature you can make your component use "display:
contents" and then make the shadow content render two rows with the
appropriate cells.

The lack of "display: contents" here doesn't just require that you
insert extra elements in the DOM. It requires dramatically changing
the API for your webcomponent.

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


FYI - gitmirror.m.o duplicate repositories will be removed Feb 16

2015-02-04 Thread Hal Wine
tl;dr: if you reference git://gitmirror.mozilla.org/mozilla-b2g/gaia, 
please change to git://git.mozilla.org/releases/gaia.git


gitmirror.mozilla.org gets overloaded from time to time. To reduce load, 
we will be removing dead repositories and repositories already mirrored 
to git.mozilla.org. (see https://bugzil.la/910040)


For this first pass on Feb 16, that means:
 - mozilla-b2g/gaia will be removed, as it exists at 
git.mozilla.org/releases/gaia.git
 - mozilla/mozilla-central will be removed, as that repo was deprecated 
long ago

https://github.com/mozilla/mozilla-central

--Hal

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


Re: Tree Status Addon

2015-02-04 Thread Jordan Santell
Ah, great, I will be checking this out as well!

On Wed, Feb 4, 2015 at 1:44 PM, Martin Thomson  wrote:

> I've been using TreeStat by Adam Roach for a while:
> https://addons.mozilla.org/en-US/firefox/addon/treestat/?src=api
>
> On Thu, Feb 5, 2015 at 7:53 AM, Jordan Santell 
> wrote:
>
>> Hey all,
>> If anyone's interested, I made an addon that lets you select an
>> integration
>> tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
>> updates an icon in the status bar with its status. If the state changes
>> (from open to close, close to open), a notification pops up letting you
>> know. Could be useful for you!
>>
>> Demo gif, lacking notification however:
>>
>> https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
>> Addon:
>> https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
>> ___
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Tree Status Addon

2015-02-04 Thread Martin Thomson
I've been using TreeStat by Adam Roach for a while:
https://addons.mozilla.org/en-US/firefox/addon/treestat/?src=api

On Thu, Feb 5, 2015 at 7:53 AM, Jordan Santell  wrote:

> Hey all,
> If anyone's interested, I made an addon that lets you select an integration
> tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
> updates an icon in the status bar with its status. If the state changes
> (from open to close, close to open), a notification pops up letting you
> know. Could be useful for you!
>
> Demo gif, lacking notification however:
>
> https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
> Addon: https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Tree Status Addon

2015-02-04 Thread Jordan Santell
Hey all,
If anyone's interested, I made an addon that lets you select an integration
tree (fx-team, try, mozilla-inbound, etc) and a polling interval, and
updates an icon in the status bar with its status. If the state changes
(from open to close, close to open), a notification pops up letting you
know. Could be useful for you!

Demo gif, lacking notification however:
https://raw.githubusercontent.com/jsantell/mozilla-tree-status/master/screenshots/tree-status-demo.gif
Addon: https://addons.mozilla.org/en-US/firefox/addon/mozilla-tree-status/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to ship: CSS display:contents

2015-02-04 Thread cmziebarth
I am trying to set up a CodePen to test this feature:

http://codepen.io/WebDevCA/pen/vEeMjx

If I understand "display:contents" properly then if it is working the green 
border around the DIV can't be seen but the contents of the H1 inside that DIV 
can be seen?

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


Web APIs documentation meeting 10 AM PST on Friday!

2015-02-04 Thread Eric Shepherd
The Web APIs documentation meeting is Friday at 10 AM Pacific Time (see 
http://bit.ly/APIdocsMDN for your time zone). Everyone's welcome to attend; if 
you're interested in ensuring that all Web APIs are properly documented, we'd 
love your input.

We have an agenda, as well as details on how to join, here:

https://etherpad.mozilla.org/WebAPI-docs-2015-01-06.

If you have topics you wish to discuss, please feel free to add them to the 
agenda.

We look forward to seeing you there!

If you have topics you wish to discuss, please feel free to add them to the 
agenda. Also, if you're unable to attend but have been working on documentation 
related to APIs, please add notes to the agenda about what you've been doing so 
we can share your progress.

Eric Shepherd
Sr. Technical Writer
Mozilla
http://www.bitstampede.com/ 

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


Range-based for loops

2015-02-04 Thread Xidorn Quan
Since the minimum supported GCC version was bumped to 4.6, the last barrier
for us to use "range-based for loop" from the compiler side has been
removed [1]. Now I want to remove the barrier in our lib side.

I just landed bug 1126552 [2], bug 1127044 [3], and bug 1126701 [4] in
mozilla-inbound. These three bugs together introduce some basic support for
using "range-based for loops".



Bug 1126552 introduces the range-based support for nsTArray, so if there is
an array like |nsTArray frames|, you can now use

for (nsIFrame* frame : frames) { }

If the element type is not something small like a pointer, you probably
want to use reference or constant reference instead of the plain type to
avoid an extra copy. Also, it is generally not a good idea to use |auto| in
this case, because doing so usually reduces the readability.


Bug 1127044 makes reversely iterating possible. If you want to go through
the same array above in the different direction, you can just write

for (nsIFrame* frame : Reversed(frames)) { }



Sometimes, we still have to use the index instead of the element. That's
the reason bug 1126701 is there. First you need to #include
"mozilla/IntegerRange.h", then just

for (auto i : MakeRange(frames.Length())) { }

This statement should have the same behavior as

for (nsTArray::size_type i = 0, iend = frames.Length(); i !=
iend; ++i) { }

but now you can benefit from the deduction of the size type, and in
addition, you don't need to use another variable for storing the length.

If you want to go from 1 to the length, you can write

for (auto i : MakeRange(1u, frames.Length())) { }

Please note the suffix "u" after the number, which is important. If you
forgot this suffix, there will be a static assertion in compile time. Also,
please make sure that the second number is not less than the first one, or
there might be an assertion in runtime.



Of course, you can combine Reversed with MakeRange to iterate the index
reversely:

for (auto i : Reversed(MakeRange(frames.Length( { }

This finally solves the problem I met previously [5].



With these things, let's start using range-based loop in new code. If you
have any problem using this, please complain to me. All suggestions are
welcome!

Iterating integer in arbitrary step length has not been supported. Sorry,
seth. I don't have a clear idea what's the best way to implement this yet.

[1] https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1126552
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1127044
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1126701
[5]
https://groups.google.com/d/msg/mozilla.dev.platform/StyQcoAmxE8/mro6WXEZT4sJ

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


Re: HTTP/2 and User-Agent strings?

2015-02-04 Thread Gervase Markham
On 28/01/15 15:45, Gijs Kruitbosch wrote:
> That's IE11, which is not the same as Spartan.

Hmm. I'm surprised that having managed to trim down the UA for IE 11 to
be "not old IE, standards compliant stuff please", they then take the
opposite approach with Spartan, when they want to send basically the
same message. 

Gerv

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


Re: MSE WebM/VP9 enabled on nightly

2015-02-04 Thread ildella
On Friday, October 24, 2014 at 5:06:22 PM UTC+2, Anthony Jones wrote:
> I just wanted to give a heads up to everyone that we enabled Media
> Source Extensions on nightly for WebM/VP9. This brings Adaptive
> Streaming capability to Firefox video playback. The feature is not
> complete so the pref will automatically turn off when it gets to
> beta/release if we do nothing.
> 
> You can check on YouTube by right clicking the playing video and
> selecting "Stats for nerds" which should appear above the "About the
> HTML5 player" option. If you see "DASH: yes" then you are now living in
> the future.
> 
> This affects YouTube but may also affect sites that use MSE with
> WebM/VP9 but it could also affect sites that use MSE but fail to check
> codec compatibility.
> 
> Please file any (unfiled) issues you experience as blocking bug 1083588.
> Don't expect it to be perfect and if you run into trouble you can set
> media.mediasource.enabled to false in your about:config
> 
> Anthony

That's great news. Does it mean we can expect to see VP9 working in Firefox 37? 
Even on Linux? 
Cause as for Firefox 35 on UBuntu 14.10 I still MSE and VP9  disabled here: 
http://www.youtube.com/html5

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