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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 2019373002: Fix page transition qualifiers not masked out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added one more occurrence. Created 4 years, 7 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
Index: chrome/browser/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index dc1b63d5894da6a962bdc0c92b6bca16b24ad31c..f0b3bfbe25e7e7bfe0fc5b37bc3a442f82de6f8d 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -39,7 +39,7 @@ namespace {
// forgotten. This is generally any navigation that isn't a link click (i.e.
// any navigation that can be considered to be the start of a new task distinct
// from what had previously occurred in that tab).
-bool ShouldForgetOpenersForTransition(ui::PageTransition transition) {
+bool ShouldForgetOpenersForBaseTransition(ui::PageTransition transition) {
return transition == ui::PAGE_TRANSITION_TYPED ||
transition == ui::PAGE_TRANSITION_AUTO_BOOKMARK ||
transition == ui::PAGE_TRANSITION_GENERATED ||
@@ -585,7 +585,8 @@ int TabStripModel::GetIndexOfLastWebContentsOpenedBy(const WebContents* opener,
void TabStripModel::TabNavigating(WebContents* contents,
ui::PageTransition transition) {
- if (ShouldForgetOpenersForTransition(transition)) {
+ if (ShouldForgetOpenersForBaseTransition(
+ ui::PageTransitionStripQualifier(transition))) {
// Don't forget the openers if this tab is a New Tab page opened at the
// end of the TabStrip (e.g. by pressing Ctrl+T). Give the user one
// navigation of one of these transition types before resetting the
« no previous file with comments | « chrome/browser/ui/search/instant_search_prerenderer.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_order_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698