[Webkit-unassigned] [Bug 60010] [Chromium]Add clear_autofill flag to hide autofill popup without clear field.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 2 23:32:31 PDT 2011


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





--- Comment #4 from Naoki Takano <takano.naoki at gmail.com>  2011-05-02 23:32:31 PST ---
If you say "Accept" means choosing item in autofill popup with keyboard, for example, the following function is called.

1061 void PopupListBox::acceptIndex(int index)
1062 {
1063     // Clear m_acceptedIndexOnAbandon once user accepts the selected index.
1064     if (m_acceptedIndexOnAbandon >= 0)
1065         m_acceptedIndexOnAbandon = -1;
1066 
1067     if (index >= numItems())
1068         return;
1069 
1070     if (index < 0) {
1071         if (m_popupClient) {
1072             // Enter pressed with no selection, just close the popup.
1073             hidePopup();
1074         }
1075         return;
1076     }
1077 
1078     if (isSelectableItem(index)) {
1079         RefPtr<PopupListBox> keepAlive(this);
1080 
1081         // Hide ourselves first since valueChanged may have numerous side-effects.
1082         hidePopup();
1083 
1084         // Tell the <select> PopupMenuClient what index was selected.
1085         m_popupClient->valueChanged(index);
1086     }
1087 }

But, as you know, hidePopup() is the same function which I try to call from startDragging and then the function calls m_popupClient->valueChanged(index); here.

Actually valueChange() calls didAcceptAutoFillSuggestion() internally, if we follow the same way as this, we have to call didAcceptAutoFillSuggestion().

But didAcceptAutoFillSuggestion() needs webnode information which is difficult to access outside of m_popupClient.

Maybe we can make a special function to accept current index, but it it very long path to access from WebView...

What do you think?

Thanks,


(In reply to comment #3)
> Ilya,
> 
> Thank you for your comment.
> 
> I want to make sure what "Accept" status.
> 
> As you know, when user changes the selection, didAcceptAutoFillSuggestion() is called. I guess this is the already "Accept" status for the field, right?
> 
> But after the "Accept" status, user select all string in the field while showing popup window, then starts dragging.
> 
> In that situation, even if the field is after "Accept", the field string is gone.
> 
> That is a problem.
> 
> Or do you mean different "Accept"?
> 
> Thanks,
> 
> 
> (In reply to comment #2)
> > This doesn't seem like the right approach to me, because we never want to have suggested values in the form fields when the popup is closed.  A drag action should accept the suggested values.  Once the suggested values are accepted, closing the popup should work normally, without any further changes.

-- 
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