void ChromeClientImpl::handleKeyboardEventOnTextField( HTMLInputElement& inputElement, KeyboardEvent& event) { WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(inputElement.document().frame()); if (webframe->autofillClient()) webframe->autofillClient()->textFieldDidReceiveKeyDown( WebInputElement(&inputElement), WebKeyboardEventBuilder(event)); }
void WebDevToolsAgentImpl::dispatchKeyEvent(const PlatformKeyboardEvent& event) { m_generatingEvent = true; WebKeyboardEvent webEvent = WebKeyboardEventBuilder(event); if (!webEvent.keyIdentifier[0] && webEvent.type != WebInputEvent::Char) webEvent.setKeyIdentifierFromWindowsKeyCode(); m_webViewImpl->handleInputEvent(webEvent); m_generatingEvent = false; }
bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event) { if (m_webView->autofillClient() && element->hasTagName(HTMLNames::inputTag)) { m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(toHTMLInputElement(element)), WebKeyboardEventBuilder(*event)); } // The Mac code appears to use this method as a hook to implement special // keyboard commands specific to Safari's auto-fill implementation. We // just return false to allow the default action. return false; }
bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event) { HTMLInputElement* inputElement = toHTMLInputElement(element); if (m_webView->autoFillClient() && inputElement) { m_webView->autoFillClient()->textFieldDidReceiveKeyDown(WebInputElement(inputElement), WebKeyboardEventBuilder(*event)); } // Remember if backspace was pressed for the autofill. It is not clear how to // find if backspace was pressed from textFieldDidBeginEditing and // textDidChangeInTextField as when these methods are called the value of the // input element already contains the type character. m_backspaceOrDeletePressed = event->keyCode() == VKEY_BACK || event->keyCode() == VKEY_DELETE; // The Mac code appears to use this method as a hook to implement special // keyboard commands specific to Safari's auto-fill implementation. We // just return false to allow the default action. return false; }
void ChromeClientImpl::handleKeyboardEventOnTextField(HTMLInputElement& inputElement, KeyboardEvent& event) { if (!m_webView->autofillClient()) return; m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inputElement), WebKeyboardEventBuilder(event)); }