Reload web views when toggling the captive portal mode at system level, so that the views end up being backed by WebProcesses with the proper captive portal mode.
Created attachment 446091 [details] Patch
Created attachment 446096 [details] Patch
Comment on attachment 446096 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446096&action=review r=me > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:979 > + page->reload({ }); Is the 'reload' process smart enough to handle cases where something is opted-out?
(In reply to Brent Fulgham from comment #3) > Comment on attachment 446096 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=446096&action=review > > r=me > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:979 > > + page->reload({ }); > > Is the 'reload' process smart enough to handle cases where something is > opted-out? The reload process will trigger a decidePolicyForNavigationAction and it is up to the client app to override via WKWebpagePreferences then. I guess it is not ideal in this case since we're going to reload unnecessarily in such case. Not sure how to best deal with this.
(In reply to Chris Dumez from comment #4) > (In reply to Brent Fulgham from comment #3) > > Comment on attachment 446096 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=446096&action=review > > > > r=me > > > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:979 > > > + page->reload({ }); > > > > Is the 'reload' process smart enough to handle cases where something is > > opted-out? > > The reload process will trigger a decidePolicyForNavigationAction and it is > up to the client app to override via WKWebpagePreferences then. I guess it > is not ideal in this case since we're going to reload unnecessarily in such > case. > > Not sure how to best deal with this. I *think* I can keep track of which views relied on the system setting and which views were explicitly opted in or out via WKWebpagePreferences. Then I would only reload the ones that relied on the system setting. I am looking into this now.
Created attachment 446175 [details] Patch
Created attachment 446183 [details] Patch
Committed r286602 (244927@trunk): <https://commits.webkit.org/244927@trunk> All reviewed patches have been landed. Closing bug and clearing flags on attachment 446183 [details].
<rdar://problem/86168069>