[Webkit-unassigned] [Bug 32533] Add support to set input element's suggestion value from auto-complete menu
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 30 12:17:45 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32533
Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #45614|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #9 from Dimitri Glazkov (Google) <dglazkov at chromium.org> 2009-12-30 12:17:44 PST ---
(From update of attachment 45614)
Looks fine, except for nits below:
It looks like setInitialAutocompleteValue is only used in one place. Do we need
it as a separate method?
> +void AutocompletePopupMenuClient::setInitialAutocompleteValue()
> +{
> + if (!m_suggestions.size() || !m_textField->name().length())
> + return;
> + int newIndex = m_selectedIndex >= 0 ? m_selectedIndex : 0;
> + WebCore::String suggestion = m_suggestions[newIndex];
No need for namespace prefix here.
> + bool hasPreviousValue = m_lastFieldValues->contains(m_textField->name());
> + WebCore::String prevValue;
Ditto.
> + if (suggestion.length() > m_typedFieldValue.length()) {
> + newSuggestion.append(suggestion.characters() + m_typedFieldValue.length(),
> + suggestion.length() - m_typedFieldValue.length());
Since we're dealing w/UTF16 here, is this still valid for weird characters? I
am a UTF ignoramus, btw.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list