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

Unified Diff: chrome/browser/ui/views/find_bar_host.cc

Issue 1785033004: Disable Find-In-Page buttons when no text is entered (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_host.cc
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 283d963c919ac76b1c404f675c0288fadc9a01ee..a3fde9eca25b946edf4291784778e5368a86d8ea 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -141,12 +141,10 @@ gfx::Range FindBarHost::GetSelectedRange() {
void FindBarHost::UpdateUIForFindResult(const FindNotificationDetails& result,
const base::string16& find_text) {
- // Make sure match count is clear. It may get set again in UpdateForResult
- // if enough data is available.
- find_bar_view()->ClearMatchCount();
-
if (!find_text.empty())
find_bar_view()->UpdateForResult(result, find_text);
+ else
+ find_bar_view()->ClearMatchCount();
msw 2016/03/14 17:30:10 AFAICT, the regression was just from FindBarView::
Mario Pistrich 2016/03/14 17:52:46 Reverting only the change of && -> || would reintr
msw 2016/03/14 18:10:32 Okay, that's reasonable; thanks for the fix and ex
// We now need to check if the window is obscuring the search results.
MoveWindowIfNecessary(result.selection_rect());
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698