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

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

Issue 2839993002: [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Fixed WebViewTest build issues after restructure. 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/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 3fd94369096424bff50b582ab74c1e7b3eeaa6f4..65888dce7179abc8b6edf61bb498df2d3aef4b43 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -2522,6 +2522,24 @@ void WebLocalFrameImpl::extractSmartClipData(WebRect rectInViewport,
}
}
+void WebLocalFrameImpl::advanceFocusInForm(WebFocusType focusType) {
+ if (!frame()->document())
+ return;
+
+ Element* element = frame()->document()->focusedElement();
+ if (!element)
+ return;
+
+ Element* nextElement =
+ frame()->inputMethodController().nextFocusableElementInForm(
+ element, focusType);
+ if (!nextElement)
+ return;
+
+ nextElement->scrollIntoViewIfNeeded(true /*centerIfNeeded*/);
+ nextElement->focus();
+}
+
TextCheckerClient& WebLocalFrameImpl::textCheckerClient() const {
return *m_textCheckerClient;
}

Powered by Google App Engine
This is Rietveld 408576698