Feed Handling:Pretty Printing: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
No 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 (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.  
- application/vnd.mozilla.maybe.feed returns a channel with content type set to xul.  
* application/vnd.mozilla.maybe.feed returns a channel with content type set to xul.  


"Promoting" channel in Stream converter:
"Promoting" channel in Stream converter:


1. onDataAvailable, decide it's a feed
# onDataAvailable, decide it's a feed
2. create a new channel for our chrome URI and open it
# create a new channel for our chrome URI and open it
3. onStartRequest for chrome channel, set URI back to original URI of feed
# onStartRequest for chrome channel, set URI back to original URI of feed
4. forward onStartRequest/onDataAvailable/onStopRequest on to the target docshell
# forward onStartRequest/onDataAvailable/onStopRequest on to the target docshell


This is very loose documentation, will be significantly refined as time goes on.
This is very loose documentation, will be significantly refined as time goes on.
525

edits

Navigation menu