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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 2942013002: [omnibox] Constrain 'IsSelectAll()' to be more accurate (Closed)
Patch Set: Missed a fix Created 3 years, 6 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 | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index d50af54bbbb597c135d96fa60b1c60c741434e6d..08d0278b1be752cf8fc1e4982fec8d5f4210f712 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -435,7 +435,7 @@ void OmniboxViewViews::SetCaretPos(size_t caret_pos) {
bool OmniboxViewViews::IsSelectAll() const {
// TODO(oshima): IME support.
- return text() == GetSelectedText();
+ return !text().empty() && text() == GetSelectedText();
}
bool OmniboxViewViews::DeleteAtEndPressed() {
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698