Feed Handling:Pretty Printing
From MozillaWiki
Notes from discussion with bz on #developers:
In order to implement a pretty print page for various types that contain RSS:
- fix uri loader bug: if isPreferred requested a conversion we should assume it wants to handle the type and not try redispatching again, which is what it does now (nsURILoader.cpp,740)
- in browser code, answer isPreferred appropriately. Fix bug with nsBrowserContentListener, make sure it gets attached and implements isPrefered in terms of canHandleContent instead of having a fixed list.
- content listener registers self as a stream converter for various rss types to either the original type or application/vnd.mozilla.maybe.feed depending on whether or not the parse succeeds.
- application/vnd.mozilla.maybe.feed returns a channel with content type set to xul.
"Promoting" channel in Stream converter:
- onDataAvailable, decide it's a feed
- create a new channel for our chrome URI and open it
- onStartRequest for chrome channel, set URI back to original URI of feed
- forward onStartRequest/onDataAvailable/onStopRequest on to the target docshell
This is very loose documentation, will be significantly refined as time goes on.