<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>146638</bug_id>
          
          <creation_ts>2015-07-06 08:24:55 -0700</creation_ts>
          <short_desc>WKUIDelegate should support closing windows</short_desc>
          <delta_ts>2015-07-06 16:50:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>iOS 8.2</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>145957</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Arentz">stefan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>benjamin</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1107099</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Arentz">stefan</who>
    <bug_when>2015-07-06 08:24:55 -0700</bug_when>
    <thetext>The WKUIDelegate has a method that is called when a new WKWebView is created when the web application calls window.open(). This is great to support things like OAuth flows that typically open up in external (popup) windows.

However, there is no way to correctly deal with web applications then calling window.close() on those windows.

This is a request for a new WKUIDelegate method that is called when the web application closes a window. Its signature could be something like this:

- (void) webView: (WKWebView * nonnull) webView wantsToCloseWebView: (WKWebView * nonnull) webViewToClose;

The application can then take appropriate action. Like updating the UI and releasing the WKWebView that is closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107276</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-07-06 16:45:48 -0700</bug_when>
    <thetext>&lt;rdar://problem/21694688&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107281</commentid>
    <comment_count>2</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2015-07-06 16:50:02 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 145957 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>