From f05b935882198ccf7d81675736e3aeb089c5113a Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 5 May 2011 14:36:32 +0100 Subject: Merge WebKit at r74534: Initial merge by git. Change-Id: I6ccd1154fa1b19c2ec2a66878eb675738735f1eb --- WebKit/chromium/src/AutoFillPopupMenuClient.cpp | 45 ++++++++----------------- 1 file changed, 14 insertions(+), 31 deletions(-) (limited to 'WebKit/chromium/src/AutoFillPopupMenuClient.cpp') diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp index 32abd6f..704ba69 100644 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp +++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp @@ -51,7 +51,6 @@ AutoFillPopupMenuClient::AutoFillPopupMenuClient() : m_separatorIndex(-1) , m_selectedIndex(-1) , m_textField(0) - , m_AutocompleteModeEnabled(false) { } @@ -123,36 +122,20 @@ bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex) void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents) { - // DEPRECATED: Will be removed once AutoFill and Autocomplete merge is - // completed. - if (m_AutocompleteModeEnabled) { - m_textField->setValue(getSuggestion(listIndex)); - - WebViewImpl* webView = getWebView(); - if (!webView) - return; - - EditorClientImpl* editor = - static_cast(webView->page()->editorClient()); - ASSERT(editor); - editor->onAutocompleteSuggestionAccepted( - static_cast(m_textField.get())); - } else { - WebViewImpl* webView = getWebView(); - if (!webView) - return; - - if (m_separatorIndex != -1 && listIndex > static_cast(m_separatorIndex)) - --listIndex; - - ASSERT(listIndex < m_names.size()); - - webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()), - m_names[listIndex], - m_labels[listIndex], - m_uniqueIDs[listIndex], - listIndex); - } + WebViewImpl* webView = getWebView(); + if (!webView) + return; + + if (m_separatorIndex != -1 && listIndex > static_cast(m_separatorIndex)) + --listIndex; + + ASSERT(listIndex < m_names.size()); + + webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()), + m_names[listIndex], + m_labels[listIndex], + m_uniqueIDs[listIndex], + listIndex); } void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents) -- cgit v1.1