Changes

Jump to: navigation, search

Browser History:Redirects

7 bytes removed, 20:37, 15 December 2005
Proposal
Add a virtual function to nsDocLoader "OnRedirectStateChange". This function would be called manually from OnChannelRedirect will full information on the source and destionation channels. DocShell will provide an implementation of this function, and we can move the redirect handling code from OnStateChange to there.
This We could add a new redirect function to the existing nsIGlobalHistory2 or add it in a new interface nsIGlobalhistory3. Adding to the existing interface is cleaner, but would attempt force embedders to QueryInterface the global update their history to a code. A new interface we define could be optional (letdocshell would fall back on AddURI if history didn's call it t QI to nsIGlobalHistory3 for now). If unsuccessful, it so embedders would revert not have to calling the old nsIGlobalHistory2.AddURI. Otherwisechange, but it would call nsIGlobalHistory3.AddURIFrom and give it information about the redirect and a pointer make history more difficult to the docshellunderstand.
The "regular" calls to AddURI docshell would also be changed extended to use support nsIWritablePropertyBag. When the history system gets visit notifications, it can store necessary state on the docshell (probably just a 64-bit visit ID number). This way, it can associate a given page visit as coming from a specific docshell, and know which specific page visit it came from, even if the new AddURIFrom functionsame document is open in more than one docshell.
The docshell will be extended to support nsIWritablePropertyBagGlobal history would maintain queues of URLs for typed and bookmarked flags. When the history system gets visit notificationsnew URLs come through that have no referrer, it can store necessary state on would check these queues to see if the docshell (probably just a 64-bit visit ID number)URL had either of these flags set. This wayrequires no changes to non-history system code, but it can associate a given page visit as coming from a specific docshellcould be confused in some unusual cases (for example, if the user types and and know which specific page visit it came from, even if follows a bookmark in quick succession for the same document URL). The side effect of getting it wrong is open in more than one docshellvery minor.
Global history would maintain queues Review of URLs for typed and bookmarked flags. When new URLs come through that have no referrer, it would check these queues to see if the URL had either of these flags set. This requires no changes to non-history system in docshell code, but it could be confused in some unusual cases (for examples, if the user types and and follows a bookmark in quick succession for the same URL). The side effect of getting it wrong is very minor.:
Review of changes in old code: * New nsIGlobalHistory3 interface defined in docshell/base OR or add to nsiGlobalHistory3.
* New virtual function OnRedirectStateChange in docloader.
202
edits

Navigation menu