Index: third_party/WebKit/Source/core/editing/InputMethodController.cpp |
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp |
index c4e039d5220e16740a7d5bc8ae5457bf5c888c2d..41194054de3110a1ae5bfe1398fbf0a6332b955e 100644 |
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp |
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp |
@@ -45,6 +45,8 @@ |
#include "core/layout/LayoutObject.h" |
#include "core/layout/LayoutTheme.h" |
#include "core/page/ChromeClient.h" |
+#include "core/page/FocusController.h" |
+#include "core/page/Page.h" |
namespace blink { |
@@ -1134,6 +1136,20 @@ int InputMethodController::TextInputFlags() const { |
} |
} |
+ if (IsHTMLFormControlElement(element)) { |
+ if (GetDocument() |
+ .GetPage() |
+ ->GetFocusController() |
+ .NextFocusableElementInForm(element, kWebFocusTypeForward)) |
+ flags |= kWebTextInputFlagHaveNextFocusableElement; |
+ |
+ if (GetDocument() |
+ .GetPage() |
+ ->GetFocusController() |
+ .NextFocusableElementInForm(element, kWebFocusTypeBackward)) |
+ flags |= kWebTextInputFlagHavePreviousFocusableElement; |
+ } |
+ |
return flags; |
} |