<!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>[171792] trunk</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/171792">171792</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-30 00:06:43 -0700 (Wed, 30 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=134830
Reviewed by Gustavo Noronha Silva.
Source/WebKit2:
It was added to make the API more convenient but it has ended up
making it more complicated. WebKitWebView::load-failed-with-tls-errors
now receives a GTlsCertificate + GTlsCertificateFlags and
webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
since the errors are not actually needed. This makes the API more
consistent with the existing method webkit_web_view_get_tls_info().
* PlatformGTK.cmake: Remove files from compilation.
* UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
* UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
* UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_allow_tls_certificate_for_host):
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewLoadFailedWithTLSErrors):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/webkit2.h:
Tools:
Update the SSL test for the API changes.
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testLoadFailedWithTLSErrors):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContexth">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtkdocssgml">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt">trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkwebkit2h">trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestSSLcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfocpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfoh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfoPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfoPrivate.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
+ https://bugs.webkit.org/show_bug.cgi?id=134830
+
+ Reviewed by Gustavo Noronha Silva.
+
+ It was added to make the API more convenient but it has ended up
+ making it more complicated. WebKitWebView::load-failed-with-tls-errors
+ now receives a GTlsCertificate + GTlsCertificateFlags and
+ webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
+ since the errors are not actually needed. This makes the API more
+ consistent with the existing method webkit_web_view_get_tls_info().
+
+ * PlatformGTK.cmake: Remove files from compilation.
+ * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
+ * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
+ * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_allow_tls_certificate_for_host):
+ * UIProcess/API/gtk/WebKitWebContext.h:
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkit_web_view_class_init):
+ (webkitWebViewLoadFailedWithTLSErrors):
+ * UIProcess/API/gtk/WebKitWebView.h:
+ * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
+ * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
+ * UIProcess/API/gtk/webkit2.h:
+
</ins><span class="cx"> 2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Do not initialize g_type system explicitly in the ewk_init()
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -100,9 +100,6 @@
</span><span class="cx"> UIProcess/API/gtk/WebKitBackForwardListItem.cpp
</span><span class="cx"> UIProcess/API/gtk/WebKitBackForwardListItem.h
</span><span class="cx"> UIProcess/API/gtk/WebKitBackForwardListPrivate.h
</span><del>- UIProcess/API/gtk/WebKitCertificateInfo.cpp
- UIProcess/API/gtk/WebKitCertificateInfo.h
- UIProcess/API/gtk/WebKitCertificateInfoPrivate.h
</del><span class="cx"> UIProcess/API/gtk/WebKitContextMenu.cpp
</span><span class="cx"> UIProcess/API/gtk/WebKitContextMenu.h
</span><span class="cx"> UIProcess/API/gtk/WebKitContextMenuActions.cpp
</span><span class="lines">@@ -324,7 +321,6 @@
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
</span><del>- ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCertificateInfo.h
</del><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCredential.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
</span><span class="cx"> ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfocpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.cpp (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.cpp        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.cpp        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Samsung Electronics Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebKitCertificateInfo.h"
-
-#include "WebKitCertificateInfoPrivate.h"
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-using namespace WebCore;
-
-/**
- * SECTION: WebKitCertificateInfo
- * @Short_description: Boxed type to encapsulate TLS certificate information
- * @Title: WebKitCertificateInfo
- * @See_also: #WebKitWebView, #WebKitWebContext
- *
- * When a client loads a page over HTTPS where there is an underlying TLS error
- * WebKit will fire a #WebKitWebView::load-failed-with-tls-errors signal with a
- * #WebKitCertificateInfo and the host of the failing URI.
- *
- * To handle this signal asynchronously you should make a copy of the
- * #WebKitCertificateInfo with webkit_certificate_info_copy().
- */
-
-G_DEFINE_BOXED_TYPE(WebKitCertificateInfo, webkit_certificate_info, webkit_certificate_info_copy, webkit_certificate_info_free)
-
-const CertificateInfo& webkitCertificateInfoGetCertificateInfo(WebKitCertificateInfo* info)
-{
- ASSERT(info);
- return info->certificateInfo;
-}
-
-/**
- * webkit_certificate_info_copy:
- * @info: a #WebKitCertificateInfo
- *
- * Make a copy of the #WebKitCertificateInfo.
- *
- * Returns: (transfer full): A copy of passed in #WebKitCertificateInfo.
- *
- * Since: 2.4
- */
-WebKitCertificateInfo* webkit_certificate_info_copy(WebKitCertificateInfo* info)
-{
- g_return_val_if_fail(info, 0);
-
- WebKitCertificateInfo* copy = g_slice_new0(WebKitCertificateInfo);
- new (copy) WebKitCertificateInfo(info);
- return copy;
-}
-
-/**
- * webkit_certificate_info_free:
- * @info: a #WebKitCertificateInfo
- *
- * Free the #WebKitCertificateInfo.
- *
- * Since: 2.4
- */
-void webkit_certificate_info_free(WebKitCertificateInfo* info)
-{
- g_return_if_fail(info);
-
- info->~WebKitCertificateInfo();
- g_slice_free(WebKitCertificateInfo, info);
-}
-
-/**
- * webkit_certificate_info_get_tls_certificate:
- * @info: a #WebKitCertificateInfo
- *
- * Get the #GTlsCertificate associated with this
- * #WebKitCertificateInfo.
- *
- * Returns: (transfer none): The certificate of @info.
- *
- * Since: 2.4
- */
-GTlsCertificate* webkit_certificate_info_get_tls_certificate(WebKitCertificateInfo *info)
-{
- g_return_val_if_fail(info, 0);
-
- return info->certificateInfo.certificate();
-}
-
-/**
- * webkit_certificate_info_get_tls_errors:
- * @info: a #WebKitCertificateInfo
- *
- * Get the #GTlsCertificateFlags verification status associated with this
- * #WebKitCertificateInfo.
- *
- * Returns: The verification status of @info.
- *
- * Since: 2.4
- */
-GTlsCertificateFlags webkit_certificate_info_get_tls_errors(WebKitCertificateInfo *info)
-{
- g_return_val_if_fail(info, static_cast<GTlsCertificateFlags>(0));
-
- return info->certificateInfo.tlsErrors();
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfoh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.h (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.h        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfo.h        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Samsung Electronics Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
-#error "Only <webkit2/webkit2.h> can be included directly."
-#endif
-
-#ifndef WebKitCertificateInfo_h
-#define WebKitCertificateInfo_h
-
-#include <gio/gio.h>
-#include <glib-object.h>
-#include <webkit2/WebKitDefines.h>
-
-G_BEGIN_DECLS
-
-#define WEBKIT_TYPE_CERTIFICATE_INFO (webkit_certificate_info_get_type())
-
-typedef struct _WebKitCertificateInfo WebKitCertificateInfo;
-
-WEBKIT_API GType
-webkit_certificate_info_get_type (void);
-
-WEBKIT_API WebKitCertificateInfo *
-webkit_certificate_info_copy (WebKitCertificateInfo *info);
-
-WEBKIT_API void
-webkit_certificate_info_free (WebKitCertificateInfo *info);
-
-WEBKIT_API GTlsCertificate *
-webkit_certificate_info_get_tls_certificate (WebKitCertificateInfo *info);
-
-WEBKIT_API GTlsCertificateFlags
-webkit_certificate_info_get_tls_errors (WebKitCertificateInfo *info);
-
-G_END_DECLS
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCertificateInfoPrivateh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfoPrivate.h (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfoPrivate.h        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCertificateInfoPrivate.h        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Samsung Electronics Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebKitCertificateInfoPrivate_h
-#define WebKitCertificateInfoPrivate_h
-
-#include "WebKitCertificateInfo.h"
-#include "WebKitPrivate.h"
-#include <WebCore/CertificateInfo.h>
-
-struct _WebKitCertificateInfo {
- _WebKitCertificateInfo(GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors)
- : certificateInfo(certificate, tlsErrors)
- {
- }
-
- _WebKitCertificateInfo(WebKitCertificateInfo* info)
- : certificateInfo(info->certificateInfo)
- {
- }
-
- WebCore::CertificateInfo certificateInfo;
-};
-
-const WebCore::CertificateInfo& webkitCertificateInfoGetCertificateInfo(WebKitCertificateInfo*);
-
-#endif // WebKitCertificateInfoPrivate_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include "WebCookieManagerProxy.h"
</span><span class="cx"> #include "WebGeolocationManagerProxy.h"
</span><span class="cx"> #include "WebKitBatteryProvider.h"
</span><del>-#include "WebKitCertificateInfoPrivate.h"
</del><span class="cx"> #include "WebKitCookieManagerPrivate.h"
</span><span class="cx"> #include "WebKitDownloadClient.h"
</span><span class="cx"> #include "WebKitDownloadPrivate.h"
</span><span class="lines">@@ -900,20 +899,20 @@
</span><span class="cx"> /**
</span><span class="cx"> * webkit_web_context_allow_tls_certificate_for_host:
</span><span class="cx"> * @context: a #WebKitWebContext
</span><del>- * @info: a #WebKitCertificateInfo
</del><ins>+ * @certificate: a #GTlsCertificate
</ins><span class="cx"> * @host: the host for which a certificate is to be allowed
</span><span class="cx"> *
</span><span class="cx"> * Ignore further TLS errors on the @host for the certificate present in @info.
</span><span class="cx"> *
</span><del>- * Since: 2.4
</del><ins>+ * Since: 2.6
</ins><span class="cx"> */
</span><del>-void webkit_web_context_allow_tls_certificate_for_host(WebKitWebContext* context, WebKitCertificateInfo* info, const gchar* host)
</del><ins>+void webkit_web_context_allow_tls_certificate_for_host(WebKitWebContext* context, GTlsCertificate* certificate, const gchar* host)
</ins><span class="cx"> {
</span><span class="cx"> g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
</span><del>- g_return_if_fail(info);
</del><ins>+ g_return_if_fail(G_IS_TLS_CERTIFICATE(certificate));
</ins><span class="cx"> g_return_if_fail(host);
</span><span class="cx">
</span><del>- RefPtr<WebCertificateInfo> webCertificateInfo = WebCertificateInfo::create(webkitCertificateInfoGetCertificateInfo(info));
</del><ins>+ RefPtr<WebCertificateInfo> webCertificateInfo = WebCertificateInfo::create(WebCore::CertificateInfo(certificate, static_cast<GTlsCertificateFlags>(0)));
</ins><span class="cx"> context->priv->context->allowSpecificHTTPSCertificateForHost(webCertificateInfo.get(), String::fromUTF8(host));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #define WebKitWebContext_h
</span><span class="cx">
</span><span class="cx"> #include <glib-object.h>
</span><del>-#include <webkit2/WebKitCertificateInfo.h>
</del><span class="cx"> #include <webkit2/WebKitCookieManager.h>
</span><span class="cx"> #include <webkit2/WebKitDefines.h>
</span><span class="cx"> #include <webkit2/WebKitDownload.h>
</span><span class="lines">@@ -236,7 +235,7 @@
</span><span class="cx">
</span><span class="cx"> WEBKIT_API void
</span><span class="cx"> webkit_web_context_allow_tls_certificate_for_host (WebKitWebContext *context,
</span><del>- WebKitCertificateInfo *info,
</del><ins>+ GTlsCertificate *certificate,
</ins><span class="cx"> const gchar *host);
</span><span class="cx">
</span><span class="cx"> WEBKIT_API void
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include "WebKitAuthenticationDialog.h"
</span><span class="cx"> #include "WebKitAuthenticationRequestPrivate.h"
</span><span class="cx"> #include "WebKitBackForwardListPrivate.h"
</span><del>-#include "WebKitCertificateInfoPrivate.h"
</del><span class="cx"> #include "WebKitContextMenuClient.h"
</span><span class="cx"> #include "WebKitContextMenuItemPrivate.h"
</span><span class="cx"> #include "WebKitContextMenuPrivate.h"
</span><span class="lines">@@ -871,16 +870,16 @@
</span><span class="cx"> /**
</span><span class="cx"> * WebKitWebView::load-failed-with-tls-errors:
</span><span class="cx"> * @web_view: the #WebKitWebView on which the signal is emitted
</span><del>- * @info: a #WebKitCertificateInfo
</del><ins>+ * @certificate: a #GTlsCertificate
+ * @errors: a #GTlsCertificateFlags with the verification status of @certificate
</ins><span class="cx"> * @host: the host on which the error occurred
</span><span class="cx"> *
</span><del>- * Emitted when a TLS error occurs during a load operation. The @info
- * object contains information about the error such as the #GTlsCertificate
- * and the #GTlsCertificateFlags. To allow an exception for this certificate
</del><ins>+ * Emitted when a TLS error occurs during a load operation.
+ * To allow an exception for this certificate
</ins><span class="cx"> * and this host use webkit_web_context_allow_tls_certificate_for_host().
</span><span class="cx"> *
</span><del>- * To handle this signal asynchronously you should copy the #WebKitCertificateInfo
- * with webkit_certificate_info_copy() and return %TRUE.
</del><ins>+ * To handle this signal asynchronously you should call g_object_ref() on @certificate
+ * and return %TRUE.
</ins><span class="cx"> *
</span><span class="cx"> * If %FALSE is returned, #WebKitWebView::load-failed will be emitted. The load
</span><span class="cx"> * will finish regardless of the returned value.
</span><span class="lines">@@ -888,7 +887,7 @@
</span><span class="cx"> * Returns: %TRUE to stop other handlers from being invoked for the event.
</span><span class="cx"> * %FALSE to propagate the event further.
</span><span class="cx"> *
</span><del>- * Since: 2.4
</del><ins>+ * Since: 2.6
</ins><span class="cx"> */
</span><span class="cx"> signals[LOAD_FAILED_WITH_TLS_ERRORS] =
</span><span class="cx"> g_signal_new("load-failed-with-tls-errors",
</span><span class="lines">@@ -896,9 +895,10 @@
</span><span class="cx"> G_SIGNAL_RUN_LAST,
</span><span class="cx"> G_STRUCT_OFFSET(WebKitWebViewClass, load_failed_with_tls_errors),
</span><span class="cx"> g_signal_accumulator_true_handled, 0 /* accumulator data */,
</span><del>- webkit_marshal_BOOLEAN__BOXED_STRING,
- G_TYPE_BOOLEAN, 2, /* number of parameters */
- WEBKIT_TYPE_CERTIFICATE_INFO | G_SIGNAL_TYPE_STATIC_SCOPE,
</del><ins>+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_TLS_CERTIFICATE,
+ G_TYPE_TLS_CERTIFICATE_FLAGS,
</ins><span class="cx"> G_TYPE_STRING);
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -1582,9 +1582,8 @@
</span><span class="cx"> WebKitTLSErrorsPolicy tlsErrorsPolicy = webkit_web_context_get_tls_errors_policy(webView->priv->context);
</span><span class="cx"> if (tlsErrorsPolicy == WEBKIT_TLS_ERRORS_POLICY_FAIL) {
</span><span class="cx"> GUniquePtr<SoupURI> soupURI(soup_uri_new(failingURI));
</span><del>- WebKitCertificateInfo info(certificate, tlsErrors);
</del><span class="cx"> gboolean returnValue;
</span><del>- g_signal_emit(webView, signals[LOAD_FAILED_WITH_TLS_ERRORS], 0, &info, soupURI->host, &returnValue);
</del><ins>+ g_signal_emit(webView, signals[LOAD_FAILED_WITH_TLS_ERRORS], 0, certificate, tlsErrors, soupURI->host, &returnValue);
</ins><span class="cx"> if (!returnValue)
</span><span class="cx"> g_signal_emit(webView, signals[LOAD_FAILED], 0, WEBKIT_LOAD_STARTED, failingURI, error, &returnValue);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -235,7 +235,8 @@
</span><span class="cx"> gboolean (* authenticate) (WebKitWebView *web_view,
</span><span class="cx"> WebKitAuthenticationRequest *request);
</span><span class="cx"> gboolean (* load_failed_with_tls_errors) (WebKitWebView *web_view,
</span><del>- WebKitCertificateInfo *info,
</del><ins>+ GTlsCertificate *certificate,
+ GTlsCertificateFlags errors,
</ins><span class="cx"> const gchar *host);
</span><span class="cx"> void (*_webkit_reserved0) (void);
</span><span class="cx"> void (*_webkit_reserved1) (void);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtkdocssgml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> <xi:include href="xml/WebKitContextMenuItem.xml"/>
</span><span class="cx"> <xi:include href="xml/WebKitFormSubmissionRequest.xml"/>
</span><span class="cx"> <xi:include href="xml/WebKitSecurityManager.xml"/>
</span><del>- <xi:include href="xml/WebKitCertificateInfo.xml"/>
</del><span class="cx"> </chapter>
</span><span class="cx">
</span><span class="cx"> <chapter>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkdocswebkit2gtksectionstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1142,18 +1142,3 @@
</span><span class="cx"> WebKitScriptWorldPrivate
</span><span class="cx"> webkit_script_world_get_type
</span><span class="cx"> </SECTION>
</span><del>-
-<SECTION>
-<FILE>WebKitCertificateInfo</FILE>
-WebKitCertificateInfo
-webkit_certificate_info_copy
-webkit_certificate_info_free
-webkit_certificate_info_get_tls_certificate
-webkit_certificate_info_get_tls_errors
-
-<SUBSECTION Standard>
-WEBKIT_TYPE_CERTIFICATE_INFO
-
-<SUBSECTION Private>
-webkit_certificate_info_get_type
-</SECTION>
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkwebkit2h"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include <webkit2/WebKitAuthenticationRequest.h>
</span><span class="cx"> #include <webkit2/WebKitBackForwardList.h>
</span><span class="cx"> #include <webkit2/WebKitBackForwardListItem.h>
</span><del>-#include <webkit2/WebKitCertificateInfo.h>
</del><span class="cx"> #include <webkit2/WebKitContextMenu.h>
</span><span class="cx"> #include <webkit2/WebKitContextMenuActions.h>
</span><span class="cx"> #include <webkit2/WebKitContextMenuItem.h>
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Tools/ChangeLog        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
+ https://bugs.webkit.org/show_bug.cgi?id=134830
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Update the SSL test for the API changes.
+
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
+ (testLoadFailedWithTLSErrors):
+
</ins><span class="cx"> 2014-07-24 David Farler <dfarler@apple.com>
</span><span class="cx">
</span><span class="cx"> Add knowledge of the iOS Simulator to webkitpy
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestSSLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp (171791 => 171792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp        2014-07-30 06:16:37 UTC (rev 171791)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp        2014-07-30 07:06:43 UTC (rev 171792)
</span><span class="lines">@@ -149,6 +149,7 @@
</span><span class="cx"> MAKE_GLIB_TEST_FIXTURE(TLSErrorsTest);
</span><span class="cx">
</span><span class="cx"> TLSErrorsTest()
</span><ins>+ : m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
</ins><span class="cx"> {
</span><span class="cx"> g_signal_connect(m_webView, "load-failed-with-tls-errors", G_CALLBACK(runLoadFailedWithTLSErrorsCallback), this);
</span><span class="cx"> }
</span><span class="lines">@@ -156,21 +157,19 @@
</span><span class="cx"> ~TLSErrorsTest()
</span><span class="cx"> {
</span><span class="cx"> g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
</span><del>- if (m_certificateInfo)
- webkit_certificate_info_free(m_certificateInfo);
</del><span class="cx"> }
</span><span class="cx">
</span><del>- static gboolean runLoadFailedWithTLSErrorsCallback(WebKitWebView*, WebKitCertificateInfo* info, const char* host, TLSErrorsTest* test)
</del><ins>+ static gboolean runLoadFailedWithTLSErrorsCallback(WebKitWebView*, GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors, const char* host, TLSErrorsTest* test)
</ins><span class="cx"> {
</span><del>- test->runLoadFailedWithTLSErrors(info, host);
</del><ins>+ test->runLoadFailedWithTLSErrors(certificate, tlsErrors, host);
</ins><span class="cx"> return TRUE;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void runLoadFailedWithTLSErrors(WebKitCertificateInfo* info, const char* host)
</del><ins>+ void runLoadFailedWithTLSErrors(GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors, const char* host)
</ins><span class="cx"> {
</span><del>- if (m_certificateInfo)
- webkit_certificate_info_free(m_certificateInfo);
- m_certificateInfo = webkit_certificate_info_copy(info);
</del><ins>+ assertObjectIsDeletedWhenTestFinishes(G_OBJECT(certificate));
+ m_certificate = certificate;
+ m_tlsErrors = tlsErrors;
</ins><span class="cx"> m_host.reset(g_strdup(host));
</span><span class="cx"> g_main_loop_quit(m_mainLoop);
</span><span class="cx"> }
</span><span class="lines">@@ -180,18 +179,13 @@
</span><span class="cx"> g_main_loop_run(m_mainLoop);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WebKitCertificateInfo* certificateInfo()
- {
- return m_certificateInfo;
- }
</del><ins>+ GTlsCertificate* certificate() const { return m_certificate.get(); }
+ GTlsCertificateFlags tlsErrors() const { return m_tlsErrors; }
+ const char* host() const { return m_host.get(); }
</ins><span class="cx">
</span><del>- const char* host()
- {
- return m_host.get();
- }
-
</del><span class="cx"> private:
</span><del>- WebKitCertificateInfo* m_certificateInfo;
</del><ins>+ GRefPtr<GTlsCertificate> m_certificate;
+ GTlsCertificateFlags m_tlsErrors;
</ins><span class="cx"> GUniquePtr<char> m_host;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -204,14 +198,14 @@
</span><span class="cx"> test->loadURI(kHttpsServer->getURIForPath("/test-tls/").data());
</span><span class="cx"> test->waitUntilLoadFailedWithTLSErrors();
</span><span class="cx"> // Test the WebKitCertificateInfo API.
</span><del>- g_assert(G_IS_TLS_CERTIFICATE(webkit_certificate_info_get_tls_certificate(test->certificateInfo())));
- g_assert_cmpuint(webkit_certificate_info_get_tls_errors(test->certificateInfo()), ==, G_TLS_CERTIFICATE_UNKNOWN_CA);
</del><ins>+ g_assert(G_IS_TLS_CERTIFICATE(test->certificate()));
+ g_assert_cmpuint(test->tlsErrors(), ==, G_TLS_CERTIFICATE_UNKNOWN_CA);
</ins><span class="cx"> g_assert_cmpstr(test->host(), ==, soup_uri_get_host(kHttpsServer->baseURI()));
</span><span class="cx"> g_assert_cmpint(test->m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
</span><span class="cx"> g_assert_cmpint(test->m_loadEvents[1], ==, LoadTrackingTest::LoadFinished);
</span><span class="cx">
</span><span class="cx"> // Test allowing an exception for this certificate on this host.
</span><del>- webkit_web_context_allow_tls_certificate_for_host(context, test->certificateInfo(), test->host());
</del><ins>+ webkit_web_context_allow_tls_certificate_for_host(context, test->certificate(), test->host());
</ins><span class="cx"> // The page should now load without errors.
</span><span class="cx"> test->loadURI(kHttpsServer->getURIForPath("/test-tls/").data());
</span><span class="cx"> test->waitUntilLoadFinished();
</span></span></pre>
</div>
</div>
</body>
</html>