<!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>[204462] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204462">204462</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-08-15 09:43:13 -0700 (Mon, 15 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move the plug-in and WebGL blacklist code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=160831

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/BlacklistUpdater.h: Added.
(WebCore::BlacklistUpdater::queue):
(WebCore::BlacklistUpdater::pluginBlacklist):
(WebCore::BlacklistUpdater::webGLBlacklist):
* platform/mac/BlacklistUpdater.mm: Added.
(WebCore::BlacklistUpdater::readBlacklistData):
(WebCore::BlacklistUpdater::reloadIfNecessary):
(WebCore::BlacklistUpdater::initializeQueue):
* platform/mac/PluginBlacklist.h: Added.
* platform/mac/PluginBlacklist.mm: Added.
(WebCore::PluginBlacklist::loadPolicyForPluginVersion):
(WebCore::PluginBlacklist::isPluginUpdateAvailable):
(WebCore::PluginBlacklist::create):
(WebCore::PluginBlacklist::~PluginBlacklist):
(WebCore::PluginBlacklist::splitOSVersion):
(WebCore::PluginBlacklist::loadPolicyForPlugin):
(WebCore::PluginBlacklist::isUpdateAvailable):
(WebCore::PluginBlacklist::PluginBlacklist):
* platform/mac/WebGLBlacklist.h: Added.
* platform/mac/WebGLBlacklist.mm: Added.
(WebCore::OSBuildInfo::OSBuildInfo):
(WebCore::OSBuildInfo::operator==):
(WebCore::OSBuildInfo::operator&gt;):
(WebCore::OSBuildInfo::operator&lt;=):
(WebCore::OSBuildInfo::operator&lt;):
(WebCore::buildInfoFromOSBuildString):
(WebCore::WebGLBlacklist::shouldBlockWebGL):
(WebCore::WebGLBlacklist::shouldSuggestBlockingWebGL):
(WebCore::matchesGPU):
(WebCore::gpuMaskFromString):
(WebCore::matchesBuildInfo):
(WebCore::WebGLBlacklist::create):
(WebCore::WebGLBlacklist::shouldBlock):
(WebCore::WebGLBlacklist::shouldSuggestBlocking):
(WebCore::WebGLBlacklist::WebGLBlacklist):
(WebCore::WebGLBlacklist::~WebGLBlacklist):
* platform/spi/cf/CFUtilitiesSPI.h: Added.

Source/WebKit/mac:

Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.

* WebCoreSupport/WebFrameLoaderClient.mm:
(shouldBlockPlugin):
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):
(shouldBlockWebGL):
(WebFrameLoaderClient::webGLPolicyForURL):
(WebFrameLoaderClient::resolveWebGLPolicyForURL):

Source/WebKit2:

Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.

* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
(WebKit::getPlatformPluginModuleInformation):
* Shared/Plugins/PluginModuleInfo.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextIsPlugInUpdateAvailable):
(WKContextShouldBlockWebGL):
(WKContextShouldSuggestBlockWebGL):
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::shouldBlockPlugin):
(WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
(WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNetscapemacPluginInformationMacmm">trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsPluginModuleInfoh">trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm">trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsmacPluginInfoStoreMacmm">trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacBlacklistUpdaterh">trunk/Source/WebCore/platform/mac/BlacklistUpdater.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacBlacklistUpdatermm">trunk/Source/WebCore/platform/mac/BlacklistUpdater.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPluginBlacklisth">trunk/Source/WebCore/platform/mac/PluginBlacklist.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPluginBlacklistmm">trunk/Source/WebCore/platform/mac/PluginBlacklist.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebGLBlacklisth">trunk/Source/WebCore/platform/mac/WebGLBlacklist.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebGLBlacklistmm">trunk/Source/WebCore/platform/mac/WebGLBlacklist.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformspicfCFUtilitiesSPIh">trunk/Source/WebCore/platform/spi/cf/CFUtilitiesSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebCore/ChangeLog        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-08-12  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Move the plug-in and WebGL blacklist code to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=160831
+
+        Reviewed by Sam Weinig.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/mac/BlacklistUpdater.h: Added.
+        (WebCore::BlacklistUpdater::queue):
+        (WebCore::BlacklistUpdater::pluginBlacklist):
+        (WebCore::BlacklistUpdater::webGLBlacklist):
+        * platform/mac/BlacklistUpdater.mm: Added.
+        (WebCore::BlacklistUpdater::readBlacklistData):
+        (WebCore::BlacklistUpdater::reloadIfNecessary):
+        (WebCore::BlacklistUpdater::initializeQueue):
+        * platform/mac/PluginBlacklist.h: Added.
+        * platform/mac/PluginBlacklist.mm: Added.
+        (WebCore::PluginBlacklist::loadPolicyForPluginVersion):
+        (WebCore::PluginBlacklist::isPluginUpdateAvailable):
+        (WebCore::PluginBlacklist::create):
+        (WebCore::PluginBlacklist::~PluginBlacklist):
+        (WebCore::PluginBlacklist::splitOSVersion):
+        (WebCore::PluginBlacklist::loadPolicyForPlugin):
+        (WebCore::PluginBlacklist::isUpdateAvailable):
+        (WebCore::PluginBlacklist::PluginBlacklist):
+        * platform/mac/WebGLBlacklist.h: Added.
+        * platform/mac/WebGLBlacklist.mm: Added.
+        (WebCore::OSBuildInfo::OSBuildInfo):
+        (WebCore::OSBuildInfo::operator==):
+        (WebCore::OSBuildInfo::operator&gt;):
+        (WebCore::OSBuildInfo::operator&lt;=):
+        (WebCore::OSBuildInfo::operator&lt;):
+        (WebCore::buildInfoFromOSBuildString):
+        (WebCore::WebGLBlacklist::shouldBlockWebGL):
+        (WebCore::WebGLBlacklist::shouldSuggestBlockingWebGL):
+        (WebCore::matchesGPU):
+        (WebCore::gpuMaskFromString):
+        (WebCore::matchesBuildInfo):
+        (WebCore::WebGLBlacklist::create):
+        (WebCore::WebGLBlacklist::shouldBlock):
+        (WebCore::WebGLBlacklist::shouldSuggestBlocking):
+        (WebCore::WebGLBlacklist::WebGLBlacklist):
+        (WebCore::WebGLBlacklist::~WebGLBlacklist):
+        * platform/spi/cf/CFUtilitiesSPI.h: Added.
+
</ins><span class="cx"> 2016-08-14  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Align the event listener firing code with the latest DOM Specification and simplify it
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -1020,6 +1020,12 @@
</span><span class="cx">                 1AF8E1C3125673E000230FF7 /* ProxyServerCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8E1C1125673E000230FF7 /* ProxyServerCFNet.cpp */; };
</span><span class="cx">                 1AFE11990CBFFCC4003017FA /* JSSQLResultSetRowList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFE11970CBFFCC4003017FA /* JSSQLResultSetRowList.cpp */; };
</span><span class="cx">                 1AFE119A0CBFFCC4003017FA /* JSSQLResultSetRowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */; };
</span><ins>+                1AFFC4531D5E81C400267A66 /* WebGLBlacklist.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AFFC4521D5E7EC700267A66 /* WebGLBlacklist.mm */; };
+                1AFFC4541D5E81CB00267A66 /* BlacklistUpdater.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AFFC44E1D5E7EC700267A66 /* BlacklistUpdater.mm */; };
+                1AFFC4551D5E81D000267A66 /* PluginBlacklist.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AFFC4501D5E7EC700267A66 /* PluginBlacklist.mm */; };
+                1AFFC4571D5E83A700267A66 /* CFUtilitiesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFFC4561D5E83A700267A66 /* CFUtilitiesSPI.h */; };
+                1AFFC4581D5E865500267A66 /* WebGLBlacklist.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFFC4511D5E7EC700267A66 /* WebGLBlacklist.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                1AFFC4591D5E866100267A66 /* PluginBlacklist.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFFC44F1D5E7EC700267A66 /* PluginBlacklist.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1B124D8D1D380B7000ECDFB0 /* MediaSampleAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B124D8C1D380B7000ECDFB0 /* MediaSampleAVFObjC.h */; };
</span><span class="cx">                 1B124D8F1D380BB600ECDFB0 /* MediaSampleAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1B124D8E1D380BB600ECDFB0 /* MediaSampleAVFObjC.mm */; };
</span><span class="cx">                 1BF9DB3C1D3973AD0026AEB7 /* MediaSample.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EC7181ED60100EE4C41 /* MediaSample.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8247,6 +8253,13 @@
</span><span class="cx">                 1AF8E1C1125673E000230FF7 /* ProxyServerCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProxyServerCFNet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AFE11970CBFFCC4003017FA /* JSSQLResultSetRowList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLResultSetRowList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLResultSetRowList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1AFFC44D1D5E7EC700267A66 /* BlacklistUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlacklistUpdater.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC44E1D5E7EC700267A66 /* BlacklistUpdater.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlacklistUpdater.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC44F1D5E7EC700267A66 /* PluginBlacklist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginBlacklist.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC4501D5E7EC700267A66 /* PluginBlacklist.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginBlacklist.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC4511D5E7EC700267A66 /* WebGLBlacklist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLBlacklist.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC4521D5E7EC700267A66 /* WebGLBlacklist.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLBlacklist.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AFFC4561D5E83A700267A66 /* CFUtilitiesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFUtilitiesSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1B124D8C1D380B7000ECDFB0 /* MediaSampleAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaSampleAVFObjC.h; path = ../MediaSampleAVFObjC.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1B124D8E1D380BB600ECDFB0 /* MediaSampleAVFObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaSampleAVFObjC.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C0106FE192594DF008A4201 /* InlineTextBoxStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineTextBoxStyle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17714,6 +17727,7 @@
</span><span class="cx">                                 65086DA719AC1719009AF46B /* CFLocaleSPI.h */,
</span><span class="cx">                                 A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */,
</span><span class="cx">                                 CE12525A1A1C018200864480 /* CFNetworkSPI.h */,
</span><ins>+                                1AFFC4561D5E83A700267A66 /* CFUtilitiesSPI.h */,
</ins><span class="cx">                                 4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */,
</span><span class="cx">                         );
</span><span class="cx">                         path = cf;
</span><span class="lines">@@ -18000,6 +18014,8 @@
</span><span class="cx">                 6582A14809999D6C00BEEB6D /* mac */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                1AFFC44D1D5E7EC700267A66 /* BlacklistUpdater.h */,
+                                1AFFC44E1D5E7EC700267A66 /* BlacklistUpdater.mm */,
</ins><span class="cx">                                 F58784F002DE375901EA4122 /* CursorMac.mm */,
</span><span class="cx">                                 A795463D0B5C4C80007B438F /* DragDataMac.mm */,
</span><span class="cx">                                 A7CFB3D40B7ED1180070C32D /* DragImageMac.mm */,
</span><span class="lines">@@ -18025,6 +18041,8 @@
</span><span class="cx">                                 C5F765BA14E1ECF4006C899B /* PlatformPasteboardMac.mm */,
</span><span class="cx">                                 BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */,
</span><span class="cx">                                 29E4D8E016B0959800C84704 /* PlatformSpeechSynthesizerMac.mm */,
</span><ins>+                                1AFFC44F1D5E7EC700267A66 /* PluginBlacklist.h */,
+                                1AFFC4501D5E7EC700267A66 /* PluginBlacklist.mm */,
</ins><span class="cx">                                 4634592B1AC2271000ECB71C /* PowerObserverMac.cpp */,
</span><span class="cx">                                 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */,
</span><span class="cx">                                 0081FEFE16B0A2B6008AAA7A /* PublicSuffixMac.mm */,
</span><span class="lines">@@ -18064,6 +18082,8 @@
</span><span class="cx">                                 93EB169409F880B00091F8FF /* WebCoreSystemInterface.mm */,
</span><span class="cx">                                 BE855F7F0701E83500239769 /* WebCoreView.h */,
</span><span class="cx">                                 BE8560510701F91100239769 /* WebCoreView.m */,
</span><ins>+                                1AFFC4511D5E7EC700267A66 /* WebGLBlacklist.h */,
+                                1AFFC4521D5E7EC700267A66 /* WebGLBlacklist.mm */,
</ins><span class="cx">                                 E1A3162B134BC32D007C9A4F /* WebNSAttributedStringExtras.h */,
</span><span class="cx">                                 E1A3162C134BC32D007C9A4F /* WebNSAttributedStringExtras.mm */,
</span><span class="cx">                                 CD5896E01CD2B15100B3BCC8 /* WebPlaybackControlsManager.h */,
</span><span class="lines">@@ -22530,8 +22550,6 @@
</span><span class="cx">                 BCF1A5BA097832090061A123 /* platform */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                5C6E653F1D5CEDC900F7862E /* URLParser.cpp */,
-                                5C6E65401D5CEDC900F7862E /* URLParser.h */,
</del><span class="cx">                                 49E912A40EFAC8E6009D0CAF /* animation */,
</span><span class="cx">                                 FD31604012B026A300C1A359 /* audio */,
</span><span class="cx">                                 1AE42F670AA4B8CB00C8612D /* cf */,
</span><span class="lines">@@ -22705,6 +22723,8 @@
</span><span class="cx">                                 6593923509AE4346002C531F /* URL.cpp */,
</span><span class="cx">                                 6593923609AE4346002C531F /* URL.h */,
</span><span class="cx">                                 BCBD21AA0E417AD400A070F2 /* URLHash.h */,
</span><ins>+                                5C6E653F1D5CEDC900F7862E /* URLParser.cpp */,
+                                5C6E65401D5CEDC900F7862E /* URLParser.h */,
</ins><span class="cx">                                 868160D1187669C40021E79D /* UserActivity.cpp */,
</span><span class="cx">                                 868160D2187669C40021E79D /* UserActivity.h */,
</span><span class="cx">                                 71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */,
</span><span class="lines">@@ -24859,6 +24879,7 @@
</span><span class="cx">                                 070363E6181A1CDC00C074A5 /* AVVideoCaptureSource.h in Headers */,
</span><span class="cx">                                 F45C231E1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h in Headers */,
</span><span class="cx">                                 29A812380FBB9C1D00510293 /* AXObjectCache.h in Headers */,
</span><ins>+                                1AFFC4591D5E866100267A66 /* PluginBlacklist.h in Headers */,
</ins><span class="cx">                                 91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */,
</span><span class="cx">                                 51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
</span><span class="cx">                                 BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
</span><span class="lines">@@ -25309,6 +25330,7 @@
</span><span class="cx">                                 A8185F3909765766005826D9 /* DocumentType.h in Headers */,
</span><span class="cx">                                 973889A1116EA9DC00ADF313 /* DocumentWriter.h in Headers */,
</span><span class="cx">                                 BC1A37AD097C715F0019F3D8 /* DOM.h in Headers */,
</span><ins>+                                1AFFC4571D5E83A700267A66 /* CFUtilitiesSPI.h in Headers */,
</ins><span class="cx">                                 8538F0190AD718D8006A81D1 /* DOMAbstractView.h in Headers */,
</span><span class="cx">                                 BC99812E0DBE807A008CE9EF /* DOMAbstractViewFrame.h in Headers */,
</span><span class="cx">                                 8538F01B0AD718D8006A81D1 /* DOMAbstractViewInternal.h in Headers */,
</span><span class="lines">@@ -27477,6 +27499,7 @@
</span><span class="cx">                                 93C38C03164473DD00091EB2 /* ScrollingTreeFixedNode.h in Headers */,
</span><span class="cx">                                 0FEA3E88191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h in Headers */,
</span><span class="cx">                                 0FC4E411187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.h in Headers */,
</span><ins>+                                1AFFC4581D5E865500267A66 /* WebGLBlacklist.h in Headers */,
</ins><span class="cx">                                 93C4A4151629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h in Headers */,
</span><span class="cx">                                 0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */,
</span><span class="cx">                                 0FE5806419327A6200DE32EB /* ScrollingTreeMac.h in Headers */,
</span><span class="lines">@@ -29608,6 +29631,7 @@
</span><span class="cx">                                 A871DB260A150BD600B12A68 /* HTMLTableSectionElement.cpp in Sources */,
</span><span class="cx">                                 D66817FA166FE6D700FA07B4 /* HTMLTemplateElement.cpp in Sources */,
</span><span class="cx">                                 A81369D7097374F600D74463 /* HTMLTextAreaElement.cpp in Sources */,
</span><ins>+                                1AFFC4551D5E81D000267A66 /* PluginBlacklist.mm in Sources */,
</ins><span class="cx">                                 9BC6C21C13CCC97B008E0337 /* HTMLTextFormControlElement.cpp in Sources */,
</span><span class="cx">                                 830519951BB0F11000F3772E /* HTMLTimeElement.cpp in Sources */,
</span><span class="cx">                                 A871DC290A15205700B12A68 /* HTMLTitleElement.cpp in Sources */,
</span><span class="lines">@@ -30717,6 +30741,7 @@
</span><span class="cx">                                 854FE7340A2297BE0058D7AD /* NodeIterator.cpp in Sources */,
</span><span class="cx">                                 4FFC022B1643B710004E1638 /* NodeRareData.cpp in Sources */,
</span><span class="cx">                                 E43105B816750F0C00DB2FB8 /* NodeTraversal.cpp in Sources */,
</span><ins>+                                1AFFC4531D5E81C400267A66 /* WebGLBlacklist.mm in Sources */,
</ins><span class="cx">                                 33503CC71017A1B1003B47E1 /* Notification.cpp in Sources */,
</span><span class="cx">                                 3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */,
</span><span class="cx">                                 3128CA68147331520074C72A /* NotificationController.cpp in Sources */,
</span><span class="lines">@@ -31407,6 +31432,7 @@
</span><span class="cx">                                 B2227A430D00BF220071B782 /* SVGMarkerElement.cpp in Sources */,
</span><span class="cx">                                 B2227A460D00BF220071B782 /* SVGMaskElement.cpp in Sources */,
</span><span class="cx">                                 B2227A4A0D00BF220071B782 /* SVGMetadataElement.cpp in Sources */,
</span><ins>+                                1AFFC4541D5E81CB00267A66 /* BlacklistUpdater.mm in Sources */,
</ins><span class="cx">                                 B2A1F2B00CEF0ABF00442F6A /* SVGMissingGlyphElement.cpp in Sources */,
</span><span class="cx">                                 B2227A4D0D00BF220071B782 /* SVGMPathElement.cpp in Sources */,
</span><span class="cx">                                 A833C7CA0A2CF06B00D57664 /* SVGNames.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacBlacklistUpdaterhfromrev204461trunkSourceWebKit2SharedPluginsPluginModuleInfoh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/BlacklistUpdater.h (from rev 204461, trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h) (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/BlacklistUpdater.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/BlacklistUpdater.h        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 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.
+ */
+
+#pragma once
+
+#if PLATFORM(MAC)
+
+#import &lt;dispatch/dispatch.h&gt;
+
+namespace WebCore {
+
+class PluginBlacklist;
+class WebGLBlacklist;
+
+class BlacklistUpdater {
+public:
+    static void initializeQueue();
+    static void reloadIfNecessary();
+
+    static dispatch_queue_t queue() { return s_queue; }
+    static PluginBlacklist* pluginBlacklist() { return s_pluginBlacklist; }
+    static WebGLBlacklist* webGLBlacklist() { return s_webGLBlacklist; };
+
+private:
+
+    static NSDictionary *readBlacklistData();
+
+    static dispatch_queue_t s_queue;
+    static PluginBlacklist* s_pluginBlacklist;
+    static WebGLBlacklist* s_webGLBlacklist;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacBlacklistUpdatermm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/BlacklistUpdater.mm (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/BlacklistUpdater.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/BlacklistUpdater.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 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;BlacklistUpdater.h&quot;
+
+#if PLATFORM(MAC)
+
+#import &quot;PluginBlacklist.h&quot;
+#import &quot;WebGLBlacklist.h&quot;
+#import &lt;sys/stat.h&gt;
+#import &lt;sys/time.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+// The time after which we'll check the blacklist data.
+static time_t blacklistNextCheckTime;
+
+// The number of seconds before we'll check if the blacklist data has changed.
+const time_t blacklistCheckTimeInterval = 60 * 10;
+
+// The time when we last re-parsed the blacklist file.
+static time_t blacklistUpdateTime;
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
+NSString * const blacklistPath = @&quot;/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist&quot;;
+#else
+NSString * const blacklistPath = @&quot;/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist&quot;;
+#endif
+
+namespace WebCore {
+
+dispatch_queue_t BlacklistUpdater::s_queue;
+
+PluginBlacklist* BlacklistUpdater::s_pluginBlacklist = nullptr;
+WebGLBlacklist* BlacklistUpdater::s_webGLBlacklist = nullptr;
+
+NSDictionary * BlacklistUpdater::readBlacklistData()
+{
+    NSData *data = [NSData dataWithContentsOfFile:blacklistPath];
+    if (!data)
+        return nil;
+
+    return dynamic_objc_cast&lt;NSDictionary&gt;([NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nullptr error:nullptr]);
+}
+
+void BlacklistUpdater::reloadIfNecessary()
+{
+    struct timeval timeVal;
+    if (!gettimeofday(&amp;timeVal, NULL)) {
+        if (timeVal.tv_sec &lt; blacklistNextCheckTime)
+            return;
+    }
+
+    blacklistNextCheckTime = timeVal.tv_sec + blacklistCheckTimeInterval;
+
+    struct stat statBuf;
+    if (stat([blacklistPath fileSystemRepresentation], &amp;statBuf) == -1)
+        return;
+
+    if (statBuf.st_mtimespec.tv_sec == blacklistUpdateTime)
+        return;
+    NSDictionary *propertyList = readBlacklistData();
+    if (!propertyList)
+        return;
+
+    if (s_pluginBlacklist) {
+        delete s_pluginBlacklist;
+        s_pluginBlacklist = 0;
+    }
+
+    if (s_webGLBlacklist) {
+        delete s_webGLBlacklist;
+        s_webGLBlacklist = 0;
+    }
+
+    s_pluginBlacklist = PluginBlacklist::create(propertyList).release();
+    s_webGLBlacklist = WebGLBlacklist::create(propertyList).release();
+
+    blacklistUpdateTime = statBuf.st_mtimespec.tv_sec;
+}
+
+void BlacklistUpdater::initializeQueue()
+{
+    static dispatch_once_t once;
+    dispatch_once(&amp;once, ^{
+        s_queue = dispatch_queue_create(&quot;com.apple.WebKit.Blacklist&quot;, 0);
+    });
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPluginBlacklisth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/PluginBlacklist.h (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PluginBlacklist.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/PluginBlacklist.h        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2012-2016 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.
+ */
+
+#pragma once
+
+#if PLATFORM(MAC)
+
+#include &lt;memory&gt;
+#include &lt;string&gt;
+#include &lt;vector&gt;
+
+OBJC_CLASS NSArray;
+OBJC_CLASS NSDictionary;
+OBJC_CLASS NSSet;
+OBJC_CLASS NSString;
+
+namespace WebCore {
+
+class PluginBlacklist {
+public:
+    enum class LoadPolicy {
+        LoadNormally,
+        BlockedForSecurity,
+        BlockedForCompatibility,
+    };
+
+    WEBCORE_EXPORT static LoadPolicy loadPolicyForPluginVersion(NSString *bundleIdentifier, NSString *bundleVersionString);
+    WEBCORE_EXPORT static bool isPluginUpdateAvailable(NSString *bundleIdentifier);
+
+    static std::unique_ptr&lt;PluginBlacklist&gt; create(NSDictionary *);
+    ~PluginBlacklist();
+
+    static NSArray *splitOSVersion(NSString *osVersion);
+
+    LoadPolicy loadPolicyForPlugin(NSString *bundleIdentifier, NSString *bundleVersionString) const;
+    bool isUpdateAvailable(NSString *bundleIdentifier) const;
+
+private:
+    PluginBlacklist(NSDictionary *bundleIDToMinimumSecureVersion, NSDictionary *bundleIDToMinimumCompatibleVersion, NSDictionary *bundleIDToBlockedVersions, NSSet *bundleIDsWithAvailableUpdates);
+
+    NSDictionary *m_bundleIDToMinimumSecureVersion;
+    NSDictionary *m_bundleIDToMinimumCompatibleVersion;
+    NSDictionary *m_bundleIDToBlockedVersions;
+    NSSet *m_bundleIDsWithAvailableUpdates;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPluginBlacklistmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/PluginBlacklist.mm (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PluginBlacklist.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/PluginBlacklist.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,194 @@
</span><ins>+/*
+ * Copyright (C) 2012-2016 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;PluginBlacklist.h&quot;
+
+#if PLATFORM(MAC)
+
+#import &quot;BlacklistUpdater.h&quot;
+#import &quot;CFUtilitiesSPI.h&quot;
+#import &lt;sys/stat.h&gt;
+#import &lt;sys/time.h&gt;
+
+namespace WebCore {
+
+PluginBlacklist::LoadPolicy PluginBlacklist::loadPolicyForPluginVersion(NSString *bundleIdentifier, NSString *bundleVersionString)
+{
+    BlacklistUpdater::initializeQueue();
+
+    __block PluginBlacklist::LoadPolicy loadPolicy = LoadPolicy::LoadNormally;
+    dispatch_sync(BlacklistUpdater::queue(), ^{
+        BlacklistUpdater::reloadIfNecessary();
+
+        PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist();
+        if (pluginBlacklist)
+            loadPolicy = pluginBlacklist-&gt;loadPolicyForPlugin(bundleIdentifier, bundleVersionString);
+    });
+
+    return loadPolicy;
+}
+
+bool PluginBlacklist::isPluginUpdateAvailable(NSString *bundleIdentifier)
+{
+    BlacklistUpdater::initializeQueue();
+
+    __block bool isPluginUpdateAvailable = false;
+    dispatch_sync(BlacklistUpdater::queue(), ^{
+        BlacklistUpdater::reloadIfNecessary();
+
+        PluginBlacklist* pluginBlacklist = BlacklistUpdater::pluginBlacklist();
+        if (pluginBlacklist)
+            isPluginUpdateAvailable = pluginBlacklist-&gt;isUpdateAvailable(bundleIdentifier);
+    });
+
+    return isPluginUpdateAvailable;
+}
+
+std::unique_ptr&lt;PluginBlacklist&gt; PluginBlacklist::create(NSDictionary *propertyList)
+{
+    CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
+    CFStringRef osVersion = static_cast&lt;CFStringRef&gt;(CFDictionaryGetValue(systemVersionDictionary, _kCFSystemVersionProductVersionKey));
+
+    NSDictionary *dictionary = [propertyList objectForKey:@&quot;PlugInBlacklist&quot;];
+
+    NSMutableDictionary *bundleIDToMinimumSecureVersion = [NSMutableDictionary dictionary];
+    NSMutableDictionary *bundleIDToMinimumCompatibleVersion = [NSMutableDictionary dictionary];
+    NSMutableDictionary *bundleIDToBlockedVersions = [NSMutableDictionary dictionary];
+    NSMutableSet *bundleIDsWithAvailableUpdates = [NSMutableSet set];
+    
+    for (NSString *osVersionComponent in splitOSVersion((NSString *)osVersion)) {
+        NSDictionary *bundleIDs = [dictionary objectForKey:osVersionComponent];
+        if (!bundleIDs)
+            continue;
+
+        for (NSString *bundleID in bundleIDs) {
+            NSDictionary *versionInfo = [bundleIDs objectForKey:bundleID];
+            assert(versionInfo);
+
+            if (![versionInfo isKindOfClass:[NSDictionary class]])
+                continue;
+
+            [bundleIDToMinimumSecureVersion removeObjectForKey:bundleID];
+            [bundleIDToMinimumCompatibleVersion removeObjectForKey:bundleID];
+            [bundleIDToBlockedVersions removeObjectForKey:bundleID];
+
+            if (NSArray *blockedVersions = [versionInfo objectForKey:@&quot;BlockedPlugInBundleVersions&quot;])
+                [bundleIDToBlockedVersions setObject:blockedVersions forKey:bundleID];
+
+            if (NSString *minimumSecureVersion = [versionInfo objectForKey:@&quot;MinimumPlugInBundleVersion&quot;])
+                [bundleIDToMinimumSecureVersion setObject:minimumSecureVersion forKey:bundleID];
+
+            if (NSString *minimumCompatibleVersion = [versionInfo objectForKey:@&quot;MinimumCompatiblePlugInBundleVersion&quot;])
+                [bundleIDToMinimumCompatibleVersion setObject:minimumCompatibleVersion forKey:bundleID];
+
+            if (NSNumber *updateAvailable = [versionInfo objectForKey:@&quot;PlugInUpdateAvailable&quot;]) {
+                // A missing PlugInUpdateAvailable key means that there is a plug-in update available.
+                if (!updateAvailable || [updateAvailable boolValue])
+                    [bundleIDsWithAvailableUpdates addObject:bundleID];
+            }
+        }
+    }
+
+    CFRelease(systemVersionDictionary);
+
+    return std::unique_ptr&lt;PluginBlacklist&gt;(new PluginBlacklist(bundleIDToMinimumSecureVersion, bundleIDToMinimumCompatibleVersion, bundleIDToBlockedVersions, bundleIDsWithAvailableUpdates));
+}
+
+PluginBlacklist::~PluginBlacklist()
+{
+    CFRelease(m_bundleIDToMinimumSecureVersion);
+    CFRelease(m_bundleIDToMinimumCompatibleVersion);
+    CFRelease(m_bundleIDToBlockedVersions);
+    CFRelease(m_bundleIDsWithAvailableUpdates);
+}
+
+NSArray *PluginBlacklist::splitOSVersion(NSString *osVersion)
+{
+    NSArray *components = [osVersion componentsSeparatedByString:@&quot;.&quot;];
+
+    NSMutableArray *result = [NSMutableArray array];
+
+    for (NSUInteger i = 0; i &lt; [components count]; ++i) {
+        NSString *versionString = [[components subarrayWithRange:NSMakeRange(0, i + 1)] componentsJoinedByString:@&quot;.&quot;];
+
+        [result addObject:versionString];
+    }
+
+    return result;
+}
+
+
+PluginBlacklist::LoadPolicy PluginBlacklist::loadPolicyForPlugin(NSString *bundleIdentifier, NSString *bundleVersionString) const
+{
+    if (!bundleIdentifier || !bundleVersionString)
+        return LoadPolicy::LoadNormally;
+
+    // First, check for explicitly blocked versions.
+    for (NSString *blockedVersion in [m_bundleIDToBlockedVersions objectForKey:bundleIdentifier]) {
+        if ([blockedVersion isEqualToString:bundleVersionString])
+            return LoadPolicy::BlockedForSecurity;
+    }
+
+    // Then, check if there's a forced minimum version for security issues.
+    if (NSString *minimumSecureVersion = [m_bundleIDToMinimumSecureVersion objectForKey:bundleIdentifier]) {
+        if ([bundleVersionString compare:minimumSecureVersion options:NSNumericSearch] == NSOrderedAscending)
+            return LoadPolicy::BlockedForSecurity;
+    }
+
+    // Then, check if there's a forced minimum version for compatibility issues.
+    if (NSString *minimumCompatibleVersion = [m_bundleIDToMinimumCompatibleVersion objectForKey:bundleIdentifier]) {
+        if ([bundleVersionString compare:minimumCompatibleVersion options:NSNumericSearch] == NSOrderedAscending)
+            return LoadPolicy::BlockedForCompatibility;
+    }
+
+    return LoadPolicy::LoadNormally;
+}
+
+bool PluginBlacklist::isUpdateAvailable(NSString *bundleIdentifier) const
+{
+    return [m_bundleIDsWithAvailableUpdates containsObject:bundleIdentifier];
+}
+
+PluginBlacklist::PluginBlacklist(NSDictionary *bundleIDToMinimumSecureVersion, NSDictionary *bundleIDToMinimumCompatibleVersion, NSDictionary *bundleIDToBlockedVersions, NSSet *bundleIDsWithAvailableUpdates)
+    : m_bundleIDToMinimumSecureVersion([bundleIDToMinimumSecureVersion copy])
+    , m_bundleIDToMinimumCompatibleVersion([bundleIDToMinimumCompatibleVersion copy])
+    , m_bundleIDToBlockedVersions([bundleIDToBlockedVersions copy])
+    , m_bundleIDsWithAvailableUpdates([bundleIDsWithAvailableUpdates copy])
+{
+    // This ensures that the dictionaries do not get destroyed under Objective-C grabage collection.
+    CFRetain(m_bundleIDToMinimumSecureVersion);
+    [m_bundleIDToMinimumSecureVersion release];
+    CFRetain(m_bundleIDToMinimumCompatibleVersion);
+    [m_bundleIDToMinimumCompatibleVersion release];
+    CFRetain(m_bundleIDToBlockedVersions);
+    [m_bundleIDToBlockedVersions release];
+    CFRetain(m_bundleIDsWithAvailableUpdates);
+    [m_bundleIDsWithAvailableUpdates release];
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebGLBlacklisthfromrev204461trunkSourceWebKit2SharedPluginsPluginModuleInfoh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/WebGLBlacklist.h (from rev 204461, trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h) (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebGLBlacklist.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/WebGLBlacklist.h        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 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.
+ */
+
+#pragma once
+
+#if PLATFORM(MAC)
+
+#include &lt;memory&gt;
+#include &lt;string&gt;
+#include &lt;vector&gt;
+
+OBJC_CLASS NSDictionary;
+
+namespace WebCore {
+
+class WebGLBlacklist {
+public:
+    enum BlockComparison {
+        Equals,
+        LessThan,
+        LessThanEquals
+    };
+
+    WEBCORE_EXPORT static bool shouldBlockWebGL();
+    WEBCORE_EXPORT static bool shouldSuggestBlockingWebGL();
+
+    static std::unique_ptr&lt;WebGLBlacklist&gt; create(NSDictionary *propertyList);
+    ~WebGLBlacklist();
+
+    bool shouldBlock() const;
+    bool shouldSuggestBlocking() const;
+
+private:
+    enum class BlockCommand {
+        Allow,
+        Block,
+        SuggestBlocking
+    };
+
+    WebGLBlacklist(BlockCommand);
+
+    BlockCommand m_command;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebGLBlacklistmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/WebGLBlacklist.mm (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebGLBlacklist.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/WebGLBlacklist.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,265 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 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;WebGLBlacklist.h&quot;
+
+#if PLATFORM(MAC)
+
+#import &quot;BlacklistUpdater.h&quot;
+#import &quot;CFUtilitiesSPI.h&quot;
+#import &lt;OpenGL/OpenGL.h&gt;
+
+namespace WebCore {
+
+struct OSBuildInfo {
+    OSBuildInfo()
+        : major(0)
+        , minor(0)
+        , build(0)
+    {
+    }
+
+    OSBuildInfo(int major, int minor, int build)
+        : major(major)
+        , minor(minor)
+        , build(build)
+    {
+    }
+
+    bool operator==(const OSBuildInfo&amp; other) const
+    {
+        return major == other.major &amp;&amp; minor == other.minor &amp;&amp; build == other.build;
+    }
+
+    bool operator&gt;(const OSBuildInfo&amp; other) const
+    {
+        return std::tie(major, minor, build) &gt; std::tie(other.major, other.minor, other.build);
+    }
+
+    bool operator&lt;=(const OSBuildInfo&amp; other) const
+    {
+        return std::tie(major, minor, build) &lt;= std::tie(other.major, other.minor, other.build);
+    }
+
+    bool operator&lt;(const OSBuildInfo&amp; other) const
+    {
+        return std::tie(major, minor, build) &lt; std::tie(other.major, other.minor, other.build);
+    }
+
+    int major; // Represents the 13 in 13C64.
+    int minor; // Represents the C in 13C64 (as a number where A == 1, i.e. 3).
+    int build; // Represents the 64 in 13C64.
+};
+
+static OSBuildInfo buildInfoFromOSBuildString(NSString *buildString)
+{
+    NSError *error = NULL;
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;^(\\d+)([A-Z])(\\d+)&quot; options:0 error:&amp;error];
+    NSArray *matches = [regex matchesInString:buildString options:0 range:NSMakeRange(0, [buildString length])];
+    if (!matches || matches.count != 1) {
+#ifndef NDEBUG
+        NSLog(@&quot;WebGLBlacklist could not parse OSBuild entry: %@&quot;, buildString);
+#endif
+        return OSBuildInfo();
+    }
+
+    NSTextCheckingResult *matchResult = [matches objectAtIndex:0];
+
+    if (matchResult.numberOfRanges != 4) {
+#ifndef NDEBUG
+        NSLog(@&quot;WebGLBlacklist could not parse OSBuild entry: %@&quot;, buildString);
+#endif
+        return OSBuildInfo();
+    }
+
+    int majorVersion = [[buildString substringWithRange:[matchResult rangeAtIndex:1]] intValue];
+    int minorVersion = [[buildString substringWithRange:[matchResult rangeAtIndex:2]] characterAtIndex:0] - 'A' + 1;
+    int buildVersion = [[buildString substringWithRange:[matchResult rangeAtIndex:3]] intValue];
+
+    return OSBuildInfo(majorVersion, minorVersion, buildVersion);
+}
+
+bool WebGLBlacklist::shouldBlockWebGL()
+{
+    BlacklistUpdater::initializeQueue();
+
+    __block bool shouldBlock = false;
+    dispatch_sync(BlacklistUpdater::queue(), ^{
+        BlacklistUpdater::reloadIfNecessary();
+
+        WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist();
+        if (webGLBlacklist)
+            shouldBlock = webGLBlacklist-&gt;shouldBlock();
+    });
+
+    return shouldBlock;
+}
+
+bool WebGLBlacklist::shouldSuggestBlockingWebGL()
+{
+    BlacklistUpdater::initializeQueue();
+
+    __block bool shouldSuggestBlocking = false;
+    dispatch_sync(BlacklistUpdater::queue(), ^{
+        BlacklistUpdater::reloadIfNecessary();
+
+        WebGLBlacklist* webGLBlacklist = BlacklistUpdater::webGLBlacklist();
+        if (webGLBlacklist)
+            shouldSuggestBlocking = webGLBlacklist-&gt;shouldSuggestBlocking();
+    });
+
+    return shouldSuggestBlocking;
+}
+
+static bool matchesGPU(GLint machineId, GLint rendererMask)
+{
+    // If the last two bytes of the rendererMask are not zero, then we're
+    // looking for an exact GPU match. Otherwise we're matching against
+    // a class of GPUs.
+
+    if (rendererMask &amp; 0xFF)
+        return machineId == rendererMask;
+
+    return (machineId &amp; kCGLRendererIDMatchingMask) == rendererMask;
+}
+
+static GLint gpuMaskFromString(NSString *input)
+{
+    NSScanner* scanner = [NSScanner scannerWithString:input];
+    unsigned maskValue;
+    [scanner scanHexInt:&amp;maskValue];
+    return static_cast&lt;GLint&gt;(maskValue &amp; (kCGLRendererIDMatchingMask | 0xFF));
+}
+
+static bool matchesBuildInfo(OSBuildInfo machineInfo, OSBuildInfo blockInfo, WebGLBlacklist::BlockComparison comparison)
+{
+    switch (comparison) {
+    case WebGLBlacklist::BlockComparison::Equals:
+        return machineInfo == blockInfo;
+    case WebGLBlacklist::BlockComparison::LessThan:
+        return machineInfo &lt; blockInfo;
+    case WebGLBlacklist::BlockComparison::LessThanEquals:
+        return machineInfo &lt;= blockInfo;
+    }
+}
+
+std::unique_ptr&lt;WebGLBlacklist&gt; WebGLBlacklist::create(NSDictionary *propertyList)
+{
+    CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
+    CFStringRef osBuild = static_cast&lt;CFStringRef&gt;(CFDictionaryGetValue(systemVersionDictionary, _kCFSystemVersionBuildVersionKey));
+    OSBuildInfo buildInfo = buildInfoFromOSBuildString((NSString *)osBuild);
+    CFRelease(systemVersionDictionary);
+
+    if (!buildInfo.major)
+        return nullptr;
+
+    NSArray *blockEntries = [propertyList objectForKey:@&quot;WebGLBlacklist&quot;];
+
+    if (![blockEntries isKindOfClass:[NSArray class]] || !blockEntries.count)
+        return nullptr;
+
+    CGLPixelFormatAttribute attribs[12] = {
+        kCGLPFAColorSize, (CGLPixelFormatAttribute)32,
+        kCGLPFADepthSize, (CGLPixelFormatAttribute)32,
+        kCGLPFAAccelerated,
+        kCGLPFASupersample,
+        kCGLPFAMultisample,
+        kCGLPFASampleBuffers, (CGLPixelFormatAttribute)1,
+        kCGLPFASamples, (CGLPixelFormatAttribute)4,
+        (CGLPixelFormatAttribute)0
+    };
+
+    CGLPixelFormatObj pix;
+    GLint npix;
+    CGLChoosePixelFormat(attribs, &amp;pix, &amp;npix);
+    CGLContextObj ctx;
+    CGLCreateContext(pix, 0, &amp;ctx);
+    GLint rendererId = 0;
+    CGLGetParameter(ctx, kCGLCPCurrentRendererID, &amp;rendererId);
+    GLint supportsSeparateAddressSpace = 0;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
+    CGLGetParameter(ctx, kCGLCPSupportSeparateAddressSpace, &amp;supportsSeparateAddressSpace);
+#endif
+    CGLDestroyContext(ctx);
+    CGLReleasePixelFormat(pix);
+
+    rendererId &amp;= kCGLRendererIDMatchingMask | 0xFF;
+
+    BlockCommand globalCommand = BlockCommand::Allow;
+
+    for (NSDictionary *blockData in blockEntries) {
+
+        GLint gpuMask = gpuMaskFromString([blockData objectForKey:@&quot;GPU&quot;]);
+
+        OSBuildInfo blockedBuildInfo = buildInfoFromOSBuildString(static_cast&lt;NSString*&gt;([blockData objectForKey:@&quot;OSBuild&quot;]));
+
+        NSString *comparisonString = [blockData objectForKey:@&quot;Comparison&quot;];
+        BlockComparison comparison = BlockComparison::Equals;
+        if ([comparisonString isEqualToString:@&quot;LessThan&quot;])
+            comparison = BlockComparison::LessThan;
+        else if ([comparisonString isEqualToString:@&quot;LessThanEquals&quot;])
+            comparison = BlockComparison::LessThanEquals;
+
+        NSString *commandString = [blockData objectForKey:@&quot;Command&quot;];
+        BlockCommand command = BlockCommand::Allow;
+        if ([commandString isEqualToString:@&quot;Block&quot;])
+            command = BlockCommand::Block;
+        else if ([commandString isEqualToString:@&quot;SuggestBlocking&quot;])
+            command = BlockCommand::SuggestBlocking;
+
+        if (matchesGPU(rendererId, gpuMask) &amp;&amp; matchesBuildInfo(buildInfo, blockedBuildInfo, comparison)) {
+            globalCommand = command;
+            break;
+        }
+    }
+
+    if (!supportsSeparateAddressSpace &amp;&amp; globalCommand == BlockCommand::Allow)
+        globalCommand = BlockCommand::SuggestBlocking;
+
+    return std::unique_ptr&lt;WebGLBlacklist&gt;(new WebGLBlacklist(globalCommand));
+}
+
+bool WebGLBlacklist::shouldBlock() const
+{
+    return m_command == BlockCommand::Block;
+}
+
+bool WebGLBlacklist::shouldSuggestBlocking() const
+{
+    return m_command == BlockCommand::SuggestBlocking;
+}
+
+WebGLBlacklist::WebGLBlacklist(BlockCommand command)
+    : m_command(command)
+{
+}
+
+WebGLBlacklist::~WebGLBlacklist()
+{
+}
+
+}
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformspicfCFUtilitiesSPIhfromrev204461trunkSourceWebKit2SharedPluginsPluginModuleInfoh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/spi/cf/CFUtilitiesSPI.h (from rev 204461, trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h) (0 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cf/CFUtilitiesSPI.h                                (rev 0)
+++ trunk/Source/WebCore/platform/spi/cf/CFUtilitiesSPI.h        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+#pragma once
+
+#include &lt;CoreFoundation/CoreFoundation.h&gt;
+
+#if USE(APPLE_INTERNAL_SDK)
+#import &lt;CoreFoundation/CFPriv.h&gt;
+#endif
+
+extern &quot;C&quot; {
+CFDictionaryRef _CFCopySystemVersionDictionary(void);
+extern const CFStringRef _kCFSystemVersionProductVersionKey;
+extern const CFStringRef _kCFSystemVersionBuildVersionKey;
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-08-12  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Move the plug-in and WebGL blacklist code to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=160831
+
+        Reviewed by Sam Weinig.
+
+        Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (shouldBlockPlugin):
+        (WebFrameLoaderClient::createPlugin):
+        (WebFrameLoaderClient::createJavaAppletWidget):
+        (shouldBlockWebGL):
+        (WebFrameLoaderClient::webGLPolicyForURL):
+        (WebFrameLoaderClient::resolveWebGLPolicyForURL):
+
</ins><span class="cx"> 2016-08-14  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix compiler errors when building iOS WebKit using the iOS 10 beta SDK
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx"> #import &lt;WebCore/NSURLDownloadSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSURLFileTypeMappingsSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/Page.h&gt;
</span><ins>+#import &lt;WebCore/PluginBlacklist.h&gt;
</ins><span class="cx"> #import &lt;WebCore/PluginViewBase.h&gt;
</span><span class="cx"> #import &lt;WebCore/ProtectionSpace.h&gt;
</span><span class="cx"> #import &lt;WebCore/ResourceError.h&gt;
</span><span class="lines">@@ -118,6 +119,7 @@
</span><span class="cx"> #import &lt;WebCore/SharedBuffer.h&gt;
</span><span class="cx"> #import &lt;WebCore/SubresourceLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/WebCoreObjCExtras.h&gt;
</span><ins>+#import &lt;WebCore/WebGLBlacklist.h&gt;
</ins><span class="cx"> #import &lt;WebCore/WebScriptObjectPrivate.h&gt;
</span><span class="cx"> #import &lt;WebCore/Widget.h&gt;
</span><span class="cx"> #import &lt;WebKitLegacy/DOMElement.h&gt;
</span><span class="lines">@@ -1890,6 +1892,17 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> 
</span><ins>+static bool shouldBlockPlugin(WebBasePluginPackage *pluginPackage)
+{
+#if PLATFORM(MAC)
+    auto loadPolicy = PluginBlacklist::loadPolicyForPluginVersion(pluginPackage.bundleIdentifier, pluginPackage.bundleVersion);
+    return loadPolicy == PluginBlacklist::LoadPolicy::BlockedForSecurity || loadPolicy == PluginBlacklist::LoadPolicy::BlockedForCompatibility;
+#else
+    UNUSED_PARAM(pluginPackage);
+    return false;
+#endif
+}
+
</ins><span class="cx"> RefPtr&lt;Widget&gt; WebFrameLoaderClient::createPlugin(const IntSize&amp; size, HTMLPlugInElement* element, const URL&amp; url,
</span><span class="cx">     const Vector&lt;String&gt;&amp; paramNames, const Vector&lt;String&gt;&amp; paramValues, const String&amp; mimeType, bool loadManually)
</span><span class="cx"> {
</span><span class="lines">@@ -1973,7 +1986,7 @@
</span><span class="cx">     NSView *view = nil;
</span><span class="cx"> 
</span><span class="cx">     if (pluginPackage) {
</span><del>-        if (WKShouldBlockPlugin([pluginPackage bundleIdentifier], [pluginPackage bundleVersion])) {
</del><ins>+        if (shouldBlockPlugin(pluginPackage)) {
</ins><span class="cx">             errorCode = WebKitErrorBlockedPlugInVersion;
</span><span class="cx">             if (is&lt;RenderEmbeddedObject&gt;(element-&gt;renderer()))
</span><span class="cx">                 downcast&lt;RenderEmbeddedObject&gt;(*element-&gt;renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</span><span class="lines">@@ -2078,7 +2091,7 @@
</span><span class="cx">     int errorCode = WebKitErrorJavaUnavailable;
</span><span class="cx"> 
</span><span class="cx">     if (pluginPackage) {
</span><del>-        if (WKShouldBlockPlugin([pluginPackage bundleIdentifier], [pluginPackage bundleVersion])) {
</del><ins>+        if (shouldBlockPlugin(pluginPackage)) {
</ins><span class="cx">             errorCode = WebKitErrorBlockedPlugInVersion;
</span><span class="cx">             if (is&lt;RenderEmbeddedObject&gt;(element-&gt;renderer()))
</span><span class="cx">                 downcast&lt;RenderEmbeddedObject&gt;(*element-&gt;renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</span><span class="lines">@@ -2126,14 +2139,23 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL)
</span><ins>+static bool shouldBlockWebGL()
+{
+#if PLATFORM(MAC)
+    return WebGLBlacklist::shouldBlockWebGL();
+#else
+    return false;
+#endif
+}
+
</ins><span class="cx"> WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForURL(const String&amp;) const
</span><span class="cx"> {
</span><del>-    return WKShouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
</del><ins>+    return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebCore::WebGLLoadPolicy WebFrameLoaderClient::resolveWebGLPolicyForURL(const String&amp;) const
</span><span class="cx"> {
</span><del>-    return WKShouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
</del><ins>+    return shouldBlockWebGL() ? WebGLBlockCreation : WebGLAllowCreation;
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit2/ChangeLog        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-08-12  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Move the plug-in and WebGL blacklist code to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=160831
+
+        Reviewed by Sam Weinig.
+
+        Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.
+
+        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
+        (WebKit::getPlatformPluginModuleInformation):
+        * Shared/Plugins/PluginModuleInfo.h:
+        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
+        (WKContextIsPlugInUpdateAvailable):
+        (WKContextShouldBlockWebGL):
+        (WKContextShouldSuggestBlockWebGL):
+        * UIProcess/Plugins/PluginInfoStore.h:
+        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
+        (WebKit::shouldBlockPlugin):
+        (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
+        (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy): Deleted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::findPlugin):
+
</ins><span class="cx"> 2016-08-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add Sandbox profile for Enterprise support version of Flash Player
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNetscapemacPluginInformationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -32,8 +32,10 @@
</span><span class="cx"> #import &quot;APIString.h&quot;
</span><span class="cx"> #import &quot;PluginModuleInfo.h&quot;
</span><span class="cx"> #import &quot;StringUtilities.h&quot;
</span><del>-#import &lt;WebKitSystemInterface.h&gt;
</del><ins>+#import &lt;WebCore/PluginBlacklist.h&gt;
</ins><span class="cx"> 
</span><ins>+using namespace WebCore;
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> void getPlatformPluginModuleInformation(const PluginModuleInfo&amp; plugin, API::Dictionary::MapType&amp; map)
</span><span class="lines">@@ -41,7 +43,7 @@
</span><span class="cx">     map.set(pluginInformationBundleIdentifierKey(), API::String::create(plugin.bundleIdentifier));
</span><span class="cx">     map.set(pluginInformationBundleVersionKey(), API::String::create(plugin.versionString));
</span><span class="cx">     map.set(pluginInformationBundleShortVersionKey(), API::String::create(plugin.shortVersionString));
</span><del>-    map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), API::Boolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
</del><ins>+    map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), API::Boolean::create(WebCore::PluginBlacklist::isPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
</ins><span class="cx">     map.set(pluginInformationHasSandboxProfileKey(), API::Boolean::create(plugin.hasSandboxProfile));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsPluginModuleInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef PluginModuleInfo_h
-#define PluginModuleInfo_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/PluginData.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -63,5 +62,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><del>-
-#endif // PluginModuleInfo_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -38,7 +38,8 @@
</span><span class="cx"> #import &quot;WKSharedAPICast.h&quot;
</span><span class="cx"> #import &quot;WKStringCF.h&quot;
</span><span class="cx"> #import &quot;WebProcessPool.h&quot;
</span><del>-#import &lt;WebKitSystemInterface.h&gt;
</del><ins>+#import &lt;WebCore/PluginBlacklist.h&gt;
+#import &lt;WebCore/WebGLBlacklist.h&gt;
</ins><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     return false;
</span><span class="cx"> #else
</span><del>-    return WKIsPluginUpdateAvailable((NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get());
</del><ins>+    return WebCore::PluginBlacklist::isPluginUpdateAvailable((NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -156,10 +157,18 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKContextShouldBlockWebGL()
</span><span class="cx"> {
</span><del>-    return WKShouldBlockWebGL();
</del><ins>+#if PLATFORM(MAC)
+    return WebCore::WebGLBlacklist::shouldBlockWebGL();
+#else
+    return false;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKContextShouldSuggestBlockWebGL()
</span><span class="cx"> {
</span><del>-    return WKShouldSuggestBlockingWebGL();
</del><ins>+#if PLATFORM(MAC)
+    return WebCore::WebGLBlacklist::shouldSuggestBlockingWebGL();
+#else
+    return false;
+#endif
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsmacPluginInfoStoreMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm (204461 => 204462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm        2016-08-15 16:10:09 UTC (rev 204461)
+++ trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm        2016-08-15 16:43:13 UTC (rev 204462)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><span class="cx"> #import &quot;NetscapePluginModule.h&quot;
</span><span class="cx"> #import &quot;SandboxUtilities.h&quot;
</span><del>-#import &quot;WebKitSystemInterface.h&quot;
</del><ins>+#import &lt;WebCore/PluginBlacklist.h&gt;
</ins><span class="cx"> #import &lt;WebCore/WebCoreNSStringExtras.h&gt;
</span><span class="cx"> #import &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> static bool shouldBlockPlugin(const PluginModuleInfo&amp; plugin)
</span><span class="cx"> {
</span><span class="cx">     PluginModuleLoadPolicy loadPolicy = PluginInfoStore::defaultLoadPolicyForPlugin(plugin);
</span><del>-    return (loadPolicy == PluginModuleBlockedForSecurity) || (loadPolicy == PluginModuleBlockedForCompatibility);
</del><ins>+    return loadPolicy == PluginModuleBlockedForSecurity || loadPolicy == PluginModuleBlockedForCompatibility;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool PluginInfoStore::shouldUsePlugin(Vector&lt;PluginModuleInfo&gt;&amp; alreadyLoadedPlugins, const PluginModuleInfo&amp; plugin)
</span><span class="lines">@@ -108,29 +108,18 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline PluginModuleLoadPolicy WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy(WKPlugInModuleLoadPolicy wksiPolicy)
</del><ins>+PluginModuleLoadPolicy PluginInfoStore::defaultLoadPolicyForPlugin(const PluginModuleInfo&amp; plugin)
</ins><span class="cx"> {
</span><del>-
-    switch (wksiPolicy) {
-        case WKPlugInModuleLoadPolicyLoadNormally:
-            return PluginModuleLoadNormally;
-        case WKPlugInModuleLoadPolicyLoadUnsandboxed:
-            return PluginModuleLoadUnsandboxed;
-        case WKPlugInModuleLoadPolicyBlockedForSecurity:
-            return PluginModuleBlockedForSecurity;
-        case WKPlugInModuleLoadPolicyBlockedForCompatibility:
-            return PluginModuleBlockedForCompatibility;
</del><ins>+    switch (PluginBlacklist::loadPolicyForPluginVersion(plugin.bundleIdentifier, plugin.versionString)) {
+    case PluginBlacklist::LoadPolicy::LoadNormally:
+        return PluginModuleLoadNormally;
+    case PluginBlacklist::LoadPolicy::BlockedForSecurity:
+        return PluginModuleBlockedForSecurity;
+    case PluginBlacklist::LoadPolicy::BlockedForCompatibility:
+        return PluginModuleBlockedForCompatibility;
</ins><span class="cx">     }
</span><del>-
-    ASSERT_NOT_REACHED();
-    return PluginModuleBlockedForSecurity;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-PluginModuleLoadPolicy PluginInfoStore::defaultLoadPolicyForPlugin(const PluginModuleInfo&amp; plugin)
-{
-    return WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy(WKLoadPolicyForPluginVersion(plugin.bundleIdentifier, plugin.versionString));
-}
-
</del><span class="cx"> PluginModuleInfo PluginInfoStore::findPluginWithBundleIdentifier(const String&amp; bundleIdentifier)
</span><span class="cx"> {
</span><span class="cx">     loadPluginsIfNecessary();
</span></span></pre>
</div>
</div>

</body>
</html>