Add API::{FrameInfo, NavigationAction, NavigationResponse} types
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 03:05:12 +0000 (03:05 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 03:05:12 +0000 (03:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140982

Reviewed by Sam Weinig.

Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
to wrap around, as a step towards moving Modern API logic down into WebPageProxy.

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIFrameInfo.cpp: Added.
* UIProcess/API/APIFrameInfo.h: Added.
* UIProcess/API/APINavigationAction.h: Added.
* UIProcess/API/APINavigationResponse.h: Added.
Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.

* UIProcess/API/Cocoa/WKFrameInfo.mm:
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.

* UIProcess/API/Cocoa/WKNavigationResponse.mm:
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.

* UIProcess/API/Cocoa/WKUserContentController.mm:
Adopt API::FrameInfo.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Adopt API::FrameInfo, and reorganize the code slightly.
Adopt API::NavigationAction.

(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
Adopt API::FrameInfo.
Adopt API::NavigationResponse.

(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
Adopt API::FrameInfo.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
Adopt API::FrameInfo.

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179328 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/APIObject.h
Source/WebKit2/Shared/Cocoa/APIObject.mm
Source/WebKit2/UIProcess/API/APIFrameInfo.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APIFrameInfo.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APINavigationAction.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/APINavigationResponse.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm
Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h
Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 6edba33..fe3a354 100644 (file)
@@ -1,3 +1,58 @@
+2015-01-28  Tim Horton  <timothy_horton@apple.com>
+
+        Add API::{FrameInfo, NavigationAction, NavigationResponse} types
+        https://bugs.webkit.org/show_bug.cgi?id=140982
+
+        Reviewed by Sam Weinig.
+
+        Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
+        to wrap around, as a step towards moving Modern API logic down into WebPageProxy.
+
+        * Shared/API/APIObject.h:
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        * UIProcess/API/APIFrameInfo.cpp: Added.
+        * UIProcess/API/APIFrameInfo.h: Added.
+        * UIProcess/API/APINavigationAction.h: Added.
+        * UIProcess/API/APINavigationResponse.h: Added.
+        Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.
+
+        * UIProcess/API/Cocoa/WKFrameInfo.mm:
+        * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
+        Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.
+
+        * UIProcess/API/Cocoa/WKNavigationAction.mm:
+        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
+        Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.
+
+        * UIProcess/API/Cocoa/WKNavigationResponse.mm:
+        * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
+        Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.
+
+        * UIProcess/API/Cocoa/WKUserContentController.mm:
+        Adopt API::FrameInfo.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
+        Adopt API::FrameInfo, and reorganize the code slightly.
+        Adopt API::NavigationAction.
+
+        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
+        Adopt API::FrameInfo.
+        Adopt API::NavigationResponse.
+
+        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
+        Adopt API::FrameInfo.
+
+        * UIProcess/Cocoa/UIDelegate.mm:
+        (WebKit::UIDelegate::UIClient::createNewPage):
+        (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
+        (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
+        (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
+        Adopt API::FrameInfo.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2015-01-28  Antti Koivisto  <antti@apple.com>
 
         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
index 63448ca..ea4cd1a 100644 (file)
@@ -109,6 +109,7 @@ public:
         Download,
         FormSubmissionListener,
         Frame,
+        FrameInfo,
         FramePolicyListener,
         FullScreenManager,
         GeolocationManager,
@@ -121,7 +122,9 @@ public:
         KeyValueStorageManager,
         MediaCacheManager,
         Navigation,
+        NavigationAction,
         NavigationData,
+        NavigationResponse,
         Notification,
         NotificationManager,
         NotificationPermissionRequest,
index ed55065..7980107 100644 (file)
@@ -33,6 +33,7 @@
 #import "WKBrowsingContextControllerInternal.h"
 #import "WKBrowsingContextGroupInternal.h"
 #import "WKConnectionInternal.h"
+#import "WKFrameInfoInternal.h"
 #import "WKNSArray.h"
 #import "WKNSData.h"
 #import "WKNSDictionary.h"
 #import "WKNSURL.h"
 #import "WKNSURLAuthenticationChallenge.h"
 #import "WKNSURLRequest.h"
+#import "WKNavigationActionInternal.h"
 #import "WKNavigationDataInternal.h"
 #import "WKNavigationInternal.h"
+#import "WKNavigationResponseInternal.h"
 #import "WKPreferencesInternal.h"
 #import "WKProcessPoolInternal.h"
 #import "WKUserContentControllerInternal.h"
@@ -142,14 +145,26 @@ void* Object::newObject(size_t size, Type type)
         wrapper = [_WKFrameHandle alloc];
         break;
 
+    case Type::FrameInfo:
+        wrapper = [WKFrameInfo alloc];
+        break;
+
     case Type::Navigation:
         wrapper = [WKNavigation alloc];
         break;
 
+    case Type::NavigationAction:
+        wrapper = [WKNavigationAction alloc];
+        break;
+
     case Type::NavigationData:
         wrapper = [WKNavigationData alloc];
         break;
 
+    case Type::NavigationResponse:
+        wrapper = [WKNavigationResponse alloc];
+        break;
+
     case Type::PageGroup:
         wrapper = [WKBrowsingContextGroup alloc];
         break;
diff --git a/Source/WebKit2/UIProcess/API/APIFrameInfo.cpp b/Source/WebKit2/UIProcess/API/APIFrameInfo.cpp
new file mode 100644 (file)
index 0000000..94789fc
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "APIFrameInfo.h"
+
+#include "WebFrameProxy.h"
+
+namespace API {
+
+// FIXME: This should use the full request of the frame, not just the URL.
+FrameInfo::FrameInfo(const WebKit::WebFrameProxy& frame)
+    : m_isMainFrame(frame.isMainFrame())
+    , m_request(WebCore::ResourceRequest(frame.url()))
+{
+}
+
+} // namespace API
diff --git a/Source/WebKit2/UIProcess/API/APIFrameInfo.h b/Source/WebKit2/UIProcess/API/APIFrameInfo.h
new file mode 100644 (file)
index 0000000..6a2bbdb
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APIFrameInfo_h
+#define APIFrameInfo_h
+
+#include "APIObject.h"
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+class WebFrameProxy;
+}
+
+namespace API {
+
+class FrameInfo final : public ObjectImpl<Object::Type::FrameInfo> {
+public:
+    static Ref<FrameInfo> create(const WebKit::WebFrameProxy& frame)
+    {
+        return adoptRef(*new FrameInfo(frame));
+    }
+
+    explicit FrameInfo(const WebKit::WebFrameProxy&);
+
+    bool isMainFrame() const { return m_isMainFrame; }
+    const WebCore::ResourceRequest& request() const { return m_request; }
+
+private:
+    bool m_isMainFrame;
+    WebCore::ResourceRequest m_request;
+};
+
+} // namespace API
+
+#endif // APIFrameInfo_h
diff --git a/Source/WebKit2/UIProcess/API/APINavigationAction.h b/Source/WebKit2/UIProcess/API/APINavigationAction.h
new file mode 100644 (file)
index 0000000..b7cbfd0
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APINavigationAction_h
+#define APINavigationAction_h
+
+#include "APIObject.h"
+#include "NavigationActionData.h"
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/URL.h>
+
+namespace API {
+
+class FrameInfo;
+
+class NavigationAction final : public ObjectImpl<Object::Type::NavigationAction> {
+public:
+    static Ref<NavigationAction> create(const WebKit::NavigationActionData& navigationActionData, API::FrameInfo* sourceFrame, API::FrameInfo* targetFrame, const WebCore::ResourceRequest& request, const WebCore::URL& originalURL)
+    {
+        return adoptRef(*new NavigationAction(navigationActionData, sourceFrame, targetFrame, request, originalURL));
+    }
+
+    NavigationAction(const WebKit::NavigationActionData& navigationActionData, API::FrameInfo* sourceFrame, API::FrameInfo* targetFrame, const WebCore::ResourceRequest& request, const WebCore::URL& originalURL)
+        : m_sourceFrame(sourceFrame)
+        , m_targetFrame(targetFrame)
+        , m_request(request)
+        , m_originalURL(originalURL)
+        , m_navigationActionData(navigationActionData)
+    {
+    }
+
+    FrameInfo* sourceFrame() const { return m_sourceFrame.get(); }
+    FrameInfo* targetFrame() const { return m_targetFrame.get(); }
+
+    const WebCore::ResourceRequest& request() const { return m_request; }
+    const WebCore::URL& originalURL() const { return m_originalURL; }
+
+    WebCore::NavigationType navigationType() const { return m_navigationActionData.navigationType; }
+    WebKit::WebEvent::Modifiers modifiers() const { return m_navigationActionData.modifiers; }
+    WebKit::WebMouseEvent::Button mouseButton() const { return m_navigationActionData.mouseButton; }
+    bool isProcessingUserGesture() const { return m_navigationActionData.isProcessingUserGesture; }
+    bool canHandleRequest() const { return m_navigationActionData.canHandleRequest; }
+
+private:
+    RefPtr<FrameInfo> m_sourceFrame;
+    RefPtr<FrameInfo> m_targetFrame;
+
+    WebCore::ResourceRequest m_request;
+    WebCore::URL m_originalURL;
+
+    WebKit::NavigationActionData m_navigationActionData;
+};
+
+} // namespace API
+
+#endif // APINavigationAction_h
diff --git a/Source/WebKit2/UIProcess/API/APINavigationResponse.h b/Source/WebKit2/UIProcess/API/APINavigationResponse.h
new file mode 100644 (file)
index 0000000..f7f957d
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APINavigationResponse_h
+#define APINavigationResponse_h
+
+#include "APIObject.h"
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+
+namespace API {
+
+class FrameInfo;
+
+class NavigationResponse final : public ObjectImpl<Object::Type::NavigationResponse> {
+public:
+    static Ref<NavigationResponse> create(API::FrameInfo& frame, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, bool canShowMIMEType)
+    {
+        return adoptRef(*new NavigationResponse(frame, request, response, canShowMIMEType));
+    }
+
+    NavigationResponse(API::FrameInfo& frame, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response, bool canShowMIMEType)
+        : m_frame(frame)
+        , m_request(request)
+        , m_response(response)
+        , m_canShowMIMEType(canShowMIMEType)
+    {
+    }
+
+    FrameInfo& frame() { return m_frame.get(); }
+
+    const WebCore::ResourceRequest& request() const { return m_request; }
+    const WebCore::ResourceResponse& response() const { return m_response; }
+
+    bool canShowMIMEType() const { return m_canShowMIMEType; }
+
+private:
+    Ref<FrameInfo> m_frame;
+
+    WebCore::ResourceRequest m_request;
+    WebCore::ResourceResponse m_response;
+    bool m_canShowMIMEType;
+};
+
+} // namespace API
+
+#endif // APINavigationResponse_h
index 4642951..3822af2 100644 (file)
 
 #if WK_API_ENABLED
 
-#import "WebFrameProxy.h"
-#import <wtf/RetainPtr.h>
+@implementation WKFrameInfo
 
-@implementation WKFrameInfo {
-    RetainPtr<NSURLRequest> _request;
-}
-
-- (instancetype)initWithWebFrameProxy:(WebKit::WebFrameProxy&)webFrameProxy
+- (void)dealloc
 {
-    if (!(self = [super init]))
-        return nil;
-
-    _mainFrame = webFrameProxy.isMainFrame();
+    _frameInfo->~FrameInfo();
 
-    // FIXME: This should use the full request of the frame, not just the URL.
-    _request = [NSURLRequest requestWithURL:[NSURL URLWithString:webFrameProxy.url()]];
-
-    return self;
+    [super dealloc];
 }
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"<%@: %p; isMainFrame = %s; request = %@>", NSStringFromClass(self.class), self, _mainFrame ? "YES" : "NO", _request.get()];
+    return [NSString stringWithFormat:@"<%@: %p; isMainFrame = %s; request = %@>", NSStringFromClass(self.class), self, self.mainFrame ? "YES" : "NO", self.request];
+}
+
+- (BOOL)isMainFrame
+{
+    return _frameInfo->isMainFrame();
 }
 
 - (NSURLRequest *)request
 {
-    return _request.get();
+    return _frameInfo->request().nsURLRequest(WebCore::DoNotUpdateHTTPBody);
 }
 
 - (id)copyWithZone:(NSZone *)zone
     return [self retain];
 }
 
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+    return *_frameInfo;
+}
+
 @end
 
 #endif
index aa7907a..382ea91 100644 (file)
 
 #if WK_API_ENABLED
 
-namespace WebKit {
-class WebFrameProxy;
-}
+#import "APIFrameInfo.h"
+#import "WKObject.h"
+
+namespace API {
+
+inline WKFrameInfo *wrapper(API::FrameInfo& frameInfo)
+{
+    ASSERT([frameInfo.wrapper() isKindOfClass:[WKFrameInfo class]]);
 
-@interface WKFrameInfo ()
+    return (WKFrameInfo *)frameInfo.wrapper();
+}
 
-- (instancetype)initWithWebFrameProxy:(WebKit::WebFrameProxy&)webFrameProxy;
+}
 
+@interface WKFrameInfo () <WKObject> {
+@package
+    API::ObjectStorage<API::FrameInfo> _frameInfo;
+}
 @end
 
 #endif
index c95d162..9b99442 100644 (file)
 #if WK_API_ENABLED
 
 #import "NavigationActionData.h"
+#import "WKFrameInfoInternal.h"
 #import <wtf/RetainPtr.h>
 
-@implementation WKNavigationAction {
-    RetainPtr<WKFrameInfo> _sourceFrame;
-    RetainPtr<WKFrameInfo> _targetFrame;
-    RetainPtr<NSURLRequest> _request;
-    RetainPtr<NSURL> _originalURL;
-    BOOL _userInitiated;
-    BOOL _canHandleRequest;
-}
+@implementation WKNavigationAction
 
 static WKNavigationType toWKNavigationType(WebCore::NavigationType navigationType)
 {
@@ -103,82 +97,79 @@ static NSInteger toNSButtonNumber(WebKit::WebMouseEvent::Button mouseButton)
 }
 #endif
 
-- (instancetype)_initWithNavigationActionData:(const WebKit::NavigationActionData&)navigationActionData
+- (void)dealloc
 {
-    if (!(self = [super init]))
-        return nil;
-
-    _navigationType = toWKNavigationType(navigationActionData.navigationType);
-
-#if PLATFORM(MAC)
-    _modifierFlags = toNSEventModifierFlags(navigationActionData.modifiers);
-    _buttonNumber = toNSButtonNumber(navigationActionData.mouseButton);
-#endif
+    _navigationAction->~NavigationAction();
 
-    _userInitiated = navigationActionData.isProcessingUserGesture;
-    _canHandleRequest = navigationActionData.canHandleRequest;
-
-    return self;
+    [super dealloc];
 }
 
 - (NSString *)description
 {
     return [NSString stringWithFormat:@"<%@: %p; navigationType = %ld; request = %@; sourceFrame = %@; targetFrame = %@>", NSStringFromClass(self.class), self,
-        (long)_navigationType, _request.get(), _sourceFrame.get(), _targetFrame.get()];
+        (long)self.navigationType, self.request, self.sourceFrame, self.targetFrame];
 }
 
 - (WKFrameInfo *)sourceFrame
 {
-    return _sourceFrame.get();
-}
-
-- (void)setSourceFrame:(WKFrameInfo *)sourceFrame
-{
-    _sourceFrame = adoptNS([sourceFrame copy]);
+    if (API::FrameInfo* frameInfo = _navigationAction->sourceFrame())
+        return wrapper(*frameInfo);
+    return nil;
 }
 
 - (WKFrameInfo *)targetFrame
 {
-    return _targetFrame.get();
+    if (API::FrameInfo* frameInfo = _navigationAction->targetFrame())
+        return wrapper(*frameInfo);
+    return nil;
 }
 
-- (void)setTargetFrame:(WKFrameInfo *)targetFrame
+- (WKNavigationType)navigationType
 {
-    _targetFrame = adoptNS([targetFrame copy]);
+    return toWKNavigationType(_navigationAction->navigationType());
 }
 
 - (NSURLRequest *)request
 {
-    return _request.get();
+    return _navigationAction->request().nsURLRequest(WebCore::DoNotUpdateHTTPBody);
 }
 
-- (void)setRequest:(NSURLRequest *)request
+#if PLATFORM(MAC)
+- (NSEventModifierFlags)modifierFlags
 {
-    _request = adoptNS([request copy]);
+    return toNSEventModifierFlags(_navigationAction->modifiers());
 }
 
-- (void)_setOriginalURL:(NSURL *)originalURL
+- (NSInteger)buttonNumber
 {
-    _originalURL = adoptNS([originalURL copy]);
+    return toNSButtonNumber(_navigationAction->mouseButton());
 }
+#endif
 
-- (NSURL *)_originalURL
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
 {
-    return _originalURL.get();
+    return *_navigationAction;
 }
 
 @end
 
 @implementation WKNavigationAction (WKPrivate)
 
+- (NSURL *)_originalURL
+{
+    return _navigationAction->originalURL();
+}
+
 - (BOOL)_isUserInitiated
 {
-    return _userInitiated;
+    return _navigationAction->isProcessingUserGesture();
 }
 
 - (BOOL)_canHandleRequest
 {
-    return _canHandleRequest;
+    return _navigationAction->canHandleRequest();
 }
 
 @end
index 439b2fb..a959d5d 100644 (file)
 
 #if WK_API_ENABLED
 
-#import <WebCore/FrameLoaderTypes.h>
+#import "APINavigationAction.h"
+#import "WKObject.h"
 
-namespace WebKit {
-struct NavigationActionData;
-}
-
-@interface WKNavigationAction ()
-
-@property (nonatomic, readwrite, copy) WKFrameInfo *sourceFrame;
-@property (nonatomic, readwrite, copy) WKFrameInfo *targetFrame;
+namespace API {
 
-@property (nonatomic, readwrite, copy) NSURLRequest *request;
+inline WKNavigationAction *wrapper(API::NavigationAction& navigationAction)
+{
+    ASSERT([navigationAction.wrapper() isKindOfClass:[WKNavigationAction class]]);
 
-@property (nonatomic, readwrite, copy, setter=_setOriginalURL:) NSURL *_originalURL;
+    return (WKNavigationAction *)navigationAction.wrapper();
+}
 
-- (instancetype)_initWithNavigationActionData:(const WebKit::NavigationActionData&)navigationActionData;
+}
 
+@interface WKNavigationAction () <WKObject> {
+@package
+    API::ObjectStorage<API::NavigationAction> _navigationAction;
+}
 @end
 
 #endif
index 4fe97ef..0289710 100644 (file)
 
 #if WK_API_ENABLED
 
-#import <wtf/RetainPtr.h>
-#import "WKFrameInfo.h"
+#import "WKFrameInfoInternal.h"
 
-@implementation WKNavigationResponse {
-    RetainPtr<NSURLResponse> _response;
+@implementation WKNavigationResponse
+
+- (void)dealloc
+{
+    _navigationResponse->~NavigationResponse();
+
+    [super dealloc];
 }
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"<%@: %p; response = %@>", NSStringFromClass(self.class), self, _response.get()];
+    return [NSString stringWithFormat:@"<%@: %p; response = %@>", NSStringFromClass(self.class), self, self.response];
 }
 
 - (BOOL)isForMainFrame
 {
-    return [_frame isMainFrame];
+    return _navigationResponse->frame().isMainFrame();
 }
 
 - (NSURLResponse *)response
 {
-    return _response.get();
+    return _navigationResponse->response().nsURLResponse();
 }
 
-- (void)setResponse:(NSURLResponse *)response
+- (BOOL)canShowMIMEType
+{
+    return _navigationResponse->canShowMIMEType();
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
 {
-    _response = adoptNS([response copy]);
+    return *_navigationResponse;
 }
 
 @end
 
 - (WKFrameInfo *)_frame
 {
-    return _frame.get();
+    return wrapper(_navigationResponse->frame());
 }
 
 - (NSURLRequest *)_request
 {
-    return _request.get();
+    return _navigationResponse->request().nsURLRequest(WebCore::DoNotUpdateHTTPBody);
 }
 
 @end
index 0e8d3a8..2f69645 100644 (file)
 
 #if WK_API_ENABLED
 
-#import <wtf/RetainPtr.h>
+#import "APINavigationResponse.h"
+#import "WKObject.h"
 
-@interface WKNavigationResponse () {
-@package
-    RetainPtr<WKFrameInfo> _frame;
-    RetainPtr<NSURLRequest> _request;
+namespace API {
+
+inline WKNavigationResponse *wrapper(API::NavigationResponse& navigationResponse)
+{
+    ASSERT([navigationResponse.wrapper() isKindOfClass:[WKNavigationResponse class]]);
+
+    return (WKNavigationResponse *)navigationResponse.wrapper();
 }
 
-@property (nonatomic, readwrite, copy) NSURLResponse *response;
-@property (nonatomic, readwrite) BOOL canShowMIMEType;
+}
 
+@interface WKNavigationResponse () <WKObject> {
+@package
+    API::ObjectStorage<API::NavigationResponse> _navigationResponse;
+}
 @end
 
 #endif
index 593f366..80abdd4 100644 (file)
@@ -86,7 +86,7 @@ public:
     
     virtual void didPostMessage(WebKit::WebPageProxy& page, WebKit::WebFrameProxy& frame, WebCore::SerializedScriptValue& serializedScriptValue)
     {
-        RetainPtr<WKFrameInfo> frameInfo = adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:frame]);
+        RetainPtr<WKFrameInfo> frameInfo = wrapper(API::FrameInfo::create(frame));
 
         RetainPtr<JSContext> context = adoptNS([[JSContext alloc] init]);
         JSValueRef valueRef = serializedScriptValue.deserialize([context JSGlobalContextRef], 0);
index 34f409e..6a7a144 100644 (file)
@@ -28,7 +28,9 @@
 
 #if WK_API_ENABLED
 
+#import "APIFrameInfo.h"
 #import "APINavigationData.h"
+#import "APINavigationResponse.h"
 #import "APIString.h"
 #import "APIURL.h"
 #import "AuthenticationDecisionListener.h"
@@ -224,9 +226,9 @@ NavigationState::PolicyClient::~PolicyClient()
 
 void NavigationState::PolicyClient::decidePolicyForNavigationAction(WebPageProxy&, WebFrameProxy* destinationFrame, const NavigationActionData& navigationActionData, WebFrameProxy* sourceFrame, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest& request, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData)
 {
-    RetainPtr<NSURLRequest> nsURLRequest = adoptNS(wrapper(*API::URLRequest::create(request).leakRef()));
-
     if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler) {
+        RetainPtr<NSURLRequest> nsURLRequest = adoptNS(wrapper(*API::URLRequest::create(request).leakRef()));
+
         if (!destinationFrame) {
             listener->use();
             return;
@@ -251,24 +253,22 @@ void NavigationState::PolicyClient::decidePolicyForNavigationAction(WebPageProxy
     if (!navigationDelegate)
         return;
 
-    auto navigationAction = adoptNS([[WKNavigationAction alloc] _initWithNavigationActionData:navigationActionData]);
+    RefPtr<API::FrameInfo> destinationFrameInfo;
+    RefPtr<API::FrameInfo> sourceFrameInfo;
 
     if (destinationFrame)
-        [navigationAction setTargetFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*destinationFrame]).get()];
+        destinationFrameInfo = API::FrameInfo::create(*destinationFrame);
 
-    if (sourceFrame) {
-        if (sourceFrame == destinationFrame)
-            [navigationAction setSourceFrame:[navigationAction targetFrame]];
-        else
-            [navigationAction setSourceFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*sourceFrame]).get()];
-    }
+    if (sourceFrame == destinationFrame)
+        sourceFrameInfo = destinationFrameInfo;
+    else if (sourceFrame)
+        sourceFrameInfo = API::FrameInfo::create(*sourceFrame);
 
-    [navigationAction setRequest:nsURLRequest.get()];
-    [navigationAction _setOriginalURL:originalRequest.url()];
+    auto navigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.get(), destinationFrameInfo.get(), request, originalRequest.url());
 
     RefPtr<WebFramePolicyListenerProxy> localListener = WTF::move(listener);
     RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(webView:decidePolicyForNavigationAction:decisionHandler:));
-    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationAction:navigationAction.get() decisionHandler:[localListener, checker](WKNavigationActionPolicy actionPolicy) {
+    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationAction:wrapper(navigationAction) decisionHandler:[localListener, checker](WKNavigationActionPolicy actionPolicy) {
         checker->didCallCompletionHandler();
 
         switch (actionPolicy) {
@@ -322,16 +322,11 @@ void NavigationState::PolicyClient::decidePolicyForResponse(WebPageProxy&, WebFr
     if (!navigationDelegate)
         return;
 
-    auto navigationResponse = adoptNS([[WKNavigationResponse alloc] init]);
-
-    navigationResponse->_frame = adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:frame]);
-    navigationResponse->_request = resourceRequest.nsURLRequest(WebCore::DoNotUpdateHTTPBody);
-    [navigationResponse setResponse:resourceResponse.nsURLResponse()];
-    [navigationResponse setCanShowMIMEType:canShowMIMEType];
+    auto navigationResponse = API::NavigationResponse::create(API::FrameInfo::create(frame).get(), resourceRequest, resourceResponse, canShowMIMEType);
 
     RefPtr<WebFramePolicyListenerProxy> localListener = WTF::move(listener);
     RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(webView:decidePolicyForNavigationResponse:decisionHandler:));
-    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:navigationResponse.get() decisionHandler:[localListener, checker](WKNavigationResponsePolicy responsePolicy) {
+    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:wrapper(navigationResponse) decisionHandler:[localListener, checker](WKNavigationResponsePolicy responsePolicy) {
         checker->didCallCompletionHandler();
 
         switch (responsePolicy) {
@@ -426,7 +421,7 @@ void NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame(WebP
         auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
         auto errorWithRecoveryAttempter = createErrorWithRecoveryAttempter(m_navigationState.m_webView, webFrameProxy, error);
         // FIXME: Get the main frame's current navigation.
-        [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView navigation:nil didFailProvisionalLoadInSubframe:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:webFrameProxy]).get() withError:errorWithRecoveryAttempter.get()];
+        [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView navigation:nil didFailProvisionalLoadInSubframe:wrapper(API::FrameInfo::create(webFrameProxy)) withError:errorWithRecoveryAttempter.get()];
 
         return;
     }
index e87af49..8175a7e 100644 (file)
@@ -102,12 +102,10 @@ PassRefPtr<WebKit::WebPageProxy> UIDelegate::UIClient::createNewPage(WebKit::Web
     auto configuration = adoptNS([m_uiDelegate.m_webView->_configuration copy]);
     [configuration _setRelatedWebView:m_uiDelegate.m_webView];
 
-    auto navigationAction = adoptNS([[WKNavigationAction alloc] _initWithNavigationActionData:navigationActionData]);
+    auto sourceFrameInfo = API::FrameInfo::create(*initiatingFrame);
+    auto navigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.ptr(), nullptr, request, WebCore::URL());
 
-    [navigationAction setSourceFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*initiatingFrame]).get()];
-    [navigationAction setRequest:request.nsURLRequest(WebCore::DoNotUpdateHTTPBody)];
-
-    RetainPtr<WKWebView> webView = [delegate.get() webView:m_uiDelegate.m_webView createWebViewWithConfiguration:configuration.get() forNavigationAction:navigationAction.get() windowFeatures:adoptNS([[WKWindowFeatures alloc] _initWithWindowFeatures:windowFeatures]).get()];
+    RetainPtr<WKWebView> webView = [delegate.get() webView:m_uiDelegate.m_webView createWebViewWithConfiguration:configuration.get() forNavigationAction:wrapper(navigationAction) windowFeatures:adoptNS([[WKWindowFeatures alloc] _initWithWindowFeatures:windowFeatures]).get()];
 
     if (!webView)
         return nullptr;
@@ -132,7 +130,7 @@ void UIDelegate::UIClient::runJavaScriptAlert(WebKit::WebPageProxy*, const WTF::
     }
 
     RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:));
-    [delegate webView:m_uiDelegate.m_webView runJavaScriptAlertPanelWithMessage:message initiatedByFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*webFrameProxy]).get() completionHandler:[completionHandler, checker] {
+    [delegate webView:m_uiDelegate.m_webView runJavaScriptAlertPanelWithMessage:message initiatedByFrame:wrapper(API::FrameInfo::create(*webFrameProxy)) completionHandler:[completionHandler, checker] {
         completionHandler();
         checker->didCallCompletionHandler();
     }];
@@ -152,7 +150,7 @@ void UIDelegate::UIClient::runJavaScriptConfirm(WebKit::WebPageProxy*, const WTF
     }
 
     RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:));
-    [delegate webView:m_uiDelegate.m_webView runJavaScriptConfirmPanelWithMessage:message initiatedByFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*webFrameProxy]).get() completionHandler:[completionHandler, checker](BOOL result) {
+    [delegate webView:m_uiDelegate.m_webView runJavaScriptConfirmPanelWithMessage:message initiatedByFrame:wrapper(API::FrameInfo::create(*webFrameProxy)) completionHandler:[completionHandler, checker](BOOL result) {
         completionHandler(result);
         checker->didCallCompletionHandler();
     }];
@@ -172,7 +170,7 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF:
     }
 
     RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:));
-    [delegate webView:m_uiDelegate.m_webView runJavaScriptTextInputPanelWithPrompt:message defaultText:defaultValue initiatedByFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*webFrameProxy]).get() completionHandler:[completionHandler, checker](NSString *result) {
+    [delegate webView:m_uiDelegate.m_webView runJavaScriptTextInputPanelWithPrompt:message defaultText:defaultValue initiatedByFrame:wrapper(API::FrameInfo::create(*webFrameProxy)) completionHandler:[completionHandler, checker](NSString *result) {
         completionHandler(result);
         checker->didCallCompletionHandler();
     }];
index 6c4cef6..6d27a62 100644 (file)
                1A4D664818A2D91A00D82E21 /* APIUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664718A2D91A00D82E21 /* APIUIClient.h */; };
                1A4D664B18A3030E00D82E21 /* WKFrameInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */; };
                1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
-               1A4D664E18A3031B00D82E21 /* WKFrameInfoInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */; };
                1A50DB66110A3D57000D3FE5 /* WebProcess.app in Copy Files */ = {isa = PBXBuildFile; fileRef = 1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */; };
                1A52C0F71A38CDC70016160A /* WebStorageNamespaceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A52C0F51A38CDC70016160A /* WebStorageNamespaceProvider.cpp */; };
                1A52C0F81A38CDC70016160A /* WebStorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A52C0F61A38CDC70016160A /* WebStorageNamespaceProvider.h */; };
                2DE6943D18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DE6943B18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp */; };
                2DE6943E18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DE6943C18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h */; };
                2DF9593B18A42412009785A1 /* ViewGestureControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DF9593418A42412009785A1 /* ViewGestureControllerIOS.mm */; };
+               2DF9EEE51A781FB400B6CFBE /* APIFrameInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DF9EEE31A781FB400B6CFBE /* APIFrameInfo.cpp */; };
+               2DF9EEE61A781FB400B6CFBE /* APIFrameInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF9EEE41A781FB400B6CFBE /* APIFrameInfo.h */; };
+               2DF9EEE81A78245500B6CFBE /* WKFrameInfoInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF9EEE71A78245500B6CFBE /* WKFrameInfoInternal.h */; };
+               2DF9EEEC1A7836EE00B6CFBE /* APINavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF9EEEA1A7836EE00B6CFBE /* APINavigationAction.h */; };
+               2DF9EEEE1A786EAD00B6CFBE /* APINavigationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF9EEED1A786EAD00B6CFBE /* APINavigationResponse.h */; };
                31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
                310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
                312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A4D664718A2D91A00D82E21 /* APIUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIUIClient.h; sourceTree = "<group>"; };
                1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKFrameInfo.mm; sourceTree = "<group>"; };
                1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfo.h; sourceTree = "<group>"; };
-               1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfoInternal.h; sourceTree = "<group>"; };
                1A4F976A100E7B6600637A18 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
                1A4F976B100E7B6600637A18 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
                1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
                2DE6943B18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartMagnificationControllerMessageReceiver.cpp; sourceTree = "<group>"; };
                2DE6943C18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartMagnificationControllerMessages.h; sourceTree = "<group>"; };
                2DF9593418A42412009785A1 /* ViewGestureControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ViewGestureControllerIOS.mm; path = ios/ViewGestureControllerIOS.mm; sourceTree = "<group>"; };
+               2DF9EEE31A781FB400B6CFBE /* APIFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIFrameInfo.cpp; sourceTree = "<group>"; };
+               2DF9EEE41A781FB400B6CFBE /* APIFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIFrameInfo.h; sourceTree = "<group>"; };
+               2DF9EEE71A78245500B6CFBE /* WKFrameInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfoInternal.h; sourceTree = "<group>"; };
+               2DF9EEEA1A7836EE00B6CFBE /* APINavigationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APINavigationAction.h; sourceTree = "<group>"; };
+               2DF9EEED1A786EAD00B6CFBE /* APINavigationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APINavigationResponse.h; sourceTree = "<group>"; };
                31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
                31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
                312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationProvider.h; sourceTree = "<group>"; };
                                37B5045119EEF31300CE2CF8 /* WKErrorPrivate.h */,
                                1A4D664A18A3030E00D82E21 /* WKFrameInfo.h */,
                                1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */,
-                               1A4D664D18A3031B00D82E21 /* WKFrameInfoInternal.h */,
+                               2DF9EEE71A78245500B6CFBE /* WKFrameInfoInternal.h */,
                                1A422F8A18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h */,
                                1A5B1C4F1898606F004FCF9B /* WKNavigation.h */,
                                1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */,
                                1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
                                00B9661518E24CBA00CE1F88 /* APIFindClient.h */,
                                37E25D6D18FDE5D6005D3A00 /* APIFormClient.h */,
+                               2DF9EEE31A781FB400B6CFBE /* APIFrameInfo.cpp */,
+                               2DF9EEE41A781FB400B6CFBE /* APIFrameInfo.h */,
                                7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */,
                                1A2464F21891E45100234C5B /* APILoaderClient.h */,
                                7CD3A4801A5D02FA009623B8 /* APINavigation.cpp */,
                                7CD3A4811A5D02FA009623B8 /* APINavigation.h */,
+                               2DF9EEEA1A7836EE00B6CFBE /* APINavigationAction.h */,
                                BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
                                BCF69FA01176D01400471A52 /* APINavigationData.h */,
+                               2DF9EEED1A786EAD00B6CFBE /* APINavigationResponse.h */,
                                7C89D2951A6753B2003A5FDE /* APIPageConfiguration.cpp */,
                                7C89D2961A6753B2003A5FDE /* APIPageConfiguration.h */,
                                1AFDD3141891B54000153970 /* APIPolicyClient.h */,
                                C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */,
                                37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */,
                                5175095A1897249700408FAC /* IDBIdentifier.h in Headers */,
+                               2DF9EEE81A78245500B6CFBE /* WKFrameInfoInternal.h in Headers */,
                                518353DB1885BF8C00D9FE44 /* IDBSerialization.h in Headers */,
                                51E351CB180F2CCC00E53BE9 /* IDBUtilities.h in Headers */,
                                BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
                                2DDE0AFA18298CC900F97EAA /* RemoteLayerTreePropertyApplier.h in Headers */,
                                1AF1AC6C1651759E00C17D7F /* RemoteLayerTreeTransaction.h in Headers */,
                                E1B78471163F24690007B692 /* RemoteNetworkingContext.h in Headers */,
+                               2DF9EEE61A781FB400B6CFBE /* APIFrameInfo.h in Headers */,
                                1AC1338018590AE400F3EC05 /* RemoteObjectRegistry.h in Headers */,
                                1AC1338618590C4600F3EC05 /* RemoteObjectRegistryMessages.h in Headers */,
                                0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */,
                                BC1BE1E012D54A410004A228 /* WebGeolocationClient.h in Headers */,
                                BC0E5FE512D697160012A72A /* WebGeolocationManager.h in Headers */,
                                BC0E606212D6BA910012A72A /* WebGeolocationManagerMessages.h in Headers */,
+                               2DF9EEEC1A7836EE00B6CFBE /* APINavigationAction.h in Headers */,
                                BC54CACB12D64291005C67B0 /* WebGeolocationManagerProxy.h in Headers */,
                                BC0E618312D6CB1D0012A72A /* WebGeolocationManagerProxyMessages.h in Headers */,
                                BC0E607312D6BC200012A72A /* WebGeolocationPosition.h in Headers */,
                                37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */,
                                BCD0139B110FA420003B8A67 /* WKFrame.h in Headers */,
                                1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */,
-                               1A4D664E18A3031B00D82E21 /* WKFrameInfoInternal.h in Headers */,
                                BCB9F6A51123DD0D00A137E0 /* WKFramePolicyListener.h in Headers */,
                                E1AEA22F14687BDB00804569 /* WKFullKeyboardAccessWatcher.h in Headers */,
                                CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */,
                                1A3CC16918907EB0001E6ED8 /* WKProcessPoolInternal.h in Headers */,
                                1A6509CE18B4146200614332 /* WKProcessPoolPrivate.h in Headers */,
                                512F58FC12A88A5400629530 /* WKProtectionSpace.h in Headers */,
+                               2DF9EEEE1A786EAD00B6CFBE /* APINavigationResponse.h in Headers */,
                                518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */,
                                1AD01BCD1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.h in Headers */,
                                1A9E329B1822E1CC00F5D04C /* WKRemoteObject.h in Headers */,
                                1ABC3DF51899E437004F0626 /* NavigationState.mm in Sources */,
                                1A6FBA2B11E6862700DB1371 /* NetscapeBrowserFuncs.cpp in Sources */,
                                1A6FBD2911E69BC200DB1371 /* NetscapePlugin.cpp in Sources */,
+                               2DF9EEE51A781FB400B6CFBE /* APIFrameInfo.cpp in Sources */,
                                1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
                                1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
                                1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,