Title: [131732] trunk/Source/WebKit2
- Revision
- 131732
- Author
- [email protected]
- Date
- 2012-10-18 05:31:11 -0700 (Thu, 18 Oct 2012)
Log Message
[GTK] Don't use the C API internally in WebKitURIResponse
https://bugs.webkit.org/show_bug.cgi?id=96782
Reviewed by Xan Lopez.
Using the C++ classes directly instead of the C API wrappers we
avoid a lot of toImpl/toAPI casts, string conversions and
allocations. The code is also a lot simpler and easier to read.
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkitURIResponseSetCertificateInfo):
* UIProcess/API/gtk/WebKitURIResponsePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(setCertificateToMainResource):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (131731 => 131732)
--- trunk/Source/WebKit2/ChangeLog 2012-10-18 12:22:34 UTC (rev 131731)
+++ trunk/Source/WebKit2/ChangeLog 2012-10-18 12:31:11 UTC (rev 131732)
@@ -1,5 +1,22 @@
2012-10-18 Carlos Garcia Campos <[email protected]>
+ [GTK] Don't use the C API internally in WebKitURIResponse
+ https://bugs.webkit.org/show_bug.cgi?id=96782
+
+ Reviewed by Xan Lopez.
+
+ Using the C++ classes directly instead of the C API wrappers we
+ avoid a lot of toImpl/toAPI casts, string conversions and
+ allocations. The code is also a lot simpler and easier to read.
+
+ * UIProcess/API/gtk/WebKitURIResponse.cpp:
+ (webkitURIResponseSetCertificateInfo):
+ * UIProcess/API/gtk/WebKitURIResponsePrivate.h:
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (setCertificateToMainResource):
+
+2012-10-18 Carlos Garcia Campos <[email protected]>
+
[GTK] Don't use the C API internally in PolicyClient classes
https://bugs.webkit.org/show_bug.cgi?id=96781
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp (131731 => 131732)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp 2012-10-18 12:22:34 UTC (rev 131731)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp 2012-10-18 12:31:11 UTC (rev 131732)
@@ -37,7 +37,6 @@
PROP_SUGGESTED_FILENAME
};
-using namespace WebKit;
using namespace WebCore;
G_DEFINE_TYPE(WebKitURIResponse, webkit_uri_response, G_TYPE_OBJECT)
@@ -282,9 +281,9 @@
return uriResponse->priv->resourceResponse;
}
-void webkitURIResponseSetCertificateInfo(WebKitURIResponse* response, WKCertificateInfoRef wkCertificate)
+void webkitURIResponseSetCertificateInfo(WebKitURIResponse* response, WebCertificateInfo* certificate)
{
- const PlatformCertificateInfo& certificateInfo = toImpl(wkCertificate)->platformCertificateInfo();
+ const PlatformCertificateInfo& certificateInfo = certificate->platformCertificateInfo();
response->priv->resourceResponse.setSoupMessageCertificate(certificateInfo.certificate());
response->priv->resourceResponse.setSoupMessageTLSErrors(certificateInfo.tlsErrors());
}
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponsePrivate.h (131731 => 131732)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponsePrivate.h 2012-10-18 12:22:34 UTC (rev 131731)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponsePrivate.h 2012-10-18 12:31:11 UTC (rev 131732)
@@ -29,8 +29,10 @@
#include "WebKitURIResponse.h"
#include <WebCore/ResourceResponse.h>
+using namespace WebKit;
+
WebKitURIResponse* webkitURIResponseCreateForResourceResponse(const WebCore::ResourceResponse&);
const WebCore::ResourceResponse& webkitURIResponseGetResourceResponse(WebKitURIResponse*);
-void webkitURIResponseSetCertificateInfo(WebKitURIResponse*, WKCertificateInfoRef);
+void webkitURIResponseSetCertificateInfo(WebKitURIResponse*, WebCertificateInfo*);
#endif // WebKitURIResponsePrivate_h
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (131731 => 131732)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2012-10-18 12:22:34 UTC (rev 131731)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2012-10-18 12:31:11 UTC (rev 131732)
@@ -1231,7 +1231,7 @@
ASSERT(priv->mainResource.get());
webkitURIResponseSetCertificateInfo(webkit_web_resource_get_response(priv->mainResource.get()),
- WKFrameGetCertificateInfo(webkitWebResourceGetFrame(priv->mainResource.get())));
+ toImpl(WKFrameGetCertificateInfo(webkitWebResourceGetFrame(priv->mainResource.get()))));
}
static void webkitWebViewEmitLoadChanged(WebKitWebView* webView, WebKitLoadEvent loadEvent)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes