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..6cb2b6070fc9f3c09fd3572e075785c13b368a45 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 reload the page or |
|
Finnur
2014/09/04 16:00:45
Forgot one thing:
s/reload/reloads/
Deepak
2014/09/05 04:16:07
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); |
| } |
| } |
| } |