Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEF3: Add HTML5 datalist support #906

Closed
magreenblatt opened this issue Mar 8, 2013 · 14 comments
Closed

CEF3: Add HTML5 datalist support #906

magreenblatt opened this issue Mar 8, 2013 · 14 comments
Labels
enhancement Enhancement request Framework Related to framework code or APIs

Comments

@magreenblatt
Copy link
Collaborator

Original report by Anonymous.


Original issue 906 created by mksuraj83 on 2013-03-08T06:02:00.000Z:

What steps will reproduce the problem?

  1. Launch CefClient
  2. Open the attached file
  3. Double Click on the Text Field

What is the expected output? What do you see instead?
Expected - The Options put in data list should get listed
Instead - I see no options getting listed

What version of the product are you using? On what operating system?
CEF 3 r1107

Please provide any additional information below.

@magreenblatt
Copy link
Collaborator Author

Comment 1. originally posted by magreenblatt on 2013-03-08T19:51:46.000Z:

Online datalist example: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5\_datalist

In Chrome this is implemented as part of autofill support (see AppendDataListSuggestions in chrome/renderer/autofill/autofill_agent.cc).

@magreenblatt
Copy link
Collaborator Author

  • set title to "CEF3: Add HTML5 datalist support"
  • set state to "open"

@magreenblatt
Copy link
Collaborator Author

Original comment by Anonymous.


Comment 2. originally posted by [email protected] on 2013-06-18T14:49:54.000Z:

It would also be nice if this worked in CEF1

@magreenblatt
Copy link
Collaborator Author

Comment 3. originally posted by magreenblatt on 2014-10-11T02:18:35.000Z:

Autofill support has now moved into a component (components.gyp:autofill_*). It works as follows (based on a Chromium build at revision 267aeeb8 (bb)):

  1. In the browser process create a ChromeAutofillClient and ContentAutofillDriver for each WebContents: https://code.google.com/p/chromium/codesearch\#chromium/src/chrome/browser/ui/tab\_helpers.cc&l=129

  2. In the renderer process create an AutofillAgent for each RenderView: https://code.google.com/p/chromium/codesearch\#chromium/src/chrome/renderer/chrome\_content\_renderer\_client.cc&l=508

  3. The AutofillAgent constructor calls WebView::setAutofillClient (AutofillAgent implements blink::WebAutofillClient): https://code.google.com/p/chromium/codesearch\#chromium/src/components/autofill/content/renderer/autofill\_agent.cc&l=138

  4. Pass some command-line arguments to the renderer process: https://code.google.com/p/chromium/codesearch\#chromium/src/chrome/browser/chrome\_content\_browser\_client.cc&l=1341 and https://code.google.com/p/chromium/codesearch\#chromium/src/components/autofill/core/common/autofill\_switches.cc&l=10

  5. Set some user preferences: https://code.google.com/p/chromium/codesearch\#chromium/src/components/autofill/core/common/autofill\_pref\_names.h&l=11

  6. Data list values are retrieved in the renderer process via GetDataListSuggestions (using the AutofillAgent set in step comment 3.): https://code.google.com/p/chromium/codesearch\#chromium/src/components/autofill/content/renderer/autofill\_agent.cc&rcl=1412920526&l=69

Chromium call stack:

chrome_child.dll!autofill::`anonymous namespace'::GetDataListSuggestions(const WebInputElement& element, bool ignore_current_value, std::vectorbase::string16* values, std::vectorbase::string16* labels) Line 75 C++
chrome_child.dll!autofill::AutofillAgent::QueryAutofillSuggestions(const blink::WebFormControlElement & element, bool display_warning_if_disabled, bool datalist_only) Line 660 C++
chrome_child.dll!autofill::AutofillAgent::ShowSuggestions(const blink::WebFormControlElement & element, bool autofill_on_empty_values, bool requires_caret_at_end, bool display_warning_if_disabled, bool datalist_only, bool show_full_suggestion_list, bool show_password_suggestions_only) Line 615 C++
chrome_child.dll!autofill::AutofillAgent::openTextDataListChooser(const blink::WebInputElement & element) Line 406 C++
chrome_child.dll!blink::ChromeClientImpl::openTextDataListChooser(blink::HTMLInputElement & input) Line 894 C++
chrome_child.dll!blink::Chrome::openTextDataListChooser(blink::HTMLInputElement & input) Line 348 C++
chrome_child.dll!blink::DataListIndicatorElement::defaultEventHandler(blink::Event * event) Line 91 C++

  1. Values are displayed in the browser process via AutofillPopupControllerImpl::UpdateDataListValues (using the ContentAutofillDriver created in step comment 1.): https://code.google.com/p/chromium/codesearch\#chromium/src/chrome/browser/ui/autofill/autofill\_popup\_controller\_impl.cc&rcl=1412920526&l=183

Chromium call stack:

chrome.dll!autofill::AutofillPopupControllerImpl::UpdateDataListValues(const std::vectorbase::string16& values, const std::vectorbase::string16& labels) Line 189 C++
chrome.dll!autofill::ChromeAutofillClient::UpdateAutofillPopupDataListValues(const std::vectorbase::string16& values, const std::vectorbase::string16& labels) Line 159 C++
chrome.dll!autofill::AutofillExternalDelegate::SetCurrentDataListValues(const std::vectorbase::string16& data_list_values, const std::vectorbase::string16& data_list_labels) Line 168 C++
chrome.dll!autofill::AutofillManager::OnSetDataList(const std::vectorbase::string16& values, const std::vectorbase::string16& labels) Line 758 C++
...
chrome.dll!autofill::ContentAutofillDriver::OnMessageReceived(const IPC::Message & message) Line 201 C++

In CEF we can likely implement the popup using a variant of CefMenuCreator.

@magreenblatt
Copy link
Collaborator Author

  • set component to "Framework"
  • edited description

@magreenblatt
Copy link
Collaborator Author

Original comment by Ahmer (Bitbucket: itsmeahmer, GitHub: itsmeahmer).


Hi Marshall,
I'm newbie in coding.
I'm using phpdesktop application for practicing
but Html 5 datalist didn't work.
CEF team resolve that trouble or phpdesktop problem ?

@magreenblatt
Copy link
Collaborator Author

Original comment by Sean Anderson (Bitbucket: sean_anderson).


@magreenblatt -- are there any plans to implement this functionality?

@magreenblatt
Copy link
Collaborator Author

@sean_anderson There are no plans at this time. PRs are welcome if you would like to take a shot at implementing it.

@magreenblatt
Copy link
Collaborator Author

Original comment by Sean Anderson (Bitbucket: sean_anderson).


Thanks for your work on CEF, @magreenblatt -- it's a great project and I'd love to help, but I've never worked with C++. I may take a look at some point, but for now we'll go back to a JS-based autocomplete solution for our client's app. Thanks for the quick reply!

@magreenblatt
Copy link
Collaborator Author

Original comment by Thi Hua Quoc (Bitbucket: Hua Quoc Thi).


@ Marshall Greenblatt pls implement this functionality

@magreenblatt
Copy link
Collaborator Author

Original comment by Hallvard Vassbotn (Bitbucket: Hallvard Vassbotn).


Still no support for datalist in CEF3 Chromimum..? :(

@magreenblatt
Copy link
Collaborator Author

Original comment by Amaury LAURENT (Bitbucket: nerys_ala).


Hi, I also need this feature in my application.

@magreenblatt
Copy link
Collaborator Author

Datalist currently works with the Chrome runtime. We will likely not support this with the Alloy runtime.

@magreenblatt
Copy link
Collaborator Author

  • changed state from "new" to "wontfix"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request Framework Related to framework code or APIs
Projects
None yet
Development

No branches or pull requests

1 participant