Chromium Code Reviews| 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 6455f6300308540d11a0cd5f6970fcd758c24bc8..b7aa8ab2f3949ff4e786ea76fa3034fe2f81bfea 100644 |
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| @@ -2571,6 +2571,24 @@ void WebLocalFrameImpl::ExtractSmartClipData(WebRect rect_in_viewport, |
| } |
| } |
| +void WebLocalFrameImpl::AdvanceFocusInForm(WebFocusType focusType) { |
| + if (!GetFrame()->GetDocument()) |
|
dcheng
2017/04/27 15:33:02
This check is unnecessary and should be a DCHECK i
AKVT
2017/05/03 14:35:12
Done.
|
| + return; |
| + |
| + Element* element = GetFrame()->GetDocument()->FocusedElement(); |
| + if (!element) |
| + return; |
| + |
| + Element* nextElement = |
| + GetFrame()->GetInputMethodController().NextFocusableElementInForm( |
| + element, focusType); |
| + if (!nextElement) |
| + return; |
| + |
| + nextElement->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); |
| + nextElement->focus(); |
| +} |
| + |
| TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
| return *text_checker_client_; |
| } |