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

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

Issue 484653003: Fixed the inconsistent behavior when long pressing on editable area in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sending UpdateTextInputState() even if we don't want to show IME case also. Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 UpdateCompositionInfo(true); 1960 UpdateCompositionInfo(true);
1961 #endif 1961 #endif
1962 } 1962 }
1963 1963
1964 void RenderWidget::didHandleGestureEvent( 1964 void RenderWidget::didHandleGestureEvent(
1965 const WebGestureEvent& event, 1965 const WebGestureEvent& event,
1966 bool event_cancelled) { 1966 bool event_cancelled) {
1967 #if defined(OS_ANDROID) || defined(USE_AURA) 1967 #if defined(OS_ANDROID) || defined(USE_AURA)
1968 if (event_cancelled) 1968 if (event_cancelled)
1969 return; 1969 return;
1970 if (event.type == WebInputEvent::GestureTap || 1970 if (event.type == WebInputEvent::GestureTap) {
1971 event.type == WebInputEvent::GestureLongPress) {
1972 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME); 1971 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
1972 } else if (event.type == WebInputEvent::GestureLongPress) {
1973 blink::WebTextInputInfo new_info;
1974 if (webwidget_)
1975 new_info = webwidget_->textInputInfo();
jdduke (slow) 2014/08/19 18:19:49 Is there no other way of determining whether the i
AKVT 2014/08/20 15:00:43 As I checked the code, there is no other way we ca
jdduke (slow) 2014/08/20 15:37:05 I guess this is fine, but |didHandleGestureEvent|
jdduke (slow) 2014/08/20 15:37:49 is a WebWidgetClient *method* that is.
AKVT 2014/08/20 18:20:17 Done.
AKVT 2014/08/20 18:20:17 Done. Thanks
1976 if (!new_info.value.isEmpty())
1977 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
1978 else
1979 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
1973 } 1980 }
1974 #endif 1981 #endif
1975 } 1982 }
1976 1983
1977 void RenderWidget::StartCompositor() { 1984 void RenderWidget::StartCompositor() {
1978 // For widgets that are never visible, we don't need the compositor to run 1985 // For widgets that are never visible, we don't need the compositor to run
1979 // at all. 1986 // at all.
1980 if (never_visible_) 1987 if (never_visible_)
1981 return; 1988 return;
1982 compositor_->setSurfaceReady(); 1989 compositor_->setSurfaceReady();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2163 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2157 video_hole_frames_.AddObserver(frame); 2164 video_hole_frames_.AddObserver(frame);
2158 } 2165 }
2159 2166
2160 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2167 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2161 video_hole_frames_.RemoveObserver(frame); 2168 video_hole_frames_.RemoveObserver(frame);
2162 } 2169 }
2163 #endif // defined(VIDEO_HOLE) 2170 #endif // defined(VIDEO_HOLE)
2164 2171
2165 } // namespace content 2172 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698