diff options
author | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 08:20:17 +0000 |
---|---|---|
committer | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 08:20:17 +0000 |
commit | b80286215906c1bace028eace8176242ec873deb (patch) | |
tree | 33e0b83da08542a71ea47170c875165076fa4ce6 /chrome/common/render_messages_internal.h | |
parent | 291a8adf16a35fdf4ecddbd802bc4cc1f4575096 (diff) | |
download | chromium_src-b80286215906c1bace028eace8176242ec873deb.zip chromium_src-b80286215906c1bace028eace8176242ec873deb.tar.gz chromium_src-b80286215906c1bace028eace8176242ec873deb.tar.bz2 |
Consider a redirect following user gesture 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.
Review URL: http://codereview.chromium.org/115919
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_internal.h')
-rw-r--r-- | chrome/common/render_messages_internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 7984ebf..2ff6eec 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -687,6 +687,9 @@ IPC_BEGIN_MESSAGES(ViewHost) int32 /* page_id */, std::string /* state */) + // Notifies the browser that a document has been loaded in a frame. + IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentLoadedInFrame) + // Changes the title for the page in the UI when the page is navigated or the // title changes. // TODO(darin): use a UTF-8 string to reduce data size |