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

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

Issue 2571583008: Support tracking focused element for OOPIFs. (Closed)
Patch Set: Do not call ScrollFocusedEditableNodeIntoRect for OOPIFs. Created 3 years, 12 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
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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 return; 2108 return;
2109 if (event.type == WebInputEvent::GestureTap) { 2109 if (event.type == WebInputEvent::GestureTap) {
2110 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); 2110 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME);
2111 } else if (event.type == WebInputEvent::GestureLongPress) { 2111 } else if (event.type == WebInputEvent::GestureLongPress) {
2112 DCHECK(GetWebWidget()); 2112 DCHECK(GetWebWidget());
2113 if (GetWebWidget()->textInputInfo().value.isEmpty()) 2113 if (GetWebWidget()->textInputInfo().value.isEmpty())
2114 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); 2114 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
2115 else 2115 else
2116 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); 2116 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME);
2117 } 2117 }
2118 // TODO(ananta): Piggyback off existing IPCs to communicate this information,
2119 // crbug/420130.
2120 #if defined(OS_WIN)
2121 if (event.type != blink::WebGestureEvent::GestureTap)
2122 return;
2123
2124 // TODO(estade): hit test the event against focused node to make sure
2125 // the tap actually hit the focused node.
2126 blink::WebTextInputType text_input_type = GetWebWidget()->textInputType();
2127
2128 Send(new ViewHostMsg_FocusedNodeTouched(
2129 routing_id_, text_input_type != blink::WebTextInputTypeNone));
2130 #endif
2118 #endif 2131 #endif
2119 } 2132 }
2120 2133
2121 void RenderWidget::didOverscroll( 2134 void RenderWidget::didOverscroll(
2122 const blink::WebFloatSize& overscrollDelta, 2135 const blink::WebFloatSize& overscrollDelta,
2123 const blink::WebFloatSize& accumulatedOverscroll, 2136 const blink::WebFloatSize& accumulatedOverscroll,
2124 const blink::WebFloatPoint& position, 2137 const blink::WebFloatPoint& position,
2125 const blink::WebFloatSize& velocity) { 2138 const blink::WebFloatSize& velocity) {
2126 #if defined(OS_MACOSX) 2139 #if defined(OS_MACOSX)
2127 // On OSX the user can disable the elastic overscroll effect. If that's the 2140 // On OSX the user can disable the elastic overscroll effect. If that's the
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 // browser side (https://crbug.com/669219). 2254 // browser side (https://crbug.com/669219).
2242 // If there is no WebFrameWidget, then there will be no 2255 // If there is no WebFrameWidget, then there will be no
2243 // InputMethodControllers for a WebLocalFrame. 2256 // InputMethodControllers for a WebLocalFrame.
2244 return nullptr; 2257 return nullptr;
2245 } 2258 }
2246 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2259 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2247 ->getActiveWebInputMethodController(); 2260 ->getActiveWebInputMethodController();
2248 } 2261 }
2249 2262
2250 } // namespace content 2263 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698