Flock on Firefox 3

Published on 03 February 2008

Update: a public beta of Flock 2.0 is available. In order to minimize the wait between the release of Firefox 3 and a Flock version based on it, Manish and me started to work on porting Flock to FF3. The current stable version of Flock is based on Firefox 2, the latest stable release from Mozilla. That's today that we're very glad to work on overlays, and keep our source modification away from Mozilla files as much as possible. Changes that were touching Mozilla files take way more time to merge/migrate. That's also an opportunity for us to clean up some of our code. For example, the way we were changing entities in browser.xul was to replace the DTD file. Bad, because we were missing the new entities from Firefox 3. We fixed that to only override the entities we want to change (Firefox -> Flock, Bookmarks -> Favorites...) So here is where we are after a few days.

What works

  • The datastorage layer. The data layer of Flock consists in an RDF datasource accessible through a Javascript object mapper (Coop) and serialized on the disk in a mozstorage (sqlite) database. I don't know if Manish had to do anything to make it work in Firefox 3, but it seems to be working great.
  • The services backend. We had to migrate to the login manager because the password manager is deprecated. So long nsIPassword, the time of nsILoginInfo has come.
  • The web clipboard. Not really a surprise, it's simple enough not to break. Cherry on the cake: now when you drag a picture or a snippet, the whole picture moves with your cursor. That really looks great and make drag'n drop very clear and easy to understand.
  • The blog editor. Still some bugs, but the basic functionality is there. Almost no work required!
  • The people sidebar. I'm really impressed. This is a big piece of code, but as soon as the service backend was fixed it just worked out-of-the-box. Everything seems to be working.
  • The star button. That one was easy. Mozilla is introducing a one-click bookmarking star button (just like the one we've been having in Flock for 2 years). So all I had to do is drop our own star, move Mozilla's one from the right to the left and theme it correctly. Tada! No online bookmark yet and it's not clear whether we'll stick with Firefox' behavior (that's not yet clearly defined anyway), but it's a start.

What's broken

  • The theme. I started to fix it, but there is still a lot of work to do. The background on toolbars is missing, tabs and the URL bar need to be styled...
  • Full text history indexing. Manish did some work on the Lucene level, and I started to migrate from the History RDF to Places. Not quite working yet.
  • The searchbar. I didn't look at it yet, but as you can see on the screenshot it's not pretty. Maybe it will just work after we fix the theme and the indexer?
  • Online bookmarks (Delicious, Magnolia). They do get synchronized locally but don't appear in the UI yet. With Places we're basically throwing away most of our UI favorites code, but we need to reinject the code related to online bookmarks in the Places UI.
  • Mediabar. It's pretty much busted. We've been using hacks and non-standard techniques more than in any other modules; I suspect that most of the breakages are due to things we were not supposed to do even in Firefox 2, and we may have to redesign some pieces to do it "the right way".
  • Notifications. I reverted that change because it was preventing the browser to start ("can't find the XBL for browser": hard to use it when the browser window doesn't appear!). Manish is going to take care of it, and that'll probably end up being a simple change.
I recommend to anyone coding on the Flock browser to have a look at Mozilla's page about porting extensions to Firefox 3. In particular, there are points about stuff that work in Firefox 2, but that we were not supposed to use and will stop working in Firefox 3. For exemple, event.preventBubble deprecated in favor of event.stopPropagation. If we start to be careful about these points in Flock's trunk, the migration to Firefox 3 will be much smoother. And if you want to play with a broken browser... Feel free to build the branch experimental/firefox3-merge. Flock on Firefox 3
TAGS: browser  firefox3  flock