Skip to content
  • weinig@apple.com's avatar
    Perform some spring cleaning to WKContentView and WKView · 57850ccd
    weinig@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124961
    
    Reviewed by Dan Bernstein.
    
    - Store the PageClientImpl in a std::unique_ptr.
    - Remove the WKBrowsingContextController internal load delegate. Replace its use with
      a new PageClient function, didCommitLoadForMainFrame.
    - Fix typo in the WKContentViewDelegate. contentViewdidCommitLoadForMainFrame -> contentViewDidCommitLoadForMainFrame.
    - Add initializers for WKContentView and WKView that take WKContextRefs and WKPageGroupRefs to match the Mac WKView.
      These are needed for WebKitTestRunner.
    - Require a WKProcessGroup (or WKContextRef) and a WKBrowsingContextGroup (or WKPageGroupRef).
    - Stop caching the WKProcessGroup and WKBrowsingContextGroup on the WKContentView.
    - Remove incorrect implementations of initWithCoder.
    - Make WKContentView lazily create its WKBrowsingContextController wrapper.
    
    * UIProcess/API/ios/PageClientImplIOS.h:
    * UIProcess/API/ios/PageClientImplIOS.mm:
    (WebKit::PageClientImpl::PageClientImpl):
    (WebKit::PageClientImpl::didCommitLoadForMainFrame):
    (WebKit::PageClientImpl::mainDocumentDidReceiveMobileDocType):
    * UIProcess/API/ios/WKContentView.h:
    * UIProcess/API/ios/WKContentView.mm:
    (-[WKContentView initWithCoder:]):
    (-[WKContentView initWithFrame:processGroup:browsingContextGroup:]):
    (-[WKContentView browsingContextController]):
    (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
    (-[WKContentView _didCommitLoadForMainFrame]):
    (-[WKContentView _didReceiveMobileDocTypeForMainFrame]):
    (-[WKContentView _didChangeViewportArguments:WebCore::]):
    (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
    (-[WKContentView _pageRef]):
    (-[WKContentView initWithFrame:contextRef:pageGroupRef:]):
    (-[WKContentView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
    * UIProcess/API/ios/WKContentViewInternal.h:
    * UIProcess/API/ios/WKContentViewPrivate.h: Added.
    * UIProcess/API/ios/WKView.mm:
    (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
    (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
    (-[WKView contentViewDidCommitLoadForMainFrame:]):
    (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
    (-[WKView pageRef]):
    (-[WKView initWithFrame:contextRef:pageGroupRef:]):
    (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
    * UIProcess/API/mac/PageClientImpl.h:
    * UIProcess/API/mac/PageClientImpl.mm:
    (WebKit::PageClientImpl::didCommitLoadForMainFrame):
    * UIProcess/API/mac/WKBrowsingContextController.mm:
    (didCommitLoadForFrame):
    * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
    * UIProcess/API/mac/WKViewPrivate.h:
    * UIProcess/PageClient.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didCommitLoadForFrame):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    57850ccd