Bug 48437

Summary: Impossible to support webViewSetResizable: in Cocoa
Product: WebKit Reporter: Christiaan Hofman <cmhofman>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal    
Priority: P2    
Version: 525.x (Safari 3.2)   
Hardware: Mac   
OS: OS X 10.6   

Description Christiaan Hofman 2010-10-27 10:23:02 PDT
It is logically and fundamentally impossible to properly support the webViewSetResizable: UI delegate method in Cocoa. The problem is that there is no way (no API) to change the resizability of Cocoa NSWindows after they are created, while the webViewSetResizable: call can come at any time, in particular after the window must already have been created (because other properties may have been set, e.g. the frame, or even shown, there is no documentation saying otherwise). This is a serious incompatibility of the WebKit API with the Cocoa API. The window properties such as resizable that can be set only at creation time should be passed in a method that creates the window, e.g. an improved variant of webViewCreateWebViewModalDialogWithRequest: with an extra argument. BTW, from the comment in the default delegate it seems you already know it, so I was surprised I could not find a bug report about this issue.