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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 59553003: Do not show IME on every touchend event when input field has focus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2nd approach with focus() Created 7 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 selection_text_.clear(); 2612 selection_text_.clear();
2613 2613
2614 // UpdateTextInputType should be called before SyncSelectionIfRequired. 2614 // UpdateTextInputType should be called before SyncSelectionIfRequired.
2615 // UpdateTextInputType may send TextInputTypeChanged to notify the focus 2615 // UpdateTextInputType may send TextInputTypeChanged to notify the focus
2616 // was changed, and SyncSelectionIfRequired may send SelectionChanged 2616 // was changed, and SyncSelectionIfRequired may send SelectionChanged
2617 // to notify the selection was changed. Focus change should be notified 2617 // to notify the selection was changed. Focus change should be notified
2618 // before selection change. 2618 // before selection change.
2619 UpdateTextInputType(); 2619 UpdateTextInputType();
2620 SyncSelectionIfRequired(); 2620 SyncSelectionIfRequired();
2621 #if defined(OS_ANDROID) 2621 #if defined(OS_ANDROID)
2622 UpdateTextInputState(false, true); 2622 UpdateTextInputState(true, true);
aurimas (slooooooooow) 2013/12/02 23:15:05 Selection change is not the same as focus(), this
2623 #endif 2623 #endif
2624 } 2624 }
2625 2625
2626 void RenderViewImpl::didExecuteCommand(const WebString& command_name) { 2626 void RenderViewImpl::didExecuteCommand(const WebString& command_name) {
2627 const std::string& name = UTF16ToUTF8(command_name); 2627 const std::string& name = UTF16ToUTF8(command_name);
2628 if (StartsWithASCII(name, "Move", true) || 2628 if (StartsWithASCII(name, "Move", true) ||
2629 StartsWithASCII(name, "Insert", true) || 2629 StartsWithASCII(name, "Insert", true) ||
2630 StartsWithASCII(name, "Delete", true)) 2630 StartsWithASCII(name, "Delete", true))
2631 return; 2631 return;
2632 RenderThreadImpl::current()->RecordUserMetrics(name); 2632 RenderThreadImpl::current()->RecordUserMetrics(name);
(...skipping 4050 matching lines...) Expand 10 before | Expand all | Expand 10 after
6683 for (size_t i = 0; i < icon_urls.size(); i++) { 6683 for (size_t i = 0; i < icon_urls.size(); i++) {
6684 WebURL url = icon_urls[i].iconURL(); 6684 WebURL url = icon_urls[i].iconURL();
6685 if (!url.isEmpty()) 6685 if (!url.isEmpty())
6686 urls.push_back(FaviconURL(url, 6686 urls.push_back(FaviconURL(url,
6687 ToFaviconType(icon_urls[i].iconType()))); 6687 ToFaviconType(icon_urls[i].iconType())));
6688 } 6688 }
6689 SendUpdateFaviconURL(urls); 6689 SendUpdateFaviconURL(urls);
6690 } 6690 }
6691 6691
6692 } // namespace content 6692 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698