Hui Yu Wang | 9 Jun 2011 12:44

Ask for help

Hi All,

I'm trying wmlbrowser with Firefox. I just change the "maxVersion" in install.rdf, then wmlbrowser works well with "FireFox5.0b3". But it's weired that it cannot work with "fennec-5.0.en-US.win32".

Could you spare some time to have a look at it or give me a tip how to resolve the problem.

Thank you very much.

Best Regards

Huiyu Wang


--
_______________________________________________
Wmlbrowser mailing list
Wmlbrowser <at> mozdev.org
https://www.mozdev.org/mailman/listinfo/wmlbrowser
Hui Yu Wang | 10 Jun 2011 03:59

Re: Ask for help

Thank you for reply.

Wmlbrowser can be installed well on "fennec-5.0.en-US.win32" ( I can find it on installed extensions list ) but it just don't work.

I try to visit "http://wap.tianya.cn" which page like this: "<wml><head>...</head><card>...</card></wml>", and fennec cannot recognize this page. But "FireFox5.0b3" with wmlbrowser can display this page well.

I added an "alert(****)" before "window.addEventListener" in browserOverlay.xul of wmlbrowser, but nothing happened. Seems even "browserOverlay.xul" didn't work.

So can you give me some idea where the problem maybe is?
Thank you very much.

Huiyu Wang 


于 2011/6/10 0:22, Matthew Wilson 写道:
On 09/06/2011 11:44, Hui Yu Wang wrote:
Hi All, I'm trying wmlbrowser with Firefox. I just change the "maxVersion" in install.rdf, then wmlbrowser works well with "FireFox5.0b3". But it's weired that it cannot work with "fennec-5.0.en-US.win32". Could you spare some time to have a look at it or give me a tip how to resolve the problem.
I haven't really been keeping up with Fennec to be honest, they might have changed things to stop wmlbrowser from working. What happens when you try it? Matthew


--
_______________________________________________
Wmlbrowser mailing list
Wmlbrowser <at> mozdev.org
https://www.mozdev.org/mailman/listinfo/wmlbrowser
Matthew Wilson | 10 Jun 2011 10:08
Picon
Picon

Re: Ask for help

Firstly, on Fennec, 'fennecOverlay.xul' is used, instead of
'browserOverlay.xul'. If I add a 'dump()' call or a console log, then
this seems to work OK.

Secondly, all of the actual WML handling is done inside the component,
wml-service.js. It looks like the component isn't working, or maybe
isn't registered, but I don't know why.

Matthew

> Thank you for reply.
> 
> Wmlbrowser can be installed well on "fennec-5.0.en-US.win32" ( I can find it on installed extensions
list ) but it just don't work.
> 
> I try to visit "http://wap.tianya.cn" which page like this:
"<wml><head>...</head><card>...</card></wml>", and fennec cannot recognize this page. But
"FireFox5.0b3" with wmlbrowser can display this page well.
> 
> I added an "alert(****)" before "window.addEventListener" in browserOverlay.xul of wmlbrowser, but
nothing happened. Seems even "browserOverlay.xul" didn't work.
> 
> So can you give me some idea where the problem maybe is?
> Thank you very much. 

> 
> 
> 
> _______________________________________________
> Wmlbrowser mailing list
> Wmlbrowser <at> mozdev.org
> https://www.mozdev.org/mailman/listinfo/wmlbrowser
Hui Yu Wang | 15 Jun 2011 10:27

Fwd: Re: Ask for help

Hi Matthew,

Sorry for reply so late. In past few days I was busing on investigating the problem and missed many emails. Sorry.

I'm working in Mozilla Beijing office. In China many sites are still written by WML so wmlbrowser is very usefull here.

I've written some code to manually register "wml-service.js" but it doesn't work(the attached is the "wmlbrowser" modified by me).

According to the comments in the following email, I did another modify to "wml-service.js"(the second attached file) but also failed.

I'm entirely confused now as a newcomer of AddOn.

Could you spare some time to have a look at it and give some help?

Thank you very much.

HuiyuWang 


-------- 原始信息 -------- 主题: 日期: 发件人: 收件人: 抄送:
Re: Ask for help
Mon, 13 Jun 2011 09:53:34 -0700 (PDT)
Mark Finkle <mfinkle <at> mozilla.com>
Hui Yu Wang <hwang <at> mozilla.com>
Matt Brubeck <mbrubeck <at> mozilla.com>, Stuart Parmenter <stuart <at> mozilla.com>


p { margin: 0; }
The add-on needs to be ported to work in the multi-process world of Fennec. The wml-service.js component probably needs to be ported to the child process. However, it's that simple. Add-ons cannot install XPCOM components into the child process the normal way. You need to manually register the JS component into the child process using a content script.

I would recommend reading:
https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis
https://developer.mozilla.org/en/The_message_manager

Also, look at how the component is manually registered in this addon. You will need to do the same thing with wml-service.js if it needs to be in the child process:
the component: http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l12
the factory: http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l43
registering: http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l84

AdblockPlus had to do the same thing with it's nsIContentPolicy XPCOM component.
I'm trying to install addon "wmlbrowser" on fennec. It's weird that it works well with Firefox5.0 and Fennec1.0a but not with Fennec5.0.
It only includes one component "wml-service.js" writen by JS. By my investigation the component doesn't work on Fennec5.0.
I did debug for 2 days but not find where the problem is.
I contacted with the author, he is also confused why the component cannot work.

You know, it's a very important addon for Chinese Fennec. Could you give me some tips who is familiar with mobile addon and can give me some help?
Thank you very much.

Huiyu Wang



--
Spread
          Firefox Affiliate Button

_______________________________________________
Wmlbrowser mailing list
Wmlbrowser <at> mozdev.org
https://www.mozdev.org/mailman/listinfo/wmlbrowser
Matthew Wilson | 15 Jun 2011 20:55
Picon
Picon

Re: Fwd: Re: Ask for help

I'm not really sure. Based on those links I think that the WML code 
should probably stay where it is, not move to the child process. I'll go 
the newsgroups and see what advice I get.

Matthew

On 15/06/2011 09:27, Hui Yu Wang wrote:
> Hi Matthew,
>
> Sorry for reply so late. In past few days I was busing on investigating
> the problem and missed many emails. Sorry.
>
> I'm working in Mozilla Beijing office. In China many sites are still
> written by WML so wmlbrowser is very usefull here.
>
> I've written some code to manually register "wml-service.js" but it
> doesn't work(the attached is the "wmlbrowser" modified by me).
>
> According to the comments in the following email, I did another modify
> to "wml-service.js"(the second attached file) but also failed.
>
> I'm entirely confused now as a newcomer of AddOn.
>
> Could you spare some time to have a look at it and give some help?
>
> Thank you very much.
>
> HuiyuWang
>
>
> -------- 原始信息 --------
> 主题: 	Re: Ask for help
> 日期: 	Mon, 13 Jun 2011 09:53:34 -0700 (PDT)
> 发件人: 	Mark Finkle <mfinkle <at> mozilla.com>
> 收件人: 	Hui Yu Wang <hwang <at> mozilla.com>
> 抄送: 	Matt Brubeck <mbrubeck <at> mozilla.com>, Stuart Parmenter
> <stuart <at> mozilla.com>
>
>
>
> The add-on needs to be ported to work in the multi-process world of
> Fennec. The wml-service.js component probably needs to be ported to the
> child process. However, it's that simple. Add-ons cannot install XPCOM
> components into the child process the normal way. You need to manually
> register the JS component into the child process using a content script.
>
> I would recommend reading:
> https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis
> https://developer.mozilla.org/en/The_message_manager
>
> Also, look at how the component is manually registered in this addon.
> You will need to do the same thing with wml-service.js if it needs to be
> in the child process:
> the component:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l12
> the factory:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l43
> registering:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l84
>
> AdblockPlus had to do the same thing with it's nsIContentPolicy XPCOM
> component.
>
>     I'm trying to install addon "wmlbrowser" on fennec. It's weird that
>     it works well with Firefox5.0 and Fennec1.0a but not with Fennec5.0.
>     It only includes one component "wml-service.js" writen by JS. By my
>     investigation the component doesn't work on Fennec5.0.
>     I did debug for 2 days but not find where the problem is.
>     I contacted with the author, he is also confused why the component
>     cannot work.
>
>     You know, it's a very important addon for Chinese Fennec. Could you
>     give me some tips who is familiar with mobile addon and can give me
>     some help?
>     Thank you very much.
>
>     Huiyu Wang
>
>
>
>     --
>     Spread
>                Firefox Affiliate Button
>
>

_______________________________________________
Wmlbrowser mailing list
Wmlbrowser <at> mozdev.org
https://www.mozdev.org/mailman/listinfo/wmlbrowser
Matthew Wilson | 21 Jun 2011 22:08
Picon
Picon

Re: Fwd: Re: Ask for help

The bootstrap approach looks like it should work in principle.

Matthew

On 15/06/2011 09:27, Hui Yu Wang wrote:
> Hi Matthew,
>
> Sorry for reply so late. In past few days I was busing on investigating
> the problem and missed many emails. Sorry.
>
> I'm working in Mozilla Beijing office. In China many sites are still
> written by WML so wmlbrowser is very usefull here.
>
> I've written some code to manually register "wml-service.js" but it
> doesn't work(the attached is the "wmlbrowser" modified by me).
>
> According to the comments in the following email, I did another modify
> to "wml-service.js"(the second attached file) but also failed.
>
> I'm entirely confused now as a newcomer of AddOn.
>
> Could you spare some time to have a look at it and give some help?
>
> Thank you very much.
>
> HuiyuWang
>
>
> -------- 原始信息 --------
> 主题: 	Re: Ask for help
> 日期: 	Mon, 13 Jun 2011 09:53:34 -0700 (PDT)
> 发件人: 	Mark Finkle <mfinkle <at> mozilla.com>
> 收件人: 	Hui Yu Wang <hwang <at> mozilla.com>
> 抄送: 	Matt Brubeck <mbrubeck <at> mozilla.com>, Stuart Parmenter
> <stuart <at> mozilla.com>
>
>
>
> The add-on needs to be ported to work in the multi-process world of
> Fennec. The wml-service.js component probably needs to be ported to the
> child process. However, it's that simple. Add-ons cannot install XPCOM
> components into the child process the normal way. You need to manually
> register the JS component into the child process using a content script.
>
> I would recommend reading:
> https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis
> https://developer.mozilla.org/en/The_message_manager
>
> Also, look at how the component is manually registered in this addon.
> You will need to do the same thing with wml-service.js if it needs to be
> in the child process:
> the component:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l12
> the factory:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l43
> registering:
> http://hg.mozilla.org/users/mfinkle_mozilla.com/cloudview/file/71bcc41d3664/bootstrap.js#l84
>
> AdblockPlus had to do the same thing with it's nsIContentPolicy XPCOM
> component.
>
>     I'm trying to install addon "wmlbrowser" on fennec. It's weird that
>     it works well with Firefox5.0 and Fennec1.0a but not with Fennec5.0.
>     It only includes one component "wml-service.js" writen by JS. By my
>     investigation the component doesn't work on Fennec5.0.
>     I did debug for 2 days but not find where the problem is.
>     I contacted with the author, he is also confused why the component
>     cannot work.
>
>     You know, it's a very important addon for Chinese Fennec. Could you
>     give me some tips who is familiar with mobile addon and can give me
>     some help?
>     Thank you very much.
>
>     Huiyu Wang
>
>
>
>     --
>     Spread
>                Firefox Affiliate Button
>
>

_______________________________________________
Wmlbrowser mailing list
Wmlbrowser <at> mozdev.org
https://www.mozdev.org/mailman/listinfo/wmlbrowser

Gmane