Index: chrome/browser/ui/find_bar/find_bar_controller.cc |
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc |
index 713c3fa0984cbf5303fb1af640a47d0266e9b60c..5241fa4a190f10643968ddf671a14a8c696535b5 100644 |
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc |
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc |
@@ -155,22 +155,12 @@ void FindBarController::Observe(int type, |
content::Details<content::LoadCommittedDetails>(details).ptr(); |
content::PageTransition transition_type = |
commit_details->entry->GetTransitionType(); |
- // We hide the FindInPage window when the user navigates away, except on |
- // reload (and when clicking on anchors within web pages). |
- if (find_bar_->IsFindBarVisible()) { |
- if (content::PageTransitionStripQualifier(transition_type) != |
- content::PAGE_TRANSITION_RELOAD) { |
- // This is a new navigation (not reload), but we still don't want the |
- // Find box to disappear if the navigation is just to a fragment |
- // within the page. |
- if (commit_details->is_navigation_to_different_page()) |
- EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); |
- } else { |
- // On Reload we want to make sure FindNext is converted to a full Find |
- // to make sure highlights for inactive matches are repainted. |
- find_tab_helper->set_find_op_aborted(true); |
- } |
- } |
+ // Hide the find bar on reload or navigation. |
+ if (find_bar_->IsFindBarVisible() && |
+ (content::PageTransitionStripQualifier(transition_type) == |
+ content::PAGE_TRANSITION_RELOAD || |
+ commit_details->is_navigation_to_different_page())) |
+ EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); |
} |
} |
} |