Towards supporting window.close() to close a window in an app that uses WebKit2 we should expose a UI delegate callback to notify the UI client that it should close the window associated with the WKWebView whose document called window.close().
<rdar://problem/17801001>
Created attachment 238492 [details] Patch and unit test
Attachment 238492 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:88: Please declare enum bitfields as unsigned integral types. [runtime/enum_bitfields] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 238492 [details] Patch and unit test View in context: https://bugs.webkit.org/attachment.cgi?id=238492&action=review > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:70 > + webView.get().configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES; Please use [webView configuration].preferences here instead
(In reply to comment #4) > (From update of attachment 238492 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238492&action=review > > > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:70 > > + webView.get().configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES; > > Please use [webView configuration].preferences here instead Will fix before landing.
Committed r173851: <http://trac.webkit.org/changeset/173851>
*** Bug 137423 has been marked as a duplicate of this bug. ***