| Index: Source/web/ChromeClientImpl.cpp
|
| diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
|
| index 9890f9f148f9a4c3f33ab7de80d928541f249f42..298694681b113bee98a2c1dff6070f445d9099c1 100644
|
| --- a/Source/web/ChromeClientImpl.cpp
|
| +++ b/Source/web/ChromeClientImpl.cpp
|
| @@ -52,6 +52,7 @@
|
| #include "WebFrameImpl.h"
|
| #include "WebInputElement.h"
|
| #include "WebInputEvent.h"
|
| +#include "WebInputEventConversion.h"
|
| #include "WebKit.h"
|
| #include "WebNode.h"
|
| #include "WebPasswordGeneratorClient.h"
|
| @@ -983,6 +984,38 @@ void ChromeClientImpl::didAssociateFormControls(const Vector<RefPtr<Element> >&
|
| m_webView->autofillClient()->didAssociateFormControls(elementVector);
|
| }
|
|
|
| +bool ChromeClientImpl::doTextFieldCommandFromEvent(HTMLInputElement* inputElement, KeyboardEvent* event)
|
| +{
|
| + if (!m_webView->autofillClient())
|
| + return false;
|
| +
|
| + m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(inputElement), 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;
|
| +}
|
| +
|
| +void ChromeClientImpl::textDidChangeInTextField(HTMLInputElement* inputElement)
|
| +{
|
| + if (!m_webView->autofillClient())
|
| + return;
|
| + m_webView->autofillClient()->textFieldDidChange(WebInputElement(inputElement));
|
| +}
|
| +
|
| +void ChromeClientImpl::textFieldDidEndEditing(HTMLInputElement* inputElement)
|
| +{
|
| + if (m_webView->autofillClient())
|
| + m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(inputElement));
|
| +
|
| + // Notification that focus was lost. Be careful with this, it's also sent
|
| + // when the page is being closed.
|
| +
|
| + // Hide any showing popup.
|
| + m_webView->hideAutofillPopup();
|
| +}
|
| +
|
| #if ENABLE(NAVIGATOR_CONTENT_UTILS)
|
| PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(WebViewImpl* webView)
|
| {
|
|
|