[webkit-dev] Refactoring activex object converting to plugin code?

Rui Jiang ruijiang2000 at hotmail.com
Thu Dec 13 14:25:08 PST 2007


Hi all,

Right now webkit will automatically convert some well known ActiveX objects 
(flash, wmp, realplayer etc) to corresponding plugins. (see code in 
RenderPartObject.cpp, mapClassIdToServiceType etc). However, this may not be 
always favorable. I've seen webpages just want the browser bail out if it 
can not support the ActiveX object, and display alternative instructions on 
how to view the page.

Does it make sense to refactor the code, so that with some customization we 
can decide whether to support conversion or not?

Another problem I've seen with the conversion is, if there is an embed tag 
inside an object, converted object type will override the type of the embed 
object. e.g.:

<OBJECT id="MediaPlayer" codeBase="..."  height="250" width="350"
   classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
  <PARAM NAME="URL" VALUE="bt9.wma">
  <embed height=250 width=350 src="midflash.swf"/>
</OBJECT>

The outer object specifies a windows media player. WebKit uses converted 
type "application/x-mplayer2" to create the plugin. However, it uses the 
internal embed tag's src etc to init the plugin, which fails to render 
correctly.

To fix this, I think we should either use everything of the embed tag (if it 
exists) or everything of the object tag (params) etc to do conversion. Does 
that sound a good approach?

Thanks,
Rui 



More information about the webkit-dev mailing list