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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 21544005: Take the navigation type into account when checking if the navigation is in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 152eceb6e4b3ed7fc238f64250fb1bfd54c9d7e6..7611f57a00217e223bcceabf77830eecf082f38a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2685,7 +2685,13 @@ void WebContentsImpl::DidNavigateMainFramePostCommit(
UpdateTargetURL(details.entry->GetPageID(), GURL());
}
- if (!details.is_in_page) {
+ // When navigating back from a ref URL to the top non ref one is_in_page
+ // is false even the navigation is in fact in page
abarth-chromium 2013/08/01 20:48:32 Should we fix that?
+ // (see AreURLsInPageNavigation()). In order to not clear
+ // the displayed_insecure_content_ flag too eagerly check the navigation type
+ // as well.
+ if (!details.is_in_page &&
+ details.type != content::NAVIGATION_TYPE_IN_PAGE) {
// Once the main frame is navigated, we're no longer considered to have
// displayed insecure content.
displayed_insecure_content_ = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698