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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2839993002: [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index cfffa16ef8bdef43e5d75dfa52a346acd4d5d471..9706d77eee93fee515cad2a11807eab8c7e9368c 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2900,6 +2900,23 @@ void WebViewImpl::advanceFocus(bool reverse) {
: WebFocusTypeForward);
}
+void WebViewImpl::advanceFocusInForm(WebFocusType focusType) {
+ Element* element = focusedElement();
+ if (!element)
+ return;
+
+ LocalFrame* focusedFrame = focusedLocalFrameInWidget();
EhsanK 2017/04/25 22:43:08 I may not be understanding the patch correctly but
AKVT 2017/04/26 10:33:04 Could you help me to find an example in this file
EhsanK 2017/04/26 21:31:59 New changes in RenderFrameImpl and WebLocalFrame l
+ if (focusedFrame) {
+ Element* nextElement =
+ focusedFrame->inputMethodController().nextFocusableElementInForm(
+ element, focusType);
+ if (!nextElement)
+ return;
+ nextElement->scrollIntoViewIfNeeded(true /*centerIfNeeded*/);
+ nextElement->focus();
+ }
+}
+
void WebViewImpl::advanceFocusAcrossFrames(WebFocusType type,
WebRemoteFrame* from,
WebLocalFrame* to) {

Powered by Google App Engine
This is Rietveld 408576698