DescriptionConsider an immediate redirect as machine-initiated and slow one as
user-initiated in maintaining navigation entries.
Also, ignore redirect- or machine-initiated- new subframe navigations.
The current code treats all redirects as machine-initiated in processing
navigation to a new page (to fix Bugs 9663 and 10531). This is not always
appropriate, because some sites, e.g., www.google.com/ig, use redirect to
implement user-initiated navigation (Bug 11896).
This change assumes that a machine-initiated redirect happens within 300ms
since the last document load was completed, while a user-initiated one
happens later.
This assumption is not always correct, e.g., a user may cause transition within
300ms. But I cannot think of any better ways to tell if a redirect is machine-
initiated or user-initiated.
I believe this change works good enough, at least better than the status quo.
TEST=Open http://www.hp.com and observe it redirects to
http://www.hp.com/#Product . Hit Back button and observe
the former URL is not visited. Open http://www.google.com/ig and
click tabs inside the page, and try hitting Back and Forward to see if the
navigation is right. Open http://www.google.com/codesearch, search for
something, click on a result item, and try hitting Back.
BUG=11896, 12820
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #Patch Set 6 : '' #Patch Set 7 : '' #Patch Set 8 : '' #Patch Set 9 : '' #Patch Set 10 : '' #Messages
Total messages: 12 (0 generated)
|