Introduce MenuItemID to autofill popup
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 05:21:58 +0000 (05:21 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 05:21:58 +0000 (05:21 +0000)
commit8f858c80f8c714f1ad6b20f4313de8c262efa16f
treeeecc63a0b31cf8973f686a023e24416a36baabd2
parent63f89c64ff2e2d982d95f1e56111d75d63207296
Introduce MenuItemID to autofill popup
https://bugs.webkit.org/show_bug.cgi?id=83777

Introducing MenuItemIDs because we want to add multiple separators and
need to identify non-autofill menu items without resorting to the separator position.

Reviewed by Kent Tamura.

* public/WebAutofillClient.h:
(WebKit::WebAutofillClient::didAcceptAutofillSuggestion): Changed uniqueID to itemID because they aren't unique.
(WebKit::WebAutofillClient::didSelectAutofillSuggestion):
* public/WebView.h:
(WebView):
* src/AutofillPopupMenuClient.cpp:
(WebKit::AutofillPopupMenuClient::AutofillPopupMenuClient):
(WebKit::AutofillPopupMenuClient::getSuggestionsCount):
(WebKit::AutofillPopupMenuClient::getSuggestion):
(WebKit::AutofillPopupMenuClient::getLabel):
(WebKit::AutofillPopupMenuClient::getIcon):
(WebKit::AutofillPopupMenuClient::removeSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::canRemoveSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::valueChanged):
(WebKit::AutofillPopupMenuClient::selectionChanged):
(WebKit::AutofillPopupMenuClient::itemIsSeparator):
(WebKit::AutofillPopupMenuClient::itemIsWarning):
(WebKit::AutofillPopupMenuClient::initialize):
(WebKit::AutofillPopupMenuClient::setSuggestions):
* src/AutofillPopupMenuClient.h:  Removed m_separatorIndex because now we use itemID to identify separators.
Added m_useLegacyBehavior which is true when it is initialized with a valid separator index. This is to keep
the autofill working even when the chromium side hasn't been updated yet.
(AutofillPopupMenuClient):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::applyAutofillSuggestions):
* src/WebViewImpl.h:
(WebViewImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebAutofillClient.h
Source/WebKit/chromium/public/WebView.h
Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp
Source/WebKit/chromium/src/AutofillPopupMenuClient.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h