Chromium Code Reviews| 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..ba63184f77a1e91398c79ea552e95288a6eb2646 100644 |
| --- a/chrome/browser/ui/find_bar/find_bar_controller.cc |
| +++ b/chrome/browser/ui/find_bar/find_bar_controller.cc |
| @@ -155,22 +155,13 @@ 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); |
| - } |
| - } |
| + // We hide the FindInPage window when the user reloads the page or |
|
msw
2014/09/08 18:16:55
nit: consider "Hide the find bar on reload or navi
Deepak
2014/09/09 03:56:06
Done.
|
| + // navigates away. |
| + if (find_bar_->IsFindBarVisible() && |
| + (content::PageTransitionStripQualifier(transition_type) == |
| + content::PAGE_TRANSITION_RELOAD || |
| + commit_details->is_navigation_to_different_page())) |
| + EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); |
| } |
| } |
| } |