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..1ccf8cea1983aac672b58c06927917756c32ec2b 100644 |
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc |
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc |
@@ -155,20 +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). |
+ // We hide the FindInPage window when the user reload the page or |
+ // navigates away. |
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); |
+ if (content::PageTransitionStripQualifier(transition_type) == |
Finnur
2014/09/04 12:45:10
We prefer:
if (x && (y || z))
... over ...
if (
Deepak
2014/09/04 13:18:14
Done.
|
+ content::PAGE_TRANSITION_RELOAD || |
+ commit_details->is_navigation_to_different_page()) { |
+ EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); |
} |
Finnur
2014/09/04 12:45:10
nit: We don't use braces around one-line if bodies
Deepak
2014/09/04 13:18:14
Done.
|
} |
} |