<!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>[211870] trunk/Source</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/211870">211870</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-02-08 07:39:38 -0800 (Wed, 08 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add support for enhanced privacy diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167948
<rdar://problem/30385112>
Reviewed by Antti Koivisto.
Source/WebCore:
Add new logDiagnosticMessageWithEnhancedPrivacy() method to DiagnosticLoggingClient
that is used for enhanced privacy logging. Start using this new API to log domains
that are visited.
* loader/EmptyClients.cpp:
* loader/FrameLoader.cpp:
(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::domainVisitedKey):
* page/DiagnosticLoggingKeys.h:
Source/WebKit2:
Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
delegate.
* UIProcess/API/APIDiagnosticLoggingClient.h:
(API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageDiagnosticLoggingClient.cpp:
(WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageDiagnosticLoggingClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDiagnosticLoggingClienth">trunk/Source/WebCore/page/DiagnosticLoggingClient.h</a></li>
<li><a href="#trunkSourceWebCorepageDiagnosticLoggingKeyscpp">trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDiagnosticLoggingKeysh">trunk/Source/WebCore/page/DiagnosticLoggingKeys.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIDiagnosticLoggingClienth">trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageDiagnosticLoggingClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKDiagnosticLoggingDelegateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaDiagnosticLoggingClienth">trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaDiagnosticLoggingClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageDiagnosticLoggingClientcpp">trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageDiagnosticLoggingClienth">trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDiagnosticLoggingClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDiagnosticLoggingClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/ChangeLog        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2017-02-08 Chris Dumez <cdumez@apple.com>
+
+ Add support for enhanced privacy diagnostic logging
+ https://bugs.webkit.org/show_bug.cgi?id=167948
+ <rdar://problem/30385112>
+
+ Reviewed by Antti Koivisto.
+
+ Add new logDiagnosticMessageWithEnhancedPrivacy() method to DiagnosticLoggingClient
+ that is used for enhanced privacy logging. Start using this new API to log domains
+ that are visited.
+
+ * loader/EmptyClients.cpp:
+ * loader/FrameLoader.cpp:
+ (WebCore::logNavigation):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ * page/DiagnosticLoggingClient.h:
+ * page/DiagnosticLoggingKeys.cpp:
+ (WebCore::DiagnosticLoggingKeys::domainVisitedKey):
+ * page/DiagnosticLoggingKeys.h:
+
</ins><span class="cx"> 2017-02-08 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GStreamer] Critical warnings when media player is destroyed
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -121,6 +121,7 @@
</span><span class="cx"> void logDiagnosticMessage(const String&, const String&, ShouldSample) final { }
</span><span class="cx"> void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) final { }
</span><span class="cx"> void logDiagnosticMessageWithValue(const String&, const String&, double, unsigned, ShouldSample) final { }
</span><ins>+ void logDiagnosticMessageWithEnhancedPrivacy(const String&, const String&, ShouldSample) final { }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx"> #include "PluginDocument.h"
</span><span class="cx"> #include "PolicyChecker.h"
</span><span class="cx"> #include "ProgressTracker.h"
</span><ins>+#include "PublicSuffix.h"
</ins><span class="cx"> #include "ResourceHandle.h"
</span><span class="cx"> #include "ResourceLoadInfo.h"
</span><span class="cx"> #include "ResourceLoadObserver.h"
</span><span class="lines">@@ -1368,7 +1369,7 @@
</span><span class="cx"> loadWithDocumentLoader(newDocumentLoader, type, 0, AllowNavigationToInvalidURL::Yes);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void logNavigation(MainFrame& frame, FrameLoadType type)
</del><ins>+static void logNavigation(MainFrame& frame, const URL& destinationURL, FrameLoadType type)
</ins><span class="cx"> {
</span><span class="cx"> if (!frame.page())
</span><span class="cx"> return;
</span><span class="lines">@@ -1402,6 +1403,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> frame.page()->diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::navigationKey(), navigationDescription, ShouldSample::No);
</span><ins>+#if ENABLE(PUBLIC_SUFFIX_LIST)
+ String domain = topPrivatelyControlledDomain(destinationURL.host());
+ if (!domain.isEmpty())
+ frame.page()->diagnosticLoggingClient().logDiagnosticMessageWithEnhancedPrivacy(DiagnosticLoggingKeys::domainVisitedKey(), domain, ShouldSample::No);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, FormState* formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL)
</span><span class="lines">@@ -1422,9 +1428,11 @@
</span><span class="cx"> if (m_frame.document())
</span><span class="cx"> m_previousURL = m_frame.document()->url();
</span><span class="cx">
</span><ins>+ const URL& newURL = loader->request().url();
+
</ins><span class="cx"> // Log main frame navigation types.
</span><span class="cx"> if (m_frame.isMainFrame()) {
</span><del>- logNavigation(static_cast<MainFrame&>(m_frame), type);
</del><ins>+ logNavigation(static_cast<MainFrame&>(m_frame), newURL, type);
</ins><span class="cx"> static_cast<MainFrame&>(m_frame).performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadStarted);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1431,7 +1439,6 @@
</span><span class="cx"> policyChecker().setLoadType(type);
</span><span class="cx"> bool isFormSubmission = formState;
</span><span class="cx">
</span><del>- const URL& newURL = loader->request().url();
</del><span class="cx"> const String& httpMethod = loader->request().httpMethod();
</span><span class="cx">
</span><span class="cx"> if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
</span></span></pre></div>
<a id="trunkSourceWebCorepageDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> virtual void logDiagnosticMessage(const String& message, const String& description, ShouldSample) = 0;
</span><span class="cx"> virtual void logDiagnosticMessageWithResult(const String& message, const String& description, DiagnosticLoggingResultType, ShouldSample) = 0;
</span><span class="cx"> virtual void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, ShouldSample) = 0;
</span><ins>+ virtual void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, ShouldSample) = 0;
</ins><span class="cx">
</span><span class="cx"> static bool shouldLogAfterSampling(ShouldSample);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDiagnosticLoggingKeyscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -343,6 +343,11 @@
</span><span class="cx"> return ASCIILiteral("documentLoaderStopping");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+String DiagnosticLoggingKeys::domainVisitedKey()
+{
+ return ASCIILiteral("DomainVisited");
+}
+
</ins><span class="cx"> String DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey()
</span><span class="cx"> {
</span><span class="cx"> return ASCIILiteral("cannotSuspendActiveDOMObjects");
</span></span></pre></div>
<a id="trunkSourceWebCorepageDiagnosticLoggingKeysh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> static String diskCacheKey();
</span><span class="cx"> static String diskCacheAfterValidationKey();
</span><span class="cx"> static String documentLoaderStoppingKey();
</span><ins>+ static String domainVisitedKey();
</ins><span class="cx"> static String engineFailedToLoadKey();
</span><span class="cx"> WEBCORE_EXPORT static String entryRightlyNotWarmedUpKey();
</span><span class="cx"> WEBCORE_EXPORT static String entryWronglyNotWarmedUpKey();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/ChangeLog        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2017-02-08 Chris Dumez <cdumez@apple.com>
+
+ Add support for enhanced privacy diagnostic logging
+ https://bugs.webkit.org/show_bug.cgi?id=167948
+ <rdar://problem/30385112>
+
+ Reviewed by Antti Koivisto.
+
+ Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
+ virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
+ delegate.
+
+ * UIProcess/API/APIDiagnosticLoggingClient.h:
+ (API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+ * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
+ * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
+ * UIProcess/Cocoa/DiagnosticLoggingClient.h:
+ * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
+ (WebKit::DiagnosticLoggingClient::setDelegate):
+ (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+ * UIProcess/WebPageDiagnosticLoggingClient.cpp:
+ (WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+ * UIProcess/WebPageDiagnosticLoggingClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
+ (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):
+ * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
+
</ins><span class="cx"> 2017-02-08 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> Allow speculative redirects
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/APIDiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> virtual void logDiagnosticMessage(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
</span><span class="cx"> virtual void logDiagnosticMessageWithResult(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description, WebCore::DiagnosticLoggingResultType) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
</span><span class="cx"> virtual void logDiagnosticMessageWithValue(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description, const WTF::String& value) { UNUSED_PARAM(message); UNUSED_PARAM(description); UNUSED_PARAM(value); }
</span><ins>+ virtual void logDiagnosticMessageWithEnhancedPrivacy(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description) { UNUSED_PARAM(message); UNUSED_PARAM(description); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageDiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> typedef void (*WKPageLogDiagnosticMessageCallback)(WKPageRef page, WKStringRef message, WKStringRef description, const void* clientInfo);
</span><span class="cx"> typedef void (*WKPageLogDiagnosticMessageWithResultCallback)(WKPageRef page, WKStringRef message, WKStringRef description, WKDiagnosticLoggingResultType result, const void* clientInfo);
</span><span class="cx"> typedef void (*WKPageLogDiagnosticMessageWithValueCallback)(WKPageRef page, WKStringRef message, WKStringRef description, WKStringRef value, const void* clientInfo);
</span><ins>+typedef void (*WKPageLogDiagnosticMessageWithEnhancedPrivacyCallback)(WKPageRef page, WKStringRef message, WKStringRef description, const void* clientInfo);
</ins><span class="cx">
</span><span class="cx"> typedef struct WKPageDiagnosticLoggingClientBase {
</span><span class="cx"> int version;
</span><span class="lines">@@ -51,6 +52,18 @@
</span><span class="cx"> WKPageLogDiagnosticMessageWithValueCallback logDiagnosticMessageWithValue;
</span><span class="cx"> } WKPageDiagnosticLoggingClientV0;
</span><span class="cx">
</span><ins>+typedef struct WKPageDiagnosticLoggingClientV1 {
+ WKPageDiagnosticLoggingClientBase base;
+
+ // Version 0.
+ WKPageLogDiagnosticMessageCallback logDiagnosticMessage;
+ WKPageLogDiagnosticMessageWithResultCallback logDiagnosticMessageWithResult;
+ WKPageLogDiagnosticMessageWithValueCallback logDiagnosticMessageWithValue;
+
+ // Version 1.
+ WKPageLogDiagnosticMessageWithEnhancedPrivacyCallback logDiagnosticMessageWithEnhancedPrivacy;
+} WKPageDiagnosticLoggingClientV1;
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKDiagnosticLoggingDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> - (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message description:(NSString *)description;
</span><span class="cx"> - (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message description:(NSString *)description result:(_WKDiagnosticLoggingResultType)result;
</span><span class="cx"> - (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message description:(NSString *)description value:(NSString *) value;
</span><ins>+- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithEnhancedPrivacy:(NSString *)message description:(NSString *)description;
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> void logDiagnosticMessage(WebPageProxy*, const String& message, const String& description) override;
</span><span class="cx"> void logDiagnosticMessageWithResult(WebPageProxy*, const String& message, const String& description, WebCore::DiagnosticLoggingResultType) override;
</span><span class="cx"> void logDiagnosticMessageWithValue(WebPageProxy*, const String& message, const String& description, const String& value) override;
</span><ins>+ void logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy*, const String& message, const String& description) override;
</ins><span class="cx">
</span><span class="cx"> WKWebView *m_webView;
</span><span class="cx"> WeakObjCPtr<id <_WKDiagnosticLoggingDelegate>> m_delegate;
</span><span class="lines">@@ -59,6 +60,7 @@
</span><span class="cx"> unsigned webviewLogDiagnosticMessage : 1;
</span><span class="cx"> unsigned webviewLogDiagnosticMessageWithResult : 1;
</span><span class="cx"> unsigned webviewLogDiagnosticMessageWithValue : 1;
</span><ins>+ unsigned webviewLogDiagnosticMessageWithEnhancedPrivacy : 1;
</ins><span class="cx"> } m_delegateMethods;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaDiagnosticLoggingClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DiagnosticLoggingClient.mm        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> m_delegateMethods.webviewLogDiagnosticMessage = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessage:description:)];
</span><span class="cx"> m_delegateMethods.webviewLogDiagnosticMessageWithResult = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithResult:description:result:)];
</span><span class="cx"> m_delegateMethods.webviewLogDiagnosticMessageWithValue = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithValue:description:value:)];
</span><ins>+ m_delegateMethods.webviewLogDiagnosticMessageWithEnhancedPrivacy = [delegate respondsToSelector:@selector(_webView:logDiagnosticMessageWithEnhancedPrivacy:description:)];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DiagnosticLoggingClient::logDiagnosticMessage(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description)
</span><span class="lines">@@ -82,6 +83,12 @@
</span><span class="cx"> [m_delegate.get() _webView:m_webView logDiagnosticMessageWithValue:message description:description value:value];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(WebKit::WebPageProxy*, const WTF::String& message, const WTF::String& description)
+{
+ if (m_delegateMethods.webviewLogDiagnosticMessageWithEnhancedPrivacy)
+ [m_delegate.get() _webView:m_webView logDiagnosticMessageWithEnhancedPrivacy:message description:description];
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx">
</span><span class="cx"> #endif // WK_API_ENABLED
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageDiagnosticLoggingClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -61,4 +61,12 @@
</span><span class="cx"> m_client.logDiagnosticMessageWithValue(toAPI(page), toAPI(message.impl()), toAPI(description.impl()), toAPI(value.impl()), m_client.base.clientInfo);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy* page, const String& message, const String& description)
+{
+ if (!m_client.logDiagnosticMessageWithEnhancedPrivacy)
+ return;
+
+ m_client.logDiagnosticMessageWithEnhancedPrivacy(toAPI(page), toAPI(message.impl()), toAPI(description.impl()), m_client.base.clientInfo);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> namespace API {
</span><span class="cx">
</span><span class="cx"> template<> struct ClientTraits<WKPageDiagnosticLoggingClientBase> {
</span><del>- typedef std::tuple<WKPageDiagnosticLoggingClientV0> Versions;
</del><ins>+ typedef std::tuple<WKPageDiagnosticLoggingClientV0, WKPageDiagnosticLoggingClientV1> Versions;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace API
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> void logDiagnosticMessage(WebPageProxy*, const String& message, const String& description) override;
</span><span class="cx"> void logDiagnosticMessageWithResult(WebPageProxy*, const String& message, const String& description, WebCore::DiagnosticLoggingResultType) override;
</span><span class="cx"> void logDiagnosticMessageWithValue(WebPageProxy*, const String& message, const String& description, const String& value) override;
</span><ins>+ void logDiagnosticMessageWithEnhancedPrivacy(WebPageProxy*, const String& message, const String& description) override;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -5195,6 +5195,14 @@
</span><span class="cx"> m_diagnosticLoggingClient->logDiagnosticMessageWithValue(this, message, description, String::number(value, significantFigures));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, ShouldSample shouldSample)
+{
+ if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
+ return;
+
+ m_diagnosticLoggingClient->logDiagnosticMessageWithEnhancedPrivacy(this, message, description);
+}
+
</ins><span class="cx"> void WebPageProxy::rectForCharacterRangeCallback(const IntRect& rect, const EditingRange& actualRange, uint64_t callbackID)
</span><span class="cx"> {
</span><span class="cx"> MESSAGE_CHECK(actualRange.isValid());
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -1130,6 +1130,7 @@
</span><span class="cx"> void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample);
</span><span class="cx"> void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, WebCore::ShouldSample);
</span><span class="cx"> void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
</span><ins>+ void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample);
</ins><span class="cx">
</span><span class="cx"> // Form validation messages.
</span><span class="cx"> void showValidationMessage(const WebCore::IntRect& anchorClientRect, const String& message);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -238,6 +238,7 @@
</span><span class="cx"> LogDiagnosticMessage(String message, String description, enum WebCore::ShouldSample shouldSample)
</span><span class="cx"> LogDiagnosticMessageWithResult(String message, String description, uint32_t result, enum WebCore::ShouldSample shouldSample)
</span><span class="cx"> LogDiagnosticMessageWithValue(String message, String description, double value, unsigned significantFigures, enum WebCore::ShouldSample shouldSample)
</span><ins>+ LogDiagnosticMessageWithEnhancedPrivacy(String message, String description, enum WebCore::ShouldSample shouldSample)
</ins><span class="cx">
</span><span class="cx"> # Editor notifications
</span><span class="cx"> EditorStateChanged(struct WebKit::EditorState editorState)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDiagnosticLoggingClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -73,4 +73,14 @@
</span><span class="cx"> m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithValue(message, description, value, significantFigures, ShouldSample::No));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample shouldSample)
+{
+ ASSERT(!m_page.corePage() || m_page.corePage()->settings().diagnosticLoggingEnabled());
+
+ if (!shouldLogAfterSampling(shouldSample))
+ return;
+
+ m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithEnhancedPrivacy(message, description, ShouldSample::No));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDiagnosticLoggingClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h (211869 => 211870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h        2017-02-08 15:10:07 UTC (rev 211869)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h        2017-02-08 15:39:38 UTC (rev 211870)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample) override;
</span><span class="cx"> void logDiagnosticMessageWithResult(const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample) override;
</span><span class="cx"> void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample) override;
</span><ins>+ void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample) override;
</ins><span class="cx">
</span><span class="cx"> WebPage& m_page;
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>