RESOLVED FIXED 137008
[Cocoa] Add UI delegate callback when window.close() is called
https://bugs.webkit.org/show_bug.cgi?id=137008
Summary [Cocoa] Add UI delegate callback when window.close() is called
Daniel Bates
Reported 2014-09-22 11:08:53 PDT
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().
Attachments
Patch and unit test (15.99 KB, patch)
2014-09-22 13:17 PDT, Daniel Bates
andersca: review+
Daniel Bates
Comment 1 2014-09-22 12:58:05 PDT
Daniel Bates
Comment 2 2014-09-22 13:17:44 PDT
Created attachment 238492 [details] Patch and unit test
WebKit Commit Bot
Comment 3 2014-09-22 13:20:42 PDT
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.
Anders Carlsson
Comment 4 2014-09-22 13:41:36 PDT
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
Daniel Bates
Comment 5 2014-09-22 13:44:26 PDT
(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.
Daniel Bates
Comment 6 2014-09-22 15:01:03 PDT
Daniel Bates
Comment 7 2014-10-06 10:28:23 PDT
*** Bug 137423 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.