It's pretty simple to restore the 3.5 behavior, but that is of course a
somewhat breaking change from b1...
Where do we go from here, for both m-c and 3.6?
-Boris
P.S. Please follow up to mozilla.dev.tech.xbl
P.P.S. Someone please write some exhaustive XBL tests? :(
>
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=526178
Hi Boris,
Do you know the status of this bug re: XULRunner 1.9.2?
The bug is flagged as RESOLVED FIXED, but this is still an issue for me on 1.9.2.3705 - the official XULRunner 1.9.2 build with XBL content.
On 1.9.2b1 with:
<binding>
<xbl:content>
<bindinga>
<bindingb/>
</bindinga>
</xbl:content>
<xbl:Constructor>
alert( "Binding c" );
</xbl:Constructor>
</binding>
What happened was:
Binding a
Binding b
Binding c
With 1.9.2 and the "fix", the order is now:
Binding c
Binding a
Binding b
This means an outer XBL constructor is initialising, before any of it its own anonymous content has initialised, I can't see anything in the bug
that this was intended behaviour either?
Can I re-open this bug?
Cheers,
Neil
It's fixed.
> On 1.9.2b1 with:
>
> <binding>
> <xbl:content>
> <bindinga>
> <bindingb/>
> </bindinga>
> </xbl:content>
>
> <xbl:Constructor>
> alert( "Binding c" );
> </xbl:Constructor>
> </binding>
That's not the situation in the bug. The situation the bug is about is:
<node-with-binding-a>
<node-with-binding-b/>
</node-with-binding-a>
and the bug was that 'a' fired after 'b'. The bug was about making 'a'
fire before 'b' again.
> With 1.9.2 and the "fix", the order is now:
>
> Binding c
>
> Binding a
>
> Binding b
Yep.
> This means an outer XBL constructor is initialising, before any of it
> its own anonymous content has initialised
Yes. That's also what Firefox 3.5, 3.0, and 2.0 do. I haven't tested
earlier things. XUL testcase attached for anyone who wants to test.
> Can I re-open this bug?
Given the above, seems like "no", right?
-Boris
Test case below:
Pre 1.9.2b2 the constructor order was B, C, A
Post 1.9.2b2 the constructor order is now A, B, C
This prevents a constructor addressing it's own anonymous content.
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="bindinga">
<content>
<xul:bindingb/>
<xul:bindingc/>
</content>
<implementation>
<constructor><![CDATA[
alert("constructing A");
]]></constructor>
</implementation>
</binding>
<binding id="bindingb">
<implementation>
<constructor><![CDATA[
alert("constructing B");
]]></constructor>
</implementation>
</binding>
<binding id="bindingc">
<implementation>
<constructor><![CDATA[
alert("constructing C");
]]></constructor>
</implementation>
</binding>
</bindings>
And I just marked that invalid. I was sure I'd posted in response to
your previous post on this thread, and my newsreader shows that post as
replied-to, but I'm not seeing my response in the newsgroup. Ah, well.
-Boris
Which is because I attached a testcase to that response... and that got
silently filtered without letting me know.
-Boris