<!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>[187370] 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/187370">187370</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-07-24 16:24:38 -0700 (Fri, 24 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Source/WebCore:
[Win] Connect UserScript and UserStyleSheet through WebView.
https://bugs.webkit.org/show_bug.cgi?id=147279
&lt;rdar://problem/21990767&gt;

Reviewed by Dean Jackson.

Tested by http/tests/security/contentSecurityPolicy/user-style-sheet-font-crasher.html as well
as many skipped tests.

* DerivedSources.cpp: Conditionally compile JSSecurityPolicyViolationEvent.cpp if CSP_NEXT is enabled.
* DerivedSources.make: Generate bindings for SecurityPolicyViolationEvent.idl.
* WebCore.vcxproj/WebCore.vcxproj: Add missing files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

Source/WebKit/win:
[Win] Connect UserScript and UserStyleSheet through WebView.
https://bugs.webkit.org/show_bug.cgi?id=147279
&lt;rdar://problem/21990767&gt;

Reviewed by Dean Jackson.

* Interfaces/IWebViewPrivate.idl: Add updated API for 'addUserScriptToGroup' and
'addUserStyleSheetToGroup'
* WebView.cpp:
(WebView::addUserScriptToGroup): Add implementation.
(toStringVector): Added helper function.
(WebView::addUserStyleSheetToGroup): Add implementation.
(WebView::removeUserScriptFromGroup): Ditto.
(WebView::removeUserStyleSheetFromGroup): Ditto.
(WebView::removeUserScriptsFromGroup): Ditto.
(WebView::removeUserStyleSheetsFromGroup): Ditto.
(WebView::removeAllUserContentFromGroup): Ditto.
* WebView.h:

Tools:
[Win] Activate CSP_NEXT and Connect UserScript and UserStyleSheet through WebView.
https://bugs.webkit.org/show_bug.cgi?id=147279
&lt;rdar://problem/21990767&gt;

Reviewed by Dean Jackson.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::addUserScript):
(TestRunner::addUserStyleSheet):
(TestRunner::setDeveloperExtrasEnabled):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesIWebViewPrivateidl">trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewh">trunk/Source/WebKit/win/WebView.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
<li><a href="#trunkWebKitLibrarieswintoolsvspropsFeatureDefinesprops">trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.props</a></li>
<li><a href="#trunkWebKitLibrarieswintoolsvspropsFeatureDefinesCairoprops">trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props</a></li>
<li><a href="#trunkWebKitLibrarieswintoolsvspropscommonprops">trunk/WebKitLibraries/win/tools/vsprops/common.props</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebCore/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-07-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Connect UserScript and UserStyleSheet through WebView.
+        https://bugs.webkit.org/show_bug.cgi?id=147279
+        &lt;rdar://problem/21990767&gt;
+
+        Reviewed by Dean Jackson.
+
+        Tested by http/tests/security/contentSecurityPolicy/user-style-sheet-font-crasher.html as well
+        as many skipped tests.
+
+        * DerivedSources.cpp: Conditionally compile JSSecurityPolicyViolationEvent.cpp if CSP_NEXT is enabled.
+        * DerivedSources.make: Generate bindings for SecurityPolicyViolationEvent.idl.
+        * WebCore.vcxproj/WebCore.vcxproj: Add missing files.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+
</ins><span class="cx"> 2015-07-24  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] Clean up server trust handling in ResourceHandle.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebCore/DerivedSources.cpp        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -314,6 +314,9 @@
</span><span class="cx"> #include &quot;JSScreen.cpp&quot;
</span><span class="cx"> #include &quot;JSScriptProfile.cpp&quot;
</span><span class="cx"> #include &quot;JSScriptProfileNode.cpp&quot;
</span><ins>+#if ENABLE(CSP_NEXT)
+#include &quot;JSSecurityPolicyViolationEvent.cpp&quot;
+#endif
</ins><span class="cx"> #include &quot;JSSQLError.cpp&quot;
</span><span class="cx"> #include &quot;JSSQLException.cpp&quot;
</span><span class="cx"> #include &quot;JSSQLResultSet.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebCore/DerivedSources.make        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -318,6 +318,7 @@
</span><span class="cx">     $(WebCore)/dom/Range.idl \
</span><span class="cx">     $(WebCore)/dom/RangeException.idl \
</span><span class="cx">     $(WebCore)/dom/RequestAnimationFrameCallback.idl \
</span><ins>+    $(WebCore)/dom/SecurityPolicyViolationEvent.idl \
</ins><span class="cx">     $(WebCore)/dom/StringCallback.idl \
</span><span class="cx">     $(WebCore)/dom/Text.idl \
</span><span class="cx">     $(WebCore)/dom/TextEvent.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -4029,6 +4029,21 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSSecurityPolicyViolationEvent.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
+
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSSQLError.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -7217,6 +7232,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\animation\CSSPropertyAnimation.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DeviceController.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DiagnosticLoggingKeys.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\page\DOMSecurityPolicy.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMSelection.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMTimer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMWindow.cpp&quot; /&gt;
</span><span class="lines">@@ -19874,6 +19890,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DeviceController.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DiagnosticLoggingKeys.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DiagnosticLoggingResultType.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\page\DOMSecurityPolicy.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMSelection.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMTimer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMWindow.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -5722,6 +5722,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSScreen.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSSecurityPolicyViolationEvent.cpp&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSSQLError.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -7272,6 +7275,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\win\GDIUtilities.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\page\DOMSecurityPolicy.cpp&quot;&gt;
+      &lt;Filter&gt;page&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\geolocation\Coordinates.h&quot;&gt;
</span><span class="lines">@@ -15264,6 +15270,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\win\GDIUtilities.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\page\DOMSecurityPolicy.h&quot;&gt;
+      &lt;Filter&gt;page&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;None Include=&quot;..\css\CSSGrammar.y.in&quot;&gt;
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebKit/win/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-07-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Connect UserScript and UserStyleSheet through WebView.
+        https://bugs.webkit.org/show_bug.cgi?id=147279
+        &lt;rdar://problem/21990767&gt;
+
+        Reviewed by Dean Jackson.
+
+        * Interfaces/IWebViewPrivate.idl: Add updated API for 'addUserScriptToGroup' and
+        'addUserStyleSheetToGroup'
+        * WebView.cpp:
+        (WebView::addUserScriptToGroup): Add implementation.
+        (toStringVector): Added helper function.
+        (WebView::addUserStyleSheetToGroup): Add implementation.
+        (WebView::removeUserScriptFromGroup): Ditto.
+        (WebView::removeUserStyleSheetFromGroup): Ditto.
+        (WebView::removeUserScriptsFromGroup): Ditto.
+        (WebView::removeUserStyleSheetsFromGroup): Ditto.
+        (WebView::removeAllUserContentFromGroup): Ditto.
+        * WebView.h:
+
</ins><span class="cx"> 2015-07-24  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove runtime flags for symbols
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesIWebViewPrivateidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -50,6 +50,11 @@
</span><span class="cx">     WebInjectAtDocumentEnd,
</span><span class="cx"> } WebUserScriptInjectionTime;
</span><span class="cx"> 
</span><ins>+typedef enum {
+    WebInjectInAllFrames = 0,
+    WebInjectInTopFrameOnly,
+} WebUserContentInjectedFrames;
+
</ins><span class="cx"> [
</span><span class="cx">     object,
</span><span class="cx">     oleautomation,
</span><span class="lines">@@ -304,4 +309,14 @@
</span><span class="cx"> 
</span><span class="cx">     HRESULT setCustomBackingScaleFactor([in] double);
</span><span class="cx">     HRESULT backingScaleFactor([out] double*);
</span><ins>+
+    HRESULT addUserScriptToGroup([in] BSTR groupName, [in] IWebScriptWorld*, [in] BSTR source, [in] BSTR url,
+        [in] unsigned whitelistCount, [in, size_is(whitelistCount)] BSTR* whitelist,
+        [in] unsigned blacklistCount, [in, size_is(blacklistCount)] BSTR* blacklist,
+        [in] WebUserScriptInjectionTime injectionTime, [in] WebUserContentInjectedFrames injectedFrames);
+
+    HRESULT addUserStyleSheetToGroup([in] BSTR groupName, [in] IWebScriptWorld*, [in] BSTR source, [in] BSTR url,
+        [in] unsigned whitelistCount, [in, size_is(whitelistCount)] BSTR* whitelist,
+        [in] unsigned blacklistCount, [in, size_is(blacklistCount)] BSTR* blacklist,
+        [in] WebUserContentInjectedFrames injectedFrames);
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebKit/win/WebView.cpp        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -157,6 +157,8 @@
</span><span class="cx"> #include &lt;WebCore/Settings.h&gt;
</span><span class="cx"> #include &lt;WebCore/SystemInfo.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserContentController.h&gt;
</span><ins>+#include &lt;WebCore/UserScript.h&gt;
+#include &lt;WebCore/UserStyleSheet.h&gt;
</ins><span class="cx"> #include &lt;WebCore/WindowMessageBroadcaster.h&gt;
</span><span class="cx"> #include &lt;WebCore/WindowsTouch.h&gt;
</span><span class="cx"> #include &lt;bindings/ScriptValue.h&gt;
</span><span class="lines">@@ -6518,34 +6520,141 @@
</span><span class="cx">                                       unsigned blacklistCount, BSTR* blacklist,
</span><span class="cx">                                       WebUserScriptInjectionTime injectionTime)
</span><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    return addUserScriptToGroup(groupName, iWorld, source, url, whitelistCount, whitelist, blacklistCount, blacklist, injectionTime, WebInjectInAllFrames);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static Vector&lt;String&gt; toStringVector(BSTR* entries, unsigned count)
+{
+    Vector&lt;String&gt; entriesVector;
+    if (!entries || !count)
+        return entriesVector;
+
+    for (unsigned i = 0; i &lt; count; ++i)
+        entriesVector.append(toString(entries[i]));
+
+    return entriesVector;
+}
+
+HRESULT WebView::addUserScriptToGroup(BSTR groupName, IWebScriptWorld* iWorld, BSTR source, BSTR url,
+    unsigned whitelistCount, BSTR* whitelist, unsigned blacklistCount, BSTR* blacklist,
+    WebUserScriptInjectionTime injectionTime, WebUserContentInjectedFrames injectedFrames)
+{
+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::getOrCreate(group, String());
+    if (!viewGroup)
+        return E_FAIL;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    auto userScript = std::make_unique&lt;UserScript&gt;(source, toURL(url), toStringVector(whitelist, whitelistCount),
+        toStringVector(blacklist, blacklistCount), injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd,
+        injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly);
+    viewGroup-&gt;userContentController().addUserScript(world-&gt;world(), WTF::move(userScript));
+    return S_OK;
+}
+
</ins><span class="cx"> HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld* iWorld, BSTR source, BSTR url,
</span><del>-                                          unsigned whitelistCount, BSTR* whitelist,
-                                          unsigned blacklistCount, BSTR* blacklist)
</del><ins>+    unsigned whitelistCount, BSTR* whitelist, unsigned blacklistCount, BSTR* blacklist)
</ins><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    return addUserStyleSheetToGroup(groupName, iWorld, source, url, whitelistCount, whitelist, blacklistCount, blacklist, WebInjectInAllFrames);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld* iWorld, BSTR source, BSTR url,
+    unsigned whitelistCount, BSTR* whitelist, unsigned blacklistCount, BSTR* blacklist, WebUserContentInjectedFrames injectedFrames)
+{
+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::getOrCreate(group, String());
+    if (!viewGroup)
+        return E_FAIL;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    auto styleSheet = std::make_unique&lt;UserStyleSheet&gt;(source, toURL(url), toStringVector(whitelist, whitelistCount), toStringVector(blacklist, blacklistCount),
+        injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly, UserStyleUserLevel);
+    viewGroup-&gt;userContentController().addUserStyleSheet(world-&gt;world(), WTF::move(styleSheet), InjectInExistingDocuments);
+    return S_OK;
+}
+
</ins><span class="cx"> HRESULT WebView::removeUserScriptFromGroup(BSTR groupName, IWebScriptWorld* iWorld, BSTR url)
</span><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::get(group);
+    if (!viewGroup)
+        return S_OK;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    viewGroup-&gt;userContentController().removeUserScript(world-&gt;world(), toURL(url));
+    return S_OK;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HRESULT WebView::removeUserStyleSheetFromGroup(BSTR groupName, IWebScriptWorld* iWorld, BSTR url)
</span><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::get(group);
+    if (!viewGroup)
+        return S_OK;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    viewGroup-&gt;userContentController().removeUserStyleSheet(world-&gt;world(), toURL(url));
+    return S_OK;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HRESULT WebView::removeUserScriptsFromGroup(BSTR groupName, IWebScriptWorld* iWorld)
</span><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::get(group);
+    if (!viewGroup)
+        return S_OK;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    viewGroup-&gt;userContentController().removeUserScripts(world-&gt;world());
+    return S_OK;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HRESULT WebView::removeUserStyleSheetsFromGroup(BSTR groupName, IWebScriptWorld* iWorld)
</span><span class="cx"> {
</span><del>-    return E_NOTIMPL;
</del><ins>+    String group = toString(groupName);
+    if (group.isEmpty())
+        return E_FAIL;
+
+    auto viewGroup = WebViewGroup::get(group);
+    if (!viewGroup)
+        return S_OK;
+
+    if (!iWorld)
+        return E_POINTER;
+
+    WebScriptWorld* world = reinterpret_cast&lt;WebScriptWorld*&gt;(iWorld);
+    viewGroup-&gt;userContentController().removeUserStyleSheets(world-&gt;world());
+    return S_OK;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> HRESULT WebView::removeAllUserContentFromGroup(BSTR groupName)
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.h (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.h        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Source/WebKit/win/WebView.h        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2012, 2014-2015 Apple Inc.  All rights reserved.
</ins><span class="cx">  * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved.
</span><span class="cx">  * Copyright (C) 2011 Brent Fulgham. All rights reserved.
</span><span class="cx">  *
</span><span class="lines">@@ -846,6 +846,10 @@
</span><span class="cx">     HRESULT STDMETHODCALLTYPE dispatchPendingLoadRequests();
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE setCustomBackingScaleFactor(double);
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE backingScaleFactor(double*);
</span><ins>+    virtual HRESULT STDMETHODCALLTYPE addUserScriptToGroup(BSTR groupName, IWebScriptWorld*, BSTR source, BSTR url,
+        unsigned whitelistCount, BSTR* whitelist, unsigned blacklistCount, BSTR* blacklist, WebUserScriptInjectionTime, WebUserContentInjectedFrames);
+    virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld*, BSTR source, BSTR url,
+        unsigned whitelistCount, BSTR* whitelist, unsigned blacklistCount, BSTR* blacklist, WebUserContentInjectedFrames);
</ins><span class="cx"> 
</span><span class="cx">     // WebView
</span><span class="cx">     bool shouldUseEmbeddedView(const WTF::String&amp; mimeType) const;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Tools/ChangeLog        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-07-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Activate CSP_NEXT and Connect UserScript and UserStyleSheet through WebView.
+        https://bugs.webkit.org/show_bug.cgi?id=147279
+        &lt;rdar://problem/21990767&gt;
+
+        Reviewed by Dean Jackson.
+
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        (TestRunner::addUserScript):
+        (TestRunner::addUserStyleSheet):
+        (TestRunner::setDeveloperExtrasEnabled):
+
</ins><span class="cx"> 2015-07-24  Basile Clement  &lt;basile_clement@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Call fixChangeLogPatch when generating patches from webkit-patch
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -997,7 +997,9 @@
</span><span class="cx">     if (FAILED(WebKitCreateInstance(__uuidof(WebScriptWorld), 0, __uuidof(world), reinterpret_cast&lt;void**&gt;(&amp;world))))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    webView-&gt;addUserScriptToGroup(_bstr_t(L&quot;org.webkit.DumpRenderTree&quot;).GetBSTR(), world.get(), bstrT(source).GetBSTR(), 0, 0, 0, 0, 0, runAtStart ? WebInjectAtDocumentStart : WebInjectAtDocumentEnd);
</del><ins>+    webView-&gt;addUserScriptToGroup(_bstr_t(L&quot;org.webkit.DumpRenderTree&quot;).GetBSTR(), world.get(), bstrT(source).GetBSTR(),
+        nullptr, 0, nullptr, 0, nullptr, runAtStart ? WebInjectAtDocumentStart : WebInjectAtDocumentEnd,
+        allFrames ? WebInjectInAllFrames : WebInjectInTopFrameOnly);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
</span><span class="lines">@@ -1010,7 +1012,8 @@
</span><span class="cx">     if (FAILED(WebKitCreateInstance(__uuidof(WebScriptWorld), 0, __uuidof(world), reinterpret_cast&lt;void**&gt;(&amp;world))))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    webView-&gt;addUserStyleSheetToGroup(_bstr_t(L&quot;org.webkit.DumpRenderTree&quot;).GetBSTR(), world.get(), bstrT(source).GetBSTR(), 0, 0, 0, 0, 0);
</del><ins>+    webView-&gt;addUserStyleSheetToGroup(_bstr_t(L&quot;org.webkit.DumpRenderTree&quot;).GetBSTR(), world.get(), bstrT(source).GetBSTR(),
+        nullptr, 0, nullptr, 0, nullptr, allFrames ? WebInjectInAllFrames : WebInjectInTopFrameOnly);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestRunner::setDeveloperExtrasEnabled(bool enabled)
</span></span></pre></div>
<a id="trunkWebKitLibrarieswintoolsvspropsFeatureDefinesprops"></a>
<div class="modfile"><h4>Modified: trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.props (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.props        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.props        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">     &lt;ENABLE_CANVAS_PATH&gt;ENABLE_CANVAS_PATH&lt;/ENABLE_CANVAS_PATH&gt;
</span><span class="cx">     &lt;ENABLE_CANVAS_PROXY /&gt;
</span><span class="cx">     &lt;ENABLE_CHANNEL_MESSAGING&gt;ENABLE_CHANNEL_MESSAGING&lt;/ENABLE_CHANNEL_MESSAGING&gt;
</span><del>-    &lt;ENABLE_CSP_NEXT /&gt;
</del><ins>+    &lt;ENABLE_CSP_NEXT&gt;ENABLE_CSP_NEXT&lt;/ENABLE_CSP_NEXT&gt;
</ins><span class="cx">     &lt;ENABLE_CSS3_CONDITIONAL_RULES&gt;ENABLE_CSS3_CONDITIONAL_RULES&lt;/ENABLE_CSS3_CONDITIONAL_RULES&gt;
</span><span class="cx">     &lt;ENABLE_CSS3_TEXT /&gt;
</span><span class="cx">     &lt;ENABLE_CSS_BOX_DECORATION_BREAK&gt;ENABLE_CSS_BOX_DECORATION_BREAK&lt;/ENABLE_CSS_BOX_DECORATION_BREAK&gt;
</span></span></pre></div>
<a id="trunkWebKitLibrarieswintoolsvspropsFeatureDefinesCairoprops"></a>
<div class="modfile"><h4>Modified: trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">     &lt;ENABLE_CANVAS_PATH&gt;ENABLE_CANVAS_PATH&lt;/ENABLE_CANVAS_PATH&gt;
</span><span class="cx">     &lt;ENABLE_CANVAS_PROXY /&gt;
</span><span class="cx">     &lt;ENABLE_CHANNEL_MESSAGING&gt;ENABLE_CHANNEL_MESSAGING&lt;/ENABLE_CHANNEL_MESSAGING&gt;
</span><del>-    &lt;ENABLE_CSP_NEXT /&gt;
</del><ins>+    &lt;ENABLE_CSP_NEXT&gt;ENABLE_CSP_NEXT&lt;/ENABLE_CSP_NEXT&gt;
</ins><span class="cx">     &lt;ENABLE_CSS3_CONDITIONAL_RULES&gt;ENABLE_CSS3_CONDITIONAL_RULES&lt;/ENABLE_CSS3_CONDITIONAL_RULES&gt;
</span><span class="cx">     &lt;ENABLE_CSS3_TEXT /&gt;
</span><span class="cx">     &lt;ENABLE_CSS_BOX_DECORATION_BREAK&gt;ENABLE_CSS_BOX_DECORATION_BREAK&lt;/ENABLE_CSS_BOX_DECORATION_BREAK&gt;
</span></span></pre></div>
<a id="trunkWebKitLibrarieswintoolsvspropscommonprops"></a>
<div class="modfile"><h4>Modified: trunk/WebKitLibraries/win/tools/vsprops/common.props (187369 => 187370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitLibraries/win/tools/vsprops/common.props        2015-07-24 23:12:41 UTC (rev 187369)
+++ trunk/WebKitLibraries/win/tools/vsprops/common.props        2015-07-24 23:24:38 UTC (rev 187370)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     &lt;ClCompile&gt;
</span><span class="cx">       &lt;AdditionalOptions&gt;/bigobj /GS %(AdditionalOptions)&lt;/AdditionalOptions&gt;
</span><span class="cx">       &lt;PreprocessorDefinitions&gt;_WINDOWS;WINVER=0x502;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_HAS_EXCEPTIONS=0;BUILDING_$(ProjectName);NOMINMAX;WIN32;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;
</span><del>-      &lt;PreprocessorDefinitions Condition=&quot;$(Platform)=='Win32'&quot;&gt;WIN32;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;
</del><ins>+      &lt;PreprocessorDefinitions Condition=&quot;$(Platform)=='Win32'&quot;&gt;WIN32;WINVER=0x601;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;
</ins><span class="cx">       &lt;PreprocessorDefinitions Condition=&quot;$(Platform)=='Win64'&quot;&gt;x64&lt;/PreprocessorDefinitions&gt;
</span><span class="cx">       &lt;ExceptionHandling&gt;false&lt;/ExceptionHandling&gt;
</span><span class="cx">       &lt;RuntimeTypeInfo&gt;false&lt;/RuntimeTypeInfo&gt;
</span></span></pre>
</div>
</div>

</body>
</html>