[BlackBerry] Add end editing handling into AutofillManager

https://bugs.webkit.org/show_bug.cgi?id=88071

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-06-01
Reviewed by Rob Buis.

RIM PR: 160857
Implemented EditorClientBlackBerry::textFieldDidEndEditing
to notify AutofillManager to send the dismissing autofill
dialog notification to webpage client.

No new tests since there is no behavior changes.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::notifyDismissAutofillDialog):
(WebKit):
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/AutofillManager.cpp:
(WebCore::AutofillManager::textFieldDidEndEditing):
(WebCore):
* WebCoreSupport/AutofillManager.h:
(AutofillManager):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::textFieldDidEndEditing):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5222dd8a
......@@ -2181,6 +2181,11 @@ void WebPagePrivate::notifyPopupAutofillDialog(const Vector<String>& candidates,
m_client->notifyPopupAutofillDialog(textItems, screenRect);
}
void WebPagePrivate::notifyDismissAutofillDialog()
{
m_client->notifyDismissAutofillDialog();
}
bool WebPagePrivate::useFixedLayout() const
{
return true;
......
......@@ -210,6 +210,7 @@ public:
virtual bool authenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0;
virtual SaveCredentialType notifyShouldSaveCredential(bool isNew) = 0;
virtual void notifyPopupAutofillDialog(const std::vector<std::string>&, const Platform::IntRect&) = 0;
virtual void notifyDismissAutofillDialog() = 0;
virtual bool shouldPluginEnterFullScreen() = 0;
virtual void didPluginEnterFullScreen() = 0;
......
......@@ -202,6 +202,7 @@ public:
void layoutFinished();
void setNeedTouchEvents(bool);
void notifyPopupAutofillDialog(const Vector<String>&, const WebCore::IntRect&);
void notifyDismissAutofillDialog();
// Called according to our heuristic or from setLoadState depending on whether we have a virtual viewport.
void zoomToInitialScaleOnLoad();
......
2012-06-01 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] Add end editing handling into AutofillManager
https://bugs.webkit.org/show_bug.cgi?id=88071
Reviewed by Rob Buis.
RIM PR: 160857
Implemented EditorClientBlackBerry::textFieldDidEndEditing
to notify AutofillManager to send the dismissing autofill
dialog notification to webpage client.
No new tests since there is no behavior changes.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::notifyDismissAutofillDialog):
(WebKit):
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/AutofillManager.cpp:
(WebCore::AutofillManager::textFieldDidEndEditing):
(WebCore):
* WebCoreSupport/AutofillManager.h:
(AutofillManager):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
2012-05-31 Jacky Jiang <zhajiang@rim.com>
[BlackBerry] Bridge Apps - Apps do not redraw correctly after orientation change
......
......@@ -51,6 +51,11 @@ void AutofillManager::didChangeInTextField(HTMLInputElement* element)
m_webPagePrivate->notifyPopupAutofillDialog(candidates, element->screenRect());
}
void AutofillManager::textFieldDidEndEditing(HTMLInputElement*)
{
m_webPagePrivate->notifyDismissAutofillDialog();
}
void AutofillManager::autofillTextField(const String& value)
{
if (!m_element)
......
......@@ -41,6 +41,7 @@ public:
static PassRefPtr<AutofillManager> create(BlackBerry::WebKit::WebPagePrivate*);
void didChangeInTextField(HTMLInputElement*);
void textFieldDidEndEditing(HTMLInputElement*);
void autofillTextField(const WTF::String&);
void saveTextFields(HTMLFormElement*);
......
......@@ -507,9 +507,10 @@ void EditorClientBlackBerry::textFieldDidBeginEditing(Element*)
notImplemented();
}
void EditorClientBlackBerry::textFieldDidEndEditing(Element*)
void EditorClientBlackBerry::textFieldDidEndEditing(Element* element)
{
notImplemented();
if (HTMLInputElement* inputElement = element->toInputElement())
m_webPagePrivate->m_autofillManager->textFieldDidEndEditing(inputElement);
}
void EditorClientBlackBerry::textDidChangeInTextField(Element* element)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment