Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6685)

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 6284002: Fix a ChromeFrame Back Forward navigation issue which occurs when we modify t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_active_document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_active_document.cc
===================================================================
--- chrome_frame/chrome_active_document.cc (revision 71338)
+++ chrome_frame/chrome_active_document.cc (working copy)
@@ -33,6 +33,7 @@
#include "grit/generated_resources.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/navigation_types.h"
#include "chrome/common/page_zoom.h"
@@ -627,7 +628,7 @@
<< ", Relative Offset: " << nav_info.relative_offset
<< ", Index: " << nav_info.navigation_index;
- UpdateNavigationState(nav_info);
+ UpdateNavigationState(nav_info, flags);
}
void ChromeActiveDocument::OnUpdateTargetUrl(
@@ -692,7 +693,7 @@
return;
}
- UpdateNavigationState(nav_info);
+ UpdateNavigationState(nav_info, 0);
}
void ChromeActiveDocument::OnCloseTab() {
@@ -707,7 +708,7 @@
}
void ChromeActiveDocument::UpdateNavigationState(
- const NavigationInfo& new_navigation_info) {
+ const NavigationInfo& new_navigation_info, int flags) {
HRESULT hr = S_OK;
bool is_title_changed = (navigation_info_.title != new_navigation_info.title);
bool is_ssl_state_changed =
@@ -754,7 +755,7 @@
cf_url.attach_to_external_tab();
bool is_internal_navigation =
- IsNewNavigation(new_navigation_info) || is_attach_external_tab_url;
+ IsNewNavigation(new_navigation_info, flags) || is_attach_external_tab_url;
if (new_navigation_info.url.is_valid())
url_.Allocate(UTF8ToWide(new_navigation_info.url.spec()).c_str());
@@ -1364,14 +1365,20 @@
}
bool ChromeActiveDocument::IsNewNavigation(
- const NavigationInfo& new_navigation_info) const {
+ const NavigationInfo& new_navigation_info, int flags) const {
// A new navigation is typically an internal navigation which is initiated by
// the renderer(WebKit). Condition 1 below has to be true along with the
// any of the other conditions below.
- // 1. The navigation index is greater than 0 which means that a top level
+ // 1. The navigation notification flags passed in as the flags parameter
+ // is not INVALIDATE_LOAD which indicates that the loading state of the
+ // tab changed.
+ // 2. The navigation index is greater than 0 which means that a top level
// navigation was initiated on the current external tab.
- // 2. The navigation type has changed.
- // 3. The url or the referrer are different.
+ // 3. The navigation type has changed.
+ // 4. The url or the referrer are different.
+ if (flags == TabContents::INVALIDATE_LOAD)
+ return false;
+
if (new_navigation_info.navigation_index <= 0)
return false;
« no previous file with comments | « chrome_frame/chrome_active_document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698