bool WebEditorClient::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event) { if (!is<HTMLInputElement>(*element)) return false; WKInputFieldActionType actionType = static_cast<WKInputFieldActionType>(0); if (!getActionTypeForKeyEvent(event, actionType)) return false; WebFrame* webFrame = WebFrame::fromCoreFrame(*element->document().frame()); ASSERT(webFrame); return m_page->injectedBundleFormClient().shouldPerformActionInTextField(m_page, downcast<HTMLInputElement>(element), toInputFieldAction(actionType), webFrame); }
void WebEditorClient::textWillBeDeletedInTextField(Element* element) { if (!is<HTMLInputElement>(*element)) return; WebFrame* webFrame = WebFrame::fromCoreFrame(*element->document().frame()); ASSERT(webFrame); m_page->injectedBundleFormClient().shouldPerformActionInTextField(m_page, downcast<HTMLInputElement>(element), toInputFieldAction(WKInputFieldActionTypeInsertDelete), webFrame); }
void WebEditorClient::textWillBeDeletedInTextField(Element* element) { if (!isHTMLInputElement(element)) return; WebFrame* webFrame = WebFrame::fromCoreFrame(*element->document().frame()); ASSERT(webFrame); #if ENABLE(INJECT_BUNDLE) m_page->injectedBundleFormClient().shouldPerformActionInTextField(m_page, toHTMLInputElement(element), toInputFieldAction(WKInputFieldActionTypeInsertDelete), webFrame); #endif }