anmar7889 / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Input validation message bubble missing #1152

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start CefClient
2. Load the following url: 
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_required (or 
another example page using an html input field with attribute 'required')
3. Click on send

What is the expected output? What do you see instead?
Validation message should popup but doesn't.

What version of the product are you using? On what operating system?
CEF 1650, Windows 7

Please provide any additional information below.
Blink has removed creating the bubble itself in WebCore\ValidationMessage.
Now you have to provide an implementation of ValidationMessageAgent.

Original issue reported on code.google.com by petero....@gmail.com on 10 Dec 2013 at 4:53

GoogleCodeExporter commented 9 years ago
Related discussion: http://magpcss.org/ceforum/viewtopic.php?f=6&t=11269

Original comment by magreenb...@gmail.com on 10 Dec 2013 at 4:56

GoogleCodeExporter commented 9 years ago
I've taken this issue https://codereview.chromium.org/23609053/#ps81001 as 
inspiration to implement Show/Hide/Move-ValidationMessage in various classes. 
Finally I've ended in browser_host_impl.h/cc. But now I'm at the point to 
create the bubble. If I use the chrome versions 
(validation_message_bubble_view/delegate) I've need almost the complete ui-lib 
which is partly implemented at the moment (for example in 
validation_message_bubble_delegate you find that views::Label is needed which 
is missing in the CEF-lib). Am I on the right track or am I missing something? 
I see a lot of work for a simple bubble.

Original comment by petero....@gmail.com on 14 Dec 2013 at 8:06

GoogleCodeExporter commented 9 years ago
Ok, you don't need all of the ui-lib but only the 'compositor' and 'views' dirs.
I'm now stuck in 'validation_message_bubble_delegate:
1. Include file 'grit/theme_resources.h' was not found. For the time being I've 
made a dummy for that one for I don't fully understand the resource handling.
2. There's a line calling 'bundle.GetImageSkiaNamed(IDR_INPUT_ALERT)'. That one 
calls 'CefContentClient::GetImageNamed' (in libcef\content\client.cc). How do I 
suppose to get the image?

Original comment by petero....@gmail.com on 15 Dec 2013 at 10:32

GoogleCodeExporter commented 9 years ago
As attached file shows I've managed to show a bubble but without an alert 
image. Don't know how to get the image from the resource, so I've commented out 
the 'icon->SetImage'- line in validation_message_bubble_delegate. 

Original comment by petero....@gmail.com on 16 Dec 2013 at 8:08

Attachments:

GoogleCodeExporter commented 9 years ago
It's hard to give specific guidance without seeing your in-progress patches. In 
general, it's best to avoid copying chrome files where we'd share the majority 
of the implementation because each copied file adds a significant maintenance 
burden. Resources are defined and included using grit files 
(libcef/resources/cef_resources.grd) that compile into cef.pak. You can include 
specific resources in cef_resources.grd or add additional files as dependencies 
to the cef_pak target in cef.gyp. For chrome source files where the only change 
is grit resource paths it's best to add stub header files in the 
libcef/resources/grit_stub/grit folder (see the existing files as an example).

Original comment by magreenb...@gmail.com on 16 Dec 2013 at 8:53

GoogleCodeExporter commented 9 years ago
I haven't copied any chrome file. I've only included existing chrome files to 
their appropriate project files. Most files I've added to the ui-lib but I did 
that manually. Where is defined which files will be included in the ui-lib so I 
can make a patch?

Original comment by petero....@gmail.com on 16 Dec 2013 at 9:24

GoogleCodeExporter commented 9 years ago
@comment#6: It depends what GYP target the files are coming from. You can 
search for the source file name in .gyp/.gypi files to identify the target. 
Note that ui/views is only used on Windows (CEF3 trunk) currently. You might 
need a different implementation for Linux and Mac OS X depending on which files 
you're including.

Original comment by magreenb...@gmail.com on 16 Dec 2013 at 9:29

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1152

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:29