<!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>[169069] branches/safari-538.34-branch/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/169069">169069</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-05-19 14:43:01 -0700 (Mon, 19 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/168994">r168994</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53834branchSourceWebCoreChangeLog">branches/safari-538.34-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53834branchSourceWebCoreWebCoreexpin">branches/safari-538.34-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari53834branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-538.34-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari53834branchSourceWebCorepagePagecpp">branches/safari-538.34-branch/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebCorepagePageh">branches/safari-538.34-branch/Source/WebCore/page/Page.h</a></li>
<li><a href="#branchessafari53834branchSourceWebCorepagePageGroupcpp">branches/safari-538.34-branch/Source/WebCore/page/PageGroup.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2ChangeLog">branches/safari-538.34-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2DerivedSourcesmake">branches/safari-538.34-branch/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2SharedAPICocoaWebKith">branches/safari-538.34-branch/Source/WebKit2/Shared/API/Cocoa/WebKit.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2SharedAPIcWKSharedAPICasth">branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2SharedAPIcWKUserScriptInjectionTimeh">branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2SharedWebPageCreationParameterscpp">branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2SharedWebPageCreationParametersh">branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICWKPageGroupcpp">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICWKPageGrouph">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKBrowsingContextGrouph">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKBrowsingContextGroupmm">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllerh">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllermm">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKWebViewmm">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessWebPageProxycpp">branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2WebKit2xcodeprojprojectpbxproj">branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlecpp">branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePrivateh">branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2WebProcessWebPageWebPageh">branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllerInternalh">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentControllerInternal.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScripth">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.h</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScriptmm">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm</a></li>
<li><a href="#branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScriptInternalh">branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScriptInternal.h</a></li>
<li>branches/safari-538.34-branch/Source/WebKit2/UIProcess/UserContent/</li>
<li>branches/safari-538.34-branch/Source/WebKit2/WebProcess/UserContent/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53834branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/ChangeLog (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/ChangeLog        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/ChangeLog        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-05-19  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r168994.
+
+    2014-05-16  Anders Carlsson  &lt;andersca@apple.com&gt;
+    
+            Expose WKUserScript as API
+            https://bugs.webkit.org/show_bug.cgi?id=133017
+            &lt;rdar://problem/16948059&gt;
+    
+            Reviewed by Sam Weinig.
+    
+            * WebCore.exp.in:
+            Export symbols.
+    
+            * WebCore.xcodeproj/project.pbxproj:
+            Change UserContentController.h to be a private header.
+    
+            * page/Page.cpp:
+            (WebCore::Page::Page):
+            Set m_userContentController from the page configuration and add it if it's not null.
+    
+            * page/Page.h:
+            Add UserContentController to PageClients.
+    
+            * page/PageGroup.cpp:
+            (WebCore::PageGroup::addPage):
+            Only try to add a user content controller if the page doesn't already have one.
+    
+            (WebCore::PageGroup::removePage):
+            Only try to remove the user content controller if it's the group one.
+    
</ins><span class="cx"> 2014-05-16  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r168777.
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/WebCore.exp.in (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/WebCore.exp.in        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/WebCore.exp.in        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -2183,6 +2183,10 @@
</span><span class="cx"> __ZN7WebCore20applicationIsHRBlockEv
</span><span class="cx"> __ZN7WebCore20builtInPDFPluginNameEv
</span><span class="cx"> __ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
</span><ins>+__ZN7WebCore21UserContentController13addUserScriptERNS_15DOMWrapperWorldENSt3__110unique_ptrINS_10UserScriptENS3_14default_deleteIS5_EEEE
+__ZN7WebCore21UserContentController17removeUserScriptsERNS_15DOMWrapperWorldE
+__ZN7WebCore21UserContentController6createEv
+__ZN7WebCore21UserContentControllerD1Ev
</ins><span class="cx"> __ZN7WebCore21applicationIsApertureEv
</span><span class="cx"> __ZN7WebCore21applicationIsVersionsEv
</span><span class="cx"> __ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -873,7 +873,7 @@
</span><span class="cx">                 1AE2AEC70A1D297B00B42B25 /* JSHTMLQuoteElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE2AEC30A1D297B00B42B25 /* JSHTMLQuoteElement.cpp */; };
</span><span class="cx">                 1AE2AEC80A1D297B00B42B25 /* JSHTMLQuoteElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE2AEC40A1D297B00B42B25 /* JSHTMLQuoteElement.h */; };
</span><span class="cx">                 1AE79D42188DB61F002239C2 /* UserContentController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE79D40188DB61F002239C2 /* UserContentController.cpp */; };
</span><del>-                1AE79D43188DB61F002239C2 /* UserContentController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE79D41188DB61F002239C2 /* UserContentController.h */; };
</del><ins>+                1AE79D43188DB61F002239C2 /* UserContentController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE79D41188DB61F002239C2 /* UserContentController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1AE82F8F0CAAFA9D002237AE /* JSDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE82F8D0CAAFA9D002237AE /* JSDatabase.cpp */; };
</span><span class="cx">                 1AE82F900CAAFA9D002237AE /* JSDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE82F8E0CAAFA9D002237AE /* JSDatabase.h */; };
</span><span class="cx">                 1AE82FEC0CAB07EE002237AE /* JSSQLResultSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE82FEA0CAB07EE002237AE /* JSSQLResultSet.cpp */; };
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/page/Page.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/page/Page.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/page/Page.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -197,13 +197,17 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
</span><span class="cx">     , m_framesHandlingBeforeUnloadEvent(0)
</span><ins>+    , m_userContentController(std::move(pageClients.userContentController))
</ins><span class="cx">     , m_visitedLinkStore(std::move(pageClients.visitedLinkStore))
</span><span class="cx">     , m_sessionID(SessionID::defaultSessionID())
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_editorClient);
</span><span class="cx">     
</span><span class="cx">     setTimerThrottlingEnabled(m_viewState &amp; ViewState::IsVisuallyIdle);
</span><del>-    
</del><ins>+
+    if (m_userContentController)
+        m_userContentController-&gt;addPage(*this);
+
</ins><span class="cx">     if (m_visitedLinkStore)
</span><span class="cx">         m_visitedLinkStore-&gt;addPage(*this);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/page/Page.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/page/Page.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/page/Page.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -118,6 +118,7 @@
</span><span class="cx">     static void updateStyleForAllPagesAfterGlobalChangeInEnvironment();
</span><span class="cx"> 
</span><span class="cx">     // It is up to the platform to ensure that non-null clients are provided where required.
</span><ins>+    // FIXME: Rename this to PageConfiguration and move it to its own class.
</ins><span class="cx">     struct PageClients {
</span><span class="cx">         WTF_MAKE_NONCOPYABLE(PageClients); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     public:
</span><span class="lines">@@ -138,6 +139,7 @@
</span><span class="cx">         ValidationMessageClient* validationMessageClient;
</span><span class="cx">         FrameLoaderClient* loaderClientForMainFrame;
</span><span class="cx"> 
</span><ins>+        RefPtr&lt;UserContentController&gt; userContentController;
</ins><span class="cx">         RefPtr&lt;VisitedLinkStore&gt; visitedLinkStore;
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebCorepagePageGroupcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebCore/page/PageGroup.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebCore/page/PageGroup.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebCore/page/PageGroup.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -167,7 +167,8 @@
</span><span class="cx">     ASSERT(!m_pages.contains(&amp;page));
</span><span class="cx">     m_pages.add(&amp;page);
</span><span class="cx"> 
</span><del>-    page.setUserContentController(m_userContentController.get());
</del><ins>+    if (!page.userContentController())
+        page.setUserContentController(m_userContentController.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageGroup::removePage(Page&amp; page)
</span><span class="lines">@@ -175,7 +176,8 @@
</span><span class="cx">     ASSERT(m_pages.contains(&amp;page));
</span><span class="cx">     m_pages.remove(&amp;page);
</span><span class="cx"> 
</span><del>-    page.setUserContentController(nullptr);
</del><ins>+    if (page.userContentController() == m_userContentController)
+        page.setUserContentController(nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> VisitedLinkStore&amp; PageGroup::visitedLinkStore()
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/ChangeLog (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/ChangeLog        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/ChangeLog        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -1,3 +1,178 @@
</span><ins>+2014-05-19  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r168994.
+
+    2014-05-16  Anders Carlsson  &lt;andersca@apple.com&gt;
+    
+            Expose WKUserScript as API
+            https://bugs.webkit.org/show_bug.cgi?id=133017
+            &lt;rdar://problem/16948059&gt;
+    
+            Reviewed by Sam Weinig.
+    
+            * DerivedSources.make:
+            Add WebUserContentController.
+    
+            * Shared/API/Cocoa/WebKit.h:
+            Add WKUserScript.h
+    
+            * Shared/API/c/WKSharedAPICast.h:
+            (WebKit::toUserScriptInjectionTime):
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+    
+            * Shared/API/c/WKUserScriptInjectionTime.h:
+            Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
+    
+            * Shared/WebPageCreationParameters.cpp:
+            (WebKit::WebPageCreationParameters::encode):
+            Encode the user content controller ID.
+    
+            (WebKit::WebPageCreationParameters::decode):
+            Decode the user content controller ID.
+    
+            * Shared/WebPageCreationParameters.h:
+            Add userContentControllerID.
+    
+            * UIProcess/API/C/WKPageGroup.cpp:
+            (WKPageGroupAddUserScript):
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+    
+            * UIProcess/API/C/WKPageGroup.h:
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+    
+            * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+    
+            * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
+            (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+    
+            * UIProcess/API/Cocoa/WKUserContentController.h:
+            Add new methods.
+    
+            * UIProcess/API/Cocoa/WKUserContentController.mm:
+            (-[WKUserContentController init]):
+            Create the WebUserContentControllerProxy object and user scripts array.
+    
+            (-[WKUserContentController userScripts]):
+            Return the user scripts array.
+    
+            (toWebCoreUserScriptInjectionTime):
+            Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
+    
+            (-[WKUserContentController addUserScript:]):
+            Call through to the _userContentControllerProxy object.
+    
+            (-[WKUserContentController removeAllUserScripts]):
+            Call through to the _userContentControllerProxy object.
+            
+            * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
+            Add WebUserContentControllerProxy ivar.
+    
+            * UIProcess/API/Cocoa/WKUserScript.h: Added.
+            Add new header.
+    
+            * UIProcess/API/Cocoa/WKUserScript.mm:
+            (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
+            Initialize the WKUserScript object.
+    
+            (-[WKUserScript source]):
+            (-[WKUserScript injectionTime]):
+            (-[WKUserScript isForMainFrameOnly]):
+            Add getters.
+    
+            (-[WKUserScript copyWithZone:]):
+            Since WKUserScript is immutable, just return a retained object.
+    
+            * UIProcess/API/Cocoa/WKUserScriptInternal.h:
+            Add ivars.
+    
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (-[WKWebView initWithFrame:configuration:]):
+            Set the user content controller from the configuration.
+    
+            * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
+            (WebKit::generateIdentifier):
+            Return a unique identifier.
+    
+            (WebKit::WebUserContentControllerProxy::create):
+            Return a new WebUserContentControllerProxy object.
+    
+            (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
+            Initialize m_identifier.
+    
+            (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
+            Add destructor.
+    
+            (WebKit::WebUserContentControllerProxy::addProcess):
+            Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
+    
+            (WebKit::WebUserContentControllerProxy::removeProcess):
+            Remove the process from m_processes.
+    
+            (WebKit::WebUserContentControllerProxy::addUserScript):
+            Add the user script and let all the web processes know that it was added.
+    
+            (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
+            Remove all user scripts and tell all the web processes about it.
+            
+            * UIProcess/UserContent/WebUserContentControllerProxy.h:
+            Add new class.
+    
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::WebPageProxy):
+            If the process is already running, add it to the user content controller.
+    
+            (WebKit::WebPageProxy::close):
+            If the process is running, remove it from the user content controller.
+    
+            (WebKit::WebPageProxy::connectionWillOpen):
+            Add the process to the user content controller.
+    
+            (WebKit::WebPageProxy::resetStateAfterProcessExited):
+            Remove the process from the user content controller.
+    
+            (WebKit::WebPageProxy::creationParameters):
+            Pass along the user content controller ID when creating the web page.
+    
+            * UIProcess/WebPageProxy.h:
+            Add a WebUserContentControllerProxy object to the web page configuration.
+    
+            * WebKit2.xcodeproj/project.pbxproj:
+            Add new files.
+    
+            * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+            * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+            Update for WKUserScriptInjectionTime -&gt; _WKUserScriptInjectionTime rename.
+            
+            * WebProcess/UserContent/WebUserContentController.cpp: Added.
+            New class that manages a WebCore::UserContentController object.
+    
+            (WebKit::WebUserContentController::getOrCreate):
+            Look up (or create) a WebUserContentController object given its identifier.
+    
+            (WebKit::WebUserContentController::WebUserContentController):
+            Add ourselves as a message receiver.
+    
+            (WebKit::WebUserContentController::~WebUserContentController):
+            Remove ourselves as a message receiver.
+    
+            (WebKit::WebUserContentController::addUserScripts):
+            Add all passed in user scripts to the WebCore user content controller object.
+    
+            (WebKit::WebUserContentController::removeAllUserScripts):
+            Remove all user scripts from the WebCore user content controller object.
+    
+            * WebProcess/UserContent/WebUserContentController.messages.in: Added.
+            Add new messages file.
+    
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::WebPage):
+            Get a WebUserContentController object and pass it along to WebCore.
+    
+            * WebProcess/WebPage/WebPage.h:
+            Add WebUserContentController member.
+    
</ins><span class="cx"> 2014-05-18  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r168976
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/DerivedSources.make (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/DerivedSources.make        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/DerivedSources.make        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx">     $(WebKit2)/WebProcess/ResourceCache \
</span><span class="cx">     $(WebKit2)/WebProcess/Scrolling \
</span><span class="cx">     $(WebKit2)/WebProcess/Storage \
</span><ins>+    $(WebKit2)/WebProcess/UserContent \
</ins><span class="cx">     $(WebKit2)/WebProcess/WebCoreSupport \
</span><span class="cx">     $(WebKit2)/WebProcess/WebPage \
</span><span class="cx">     $(WebKit2)/WebProcess/ios \
</span><span class="lines">@@ -133,6 +134,7 @@
</span><span class="cx">     WebResourceCacheManager \
</span><span class="cx">     WebResourceCacheManagerProxy \
</span><span class="cx">     WebResourceLoader \
</span><ins>+    WebUserContentController \
</ins><span class="cx">     WebVideoFullscreenManager \
</span><span class="cx">     WebVideoFullscreenManagerProxy \
</span><span class="cx"> #
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2SharedAPICocoaWebKith"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/Shared/API/Cocoa/WebKit.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/Shared/API/Cocoa/WebKit.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/Shared/API/Cocoa/WebKit.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #import &lt;WebKit/WKScriptMessageHandler.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKUIDelegate.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKUserContentController.h&gt;
</span><ins>+#import &lt;WebKit/WKUserScript.h&gt;
</ins><span class="cx"> #import &lt;WebKit/WKWebView.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKWebViewConfiguration.h&gt;
</span><span class="cx"> #import &lt;WebKit/WebKitLegacy.h&gt;
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2SharedAPIcWKSharedAPICasth"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -895,7 +895,7 @@
</span><span class="cx">     return snapshotOptions;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline WebCore::UserScriptInjectionTime toUserScriptInjectionTime(WKUserScriptInjectionTime wkInjectedTime)
</del><ins>+inline WebCore::UserScriptInjectionTime toUserScriptInjectionTime(_WKUserScriptInjectionTime wkInjectedTime)
</ins><span class="cx"> {
</span><span class="cx">     switch (wkInjectedTime) {
</span><span class="cx">     case kWKInjectAtDocumentStart:
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2SharedAPIcWKUserScriptInjectionTimeh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -26,10 +26,10 @@
</span><span class="cx"> #ifndef WKUserScriptInjectionTime_h
</span><span class="cx"> #define WKUserScriptInjectionTime_h
</span><span class="cx"> 
</span><del>-enum WKUserScriptInjectionTime {
</del><ins>+enum _WKUserScriptInjectionTime {
</ins><span class="cx">     kWKInjectAtDocumentStart,
</span><span class="cx">     kWKInjectAtDocumentEnd
</span><span class="cx"> };
</span><del>-typedef enum WKUserScriptInjectionTime WKUserScriptInjectionTime;
</del><ins>+typedef enum _WKUserScriptInjectionTime _WKUserScriptInjectionTime;
</ins><span class="cx"> 
</span><span class="cx"> #endif /* WKUserScriptInjectionTime_h */
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     encoder &lt;&lt; sessionState;
</span><span class="cx">     encoder &lt;&lt; sessionID;
</span><span class="cx">     encoder &lt;&lt; highestUsedBackForwardItemID;
</span><ins>+    encoder &lt;&lt; userContentControllerID;
</ins><span class="cx">     encoder &lt;&lt; visitedLinkTableID;
</span><span class="cx">     encoder &lt;&lt; canRunBeforeUnloadConfirmPanel;
</span><span class="cx">     encoder &lt;&lt; canRunModal;
</span><span class="lines">@@ -115,6 +116,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.highestUsedBackForwardItemID))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(parameters.userContentControllerID))
+        return false;
</ins><span class="cx">     if (!decoder.decode(parameters.visitedLinkTableID))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.canRunBeforeUnloadConfirmPanel))
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/Shared/WebPageCreationParameters.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx">     WebCore::SessionID sessionID;
</span><span class="cx">     uint64_t highestUsedBackForwardItemID;
</span><span class="cx"> 
</span><ins>+    uint64_t userContentControllerID;
</ins><span class="cx">     uint64_t visitedLinkTableID;
</span><span class="cx">     bool canRunBeforeUnloadConfirmPanel;
</span><span class="cx">     bool canRunModal;
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICWKPageGroupcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     toImpl(pageGroupRef)-&gt;removeAllUserStyleSheets();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageGroupAddUserScript(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames injectedFrames, WKUserScriptInjectionTime injectionTime)
</del><ins>+void WKPageGroupAddUserScript(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames injectedFrames, _WKUserScriptInjectionTime injectionTime)
</ins><span class="cx"> {
</span><span class="cx">     toImpl(pageGroupRef)-&gt;addUserScript(toWTFString(sourceRef), toWTFString(baseURL), toImpl(whitelistedURLPatterns), toImpl(blacklistedURLPatterns), toUserContentInjectedFrames(injectedFrames), toUserScriptInjectionTime(injectionTime));
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICWKPageGrouph"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/C/WKPageGroup.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> WK_EXPORT void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames);
</span><span class="cx"> WK_EXPORT void WKPageGroupRemoveAllUserStyleSheets(WKPageGroupRef pageGroup);
</span><span class="cx">     
</span><del>-WK_EXPORT void WKPageGroupAddUserScript(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames, WKUserScriptInjectionTime);
</del><ins>+WK_EXPORT void WKPageGroupAddUserScript(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames, _WKUserScriptInjectionTime);
</ins><span class="cx"> WK_EXPORT void WKPageGroupRemoveAllUserScripts(WKPageGroupRef pageGroup);
</span><span class="cx"> 
</span><span class="cx"> #ifdef __cplusplus
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKBrowsingContextGrouph"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> - (void)addUserStyleSheet:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist mainFrameOnly:(BOOL)mainFrameOnly;
</span><span class="cx"> - (void)removeAllUserStyleSheets;
</span><span class="cx"> 
</span><del>-- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist injectionTime:(WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly;
</del><ins>+- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist injectionTime:(_WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly;
</ins><span class="cx"> - (void)removeAllUserScripts;
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKBrowsingContextGroupmm"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     WKPageGroupRemoveAllUserStyleSheets(toAPI(_pageGroup.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist injectionTime:(WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly
</del><ins>+- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURLPatterns:(NSArray *)whitelist blacklistedURLPatterns:(NSArray *)blacklist injectionTime:(_WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly
</ins><span class="cx"> {
</span><span class="cx">     if (!source)
</span><span class="cx">         CRASH();
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import &lt;Foundation/Foundation.h&gt;
</span><span class="cx"> 
</span><ins>+@class WKUserScript;
</ins><span class="cx"> @protocol WKScriptMessageHandler;
</span><span class="cx"> 
</span><span class="cx"> /*! WKUserContentController provides a way for JavaScript to post messages to the @link WKWebView @/link.
</span><span class="lines">@@ -37,6 +38,19 @@
</span><span class="cx"> WK_CLASS_AVAILABLE(10_10, 8_0)
</span><span class="cx"> @interface WKUserContentController : NSObject
</span><span class="cx"> 
</span><ins>+/*! @abstract The user scripts associated with this user content controller.
+*/
+@property (nonatomic, readonly) NSArray *userScripts;
+
+/*! @abstract Adds a user script.
+ @param userScript The user script to add.
+*/
+- (void)addUserScript:(WKUserScript *)userScript;
+
+/*! @abstract Removes all associated user scripts.
+*/
+- (void)removeAllUserScripts;
+
</ins><span class="cx"> /*! @abstract Adds a script message handler.
</span><span class="cx">  @param scriptMessageHandler The message handler where the messages should be delivered.
</span><span class="cx">  @param name The name of the message handler.
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -24,14 +24,63 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #import &quot;config.h&quot;
</span><del>-#import &quot;WKUserContentControllerPrivate.h&quot;
</del><ins>+#import &quot;WKUserContentControllerInternal.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;WKUserScriptInternal.h&quot;
+#import &quot;WebUserContentControllerProxy.h&quot;
</ins><span class="cx"> #import &quot;_WKScriptWorld.h&quot;
</span><ins>+#import &lt;WebCore/UserScript.h&gt;
</ins><span class="cx"> 
</span><del>-@implementation WKUserContentController
</del><ins>+@implementation WKUserContentController {
+    RetainPtr&lt;NSMutableArray&gt; _userScripts;
+}
</ins><span class="cx"> 
</span><ins>+- (instancetype)init
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _userContentControllerProxy = WebKit::WebUserContentControllerProxy::create();
+    _userScripts = adoptNS([[NSMutableArray alloc] init]);
+
+    return self;
+}
+
+- (NSArray *)userScripts
+{
+    return _userScripts.get();
+}
+
+static WebCore::UserScriptInjectionTime toWebCoreUserScriptInjectionTime(WKUserScriptInjectionTime injectionTime)
+{
+    switch (injectionTime) {
+    case WKUserScriptInjectionTimeAtDocumentStart:
+        return WebCore::InjectAtDocumentStart;
+
+    case WKUserScriptInjectionTimeAtDocumentEnd:
+        return WebCore::InjectAtDocumentEnd;
+    }
+
+    ASSERT_NOT_REACHED();
+    return WebCore::InjectAtDocumentEnd;
+}
+
+- (void)addUserScript:(WKUserScript *)userScript
+{
+    [_userScripts addObject:userScript];
+
+    _userContentControllerProxy-&gt;addUserScript(WebCore::UserScript { userScript-&gt;_source.get(), WebCore::blankURL(), { }, { }, toWebCoreUserScriptInjectionTime(userScript-&gt;_injectionTime), userScript-&gt;_forMainFrameOnly ? WebCore::InjectInTopFrameOnly : WebCore::InjectInAllFrames });
+}
+
+- (void)removeAllUserScripts
+{
+    [_userScripts removeAllObjects];
+
+    _userContentControllerProxy-&gt;removeAllUserScripts();
+}
+
</ins><span class="cx"> - (void)addScriptMessageHandler:(id &lt;WKScriptMessageHandler&gt;)scriptMessageHandler name:(NSString *)name
</span><span class="cx"> {
</span><span class="cx">     [self _addScriptMessageHandler:scriptMessageHandler name:name world:[_WKScriptWorld defaultWorld]];
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserContentControllerInternalhfromrev168994trunkSourceWebKit2UIProcessAPICocoaWKUserContentControllerInternalh"></a>
<div class="copfile"><h4>Copied: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentControllerInternal.h (from rev 168994, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentControllerInternal.h) (0 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentControllerInternal.h                                (rev 0)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserContentControllerInternal.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;WKUserContentControllerPrivate.h&quot;
+
+#if WK_API_ENABLED
+
+#import &lt;wtf/RefPtr.h&gt;
+
+namespace WebKit {
+class WebUserContentControllerProxy;
+}
+
+@interface WKUserContentController () {
+@package
+    RefPtr&lt;WebKit::WebUserContentControllerProxy&gt; _userContentControllerProxy;
+}
+@end
+
+#endif
</ins></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScripthfromrev168994trunkSourceWebKit2UIProcessAPICocoaWKUserScripth"></a>
<div class="copfile"><h4>Copied: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.h (from rev 168994, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.h) (0 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.h                                (rev 0)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &lt;Foundation/Foundation.h&gt;
+
+/*! @enum WKUserScriptInjectionTime
+ @abstract when a user script should be injected into a web page.
+ @constant WKUserScriptInjectionTimeAtDocumentStart    Inject the script after the document element has been created, but before any other content has been loaded.
+ @constant WKUserScriptInjectionTimeAtDocumentEnd      Inject the script after the document has finished loading, but before any subresources may have finished loading.
+ */
+typedef NS_ENUM(NSInteger, WKUserScriptInjectionTime) {
+    WKUserScriptInjectionTimeAtDocumentStart,
+    WKUserScriptInjectionTimeAtDocumentEnd
+} WK_ENUM_AVAILABLE(10_10, 8_0);
+
+/*! A @link WKUserScript @/link object represents a script that can be injected into web pages.
+ */
+WK_CLASS_AVAILABLE(10_10, 8_0)
+@interface WKUserScript : NSObject &lt;NSCopying&gt;
+
+/*! @abstract Returns an initialized user script that can be added to a @link WKUserContentController @/link.
+ @param source The script source.
+ @param injectionTime When the script should be injected.
+ @param forMainFrameOnly Whether the script should be injected into all frames or just the main frame.
+ */
+- (instancetype)initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly;
+
+/* @abstract The script source code. */
+@property (nonatomic, readonly) NSString *source;
+
+/* @abstract When the script should be injected. */
+@property (nonatomic, readonly) WKUserScriptInjectionTime injectionTime;
+
+/* @abstract Whether the script should be injected into all frames or just the main frame. */
+@property (nonatomic, readonly, getter=isForMainFrameOnly) BOOL forMainFrameOnly;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScriptmmfromrev168994trunkSourceWebKit2UIProcessAPICocoaWKUserScriptmm"></a>
<div class="copfile"><h4>Copied: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm (from rev 168994, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm) (0 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm                                (rev 0)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScript.mm        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WKUserScriptInternal.h&quot;
+
+#if WK_API_ENABLED
+
+@implementation WKUserScript
+
+- (instancetype)initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _source = adoptNS([source copy]);
+    _injectionTime = injectionTime;
+    _forMainFrameOnly = forMainFrameOnly;
+
+    return self;
+}
+
+- (NSString *)source
+{
+    return _source.get();
+}
+
+- (WKUserScriptInjectionTime)injectionTime
+{
+    return _injectionTime;
+}
+
+- (BOOL)isForMainFrameOnly
+{
+    return _forMainFrameOnly;
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    return [self retain];
+}
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKUserScriptInternalhfromrev168994trunkSourceWebKit2UIProcessAPICocoaWKUserScriptInternalh"></a>
<div class="copfile"><h4>Copied: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScriptInternal.h (from rev 168994, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUserScriptInternal.h) (0 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScriptInternal.h                                (rev 0)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKUserScriptInternal.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;WKUserScript.h&quot;
+
+#if WK_API_ENABLED
+
+#import &lt;wtf/RetainPtr.h&gt;
+
+@interface WKUserScript () {
+@package
+    RetainPtr&lt;NSString&gt; _source;
+    WKUserScriptInjectionTime _injectionTime;
+    BOOL _forMainFrameOnly;
+}
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #import &quot;WKPreferencesInternal.h&quot;
</span><span class="cx"> #import &quot;WKProcessPoolInternal.h&quot;
</span><span class="cx"> #import &quot;WKUIDelegate.h&quot;
</span><del>-#import &quot;WKUserContentController.h&quot;
</del><ins>+#import &quot;WKUserContentControllerInternal.h&quot;
</ins><span class="cx"> #import &quot;WKWebViewConfigurationInternal.h&quot;
</span><span class="cx"> #import &quot;WKWebViewContentProvider.h&quot;
</span><span class="cx"> #import &quot;WebBackForwardList.h&quot;
</span><span class="lines">@@ -176,6 +176,7 @@
</span><span class="cx">     if (WKWebView *relatedWebView = [_configuration _relatedWebView])
</span><span class="cx">         webPageConfiguration.relatedPage = relatedWebView-&gt;_page.get();
</span><span class="cx"> 
</span><ins>+    webPageConfiguration.userContentController = [_configuration userContentController]-&gt;_userContentControllerProxy.get();
</ins><span class="cx">     webPageConfiguration.visitedLinkProvider = [_configuration _visitedLinkProvider]-&gt;_visitedLinkProvider.get();
</span><span class="cx">     webPageConfiguration.session = [_configuration _websiteDataStore]-&gt;_session.get();
</span><span class="cx">     
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -88,6 +88,7 @@
</span><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #include &quot;WebProtectionSpace.h&quot;
</span><span class="cx"> #include &quot;WebSecurityOrigin.h&quot;
</span><ins>+#include &quot;WebUserContentControllerProxy.h&quot;
</ins><span class="cx"> #include &lt;WebCore/DragController.h&gt;
</span><span class="cx"> #include &lt;WebCore/DragData.h&gt;
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="lines">@@ -263,6 +264,7 @@
</span><span class="cx">     , m_process(process)
</span><span class="cx">     , m_pageGroup(*configuration.pageGroup)
</span><span class="cx">     , m_preferences(*configuration.preferences)
</span><ins>+    , m_userContentController(configuration.userContentController)
</ins><span class="cx">     , m_visitedLinkProvider(*configuration.visitedLinkProvider)
</span><span class="cx">     , m_mainFrame(nullptr)
</span><span class="cx">     , m_userAgent(standardUserAgent())
</span><span class="lines">@@ -358,8 +360,11 @@
</span><span class="cx">     , m_scrollPinningBehavior(DoNotPin)
</span><span class="cx">     , m_navigationID(0)
</span><span class="cx"> {
</span><del>-    if (m_process-&gt;state() == WebProcessProxy::State::Running)
</del><ins>+    if (m_process-&gt;state() == WebProcessProxy::State::Running) {
+        if (m_userContentController)
+            m_userContentController-&gt;addProcess(m_process.get());
</ins><span class="cx">         m_visitedLinkProvider-&gt;addProcess(m_process.get());
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     updateViewState();
</span><span class="cx">     updateActivityToken();
</span><span class="lines">@@ -618,8 +623,11 @@
</span><span class="cx"> 
</span><span class="cx">     m_isClosed = true;
</span><span class="cx"> 
</span><del>-    if (m_process-&gt;state() == WebProcessProxy::State::Running)
</del><ins>+    if (m_process-&gt;state() == WebProcessProxy::State::Running) {
+        if (m_userContentController)
+            m_userContentController-&gt;removeProcess(m_process.get());
</ins><span class="cx">         m_visitedLinkProvider-&gt;removeProcess(m_process.get());
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     m_backForwardList-&gt;pageClosed();
</span><span class="cx">     m_pageClient.pageClosed();
</span><span class="lines">@@ -2900,6 +2908,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(connection == m_process-&gt;connection());
</span><span class="cx"> 
</span><ins>+    if (m_userContentController)
+        m_userContentController-&gt;addProcess(m_process.get());
</ins><span class="cx">     m_visitedLinkProvider-&gt;addProcess(m_process.get());
</span><span class="cx"> 
</span><span class="cx">     m_process-&gt;context().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, connection);
</span><span class="lines">@@ -4200,8 +4210,11 @@
</span><span class="cx">     // FIXME: It's weird that resetStateAfterProcessExited() is called even though the process is launching.
</span><span class="cx">     ASSERT(m_process-&gt;state() == WebProcessProxy::State::Launching || m_process-&gt;state() == WebProcessProxy::State::Terminated);
</span><span class="cx"> 
</span><del>-    if (m_process-&gt;state() == WebProcessProxy::State::Terminated)
</del><ins>+    if (m_process-&gt;state() == WebProcessProxy::State::Terminated) {
+        if (m_userContentController)
+            m_userContentController-&gt;removeProcess(m_process.get());
</ins><span class="cx">         m_visitedLinkProvider-&gt;removeProcess(m_process.get());
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     m_process-&gt;removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
</span><span class="cx"> 
</span><span class="lines">@@ -4270,6 +4283,7 @@
</span><span class="cx">     parameters.sessionState = SessionState(m_backForwardList-&gt;entries(), m_backForwardList-&gt;currentIndex());
</span><span class="cx">     parameters.sessionID = m_session-&gt;getID();
</span><span class="cx">     parameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID();
</span><ins>+    parameters.userContentControllerID = m_userContentController ? m_userContentController-&gt;identifier() : 0;
</ins><span class="cx">     parameters.visitedLinkTableID = m_visitedLinkProvider-&gt;identifier();
</span><span class="cx">     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient-&gt;canRunBeforeUnloadConfirmPanel();
</span><span class="cx">     parameters.canRunModal = m_canRunModal;
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -163,6 +163,7 @@
</span><span class="cx"> class WebOpenPanelResultListenerProxy;
</span><span class="cx"> class WebPageGroup;
</span><span class="cx"> class WebProcessProxy;
</span><ins>+class WebUserContentControllerProxy;
</ins><span class="cx"> class WebWheelEvent;
</span><span class="cx"> struct AttributedString;
</span><span class="cx"> struct ColorSpaceData;
</span><span class="lines">@@ -427,7 +428,9 @@
</span><span class="cx"> struct WebPageConfiguration {
</span><span class="cx">     WebPageGroup* pageGroup = nullptr;
</span><span class="cx">     WebPreferences* preferences = nullptr;
</span><ins>+    WebUserContentControllerProxy* userContentController = nullptr;
</ins><span class="cx">     VisitedLinkProvider* visitedLinkProvider = nullptr;
</span><ins>+
</ins><span class="cx">     API::Session* session = nullptr;
</span><span class="cx">     WebPageProxy* relatedPage = nullptr;
</span><span class="cx"> };
</span><span class="lines">@@ -1450,6 +1453,7 @@
</span><span class="cx">     Ref&lt;WebProcessProxy&gt; m_process;
</span><span class="cx">     Ref&lt;WebPageGroup&gt; m_pageGroup;
</span><span class="cx">     Ref&lt;WebPreferences&gt; m_preferences;
</span><ins>+    const RefPtr&lt;WebUserContentControllerProxy&gt; m_userContentController;
</ins><span class="cx">     Ref&lt;VisitedLinkProvider&gt; m_visitedLinkProvider;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebFrameProxy&gt; m_mainFrame;
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -319,6 +319,16 @@
</span><span class="cx">                 1AAB4A8D1296F0A20023952F /* SandboxExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAB4A8C1296F0A20023952F /* SandboxExtension.h */; };
</span><span class="cx">                 1AAB4AAA1296F1540023952F /* SandboxExtensionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */; };
</span><span class="cx">                 1AABFE3A1829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */; };
</span><ins>+                1AAF089A19267EE500B6390C /* WKUserScript.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF089819267EE500B6390C /* WKUserScript.mm */; };
+                1AAF089B19267EE500B6390C /* WKUserScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF089919267EE500B6390C /* WKUserScript.h */; settings = {ATTRIBUTES = (Public, ); }; };
+                1AAF089D19267FC800B6390C /* WKUserScriptInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF089C19267FC800B6390C /* WKUserScriptInternal.h */; };
+                1AAF08A1192681D100B6390C /* WebUserContentControllerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF089F192681D100B6390C /* WebUserContentControllerProxy.cpp */; };
+                1AAF08A2192681D100B6390C /* WebUserContentControllerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF08A0192681D100B6390C /* WebUserContentControllerProxy.h */; };
+                1AAF08A4192682DA00B6390C /* WKUserContentControllerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF08A3192682DA00B6390C /* WKUserContentControllerInternal.h */; };
+                1AAF08AD1926936700B6390C /* WebUserContentController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF08AB1926936700B6390C /* WebUserContentController.cpp */; };
+                1AAF08AE1926936700B6390C /* WebUserContentController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF08AC1926936700B6390C /* WebUserContentController.h */; };
+                1AAF08B719269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF08B519269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp */; };
+                1AAF08B819269E6D00B6390C /* WebUserContentControllerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF08B619269E6D00B6390C /* WebUserContentControllerMessages.h */; };
</ins><span class="cx">                 1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */; };
</span><span class="cx">                 1AAF0C4B12B16334008E49E2 /* ArgumentCodersCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */; };
</span><span class="cx">                 1AAF263814687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF263614687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm */; };
</span><span class="lines">@@ -2148,6 +2158,17 @@
</span><span class="cx">                 1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SandboxExtensionMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKRemoteObjectInterfaceInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AADE6FE10D855FC00D3D63D /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; };
</span><ins>+                1AAF089819267EE500B6390C /* WKUserScript.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKUserScript.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF089919267EE500B6390C /* WKUserScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserScript.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF089C19267FC800B6390C /* WKUserScriptInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserScriptInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF089F192681D100B6390C /* WebUserContentControllerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUserContentControllerProxy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08A0192681D100B6390C /* WebUserContentControllerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentControllerProxy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08A3192682DA00B6390C /* WKUserContentControllerInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserContentControllerInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08AB1926936700B6390C /* WebUserContentController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUserContentController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08AC1926936700B6390C /* WebUserContentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08B419269E2400B6390C /* WebUserContentController.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebUserContentController.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08B519269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUserContentControllerMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AAF08B619269E6D00B6390C /* WebUserContentControllerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentControllerMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersCF.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = ArgumentCodersCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AAF263614687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TiledCoreAnimationDrawingArea.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4320,6 +4341,25 @@
</span><span class="cx">                         path = Plugins;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                1AAF089E192681AC00B6390C /* UserContent */ = {
+                        isa = PBXGroup;
+                        children = (
+                                1AAF089F192681D100B6390C /* WebUserContentControllerProxy.cpp */,
+                                1AAF08A0192681D100B6390C /* WebUserContentControllerProxy.h */,
+                        );
+                        path = UserContent;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                1AAF08AA1926930B00B6390C /* UserContent */ = {
+                        isa = PBXGroup;
+                        children = (
+                                1AAF08AB1926936700B6390C /* WebUserContentController.cpp */,
+                                1AAF08AC1926936700B6390C /* WebUserContentController.h */,
+                                1AAF08B419269E2400B6390C /* WebUserContentController.messages.in */,
+                        );
+                        path = UserContent;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 1AAF0C4712B16328008E49E2 /* cf */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -4785,7 +4825,11 @@
</span><span class="cx">                                 3743925718BC4C60001C8675 /* WKUIDelegatePrivate.h */,
</span><span class="cx">                                 1AFA3AC718E61C61003CCBAE /* WKUserContentController.h */,
</span><span class="cx">                                 1AFA3AC618E61C61003CCBAE /* WKUserContentController.mm */,
</span><ins>+                                1AAF08A3192682DA00B6390C /* WKUserContentControllerInternal.h */,
</ins><span class="cx">                                 7CC99A3318EF7B120048C8B4 /* WKUserContentControllerPrivate.h */,
</span><ins>+                                1AAF089919267EE500B6390C /* WKUserScript.h */,
+                                1AAF089819267EE500B6390C /* WKUserScript.mm */,
+                                1AAF089C19267FC800B6390C /* WKUserScriptInternal.h */,
</ins><span class="cx">                                 1A3CC16518906ACF001E6ED8 /* WKWebView.h */,
</span><span class="cx">                                 1A3CC16418906ACF001E6ED8 /* WKWebView.mm */,
</span><span class="cx">                                 1ADF59191890528E0043C145 /* WKWebViewConfiguration.h */,
</span><span class="lines">@@ -5334,6 +5378,7 @@
</span><span class="cx">                                 3336762B130C9978006C9DE2 /* ResourceCache */,
</span><span class="cx">                                 0F59478C187B3B2A00437857 /* Scrolling */,
</span><span class="cx">                                 1AAC4DDE16B1CBF6009425E3 /* Storage */,
</span><ins>+                                1AAF08AA1926930B00B6390C /* UserContent */,
</ins><span class="cx">                                 BC032D5D10F437220058C15A /* WebCoreSupport */,
</span><span class="cx">                                 BC032D5E10F4372B0058C15A /* WebPage */,
</span><span class="cx">                                 BCE9C0CF1485965D00E33D61 /* WebConnectionToUIProcess.cpp */,
</span><span class="lines">@@ -5472,6 +5517,7 @@
</span><span class="cx">                                 1AEFCC0511D01F34008219D3 /* Plugins */,
</span><span class="cx">                                 0F594793187B3B4C00437857 /* Scrolling */,
</span><span class="cx">                                 1A44B95816B73F8C00B7BBD8 /* Storage */,
</span><ins>+                                1AAF089E192681AC00B6390C /* UserContent */,
</ins><span class="cx">                                 BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
</span><span class="cx">                                 BCF69FA01176D01400471A52 /* APINavigationData.h */,
</span><span class="cx">                                 75A8D2DD187DE87400C39C9E /* APISession.cpp */,
</span><span class="lines">@@ -6423,6 +6469,8 @@
</span><span class="cx">                 C0CE729D1247E71D00BC0EC4 /* Derived Sources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                1AAF08B519269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp */,
+                                1AAF08B619269E6D00B6390C /* WebUserContentControllerMessages.h */,
</ins><span class="cx">                                 2DE6943B18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp */,
</span><span class="cx">                                 2DE6943C18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h */,
</span><span class="cx">                                 512F58A012A883AD00629530 /* AuthenticationManagerMessageReceiver.cpp */,
</span><span class="lines">@@ -6851,6 +6899,7 @@
</span><span class="cx">                                 1A79D9F218EB5EF100914CC5 /* WKBackForwardListPrivate.h in Headers */,
</span><span class="cx">                                 BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
</span><span class="cx">                                 1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */,
</span><ins>+                                1AAF08AE1926936700B6390C /* WebUserContentController.h in Headers */,
</ins><span class="cx">                                 BC64697011DBE603006455B0 /* APIArray.h in Headers */,
</span><span class="cx">                                 BCBCB0CB1215E32100DE59CA /* ImmutableDictionary.h in Headers */,
</span><span class="cx">                                 BC204EE311C83E98008F3375 /* InjectedBundle.h in Headers */,
</span><span class="lines">@@ -7258,6 +7307,7 @@
</span><span class="cx">                                 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */,
</span><span class="cx">                                 51217465164C21370037A5C1 /* WebResourceBuffer.h in Headers */,
</span><span class="cx">                                 33367630130C9998006C9DE2 /* WebResourceCacheManager.h in Headers */,
</span><ins>+                                1AAF089B19267EE500B6390C /* WKUserScript.h in Headers */,
</ins><span class="cx">                                 33367656130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h in Headers */,
</span><span class="cx">                                 2DA944A41884E4F000ED86DB /* GestureTypes.h in Headers */,
</span><span class="cx">                                 33367636130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h in Headers */,
</span><span class="lines">@@ -7265,6 +7315,7 @@
</span><span class="cx">                                 0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,
</span><span class="cx">                                 510AFFBA16542048001BA05E /* WebResourceLoader.h in Headers */,
</span><span class="cx">                                 51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
</span><ins>+                                1AAF08A4192682DA00B6390C /* WKUserContentControllerInternal.h in Headers */,
</ins><span class="cx">                                 D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */,
</span><span class="cx">                                 1FB00AC9185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h in Headers */,
</span><span class="cx">                                 F634445612A885C8000612D8 /* WebSecurityOrigin.h in Headers */,
</span><span class="lines">@@ -7306,6 +7357,7 @@
</span><span class="cx">                                 517DD5BF180DA7D30081660B /* DatabaseProcessProxy.h in Headers */,
</span><span class="cx">                                 935EEB9B1277617C003322B8 /* WKBundleBackForwardListItem.h in Headers */,
</span><span class="cx">                                 51EFC1CF1524E62500C9A938 /* WKBundleDOMWindowExtension.h in Headers */,
</span><ins>+                                1AAF08A2192681D100B6390C /* WebUserContentControllerProxy.h in Headers */,
</ins><span class="cx">                                 BCD25F1711D6BDE100169B0E /* WKBundleFrame.h in Headers */,
</span><span class="cx">                                 BCF049E611FE20F600F86A58 /* WKBundleFramePrivate.h in Headers */,
</span><span class="cx">                                 29232DF418B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h in Headers */,
</span><span class="lines">@@ -7357,6 +7409,7 @@
</span><span class="cx">                                 BC5D24C216CD706D007D5461 /* WKDOMNodePrivate.h in Headers */,
</span><span class="cx">                                 1AABFE3A1829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h in Headers */,
</span><span class="cx">                                 BC5D24C516CD7088007D5461 /* WKDOMRangePrivate.h in Headers */,
</span><ins>+                                1AAF089D19267FC800B6390C /* WKUserScriptInternal.h in Headers */,
</ins><span class="cx">                                 1A9E328D182165A900F5D04C /* _WKRemoteObjectInterface.h in Headers */,
</span><span class="cx">                                 51290993183ACEAF005522A6 /* WebIDBServerConnection.h in Headers */,
</span><span class="cx">                                 370F34A31829BE1E009027C8 /* WKNavigationData.h in Headers */,
</span><span class="lines">@@ -7436,6 +7489,7 @@
</span><span class="cx">                                 3336763B130C99DC006C9DE2 /* WKResourceCacheManager.h in Headers */,
</span><span class="cx">                                 BC8A501511765F5600757573 /* WKRetainPtr.h in Headers */,
</span><span class="cx">                                 F634445D12A885E9000612D8 /* WKSecurityOrigin.h in Headers */,
</span><ins>+                                1AAF08B819269E6D00B6390C /* WebUserContentControllerMessages.h in Headers */,
</ins><span class="cx">                                 BC407604124FF0270068F20A /* WKSerializedScriptValue.h in Headers */,
</span><span class="cx">                                 0FCB4E4C18BBE044000FCFC9 /* WKContentView.h in Headers */,
</span><span class="cx">                                 37A64E5718F38F4600EB30F1 /* _WKFormInputSession.h in Headers */,
</span><span class="lines">@@ -8443,6 +8497,7 @@
</span><span class="cx">                                 1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */,
</span><span class="cx">                                 BCE81D8C1319F7EF00241910 /* FontInfo.cpp in Sources */,
</span><span class="cx">                                 378E1A4918208CD60031007A /* WKNSString.mm in Sources */,
</span><ins>+                                1AAF08B719269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 1AD01BCC1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.mm in Sources */,
</span><span class="cx">                                 C55CB5B818C2A5D600CA81E1 /* WKFormSelectPicker.mm in Sources */,
</span><span class="cx">                                 BC06F43012DBB9B6002D78DE /* GeolocationPermissionRequestManager.cpp in Sources */,
</span><span class="lines">@@ -8543,6 +8598,7 @@
</span><span class="cx">                                 1AE4976911FF658E0048B464 /* NPJSObject.cpp in Sources */,
</span><span class="cx">                                 1A2D82A4127F4EAB001EB962 /* NPObjectMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A2D8439127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp in Sources */,
</span><ins>+                                1AAF08AD1926936700B6390C /* WebUserContentController.cpp in Sources */,
</ins><span class="cx">                                 1A2D82A6127F4EAB001EB962 /* NPObjectProxy.cpp in Sources */,
</span><span class="cx">                                 1A2D82A8127F4EAB001EB962 /* NPRemoteObjectMap.cpp in Sources */,
</span><span class="cx">                                 1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */,
</span><span class="lines">@@ -8858,6 +8914,7 @@
</span><span class="cx">                                 BC5744EF12638FB3006F0F12 /* WebPopupItem.cpp in Sources */,
</span><span class="cx">                                 0F931C1D18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm in Sources */,
</span><span class="cx">                                 D3B9484611FF4B6500032B39 /* WebPopupMenu.cpp in Sources */,
</span><ins>+                                1AAF08A1192681D100B6390C /* WebUserContentControllerProxy.cpp in Sources */,
</ins><span class="cx">                                 BCC43AC7127B99DE00317F16 /* WebPopupMenuMac.mm in Sources */,
</span><span class="cx">                                 BC5750981268F3C6006F0F12 /* WebPopupMenuProxyMac.mm in Sources */,
</span><span class="cx">                                 BCD59800112B57BE00EC8C23 /* WebPreferences.cpp in Sources */,
</span><span class="lines">@@ -8981,6 +9038,7 @@
</span><span class="cx">                                 BCD0139C110FA420003B8A67 /* WKFrame.cpp in Sources */,
</span><span class="cx">                                 BCB9F6A61123DD0D00A137E0 /* WKFramePolicyListener.cpp in Sources */,
</span><span class="cx">                                 E1AEA23014687BDB00804569 /* WKFullKeyboardAccessWatcher.mm in Sources */,
</span><ins>+                                1AAF089A19267EE500B6390C /* WKUserScript.mm in Sources */,
</ins><span class="cx">                                 CDCA85C8132ABA4E00E961DF /* WKFullScreenWindowController.mm in Sources */,
</span><span class="cx">                                 1AE00D6B18327C1200087DD7 /* StringReference.cpp in Sources */,
</span><span class="cx">                                 BC54CC1312D674EE005C67B0 /* WKGeolocationManager.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">     toImpl(bundleRef)-&gt;setAlwaysAcceptCookies(accept);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKBundleAddUserScript(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKBundleScriptWorldRef scriptWorldRef, WKStringRef sourceRef, WKURLRef urlRef, WKArrayRef whitelistRef, WKArrayRef blacklistRef, WKUserScriptInjectionTime injectionTimeRef, WKUserContentInjectedFrames injectedFramesRef)
</del><ins>+void WKBundleAddUserScript(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKBundleScriptWorldRef scriptWorldRef, WKStringRef sourceRef, WKURLRef urlRef, WKArrayRef whitelistRef, WKArrayRef blacklistRef, _WKUserScriptInjectionTime injectionTimeRef, WKUserContentInjectedFrames injectedFramesRef)
</ins><span class="cx"> {
</span><span class="cx">     toImpl(bundleRef)-&gt;addUserScript(toImpl(pageGroupRef), toImpl(scriptWorldRef), toWTFString(sourceRef), toWTFString(urlRef), toImpl(whitelistRef), toImpl(blacklistRef), toUserScriptInjectionTime(injectionTimeRef), toUserContentInjectedFrames(injectedFramesRef));
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> WK_EXPORT void WKBundleSetAsynchronousSpellCheckingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
</span><span class="cx"> 
</span><span class="cx"> // UserContent API
</span><del>-WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames);
</del><ins>+WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, _WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames);
</ins><span class="cx"> WK_EXPORT void WKBundleAddUserStyleSheet(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, WKUserContentInjectedFrames injectedFrames);
</span><span class="cx"> WK_EXPORT void WKBundleRemoveUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKURLRef url);
</span><span class="cx"> WK_EXPORT void WKBundleRemoveUserStyleSheet(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKURLRef url);
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -92,6 +92,7 @@
</span><span class="cx"> #include &quot;WebProcessProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebProgressTrackerClient.h&quot;
</span><span class="cx"> #include &quot;WebUndoStep.h&quot;
</span><ins>+#include &quot;WebUserContentController.h&quot;
</ins><span class="cx"> #include &lt;JavaScriptCore/APICast.h&gt;
</span><span class="cx"> #include &lt;WebCore/ArchiveResource.h&gt;
</span><span class="cx"> #include &lt;WebCore/Chrome.h&gt;
</span><span class="lines">@@ -270,6 +271,7 @@
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="cx">     , m_activeColorChooser(0)
</span><span class="cx"> #endif
</span><ins>+    , m_userContentController(parameters.userContentControllerID ? WebUserContentController::getOrCreate(parameters.userContentControllerID) : nullptr)
</ins><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx">     , m_geolocationPermissionRequestManager(this)
</span><span class="cx"> #endif
</span><span class="lines">@@ -342,6 +344,7 @@
</span><span class="cx">     pageClients.loaderClientForMainFrame = new WebFrameLoaderClient;
</span><span class="cx">     pageClients.progressTrackerClient = new WebProgressTrackerClient(*this);
</span><span class="cx"> 
</span><ins>+    pageClients.userContentController = m_userContentController ? &amp;m_userContentController-&gt;userContentController() : nullptr;
</ins><span class="cx">     pageClients.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
</span><span class="cx"> 
</span><span class="cx">     m_page = std::make_unique&lt;Page&gt;(pageClients);
</span></span></pre></div>
<a id="branchessafari53834branchSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (169068 => 169069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-19 21:42:38 UTC (rev 169068)
+++ branches/safari-538.34-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-19 21:43:01 UTC (rev 169069)
</span><span class="lines">@@ -159,6 +159,7 @@
</span><span class="cx"> class WebPageGroupProxy;
</span><span class="cx"> class WebPopupMenu;
</span><span class="cx"> class WebUndoStep;
</span><ins>+class WebUserContentController;
</ins><span class="cx"> class WebVideoFullscreenManager;
</span><span class="cx"> class WebWheelEvent;
</span><span class="cx"> struct AssistedNodeInformation;
</span><span class="lines">@@ -1138,6 +1139,8 @@
</span><span class="cx">     RefPtr&lt;WebOpenPanelResultListener&gt; m_activeOpenPanelResultListener;
</span><span class="cx">     RefPtr&lt;NotificationPermissionRequestManager&gt; m_notificationPermissionRequestManager;
</span><span class="cx"> 
</span><ins>+    RefPtr&lt;WebUserContentController&gt; m_userContentController;
+
</ins><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx">     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>