<?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>197096</bug_id>
          
          <creation_ts>2019-04-19 00:18:33 -0700</creation_ts>
          <short_desc>AX: Cannot load local file after loaded online page with a wkWebView on iOS12.2</short_desc>
          <delta_ts>2019-04-19 22:06:05 -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>Accessibility</component>
          <version>Safari 12</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="qianyangbiao">ahut_qyb_6737</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1528718</commentid>
    <comment_count>0</comment_count>
    <who name="qianyangbiao">ahut_qyb_6737</who>
    <bug_when>2019-04-19 00:18:33 -0700</bug_when>
    <thetext>Reproduce on iOS 12.2 device:

1.Create a wkwebView like :
WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, size.width, (size.height - 100)/2) configuration:[WKWebViewConfiguration new]];

2.Load online page like :
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@&quot;https://www.baidu.com&quot;]]];

3.After webView finish load, load a local file like:
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@&quot;test.html&quot;];
[webView loadFileURL:fileURL allowingReadAccessToURL:fileURL];

Then you can see error like:
2019-04-19 15:17:11.107165+0800 TestWKWebView[10686:386533] [ProcessSwapping] 0x1035382c0 - ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageID = 1, frameID = 1, navigationID = 2
2019-04-19 15:17:11.109566+0800 TestWKWebView[10686:386533] didFailProvisionalNavigation = Error Domain=kCFErrorDomainCFNetwork Code=1 &quot;(null)&quot; UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;644E6D87-CC60-4D8D-8B89-3898D4899027&gt;.&lt;31&gt;, _WKRecoveryAttempterErrorKey=&lt;WKReloadFrameErrorRecoveryAttempter: 0x283c87440&gt;}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1528719</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-04-19 00:18:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/50041855&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>