Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XBL binding override

0 views
Skip to first unread message

Damiano ALBANI

unread,
May 14, 2008, 4:27:27 PM5/14/08
to
Hello,

I'm trying to change the look and behavior of <progressmeter>s in
Firefox downloads window.

So, in the 'chrome.manifest' of my extension, I specified:

style chrome://mozapps/content/downloads/downloads.xul
chrome://download-skin/skin/override.css

Where 'override.css' contains :

progressmeter {
-moz-binding: url("chrome://download-skin/skin/
progressmeter.xml#progressmeter") !important;
}

progressmeter[mode="undetermined"] {
-moz-binding: url("chrome://download-skin/skin/
progressmeter.xml#progressmeter-undetermined") !important;
}

So far, the <content> part of my own <progressmeter> binding is used
(as shown on screen). However, it's not the case with the
<implementation>, which seems "ignored", as if it was still using the
one from the original binding.

What's the reason of this "issue"? How can I override an XBL binding
properly?

Thanks!

--
Damiano ALBANI

Martijn

unread,
May 14, 2008, 4:34:17 PM5/14/08
to Damiano ALBANI, dev-te...@lists.mozilla.org
Hi Damiano,

The script part of xbl is not executed inside the skin directory.
Iiuc, this is a security precaution, skins should not be able to execute
scripts or something like that.
So you need to put your xbl binding in a different directory to get that
working.

Regards,
Martijn

On Wed, May 14, 2008 at 10:27 PM, Damiano ALBANI <damiano...@gmail.com>
wrote:

> _______________________________________________
> dev-tech-xbl mailing list
> dev-te...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xbl
>

--
Martijn Wargers - Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://wiki.mozilla.org/Mozilla_QA_Community
irc://irc.mozilla.org/qa - /nick mw22

Philip Chee

unread,
May 14, 2008, 9:21:07 PM5/14/08
to
On Wed, 14 May 2008 13:27:27 -0700 (PDT), Damiano ALBANI wrote:

> progressmeter {
> -moz-binding: url("chrome://download-skin/skin/
> progressmeter.xml#progressmeter") !important;
> }

[...]


> What's the reason of this "issue"? How can I override an XBL binding
> properly?

I think you'll need to put your XBL in chrome://download-skin/CONTENT/
if you want your code to run. Scripts are not allowed to run from /skin/

Phil

--
Philip Chee <phi...@aleytys.pc.my>, <phili...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]I'm a figment of your imagination.
* TagZilla 0.066.6

Damiano ALBANI

unread,
May 15, 2008, 3:36:14 AM5/15/08
to
Hello,

On May 14, 10:34 pm, Martijn <martijn.mart...@gmail.com> wrote:
> So you need to put your xbl binding in a different directory to get that
> working.

On May 15, 3:21 am, Philip Chee <philip.c...@gmail.com> wrote:
> I think you'll need to put your XBL in chrome://download-skin/CONTENT/
> if you want your code to run. Scripts are not allowed to run from /skin/

Thanks guys for your help, but even with *everything* put back in
"content/", there's still the same issue...
I just don't understand :-)

Regards,

--
Damiano ALBANI

Martijn

unread,
May 15, 2008, 7:21:42 AM5/15/08
to Damiano ALBANI, dev-te...@lists.mozilla.org
Damiano,

Could you provide and example or some code or a bit more explanation?
It might be difficult for people to anwer your question, because not
everything is known.

Regards,
Martijn

On Thu, May 15, 2008 at 9:36 AM, Damiano ALBANI <damiano...@gmail.com>
wrote:

Damiano ALBANI

unread,
May 15, 2008, 8:28:09 AM5/15/08
to
Hello,

On May 15, 1:21 pm, Martijn <martijn.mart...@gmail.com> wrote:
>
> Could you provide and example or some code or a bit more explanation?
> It might be difficult for people to anwer your question, because not
> everything is known.

Sure.
My own XBL <progressmeter> binding file is : <http://
pastebin.mozilla.org/431992>.
As you can see, compared to the original binding (from which I
"started"), I only :
- changed the <content>,
- added a "debug-like" Components.utils.reportError() call in the
"value" setter.

The images of the <content> part display just fine. But none of the
setters/getters seem to get called. That's the part which is
mysterious to me :-)
Do you see what I mean?

Thanks,

--
Damiano ALBANI

Martijn

unread,
May 15, 2008, 8:37:37 AM5/15/08
to Damiano ALBANI, dev-te...@lists.mozilla.org
Damiano,

Is this installed as an extension? Or as a theme?

Regards,
Martijn

On Thu, May 15, 2008 at 2:28 PM, Damiano ALBANI <damiano...@gmail.com>
wrote:

> Hello,

Damiano ALBANI

unread,
May 15, 2008, 8:46:11 AM5/15/08
to
On May 15, 2:37 pm, Martijn <martijn.mart...@gmail.com> wrote:
> Damiano,
>
> Is this installed as an extension? Or as a theme?

Yes, it's an extension indeed.

Regards,

--
Damiano ALBANI

0 new messages