<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[188404] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/188404">188404</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-08-13 14:31:36 -0700 (Thu, 13 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
https://bugs.webkit.org/show_bug.cgi?id=147989
Reviewed by Tim Horton.
* Platform/IPC/mac/ConnectionMac.mm:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/APIWindowFeatures.cpp: Added.
* UIProcess/API/APIWindowFeatures.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
(WKWindowFeaturesGetTypeID):
* UIProcess/API/C/WKWindowFeaturesRef.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures dealloc]):
(-[WKWindowFeatures menuBarVisibility]):
(-[WKWindowFeatures statusBarVisibility]):
(-[WKWindowFeatures toolbarsVisibility]):
(-[WKWindowFeatures allowsResizing]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
(-[WKWindowFeatures _apiObject]):
(-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
(WebKit::wrapper):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* WebKit2.xcodeproj/project.pbxproj:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIAPIObjecth">trunk/Source/WebKit2/Shared/API/APIObject.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKBaseh">trunk/Source/WebKit2/Shared/API/c/WKBase.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAPICasth">trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageUIClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaUIDelegatemm">trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWindowFeaturescpp">trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWindowFeaturesh">trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKWindowFeaturesRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKWindowFeaturesRefh">trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/ChangeLog        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2015-08-13 Anders Carlsson <andersca@apple.com>
+
+ Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
+ https://bugs.webkit.org/show_bug.cgi?id=147989
+
+ Reviewed by Tim Horton.
+
+ * Platform/IPC/mac/ConnectionMac.mm:
+ * Shared/API/APIObject.h:
+ * Shared/API/c/WKBase.h:
+ * UIProcess/API/APIWindowFeatures.cpp: Added.
+ * UIProcess/API/APIWindowFeatures.h: Added.
+ * UIProcess/API/C/WKAPICast.h:
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageUIClient):
+ * UIProcess/API/C/WKPageUIClient.h:
+ * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
+ (WKWindowFeaturesGetTypeID):
+ * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
+ * UIProcess/API/Cocoa/WKWindowFeatures.mm:
+ (-[WKWindowFeatures dealloc]):
+ (-[WKWindowFeatures menuBarVisibility]):
+ (-[WKWindowFeatures statusBarVisibility]):
+ (-[WKWindowFeatures toolbarsVisibility]):
+ (-[WKWindowFeatures allowsResizing]):
+ (-[WKWindowFeatures x]):
+ (-[WKWindowFeatures y]):
+ (-[WKWindowFeatures width]):
+ (-[WKWindowFeatures height]):
+ (-[WKWindowFeatures _apiObject]):
+ (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
+ * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
+ (WebKit::wrapper):
+ * UIProcess/Cocoa/UIDelegate.mm:
+ (WebKit::UIDelegate::UIClient::createNewPage):
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2015-08-13 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> FilterOperation.h should not include FilterEffect.h
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIAPIObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/APIObject.h (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/APIObject.h        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/Shared/API/APIObject.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -148,6 +148,7 @@
</span><span class="cx"> VisitedLinkProvider,
</span><span class="cx"> WebsiteDataRecord,
</span><span class="cx"> WebsiteDataStore,
</span><ins>+ WindowFeatures,
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx"> MediaSessionFocusManager,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKBase.h (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKBase.h        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/Shared/API/c/WKBase.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -142,6 +142,7 @@
</span><span class="cx"> typedef const struct OpaqueWKVibration* WKVibrationRef;
</span><span class="cx"> typedef const struct OpaqueWKViewportAttributes* WKViewportAttributesRef;
</span><span class="cx"> typedef const struct OpaqueWKWebsiteDataStore* WKWebsiteDataStoreRef;
</span><ins>+typedef const struct OpaqueWKWindowFeatures* WKWindowFeaturesRef;
</ins><span class="cx">
</span><span class="cx"> /* WebKit2 Bundle types */
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWindowFeaturescppfromrev188402trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.cpp (from rev 188402, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h) (0 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.cpp        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * 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 "APIWindowFeatures.h"
+
+namespace API {
+
+Ref<WindowFeatures> WindowFeatures::create(const WebCore::WindowFeatures& windowFeatures)
+{
+ return adoptRef(*new WindowFeatures(windowFeatures));
+}
+
+WindowFeatures::WindowFeatures(const WebCore::WindowFeatures& windowFeatures)
+ : m_windowFeatures(windowFeatures)
+{
+}
+
+WindowFeatures::~WindowFeatures()
+{
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWindowFeatureshfromrev188402trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.h (from rev 188402, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h) (0 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIWindowFeatures.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * 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 APIWindowFeatures_h
+#define APIWindowFeatures_h
+
+#include "APIObject.h"
+#include <WebCore/WindowFeatures.h>
+
+namespace API {
+
+class WindowFeatures final : public ObjectImpl<Object::Type::WindowFeatures> {
+public:
+ static Ref<WindowFeatures> create(const WebCore::WindowFeatures&);
+ virtual ~WindowFeatures();
+
+ const WebCore::WindowFeatures& windowFeatures() const { return m_windowFeatures; }
+
+private:
+ explicit WindowFeatures(const WebCore::WindowFeatures&);
+
+ const WebCore::WindowFeatures m_windowFeatures;
+};
+
+}
+
+#endif // APIWindowFeatures_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx"> class UserContentExtensionStore;
</span><span class="cx"> class UserScript;
</span><span class="cx"> class WebsiteDataStore;
</span><ins>+class WindowFeatures;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -166,6 +167,7 @@
</span><span class="cx"> WK_ADD_API_MAPPING(WKVibrationRef, WebVibrationProxy)
</span><span class="cx"> WK_ADD_API_MAPPING(WKViewportAttributesRef, WebViewportAttributes)
</span><span class="cx"> WK_ADD_API_MAPPING(WKWebsiteDataStoreRef, API::WebsiteDataStore)
</span><ins>+WK_ADD_API_MAPPING(WKWindowFeaturesRef, API::WindowFeatures)
</ins><span class="cx">
</span><span class="cx"> /* Enum conversions */
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include "APIPolicyClient.h"
</span><span class="cx"> #include "APISessionState.h"
</span><span class="cx"> #include "APIUIClient.h"
</span><ins>+#include "APIWindowFeatures.h"
</ins><span class="cx"> #include "AuthenticationChallengeProxy.h"
</span><span class="cx"> #include "LegacySessionStateCoding.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="lines">@@ -102,7 +103,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<> struct ClientTraits<WKPageUIClientBase> {
</span><del>- typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5> Versions;
</del><ins>+ typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5, WKPageUIClientV6> Versions;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="lines">@@ -1341,38 +1342,55 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- virtual PassRefPtr<WebPageProxy> createNewPage(WebPageProxy* page, WebFrameProxy*, const SecurityOriginData&, const ResourceRequest& resourceRequest, const WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
</del><ins>+ virtual PassRefPtr<WebPageProxy> createNewPage(WebPageProxy* page, WebFrameProxy* initiatingFrame, const SecurityOriginData& securityOriginData, const ResourceRequest& resourceRequest, const WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
</ins><span class="cx"> {
</span><del>- if (!m_client.base.version && !m_client.createNewPage_deprecatedForUseWithV0)
- return 0;
</del><ins>+ if (m_client.base.version < 6) {
+ if (!m_client.base.version && !m_client.createNewPage_deprecatedForUseWithV0)
+ return nullptr;
</ins><span class="cx">
</span><del>- if (m_client.base.version > 0 && !m_client.createNewPage)
- return 0;
</del><ins>+ if (!m_client.createNewPage_deprecatedForUseWithV1)
+ return nullptr;
</ins><span class="cx">
</span><del>- API::Dictionary::MapType map;
- if (windowFeatures.x)
- map.set("x", API::Double::create(*windowFeatures.x));
- if (windowFeatures.y)
- map.set("y", API::Double::create(*windowFeatures.y));
- if (windowFeatures.width)
- map.set("width", API::Double::create(*windowFeatures.width));
- if (windowFeatures.height)
- map.set("height", API::Double::create(*windowFeatures.height));
- map.set("menuBarVisible", API::Boolean::create(windowFeatures.menuBarVisible));
- map.set("statusBarVisible", API::Boolean::create(windowFeatures.statusBarVisible));
- map.set("toolBarVisible", API::Boolean::create(windowFeatures.toolBarVisible));
- map.set("locationBarVisible", API::Boolean::create(windowFeatures.locationBarVisible));
- map.set("scrollbarsVisible", API::Boolean::create(windowFeatures.scrollbarsVisible));
- map.set("resizable", API::Boolean::create(windowFeatures.resizable));
- map.set("fullscreen", API::Boolean::create(windowFeatures.fullscreen));
- map.set("dialog", API::Boolean::create(windowFeatures.dialog));
- Ref<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map));
</del><ins>+ API::Dictionary::MapType map;
+ if (windowFeatures.x)
+ map.set("x", API::Double::create(*windowFeatures.x));
+ if (windowFeatures.y)
+ map.set("y", API::Double::create(*windowFeatures.y));
+ if (windowFeatures.width)
+ map.set("width", API::Double::create(*windowFeatures.width));
+ if (windowFeatures.height)
+ map.set("height", API::Double::create(*windowFeatures.height));
+ map.set("menuBarVisible", API::Boolean::create(windowFeatures.menuBarVisible));
+ map.set("statusBarVisible", API::Boolean::create(windowFeatures.statusBarVisible));
+ map.set("toolBarVisible", API::Boolean::create(windowFeatures.toolBarVisible));
+ map.set("locationBarVisible", API::Boolean::create(windowFeatures.locationBarVisible));
+ map.set("scrollbarsVisible", API::Boolean::create(windowFeatures.scrollbarsVisible));
+ map.set("resizable", API::Boolean::create(windowFeatures.resizable));
+ map.set("fullscreen", API::Boolean::create(windowFeatures.fullscreen));
+ map.set("dialog", API::Boolean::create(windowFeatures.dialog));
+ Ref<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map));
</ins><span class="cx">
</span><del>- if (!m_client.base.version)
- return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
</del><ins>+ if (!m_client.base.version)
+ return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
</ins><span class="cx">
</span><del>- Ref<API::URLRequest> request = API::URLRequest::create(resourceRequest);
- return adoptRef(toImpl(m_client.createNewPage(toAPI(page), toAPI(request.ptr()), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
</del><ins>+ Ref<API::URLRequest> request = API::URLRequest::create(resourceRequest);
+ return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV1(toAPI(page), toAPI(request.ptr()), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
+ }
+
+ if (!m_client.createNewPage)
+ return nullptr;
+
+ auto configuration = page->configuration().copy();
+ configuration->setRelatedPage(page);
+
+ auto sourceFrameInfo = API::FrameInfo::create(*initiatingFrame, securityOriginData.securityOrigin());
+
+ bool shouldOpenAppLinks = !protocolHostAndPortAreEqual(WebCore::URL(WebCore::ParsedURLString, initiatingFrame->url()), resourceRequest.url());
+ auto apiNavigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.ptr(), nullptr, resourceRequest, WebCore::URL(), shouldOpenAppLinks);
+
+ auto apiWindowFeatures = API::WindowFeatures::create(windowFeatures);
+
+ return adoptRef(toImpl(m_client.createNewPage(toAPI(page), toAPI(configuration.ptr()), toAPI(apiNavigationAction.ptr()), toAPI(apiWindowFeatures.ptr()), m_client.base.clientInfo)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual void showPage(WebPageProxy* page) override
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> typedef uint32_t WKPluginUnavailabilityReason;
</span><span class="cx">
</span><span class="cx"> typedef void (*WKPageUIClientCallback)(WKPageRef page, const void* clientInfo);
</span><del>-typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKURLRequestRef urlRequest, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
</del><ins>+typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKPageConfigurationRef configuration, WKNavigationActionRef navigationAction, WKWindowFeaturesRef windowFeatures, const void *clientInfo);
</ins><span class="cx"> typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, WKSecurityOriginRef securityOrigin, const void *clientInfo);
</span><span class="cx"> typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, WKSecurityOriginRef securityOrigin, const void *clientInfo);
</span><span class="cx"> typedef WKStringRef (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, WKSecurityOriginRef securityOrigin, const void *clientInfo);
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx"> typedef void (*WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void *clientInfo);
</span><span class="cx"> typedef bool (*WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
</span><span class="cx"> typedef WKStringRef (*WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void *clientInfo);
</span><ins>+typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV1)(WKPageRef page, WKURLRequestRef urlRequest, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
</ins><span class="cx">
</span><span class="cx"> typedef struct WKPageUIClientBase {
</span><span class="cx"> int version;
</span><span class="lines">@@ -197,7 +198,7 @@
</span><span class="cx"> void* shouldInterruptJavaScript_unavailable;
</span><span class="cx">
</span><span class="cx"> // Version 1.
</span><del>- WKPageCreateNewPageCallback createNewPage;
</del><ins>+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage;
</ins><span class="cx"> WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
</span><span class="cx"> WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
</span><span class="cx"> WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
</span><span class="lines">@@ -248,7 +249,7 @@
</span><span class="cx"> void* shouldInterruptJavaScript_unavailable;
</span><span class="cx">
</span><span class="cx"> // Version 1.
</span><del>- WKPageCreateNewPageCallback createNewPage;
</del><ins>+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage;
</ins><span class="cx"> WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
</span><span class="cx"> WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
</span><span class="cx"> WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
</span><span class="lines">@@ -304,7 +305,7 @@
</span><span class="cx"> void* shouldInterruptJavaScript_unavailable;
</span><span class="cx">
</span><span class="cx"> // Version 1.
</span><del>- WKPageCreateNewPageCallback createNewPage;
</del><ins>+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage;
</ins><span class="cx"> WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
</span><span class="cx"> WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
</span><span class="cx"> WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
</span><span class="lines">@@ -363,7 +364,7 @@
</span><span class="cx"> void* shouldInterruptJavaScript_unavailable;
</span><span class="cx">
</span><span class="cx"> // Version 1.
</span><del>- WKPageCreateNewPageCallback createNewPage;
</del><ins>+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage;
</ins><span class="cx"> WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
</span><span class="cx"> WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
</span><span class="cx"> WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
</span><span class="lines">@@ -428,7 +429,7 @@
</span><span class="cx"> void* shouldInterruptJavaScript_unavailable;
</span><span class="cx">
</span><span class="cx"> // Version 1.
</span><del>- WKPageCreateNewPageCallback createNewPage;
</del><ins>+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage;
</ins><span class="cx"> WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
</span><span class="cx"> WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
</span><span class="cx"> WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
</span><span class="lines">@@ -456,6 +457,83 @@
</span><span class="cx"> WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange;
</span><span class="cx"> } WKPageUIClientV5;
</span><span class="cx">
</span><ins>+typedef struct WKPageUIClientV6 {
+ WKPageUIClientBase base;
+
+ // Version 0.
+ WKPageCreateNewPageCallback_deprecatedForUseWithV0 createNewPage_deprecatedForUseWithV0;
+ WKPageUIClientCallback showPage;
+ WKPageUIClientCallback close;
+ WKPageTakeFocusCallback takeFocus;
+ WKPageFocusCallback focus;
+ WKPageUnfocusCallback unfocus;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
+ WKPageSetStatusTextCallback setStatusText;
+ WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
+ WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
+ WKPageDidNotHandleKeyEventCallback didNotHandleKeyEvent;
+ WKPageDidNotHandleWheelEventCallback didNotHandleWheelEvent;
+ WKPageGetToolbarsAreVisibleCallback toolbarsAreVisible;
+ WKPageSetToolbarsAreVisibleCallback setToolbarsAreVisible;
+ WKPageGetMenuBarIsVisibleCallback menuBarIsVisible;
+ WKPageSetMenuBarIsVisibleCallback setMenuBarIsVisible;
+ WKPageGetStatusBarIsVisibleCallback statusBarIsVisible;
+ WKPageSetStatusBarIsVisibleCallback setStatusBarIsVisible;
+ WKPageGetIsResizableCallback isResizable;
+ WKPageSetIsResizableCallback setIsResizable;
+ WKPageGetWindowFrameCallback getWindowFrame;
+ WKPageSetWindowFrameCallback setWindowFrame;
+ WKPageRunBeforeUnloadConfirmPanelCallback runBeforeUnloadConfirmPanel;
+ WKPageUIClientCallback didDraw;
+ WKPageUIClientCallback pageDidScroll;
+ WKPageExceededDatabaseQuotaCallback exceededDatabaseQuota;
+ WKPageRunOpenPanelCallback runOpenPanel;
+ WKPageDecidePolicyForGeolocationPermissionRequestCallback decidePolicyForGeolocationPermissionRequest;
+ WKPageHeaderHeightCallback headerHeight;
+ WKPageFooterHeightCallback footerHeight;
+ WKPageDrawHeaderCallback drawHeader;
+ WKPageDrawFooterCallback drawFooter;
+ WKPagePrintFrameCallback printFrame;
+ WKPageUIClientCallback runModal;
+ void* unused1; // Used to be didCompleteRubberBandForMainFrame
+ WKPageSaveDataToFileInDownloadsFolderCallback saveDataToFileInDownloadsFolder;
+ void* shouldInterruptJavaScript_unavailable;
+
+ // Version 1.
+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage_deprecatedForUseWithV1;
+ WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
+ WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
+ WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
+
+ // Version 2.
+ WKPageShowColorPickerCallback showColorPicker;
+ WKPageHideColorPickerCallback hideColorPicker;
+ WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked;
+
+ // Version 3.
+ WKPagePinnedStateDidChangeCallback pinnedStateDidChange;
+
+ // Version 4.
+ WKPageDidBeginTrackingPotentialLongMousePressCallback didBeginTrackingPotentialLongMousePress;
+ WKPageDidRecognizeLongMousePressCallback didRecognizeLongMousePress;
+ WKPageDidCancelTrackingPotentialLongMousePressCallback didCancelTrackingPotentialLongMousePress;
+ WKPageIsPlayingAudioDidChangeCallback isPlayingAudioDidChange;
+
+ // Version 5.
+ WKPageDecidePolicyForUserMediaPermissionRequestCallback decidePolicyForUserMediaPermissionRequest;
+ WKPageDidClickAutoFillButtonCallback didClickAutoFillButton;
+ WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
+ WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
+ WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange;
+
+ // Version 6.
+ WKPageCreateNewPageCallback createNewPage;
+
+} WKPageUIClientV6;
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKWindowFeaturesRefcppfromrev188402trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.cpp (from rev 188402, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h) (0 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.cpp        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * 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 "WKWindowFeaturesRef.h"
+
+#include "APIWindowFeatures.h"
+#include "WKAPICast.h"
+
+WKTypeID WKWindowFeaturesGetTypeID()
+{
+ return WebKit::toAPI(API::WindowFeatures::APIType);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKWindowFeaturesRefhfromrev188402trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.h (from rev 188402, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h) (0 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKWindowFeaturesRef.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+/*
+ * 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 WKWindowFeaturesRef_h
+#define WKWindowFeaturesRef_h
+
+#include <WebKit/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKWindowFeaturesGetTypeID();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // WKWindowFeaturesRef_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.mm        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -31,82 +31,74 @@
</span><span class="cx"> #import <WebCore/WindowFeatures.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><del>-@implementation WKWindowFeatures {
- RetainPtr<NSNumber> _menuBarVisibility;
- RetainPtr<NSNumber> _statusBarVisibility;
- RetainPtr<NSNumber> _toolbarsVisibility;
</del><ins>+@implementation WKWindowFeatures
</ins><span class="cx">
</span><del>- RetainPtr<NSNumber> _allowsResizing;
-
- RetainPtr<NSNumber> _x;
- RetainPtr<NSNumber> _y;
- RetainPtr<NSNumber> _width;
- RetainPtr<NSNumber> _height;
-}
-
-- (instancetype)_initWithWindowFeatures:(const WebCore::WindowFeatures&)windowFeatures
</del><ins>+- (void)dealloc
</ins><span class="cx"> {
</span><del>- if (!(self = [super init]))
- return nil;
</del><ins>+ _windowFeatures->API::WindowFeatures::~WindowFeatures();
</ins><span class="cx">
</span><del>- // FIXME: These should be set to nil if the features didn't exist in the string.
- _menuBarVisibility = @(windowFeatures.menuBarVisible);
- _statusBarVisibility = @(windowFeatures.statusBarVisible);
- _toolbarsVisibility = @(windowFeatures.toolBarVisible || windowFeatures.locationBarVisible);
- _allowsResizing = @(windowFeatures.resizable);
-
- if (windowFeatures.x)
- _x = @(*windowFeatures.x);
- if (windowFeatures.y)
- _y = @(*windowFeatures.y);
- if (windowFeatures.width)
- _width = @(*windowFeatures.width);
- if (windowFeatures.height)
- _height = @(*windowFeatures.height);
-
- return self;
</del><ins>+ [super dealloc];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)menuBarVisibility
</span><span class="cx"> {
</span><del>- return _menuBarVisibility.get();
</del><ins>+ return @(_windowFeatures->windowFeatures().menuBarVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)statusBarVisibility
</span><span class="cx"> {
</span><del>- return _statusBarVisibility.get();
</del><ins>+ return @(_windowFeatures->windowFeatures().statusBarVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)toolbarsVisibility
</span><span class="cx"> {
</span><del>- return _toolbarsVisibility.get();
</del><ins>+ return @(_windowFeatures->windowFeatures().toolBarVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)allowsResizing
</span><span class="cx"> {
</span><del>- return _allowsResizing.get();
</del><ins>+ return @(_windowFeatures->windowFeatures().resizable);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)x
</span><span class="cx"> {
</span><del>- return _x.get();
</del><ins>+ if (auto x = _windowFeatures->windowFeatures().x)
+ return @(*x);
+
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)y
</span><span class="cx"> {
</span><del>- return _y.get();
</del><ins>+ if (auto y = _windowFeatures->windowFeatures().y)
+ return @(*y);
+
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)width
</span><span class="cx"> {
</span><del>- return _width.get();
</del><ins>+ if (auto width = _windowFeatures->windowFeatures().width)
+ return @(*width);
+
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSNumber *)height
</span><span class="cx"> {
</span><del>- return _height.get();
</del><ins>+ if (auto height = _windowFeatures->windowFeatures().height)
+ return @(*height);
+
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+ return *_windowFeatures;
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWindowFeaturesInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeaturesInternal.h        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -27,14 +27,23 @@
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><del>-namespace WebCore {
-struct WindowFeatures;
-}
</del><ins>+#import "APIWindowFeatures.h"
+#import "WKObject.h"
</ins><span class="cx">
</span><del>-@interface WKWindowFeatures ()
</del><ins>+namespace WebKit {
</ins><span class="cx">
</span><del>-- (instancetype)_initWithWindowFeatures:(const WebCore::WindowFeatures&)windowFeatures;
</del><ins>+inline WKWindowFeatures *wrapper(API::WindowFeatures& windowFeatures)
+{
+ ASSERT([windowFeatures.wrapper() isKindOfClass:[WKWindowFeatures class]]);
</ins><span class="cx">
</span><ins>+ return (WKWindowFeatures *)windowFeatures.wrapper();
+}
+
+}
+@interface WKWindowFeatures () <WKObject> {
+@package
+ API::ObjectStorage<API::WindowFeatures> _windowFeatures;
+}
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaUIDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -114,10 +114,12 @@
</span><span class="cx"> auto sourceFrameInfo = API::FrameInfo::create(*initiatingFrame, securityOriginData.securityOrigin());
</span><span class="cx">
</span><span class="cx"> bool shouldOpenAppLinks = !protocolHostAndPortAreEqual(WebCore::URL(WebCore::ParsedURLString, initiatingFrame->url()), request.url());
</span><del>- auto navigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.ptr(), nullptr, request, WebCore::URL(), shouldOpenAppLinks);
</del><ins>+ auto apiNavigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.ptr(), nullptr, request, WebCore::URL(), shouldOpenAppLinks);
</ins><span class="cx">
</span><del>- RetainPtr<WKWebView> webView = [delegate.get() webView:m_uiDelegate.m_webView createWebViewWithConfiguration:configuration.get() forNavigationAction:wrapper(navigationAction) windowFeatures:adoptNS([[WKWindowFeatures alloc] _initWithWindowFeatures:windowFeatures]).get()];
</del><ins>+ auto apiWindowFeatures = API::WindowFeatures::create(windowFeatures);
</ins><span class="cx">
</span><ins>+ RetainPtr<WKWebView> webView = [delegate.get() webView:m_uiDelegate.m_webView createWebViewWithConfiguration:configuration.get() forNavigationAction:wrapper(apiNavigationAction) windowFeatures:wrapper(apiWindowFeatures)];
+
</ins><span class="cx"> if (!webView)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (188403 => 188404)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-08-13 21:30:13 UTC (rev 188403)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-08-13 21:31:36 UTC (rev 188404)
</span><span class="lines">@@ -285,6 +285,8 @@
</span><span class="cx">                 1A64245E12DE29A100CAAE2C /* UpdateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64245C12DE29A100CAAE2C /* UpdateInfo.h */; };
</span><span class="cx">                 1A64245F12DE29A100CAAE2C /* UpdateInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */; };
</span><span class="cx">                 1A6509CE18B4146200614332 /* WKProcessPoolPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6509CD18B4146200614332 /* WKProcessPoolPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                1A6563E41B7A8C50009CF787 /* APIWindowFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */; };
+                1A6563E51B7A8C50009CF787 /* APIWindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */; };
</ins><span class="cx">                 1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */; };
</span><span class="cx">                 1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
</span><span class="cx">                 1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */; };
</span><span class="lines">@@ -300,6 +302,8 @@
</span><span class="cx">                 1A7284481959F8040007BCE5 /* SessionStateConversion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7284441959ED100007BCE5 /* SessionStateConversion.cpp */; };
</span><span class="cx">                 1A7865B916CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7865B716CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp */; };
</span><span class="cx">                 1A7865BA16CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7865B816CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h */; };
</span><ins>+                1A7C0DF61B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7C0DF41B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp */; };
+                1A7C0DF71B7D1F1000A9B848 /* WKWindowFeaturesRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7C0DF51B7D1F1000A9B848 /* WKWindowFeaturesRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7C6CD81378950800B9C04D /* EnvironmentVariables.cpp */; };
</span><span class="cx">                 1A7C6CDB1378950800B9C04D /* EnvironmentVariables.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7C6CD91378950800B9C04D /* EnvironmentVariables.h */; };
</span><span class="cx">                 1A7E377518E4A33A003D0FFF /* WKScriptMessageHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7E377418E4A33A003D0FFF /* WKScriptMessageHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="lines">@@ -2383,6 +2387,8 @@
</span><span class="cx">                 1A64245C12DE29A100CAAE2C /* UpdateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpdateInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UpdateInfo.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1A6509CD18B4146200614332 /* WKProcessPoolPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKProcessPoolPrivate.h; sourceTree = "<group>"; };
</span><ins>+                1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIWindowFeatures.cpp; sourceTree = "<group>"; };
+                1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWindowFeatures.h; sourceTree = "<group>"; };
</ins><span class="cx">                 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewInternal.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A6D141F1B0167D500785FF0 /* Info-OSX-10.9-10.10.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX-10.9-10.10.plist"; sourceTree = "<group>"; };
</span><span class="cx">                 1A6D14211B01681600785FF0 /* PluginService.32-64-10.9-10.10.Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "PluginService.32-64-10.9-10.10.Info.plist"; path = "PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist"; sourceTree = SOURCE_ROOT; };
</span><span class="lines">@@ -2401,6 +2407,8 @@
</span><span class="cx">                 1A7865B616CAC6FD00ACE83A /* PluginProcessConnectionManager.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = PluginProcessConnectionManager.messages.in; sourceTree = "<group>"; };
</span><span class="cx">                 1A7865B716CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessConnectionManagerMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1A7865B816CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessConnectionManagerMessages.h; sourceTree = "<group>"; };
</span><ins>+                1A7C0DF41B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKWindowFeaturesRef.cpp; sourceTree = "<group>"; };
+                1A7C0DF51B7D1F1000A9B848 /* WKWindowFeaturesRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWindowFeaturesRef.h; sourceTree = "<group>"; };
</ins><span class="cx">                 1A7C6CD81378950800B9C04D /* EnvironmentVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnvironmentVariables.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1A7C6CD91378950800B9C04D /* EnvironmentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnvironmentVariables.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A7DA54D1AFD8B380018239D /* Info-OSX-10.9-10.10.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX-10.9-10.10.plist"; sourceTree = "<group>"; };
</span><span class="lines">@@ -6252,6 +6260,8 @@
</span><span class="cx">                                 1A4832C61A9BC13C008B4DFE /* APIWebsiteDataRecord.h */,
</span><span class="cx">                                 1A3635A71A3144A300ED6197 /* APIWebsiteDataStore.cpp */,
</span><span class="cx">                                 1A3635A81A3144A300ED6197 /* APIWebsiteDataStore.h */,
</span><ins>+                                1A6563E21B7A8C50009CF787 /* APIWindowFeatures.cpp */,
+                                1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = API;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -6387,6 +6397,8 @@
</span><span class="cx">                                 7C89D2A21A678875003A5FDE /* WKUserScriptRef.h */,
</span><span class="cx">                                 1A57109C1ABA0027002FABBE /* WKWebsiteDataStoreRef.cpp */,
</span><span class="cx">                                 1A57109D1ABA0027002FABBE /* WKWebsiteDataStoreRef.h */,
</span><ins>+                                1A7C0DF41B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp */,
+                                1A7C0DF51B7D1F1000A9B848 /* WKWindowFeaturesRef.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = C;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -8043,6 +8055,7 @@
</span><span class="cx">                                 1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */,
</span><span class="cx">                                 1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
</span><span class="cx">                                 1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
</span><ins>+                                1A6563E51B7A8C50009CF787 /* APIWindowFeatures.h in Headers */,
</ins><span class="cx">                                 836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */,
</span><span class="cx">                                 1A52C0F81A38CDC70016160A /* WebStorageNamespaceProvider.h in Headers */,
</span><span class="cx">                                 BCC5715B115ADAEF001CCAF9 /* WebSystemInterface.h in Headers */,
</span><span class="lines">@@ -8168,6 +8181,7 @@
</span><span class="cx">                                 C54256B818BEC18C00DE4179 /* WKFormPopover.h in Headers */,
</span><span class="cx">                                 C54256BA18BEC18C00DE4179 /* WKFormSelectControl.h in Headers */,
</span><span class="cx">                                 BCE4695A1214EDF4000B98EB /* WKFormSubmissionListener.h in Headers */,
</span><ins>+                                1A7C0DF71B7D1F1000A9B848 /* WKWindowFeaturesRef.h in Headers */,
</ins><span class="cx">                                 37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */,
</span><span class="cx">                                 BCD0139B110FA420003B8A67 /* WKFrame.h in Headers */,
</span><span class="cx">                                 1A4D664C18A3030E00D82E21 /* WKFrameInfo.h in Headers */,
</span><span class="lines">@@ -9369,6 +9383,7 @@
</span><span class="cx">                                 7CEFA9621AC0999300B910FD /* APIUserContentExtensionStoreCocoa.mm in Sources */,
</span><span class="cx">                                 7C89D2A61A6789EA003A5FDE /* APIUserScript.cpp in Sources */,
</span><span class="cx">                                 C5E1AFEC16B21012006CC1F2 /* APIWebArchive.mm in Sources */,
</span><ins>+                                1A7C0DF61B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp in Sources */,
</ins><span class="cx">                                 C5E1AFEE16B21025006CC1F2 /* APIWebArchiveResource.mm in Sources */,
</span><span class="cx">                                 1A4832C71A9BC13C008B4DFE /* APIWebsiteDataRecord.cpp in Sources */,
</span><span class="cx">                                 1A3635A91A3144A300ED6197 /* APIWebsiteDataStore.cpp in Sources */,
</span><span class="lines">@@ -10031,6 +10046,7 @@
</span><span class="cx">                                 37BF2F071947DEB400723C48 /* WKNSURLRequest.mm in Sources */,
</span><span class="cx">                                 BC407601124FF0270068F20A /* WKNumber.cpp in Sources */,
</span><span class="cx">                                 7CD5EBB81746A15B000C1C45 /* WKObjCTypeWrapperRef.mm in Sources */,
</span><ins>+                                1A6563E41B7A8C50009CF787 /* APIWindowFeatures.cpp in Sources */,
</ins><span class="cx">                                 374436881820E7240049579F /* WKObject.mm in Sources */,
</span><span class="cx">                                 BC85806312B8505700EDEB2E /* WKOpenPanelParameters.cpp in Sources */,
</span><span class="cx">                                 BC85806212B8505700EDEB2E /* WKOpenPanelResultListener.cpp in Sources */,
</span></span></pre>
</div>
</div>
</body>
</html>