星期一, 十月 16, 2006

头脑风暴中的Firefox 3.0

最近,软件上的大突进即将来临。IE7, Firefox 2.0, Vista, Office 2007...(虽然后面两个我的硬件不可能支持了,不过还是期待一下吧)

就在Firefox 2.0呼之欲出的时候,3.0着重的新特性还在头脑风暴中。个路好手已经提出了一摞的目标。其中,我最最看重的还是针对稳定运行和内存泄露的问题:

  • When a document causes Firefox to crash, the whole browser won't be taken with it.
  • When a bug in Firefox stomps on memory it doesn't own, other documents in memory are not corrupted.
  • When a document causes Firefox to leak massive amounts of memory, closing that tab or window will free up the wasted memory.
性能上,要对图形加速的整合好好努力了,以免大家上网之前要先关闭compiz:
  • Hardware accelerated graphics (perhaps use the Vista/Mac OS X/AIXGL/XGL engines to do the acceleration for us)
还有恼人的MIME问题,把所有问题推给不负责的网站设计者是不现实的:
Pages with wrong/unknown mime type
  • Often I will find a page that firefox can't display. Nearly always, such pages are plain ASCII text with a weird mime type. For example, firefox doesn't know how to display typical source code. (C, FORTRAN, BASIC, Pascal...) I get a dialog asking me to save the file to disk or choose an app for displaying the file. One particularly desirable display choice is missing: the browser itself!!! Come on now, it's plain ASCII text. Surely the browser can handle this.
  • Firefox can determine the mime type of a local file. (by magic or extension I suppose) For remote files, it always blindly trusts the server. Nearly always, the server just looks at the file magic or extension. This ought to not matter, but it does. Servers often lack a complete and modern mapping from extension/magic to mime type because people don't often install lots of multimedia apps on servers. Such servers will substitute a generic mime type. IE tolerates this just fine because IE determines mime type from the file extension alone. Firefox acts weird: if you "save link as..." and then view the local file, firefox will use a different (inconsistant) mime type. At the very least, IE-like behavior should be an option, and should always be used when the server-provided mime type is clearly useless. If firefox must pop up a dialog to ask the user about viewer apps, the default needs to be that of the file extension. Probably it is better to just bury this server-knows-best relic of the past though, standard or not.

而架构上,Firefox 3会变得更加灵活:

  • Firefox should become a minimal browser
    • All features are provided by the plugin architecture
      • Even basic functions like bookmark manager or history should be provided as extensions to become exchangable
      • Extensions can be installed/uninstalled without restarting the browser
      • Per-machine extensions, Per-user extensions
      • Search plugins are provided as extensions
    • Even the rendering engine becomes exchangable and configurable
      • Support for Gecko, Opera, KHTML, (IE)
      • per-site configurable which engine to use
Developer focus should not be on features, but on architecture
Firefox should be distributed as package including the core browser plus a set of selected basic extensions like history and bookmark manager

只是感觉上面,如此大的一张饼,画出来尚且困难重重,实际上的制作烘烤过程不知道又会变成什么样子。千万别学Netscape6,作出来后黄花菜都凉了。

没有评论: