Feed Handling:Pretty Printing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
GavinSharp (talk | contribs) mNo edit summary |
||
| Line 3: | Line 3: | ||
In order to implement a pretty print page for various types that contain RSS: | 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) | * 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 ([http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/uriloader/base/nsURILoader.cpp&rev=1.138&mark=740#711 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. | * 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. | * 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. | ||
Latest revision as of 23:29, 24 January 2006
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.