cloudtrends / chromiumembedded

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

Boolean flags from javascript window.open() not passed through to HandleBeforeCreated() #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you pass specs into the javascript window.open() function, only the size 
and position values are passed through in the popupFeatures parameter to the 
HandleBeforeCreated function. 

The values of all the boolean flags (e.g. resizable, menubar, etc) in 
popupFeatures are always the same no matter what you put in your javascript.
(locationBarVisible and dialog are always false, the others are always true)
I've tried using both yes/no and 1/0 in the javascript call.

What steps will reproduce the problem?
1. Run CEF test app in debugger
2. Load the attached webpage
2. Put a breakpoint in HandleBeforeCreated()
3. Click on of the window opening buttons on the webpage
4. Inpect members of popupFeatures parameter in debugger and see that they are 
always the same.

What version of the product are you using? On what operating system?
CEF r195 or r181
Windows XP

This page lists the available flags: 
http://www.w3schools.com/jsref/met_win_open.asp
Note sure if this is authoritative, but most of the flags listed have an 
equivalent in the cef_popup_features_t structure, so I'd expect the values to 
get passed though.

Original issue reported on code.google.com by powerbf...@gmail.com on 2 Mar 2011 at 7:21

Attachments:

GoogleCodeExporter commented 9 years ago
CEF's CefPopupFeatures structure is an accurate reflection of the WebKit 
WindowFeatures structure. See the WindowFeatures constructor in 
src/third_party/WebKit/Source/WebCore/page/WindowFeatures.cpp for a description 
of the parsing rules.

Original comment by magreenb...@gmail.com on 8 Mar 2011 at 5:12

GoogleCodeExporter commented 9 years ago
Looking at WindowFeatures.cpp, putting "menubar=yes" or "menubar=1" should 
result in the menuBarVisible member being set to true. Similarly, "toolbar" 
maps to the toolBarVisible member, "location" to locationBarVisible, "status" 
to statusBarVisible, "fullscreen" to fullscreen and "scrollbars" to 
scrollbarsVisible.

However, this is not happening. 

If, as you say, the CEf structure accurately reflects the WbKit one, this would 
seem to be a bug in WebKit.

Original comment by powerbf...@gmail.com on 9 Mar 2011 at 7:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Using this string:

toolbar=yes, location=1, status=yes, menubar=0, scrollbars=yes, resizable=0, 
width=400, height=400

I see this CefPopupFeatures structure:

-       (*(_cef_popup_features_t*)(&popupFeatures))
        x   0   int
        xSet    false   bool
        y   0   int
        ySet    false   bool
        width   400 int
        widthSet    true    bool
        height  400 int
        heightSet   true    bool
        menuBarVisible  false   bool
        statusBarVisible    true    bool
        toolBarVisible  true    bool
        locationBarVisible  true    bool
        scrollbarsVisible   true    bool
        resizable   true    bool
        fullscreen  false   bool
        dialog  false   bool

Which is exactly what I expect. All values are represented correctly except for 
"resizable", which will always be true based on the comments in WindowFeatures.

This is at CEF revision 202.

Original comment by magreenb...@gmail.com on 9 Mar 2011 at 2:43

GoogleCodeExporter commented 9 years ago
Re-tested with CEF revision 212.

All flags now working, except:
- resizable, which is always true (as per comment in WindowFeatures)
- dialog, which is always false (and doesn't appear to be standard)

Original comment by powerbf...@gmail.com on 28 Mar 2011 at 7:23