<!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>[218098] 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/218098">218098</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-12 05:58:50 -0700 (Mon, 12 Jun 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Prefer to use private WebKitWebView API over WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=173254

Reviewed by Žan Doberšek.

WebKitWebViewBase is specific to the GTK+ API, but WebKitWebView should be present in any glib-based API. Add
webkitWebViewCreatePage() and webkitWebViewGetPage() and use them when possible instead of the WebKitWebViewBase
ones.

* UIProcess/API/gtk/WebKitAutomationSession.cpp:
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(attachContextMenuClientToView):
* UIProcess/API/gtk/WebKitFindController.cpp:
(getPage):
(webkitFindControllerDispose):
(webkitFindControllerConstructed):
(webKitFindControllerPerform):
(webkit_find_controller_search_finish):
* UIProcess/API/gtk/WebKitFormClient.cpp:
(attachFormClientToView):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView):
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
(attachPolicyClientToView):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):
(webkitPrintOperationPrintPagesForFrame):
(webkit_print_operation_run_dialog):
(webkit_print_operation_print):
* UIProcess/API/gtk/WebKitUIClient.cpp:
(attachUIClientToView):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
(webkitWebContextWebViewDestroyed):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreatePage):
(webkitWebViewGetPage):
* UIProcess/API/gtk/WebKitWebViewPrivate.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitAutomationSessioncpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitContextMenuClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitFindControllercpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitFormClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitLoaderClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitPolicyClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitPrintOperationcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitUIClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog   2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/ChangeLog      2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -1,5 +1,46 @@
</span><span class="cx"> 2017-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><ins>+        [GTK] Prefer to use private WebKitWebView API over WebKitWebViewBase
+        https://bugs.webkit.org/show_bug.cgi?id=173254
+
+        Reviewed by Žan Doberšek.
+
+        WebKitWebViewBase is specific to the GTK+ API, but WebKitWebView should be present in any glib-based API. Add
+        webkitWebViewCreatePage() and webkitWebViewGetPage() and use them when possible instead of the WebKitWebViewBase
+        ones.
+
+        * UIProcess/API/gtk/WebKitAutomationSession.cpp:
+        * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
+        (attachContextMenuClientToView):
+        * UIProcess/API/gtk/WebKitFindController.cpp:
+        (getPage):
+        (webkitFindControllerDispose):
+        (webkitFindControllerConstructed):
+        (webKitFindControllerPerform):
+        (webkit_find_controller_search_finish):
+        * UIProcess/API/gtk/WebKitFormClient.cpp:
+        (attachFormClientToView):
+        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+        (attachLoaderClientToView):
+        * UIProcess/API/gtk/WebKitPolicyClient.cpp:
+        (attachPolicyClientToView):
+        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
+        (drawPagesForPrintingCompleted):
+        (webkitPrintOperationPrintPagesForFrame):
+        (webkit_print_operation_run_dialog):
+        (webkit_print_operation_print):
+        * UIProcess/API/gtk/WebKitUIClient.cpp:
+        (attachUIClientToView):
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkitWebContextCreatePageForWebView):
+        (webkitWebContextWebViewDestroyed):
+        * UIProcess/API/gtk/WebKitWebView.cpp:
+        (webkitWebViewCreatePage):
+        (webkitWebViewGetPage):
+        * UIProcess/API/gtk/WebKitWebViewPrivate.h:
+
+2017-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
+
</ins><span class="cx">         [GTK] getPage() in WebKitWebView should return a reference instead of a pointer
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=173251
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitAutomationSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp       2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp  2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> #include "APIAutomationSessionClient.h"
</span><span class="cx"> #include "WebKitAutomationSessionPrivate.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><del>-#include "WebKitWebView.h"
-#include "WebKitWebViewBasePrivate.h"
</del><ins>+#include "WebKitWebViewPrivate.h"
</ins><span class="cx"> #include <glib/gi18n-lib.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> 
</span><span class="lines">@@ -86,7 +85,7 @@
</span><span class="cx">         if (!webView || !webkit_web_view_is_controlled_by_automation(webView))
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><del>-        return webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
</del><ins>+        return &webkitWebViewGetPage(webView);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     WebKitAutomationSession* m_session;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitContextMenuClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp       2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp  2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "APIContextMenuClient.h"
</span><span class="cx"> #include "WebContextMenuItem.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="lines">@@ -57,7 +56,6 @@
</span><span class="cx"> 
</span><span class="cx"> void attachContextMenuClientToView(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    page->setContextMenuClient(std::make_unique<ContextMenuClient>(webView));
</del><ins>+    webkitWebViewGetPage(webView).setContextMenuClient(std::make_unique<ContextMenuClient>(webView));
</ins><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitFindControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp  2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp     2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> #include "APIFindClient.h"
</span><span class="cx"> #include "WebKitEnumTypes.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><del>-#include "WebKitWebView.h"
-#include "WebKitWebViewBasePrivate.h"
</del><ins>+#include "WebKitWebViewPrivate.h"
</ins><span class="cx"> #include <glib/gi18n-lib.h>
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="lines">@@ -102,9 +101,9 @@
</span><span class="cx">         | (findOptions & FindOptionsWrapAround ? WEBKIT_FIND_OPTIONS_WRAP_AROUND : 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline WebPageProxy* getPage(WebKitFindController* findController)
</del><ins>+static inline WebPageProxy& getPage(WebKitFindController* findController)
</ins><span class="cx"> {
</span><del>-    return webkitWebViewBaseGetPage(reinterpret_cast<WebKitWebViewBase*>(findController->priv->webView));
</del><ins>+    return webkitWebViewGetPage(findController->priv->webView);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class FindClient final : public API::FindClient {
</span><span class="lines">@@ -136,7 +135,7 @@
</span><span class="cx"> static void webkitFindControllerDispose(GObject* object)
</span><span class="cx"> {
</span><span class="cx">     WebKitFindController* findController = WEBKIT_FIND_CONTROLLER(object);
</span><del>-    getPage(findController)->setFindClient(nullptr);
</del><ins>+    getPage(findController).setFindClient(nullptr);
</ins><span class="cx"> 
</span><span class="cx">     G_OBJECT_CLASS(webkit_find_controller_parent_class)->dispose(object);
</span><span class="cx"> }
</span><span class="lines">@@ -146,7 +145,7 @@
</span><span class="cx">     G_OBJECT_CLASS(webkit_find_controller_parent_class)->constructed(object);
</span><span class="cx"> 
</span><span class="cx">     WebKitFindController* findController = WEBKIT_FIND_CONTROLLER(object);
</span><del>-    getPage(findController)->setFindClient(std::make_unique<FindClient>(findController));
</del><ins>+    getPage(findController).setFindClient(std::make_unique<FindClient>(findController));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void webkitFindControllerGetProperty(GObject* object, guint propId, GValue* value, GParamSpec* paramSpec)
</span><span class="lines">@@ -374,7 +373,7 @@
</span><span class="cx"> {
</span><span class="cx">     WebKitFindControllerPrivate* priv = findController->priv;
</span><span class="cx">     if (operation == CountOperation) {
</span><del>-        getPage(findController)->countStringMatches(String::fromUTF8(priv->searchText.data()),
</del><ins>+        getPage(findController).countStringMatches(String::fromUTF8(priv->searchText.data()),
</ins><span class="cx">             static_cast<WebKit::FindOptions>(priv->findOptions), priv->maxMatchCount);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -390,8 +389,7 @@
</span><span class="cx">         // extra unmarkAllTextMatches() + markAllTextMatches()
</span><span class="cx">         findOptions |= FindOptionsShowHighlight;
</span><span class="cx"> 
</span><del>-    getPage(findController)->findString(String::fromUTF8(priv->searchText.data()), static_cast<WebKit::FindOptions>(findOptions),
-                                        priv->maxMatchCount);
</del><ins>+    getPage(findController).findString(String::fromUTF8(priv->searchText.data()), static_cast<WebKit::FindOptions>(findOptions), priv->maxMatchCount);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline void webKitFindControllerSetSearchData(WebKitFindController* findController, const gchar* searchText, guint32 findOptions, guint maxMatchCount)
</span><span class="lines">@@ -508,5 +506,5 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_if_fail(WEBKIT_IS_FIND_CONTROLLER(findController));
</span><span class="cx"> 
</span><del>-    getPage(findController)->hideFindUI();
</del><ins>+    getPage(findController).hideFindUI();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitFormClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp      2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp 2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> #include "WebFormSubmissionListenerProxy.h"
</span><span class="cx"> #include "WebKitFormSubmissionRequestPrivate.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="cx"> 
</span><span class="lines">@@ -49,6 +48,5 @@
</span><span class="cx"> 
</span><span class="cx"> void attachFormClientToView(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>-    auto* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    page->setFormClient(std::make_unique<FormClient>(webView));
</del><ins>+    webkitWebViewGetPage(webView).setFormClient(std::make_unique<FormClient>(webView));
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp    2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp       2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #include "WebKitBackForwardListPrivate.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitURIResponsePrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include <wtf/glib/GUniquePtr.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="lines">@@ -121,7 +120,6 @@
</span><span class="cx"> 
</span><span class="cx"> void attachLoaderClientToView(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    page->setLoaderClient(std::make_unique<LoaderClient>(webView));
</del><ins>+    webkitWebViewGetPage(webView).setLoaderClient(std::make_unique<LoaderClient>(webView));
</ins><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitPolicyClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp    2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp       2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> #include "APIPolicyClient.h"
</span><span class="cx"> #include "WebKitNavigationPolicyDecisionPrivate.h"
</span><span class="cx"> #include "WebKitResponsePolicyDecisionPrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include "WebsitePolicies.h"
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="lines">@@ -62,6 +61,5 @@
</span><span class="cx"> 
</span><span class="cx"> void attachPolicyClientToView(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    page->setPolicyClient(std::make_unique<PolicyClient>(webView));
</del><ins>+    webkitWebViewGetPage(webView).setPolicyClient(std::make_unique<PolicyClient>(webView));
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitPrintOperationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp  2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp     2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> #include "WebKitPrintCustomWidgetPrivate.h"
</span><span class="cx"> #include "WebKitPrintOperationPrivate.h"
</span><span class="cx"> #include "WebKitPrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><ins>+#include "WebKitWebViewPrivate.h"
</ins><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include <WebCore/GtkUtilities.h>
</span><span class="cx"> #include <WebCore/NotImplemented.h>
</span><span class="lines">@@ -307,10 +307,8 @@
</span><span class="cx"> static void drawPagesForPrintingCompleted(API::Error* wkPrintError, WebKitPrintOperation* printOperation)
</span><span class="cx"> {
</span><span class="cx">     // When running synchronously WebPageProxy::printFrame() calls endPrinting().
</span><del>-    if (printOperation->priv->printMode == PrintInfo::PrintModeAsync && printOperation->priv->webView) {
-        WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
-        page->endPrinting();
-    }
</del><ins>+    if (printOperation->priv->printMode == PrintInfo::PrintModeAsync && printOperation->priv->webView)
+        webkitWebViewGetPage(printOperation->priv->webView).endPrinting();
</ins><span class="cx"> 
</span><span class="cx">     const WebCore::ResourceError& resourceError = wkPrintError ? wkPrintError->platformError() : WebCore::ResourceError();
</span><span class="cx">     if (!resourceError.isNull()) {
</span><span class="lines">@@ -324,9 +322,9 @@
</span><span class="cx"> static void webkitPrintOperationPrintPagesForFrame(WebKitPrintOperation* printOperation, WebFrameProxy* webFrame, GtkPrintSettings* printSettings, GtkPageSetup* pageSetup)
</span><span class="cx"> {
</span><span class="cx">     PrintInfo printInfo(printSettings, pageSetup, printOperation->priv->printMode);
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
</del><ins>+    auto& page = webkitWebViewGetPage(printOperation->priv->webView);
</ins><span class="cx">     g_object_ref(printOperation);
</span><del>-    page->drawPagesForPrinting(webFrame, printInfo, PrintFinishedCallback::create([printOperation](API::Error* printError, CallbackBase::Error) {
</del><ins>+    page.drawPagesForPrinting(webFrame, printInfo, PrintFinishedCallback::create([printOperation](API::Error* printError, CallbackBase::Error) {
</ins><span class="cx">         drawPagesForPrintingCompleted(printError, adoptGRef(printOperation).get());
</span><span class="cx">     }));
</span><span class="cx"> }
</span><span class="lines">@@ -466,8 +464,8 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_val_if_fail(WEBKIT_IS_PRINT_OPERATION(printOperation), WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL);
</span><span class="cx"> 
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
-    return webkitPrintOperationRunDialogForFrame(printOperation, parent, page->mainFrame());
</del><ins>+    auto& page = webkitWebViewGetPage(printOperation->priv->webView);
+    return webkitPrintOperationRunDialogForFrame(printOperation, parent, page.mainFrame());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -491,6 +489,6 @@
</span><span class="cx">     GRefPtr<GtkPrintSettings> printSettings = priv->printSettings ? priv->printSettings : adoptGRef(gtk_print_settings_new());
</span><span class="cx">     GRefPtr<GtkPageSetup> pageSetup = priv->pageSetup ? priv->pageSetup : adoptGRef(gtk_page_setup_new());
</span><span class="cx"> 
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
-    webkitPrintOperationPrintPagesForFrame(printOperation, page->mainFrame(), printSettings.get(), pageSetup.get());
</del><ins>+    auto& page = webkitWebViewGetPage(printOperation->priv->webView);
+    webkitPrintOperationPrintPagesForFrame(printOperation, page.mainFrame(), printSettings.get(), pageSetup.get());
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitUIClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp        2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp   2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitURIRequestPrivate.h"
</span><span class="cx"> #include "WebKitUserMediaPermissionRequestPrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include "WebKitWindowPropertiesPrivate.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="lines">@@ -217,7 +216,6 @@
</span><span class="cx"> 
</span><span class="cx"> void attachUIClientToView(WebKitWebView* webView)
</span><span class="cx"> {
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    page->setUIClient(std::make_unique<UIClient>(webView));
</del><ins>+    webkitWebViewGetPage(webView).setUIClient(std::make_unique<UIClient>(webView));
</ins><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp      2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> #include "WebKitURISchemeRequestPrivate.h"
</span><span class="cx"> #include "WebKitUserContentManagerPrivate.h"
</span><span class="cx"> #include "WebKitWebContextPrivate.h"
</span><del>-#include "WebKitWebViewBasePrivate.h"
</del><span class="cx"> #include "WebKitWebViewPrivate.h"
</span><span class="cx"> #include "WebKitWebsiteDataManagerPrivate.h"
</span><span class="cx"> #include "WebNotificationManagerProxy.h"
</span><span class="lines">@@ -1601,8 +1600,6 @@
</span><span class="cx"> 
</span><span class="cx"> void webkitWebContextCreatePageForWebView(WebKitWebContext* context, WebKitWebView* webView, WebKitUserContentManager* userContentManager, WebKitWebView* relatedView)
</span><span class="cx"> {
</span><del>-    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(webView);
-
</del><span class="cx">     // FIXME: icon database private mode is global, not per page, so while there are
</span><span class="cx">     // pages in private mode we need to enable the private mode in the icon database.
</span><span class="cx">     webkitWebContextEnableIconDatabasePrivateBrowsingIfNeeded(context, webView);
</span><span class="lines">@@ -1610,7 +1607,7 @@
</span><span class="cx">     auto pageConfiguration = API::PageConfiguration::create();
</span><span class="cx">     pageConfiguration->setProcessPool(context->priv->processPool.get());
</span><span class="cx">     pageConfiguration->setPreferences(webkitSettingsGetPreferences(webkit_web_view_get_settings(webView)));
</span><del>-    pageConfiguration->setRelatedPage(relatedView ? webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(relatedView)) : nullptr);
</del><ins>+    pageConfiguration->setRelatedPage(relatedView ? &webkitWebViewGetPage(relatedView) : nullptr);
</ins><span class="cx">     pageConfiguration->setUserContentController(userContentManager ? webkitUserContentManagerGetUserContentControllerProxy(userContentManager) : nullptr);
</span><span class="cx">     pageConfiguration->setControlledByAutomation(webkit_web_view_is_controlled_by_automation(webView));
</span><span class="cx"> 
</span><span class="lines">@@ -1619,17 +1616,15 @@
</span><span class="cx">         manager = context->priv->websiteDataManager.get();
</span><span class="cx">     pageConfiguration->setWebsiteDataStore(&webkitWebsiteDataManagerGetDataStore(manager));
</span><span class="cx">     pageConfiguration->setSessionID(pageConfiguration->websiteDataStore()->websiteDataStore().sessionID());
</span><del>-    webkitWebViewBaseCreateWebPage(webViewBase, WTFMove(pageConfiguration));
</del><ins>+    webkitWebViewCreatePage(webView, WTFMove(pageConfiguration));
</ins><span class="cx"> 
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(webViewBase);
-    context->priv->webViews.set(page->pageID(), webView);
</del><ins>+    context->priv->webViews.set(webkit_web_view_get_page_id(webView), webView);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void webkitWebContextWebViewDestroyed(WebKitWebContext* context, WebKitWebView* webView)
</span><span class="cx"> {
</span><span class="cx">     webkitWebContextDisableIconDatabasePrivateBrowsingIfNeeded(context, webView);
</span><del>-    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView));
-    context->priv->webViews.remove(page->pageID());
</del><ins>+    context->priv->webViews.remove(webkit_web_view_get_page_id(webView));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebKitWebView* webkitWebContextGetWebViewForPage(WebKitWebContext* context, WebPageProxy* page)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp    2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -1894,6 +1894,16 @@
</span><span class="cx">     webView->priv->authenticationRequest.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkitWebViewCreatePage(WebKitWebView* webView, Ref<API::PageConfiguration>&& configuration)
+{
+    webkitWebViewBaseCreateWebPage(WEBKIT_WEB_VIEW_BASE(webView), WTFMove(configuration));
+}
+
+WebPageProxy& webkitWebViewGetPage(WebKitWebView* webView)
+{
+    return getPage(webView);
+}
+
</ins><span class="cx"> void webkitWebViewLoadChanged(WebKitWebView* webView, WebKitLoadEvent loadEvent)
</span><span class="cx"> {
</span><span class="cx">     WebKitWebViewPrivate* priv = webView->priv;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h (218097 => 218098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h    2017-06-12 12:54:52 UTC (rev 218097)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h       2017-06-12 12:58:50 UTC (rev 218098)
</span><span class="lines">@@ -24,16 +24,20 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef WebKitWebViewPrivate_h
-#define WebKitWebViewPrivate_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><ins>+#include "APIPageConfiguration.h"
</ins><span class="cx"> #include "InstallMissingMediaPluginsPermissionRequest.h"
</span><span class="cx"> #include "WebContextMenuItemData.h"
</span><span class="cx"> #include "WebHitTestResultData.h"
</span><span class="cx"> #include "WebImage.h"
</span><ins>+#include "WebKitPrivate.h"
</ins><span class="cx"> #include "WebKitWebView.h"
</span><ins>+#include "WebPageProxy.h"
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> 
</span><ins>+void webkitWebViewCreatePage(WebKitWebView*, Ref<API::PageConfiguration>&&);
+WebKit::WebPageProxy& webkitWebViewGetPage(WebKitWebView*);
</ins><span class="cx"> void webkitWebViewLoadChanged(WebKitWebView*, WebKitLoadEvent);
</span><span class="cx"> void webkitWebViewLoadFailed(WebKitWebView*, WebKitLoadEvent, const char* failingURI, GError*);
</span><span class="cx"> void webkitWebViewLoadFailedWithTLSErrors(WebKitWebView*, const char* failingURI, GError*, GTlsCertificateFlags, GTlsCertificate*);
</span><span class="lines">@@ -68,5 +72,3 @@
</span><span class="cx"> void webkitWebViewSelectionDidChange(WebKitWebView*);
</span><span class="cx"> void webkitWebViewRequestInstallMissingMediaPlugins(WebKitWebView*, WebKit::InstallMissingMediaPluginsPermissionRequest&);
</span><span class="cx"> WebKitWebsiteDataManager* webkitWebViewGetWebsiteDataManager(WebKitWebView*);
</span><del>-
-#endif // WebKitWebViewPrivate_h
</del></span></pre>
</div>
</div>

</body>
</html>