<!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>[198088] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198088">198088</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-03-13 18:09:17 -0700 (Sun, 13 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre><attachment> should be a runtime-enabled feature
https://bugs.webkit.org/show_bug.cgi?id=155413
<rdar://problem/25120753>
Reviewed by Sam Weinig and Anders Carlsson.
Source/WebKit/mac:
Add an internal setting on WebPreferences
to enable the <attachment> element support.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences attachmentElementEnabled]):
(-[WebPreferences setAttachmentElementEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit2:
Add an internal setting on WKWebViewConfiguration
to enable the <attachment> element support.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _attachmentElementEnabled]):
(-[WKWebViewConfiguration _setAttachmentElementEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
LayoutTests:
Now that <attachment> is disabled by default, use an
internal setting to turn them back on test by test.
* fast/attachment/attachment-default-icon-expected.html:
* fast/attachment/attachment-default-icon.html:
* fast/attachment/attachment-disabled-dom.html:
* fast/attachment/attachment-disabled-rendering.html:
* fast/attachment/attachment-dom.html:
* fast/attachment/attachment-folder-icon-expected.html:
* fast/attachment/attachment-folder-icon.html:
* fast/attachment/attachment-icon-from-file-extension-expected.html:
* fast/attachment/attachment-icon-from-file-extension.html:
* fast/attachment/attachment-label-highlight.html:
* fast/attachment/attachment-progress.html:
* fast/attachment/attachment-rendering.html:
* fast/attachment/attachment-select-on-click-inside-user-select-all.html:
* fast/attachment/attachment-select-on-click.html:
* fast/attachment/attachment-subtitle.html:
* fast/attachment/attachment-title.html:
* fast/attachment/attachment-type-attribute-expected.html:
* fast/attachment/attachment-type-attribute.html:
* editing/pasteboard/copy-paste-attachment.html:
* editing/pasteboard/drag-and-drop-attachment-contenteditable.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingpasteboardcopypasteattachmenthtml">trunk/LayoutTests/editing/pasteboard/copy-paste-attachment.html</a></li>
<li><a href="#trunkLayoutTestseditingpasteboarddraganddropattachmentcontenteditablehtml">trunk/LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentdefaulticonexpectedhtml">trunk/LayoutTests/fast/attachment/attachment-default-icon-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentdefaulticonhtml">trunk/LayoutTests/fast/attachment/attachment-default-icon.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentdisableddomhtml">trunk/LayoutTests/fast/attachment/attachment-disabled-dom.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentdisabledrenderinghtml">trunk/LayoutTests/fast/attachment/attachment-disabled-rendering.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentdomhtml">trunk/LayoutTests/fast/attachment/attachment-dom.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentfoldericonexpectedhtml">trunk/LayoutTests/fast/attachment/attachment-folder-icon-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentfoldericonhtml">trunk/LayoutTests/fast/attachment/attachment-folder-icon.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmenticonfromfileextensionexpectedhtml">trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmenticonfromfileextensionhtml">trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentlabelhighlighthtml">trunk/LayoutTests/fast/attachment/attachment-label-highlight.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentprogresshtml">trunk/LayoutTests/fast/attachment/attachment-progress.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentrenderinghtml">trunk/LayoutTests/fast/attachment/attachment-rendering.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentselectonclickinsideuserselectallhtml">trunk/LayoutTests/fast/attachment/attachment-select-on-click-inside-user-select-all.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentselectonclickhtml">trunk/LayoutTests/fast/attachment/attachment-select-on-click.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmentsubtitlehtml">trunk/LayoutTests/fast/attachment/attachment-subtitle.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmenttitlehtml">trunk/LayoutTests/fast/attachment/attachment-title.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmenttypeattributeexpectedhtml">trunk/LayoutTests/fast/attachment/attachment-type-attribute-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastattachmentattachmenttypeattributehtml">trunk/LayoutTests/fast/attachment/attachment-type-attribute.html</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/ChangeLog        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2016-03-13 Dean Jackson <dino@apple.com>
+
+ <attachment> should be a runtime-enabled feature
+ https://bugs.webkit.org/show_bug.cgi?id=155413
+ <rdar://problem/25120753>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ Now that <attachment> is disabled by default, use an
+ internal setting to turn them back on test by test.
+
+ * fast/attachment/attachment-default-icon-expected.html:
+ * fast/attachment/attachment-default-icon.html:
+ * fast/attachment/attachment-disabled-dom.html:
+ * fast/attachment/attachment-disabled-rendering.html:
+ * fast/attachment/attachment-dom.html:
+ * fast/attachment/attachment-folder-icon-expected.html:
+ * fast/attachment/attachment-folder-icon.html:
+ * fast/attachment/attachment-icon-from-file-extension-expected.html:
+ * fast/attachment/attachment-icon-from-file-extension.html:
+ * fast/attachment/attachment-label-highlight.html:
+ * fast/attachment/attachment-progress.html:
+ * fast/attachment/attachment-rendering.html:
+ * fast/attachment/attachment-select-on-click-inside-user-select-all.html:
+ * fast/attachment/attachment-select-on-click.html:
+ * fast/attachment/attachment-subtitle.html:
+ * fast/attachment/attachment-title.html:
+ * fast/attachment/attachment-type-attribute-expected.html:
+ * fast/attachment/attachment-type-attribute.html:
+ * editing/pasteboard/copy-paste-attachment.html:
+ * editing/pasteboard/drag-and-drop-attachment-contenteditable.html:
+
</ins><span class="cx"> 2016-03-13 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> ComposedTreeIterator fails to traverse slots if root is shadow host
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboardcopypasteattachmenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/pasteboard/copy-paste-attachment.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/copy-paste-attachment.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/editing/pasteboard/copy-paste-attachment.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,6 +1,10 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboarddraganddropattachmentcontenteditablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/editing/pasteboard/drag-and-drop-attachment-contenteditable.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,6 +1,10 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> <style>
</span><span class="cx"> #target {
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentdefaulticonexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-default-icon-expected.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-default-icon-expected.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-default-icon-expected.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,6 +1,10 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <body>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <attachment id="attachment" title=" "></attachment>
</span><span class="cx"> <script>
</span><span class="cx"> var file;
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentdefaulticonhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-default-icon.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-default-icon.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-default-icon.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,6 +1,10 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <body>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <attachment></attachment>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentdisableddomhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-disabled-dom.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-disabled-dom.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-disabled-dom.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -7,9 +7,6 @@
</span><span class="cx"> <body>
</span><span class="cx"> <script>
</span><span class="cx">
</span><del>-if (window.internals)
- window.internals.settings.setAttachmentElementEnabled(false);
-
</del><span class="cx"> description("This tests that attachments have an instance type of HTMLUnknownElement if attachments are disabled.");
</span><span class="cx">
</span><span class="cx"> var attachment = document.createElement("attachment");
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentdisabledrenderinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-disabled-rendering.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-disabled-rendering.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-disabled-rendering.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,10 +1,4 @@
</span><span class="cx"> <html>
</span><del>-<head>
- <script>
- if (window.internals)
- window.internals.settings.setAttachmentElementEnabled(false);
- </script>
-</head>
</del><span class="cx"> <body>
</span><span class="cx"> <p>This tests that attachments don't have a custom renderer when they are disabled. This test must be run in the test runner.</p>
</span><span class="cx"> <attachment></attachment>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentdomhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-dom.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-dom.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-dom.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -2,6 +2,10 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <meta charset="utf-8">
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentfoldericonexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-folder-icon-expected.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-folder-icon-expected.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-folder-icon-expected.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment title=" "></attachment>
</span><span class="cx"> <attachment title=" "></attachment>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentfoldericonhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-folder-icon.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-folder-icon.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-folder-icon.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment type="multipart/x-folder"></attachment>
</span><span class="cx"> <attachment type="application/vnd.apple.folder"></attachment>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmenticonfromfileextensionexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension-expected.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment></attachment>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmenticonfromfileextensionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-icon-from-file-extension.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment title="test-file.txt"></attachment>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentlabelhighlighthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-label-highlight.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-label-highlight.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-label-highlight.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -2,6 +2,9 @@
</span><span class="cx"> <html>
</span><span class="cx"> <body>
</span><span class="cx"> <script>
</span><ins>+if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+
</ins><span class="cx"> var attachmentShortLabel = document.createElement("attachment");
</span><span class="cx"> var attachmentLongOnTopLabel = document.createElement("attachment");
</span><span class="cx"> var attachmentLongOnBottomLabel = document.createElement("attachment");
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentprogresshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-progress.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-progress.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-progress.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment progress="-1.5"></attachment>
</span><span class="cx"> <attachment progress="0"></attachment>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentrenderinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-rendering.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-rendering.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-rendering.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx"> <p>This tests that attachments have a custom renderer.</p>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentselectonclickinsideuserselectallhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-select-on-click-inside-user-select-all.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-select-on-click-inside-user-select-all.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-select-on-click-inside-user-select-all.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body onload="runTest()">
</span><span class="cx"> <div style="-webkit-user-select: all;">text before <attachment id="attachment"></attachment> text after</div>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentselectonclickhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-select-on-click.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-select-on-click.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-select-on-click.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body onload="runTest()">
</span><span class="cx"> <div>text before <attachment id="attachment"></attachment> text after</div>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmentsubtitlehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-subtitle.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-subtitle.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-subtitle.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment id="attachment" subtitle="1024 bytes"></attachment>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmenttitlehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-title.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-title.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-title.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment id="attachment" title="overridden title" subtitle="1024 bytes"></attachment>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmenttypeattributeexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-type-attribute-expected.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-type-attribute-expected.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-type-attribute-expected.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment id="attachment" title=" "></attachment>
</span><span class="cx"> <script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastattachmentattachmenttypeattributehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/attachment/attachment-type-attribute.html (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/attachment/attachment-type-attribute.html        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/LayoutTests/fast/attachment/attachment-type-attribute.html        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><ins>+<script>
+ if (window.internals)
+ window.internals.settings.setAttachmentElementEnabled(true)
+</script>
</ins><span class="cx"> <body>
</span><span class="cx"> <attachment type="text/plain"></attachment>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-03-13 Dean Jackson <dino@apple.com>
+
+ <attachment> should be a runtime-enabled feature
+ https://bugs.webkit.org/show_bug.cgi?id=155413
+ <rdar://problem/25120753>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ Add an internal setting on WebPreferences
+ to enable the <attachment> element support.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences attachmentElementEnabled]):
+ (-[WebPreferences setAttachmentElementEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2016-03-12 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -204,3 +204,5 @@
</span><span class="cx"> #define WebKitMediaDataLoadsAutomaticallyPreferenceKey @"WebKitMediaDataLoadsAutomatically"
</span><span class="cx"> #define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled"
</span><span class="cx">
</span><ins>+#define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
+
</ins></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #import <WebCore/NetworkStorageSession.h>
</span><span class="cx"> #import <WebCore/PlatformCookieJar.h>
</span><span class="cx"> #import <WebCore/ResourceHandle.h>
</span><ins>+#import <WebCore/RuntimeApplicationChecks.h>
</ins><span class="cx"> #import <WebCore/Settings.h>
</span><span class="cx"> #import <WebCore/TextEncodingRegistry.h>
</span><span class="cx"> #import <runtime/InitializeThreading.h>
</span><span class="lines">@@ -393,9 +394,11 @@
</span><span class="cx"> JSC::initializeThreading();
</span><span class="cx"> WTF::initializeMainThreadToProcessMainThread();
</span><span class="cx"> RunLoop::initializeMainRunLoop();
</span><ins>+ bool attachmentElementEnabled = MacApplication::isAppleMail();
</ins><span class="cx"> #else
</span><span class="cx"> bool allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
</span><span class="cx"> bool requiresPlaysInlineAttribute = !allowsInlineMediaPlayback;
</span><ins>+ bool attachmentElementEnabled = IOSApplication::isMobileMail();
</ins><span class="cx"> #endif
</span><span class="cx"> InitWebCoreSystemInterface();
</span><span class="cx">
</span><span class="lines">@@ -519,6 +522,7 @@
</span><span class="cx"> [NSNumber numberWithBool:YES], WebKitAVFoundationEnabledKey,
</span><span class="cx"> [NSNumber numberWithBool:YES], WebKitAVFoundationNSURLSessionEnabledKey,
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitSuppressesIncrementalRenderingKey,
</span><ins>+ [NSNumber numberWithBool:attachmentElementEnabled], WebKitAttachmentElementEnabledPreferenceKey,
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitRequiresUserGestureForVideoPlaybackPreferenceKey,
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitRequiresUserGestureForAudioPlaybackPreferenceKey,
</span><span class="lines">@@ -2657,6 +2661,16 @@
</span><span class="cx"> [self _setBoolValue:flag forKey:WebKitMediaDataLoadsAutomaticallyPreferenceKey];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)attachmentElementEnabled
+{
+ return [self _boolValueForKey:WebKitAttachmentElementEnabledPreferenceKey];
+}
+
+- (void)setAttachmentElementEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitAttachmentElementEnabledPreferenceKey];
+}
+
</ins><span class="cx"> - (BOOL)mockCaptureDevicesEnabled
</span><span class="cx"> {
</span><span class="cx"> return [self _boolValueForKey:WebKitMockCaptureDevicesEnabledPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -483,5 +483,6 @@
</span><span class="cx">
</span><span class="cx"> @property (nonatomic) BOOL javaScriptMarkupEnabled;
</span><span class="cx"> @property (nonatomic) BOOL mediaDataLoadsAutomatically;
</span><ins>+@property (nonatomic) BOOL attachmentElementEnabled;
</ins><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -2515,6 +2515,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> settings.setMediaDataLoadsAutomatically([preferences mediaDataLoadsAutomatically]);
</span><ins>+ settings.setAttachmentElementEnabled([preferences attachmentElementEnabled]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline IMP getMethod(id o, SEL s)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-03-13 Dean Jackson <dino@apple.com>
+
+ <attachment> should be a runtime-enabled feature
+ https://bugs.webkit.org/show_bug.cgi?id=155413
+ <rdar://problem/25120753>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ Add an internal setting on WKWebViewConfiguration
+ to enable the <attachment> element support.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration init]):
+ (-[WKWebViewConfiguration copyWithZone:]):
+ (-[WKWebViewConfiguration _attachmentElementEnabled]):
+ (-[WKWebViewConfiguration _setAttachmentElementEnabled:]):
+ * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2016-03-12 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -163,6 +163,7 @@
</span><span class="cx"> macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
</span><span class="cx"> macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \
</span><span class="cx"> macro(WebAudioEnabled, webAudioEnabled, Bool, bool, true) \
</span><ins>+ macro(AttachmentElementEnabled, attachmentElementEnabled, Bool, bool, false) \
</ins><span class="cx"> macro(SuppressesIncrementalRendering, suppressesIncrementalRendering, Bool, bool, false) \
</span><span class="cx"> macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED) \
</span><span class="cx"> macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> #import <WebCore/IOSurface.h>
</span><span class="cx"> #import <WebCore/JSDOMBinding.h>
</span><span class="cx"> #import <WebCore/NSTextFinderSPI.h>
</span><ins>+#import <WebCore/RuntimeApplicationChecks.h>
</ins><span class="cx"> #import <wtf/HashMap.h>
</span><span class="cx"> #import <wtf/MathExtras.h>
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="lines">@@ -434,6 +435,13 @@
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::invisibleAutoplayNotPermittedKey(), WebKit::WebPreferencesStore::Value(!![_configuration _invisibleAutoplayNotPermitted]));
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaDataLoadsAutomaticallyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaDataLoadsAutomatically]));
</span><span class="cx">
</span><ins>+// FIXME: <rdar://problem/25135244> Remove bundle checks for attachmentElementEnabled
+#if PLATFORM(IOS)
+ pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::attachmentElementEnabledKey(), WebKit::WebPreferencesStore::Value(WebCore::IOSApplication::isMobileMail() ? true : !![_configuration _attachmentElementEnabled]));
+#else
+ pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::attachmentElementEnabledKey(), WebKit::WebPreferencesStore::Value(WebCore::MacApplication::isAppleMail() ? true : !![_configuration _attachmentElementEnabled]));
+#endif
+
</ins><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx"> pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::dataDetectorTypesKey(), WebKit::WebPreferencesStore::Value(static_cast<uint32_t>(fromWKDataDetectorTypes([_configuration dataDetectorTypes]))));
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #import "WeakObjCPtr.h"
</span><span class="cx"> #import "_WKVisitedLinkProvider.h"
</span><span class="cx"> #import "_WKWebsiteDataStoreInternal.h"
</span><ins>+#import <WebCore/RuntimeApplicationChecks.h>
</ins><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -43,6 +44,8 @@
</span><span class="cx"> #import <WebCore/Device.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+using namespace WebCore;
+
</ins><span class="cx"> template<typename T> class LazyInitialized {
</span><span class="cx"> public:
</span><span class="cx"> typedef typename WTF::GetPtrHelper<T>::PtrType PtrType;
</span><span class="lines">@@ -108,6 +111,7 @@
</span><span class="cx">
</span><span class="cx"> BOOL _invisibleAutoplayNotPermitted;
</span><span class="cx"> BOOL _mediaDataLoadsAutomatically;
</span><ins>+ BOOL _attachmentElementEnabled;
</ins><span class="cx"> BOOL _requiresUserActionForVideoPlayback;
</span><span class="cx"> BOOL _requiresUserActionForAudioPlayback;
</span><span class="cx"> BOOL _mainContentUserGestureOverrideEnabled;
</span><span class="lines">@@ -142,7 +146,14 @@
</span><span class="cx"> _mainContentUserGestureOverrideEnabled = NO;
</span><span class="cx"> _invisibleAutoplayNotPermitted = NO;
</span><span class="cx">
</span><ins>+// FIXME: <rdar://problem/25135244> Should default to NO once clients have adopted the setting.
</ins><span class="cx"> #if PLATFORM(IOS)
</span><ins>+ _attachmentElementEnabled = IOSApplication::isMobileMail();
+#else
+ _attachmentElementEnabled = MacApplication::isAppleMail();
+#endif
+
+#if PLATFORM(IOS)
</ins><span class="cx"> _respectsImageOrientation = YES;
</span><span class="cx"> _printsBackgrounds = YES;
</span><span class="cx"> #endif
</span><span class="lines">@@ -249,6 +260,7 @@
</span><span class="cx">
</span><span class="cx"> configuration->_invisibleAutoplayNotPermitted = self->_invisibleAutoplayNotPermitted;
</span><span class="cx"> configuration->_mediaDataLoadsAutomatically = self->_mediaDataLoadsAutomatically;
</span><ins>+ configuration->_attachmentElementEnabled = self->_attachmentElementEnabled;
</ins><span class="cx"> configuration->_requiresUserActionForVideoPlayback = self->_requiresUserActionForVideoPlayback;
</span><span class="cx"> configuration->_requiresUserActionForAudioPlayback = self->_requiresUserActionForAudioPlayback;
</span><span class="cx"> configuration->_mainContentUserGestureOverrideEnabled = self->_mainContentUserGestureOverrideEnabled;
</span><span class="lines">@@ -565,6 +577,16 @@
</span><span class="cx"> _mediaDataLoadsAutomatically = mediaDataLoadsAutomatically;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)_attachmentElementEnabled
+{
+ return _attachmentElementEnabled;
+}
+
+- (void)_setAttachmentElementEnabled:(BOOL)attachmentElementEnabled
+{
+ _attachmentElementEnabled = attachmentElementEnabled;
+}
+
</ins><span class="cx"> - (BOOL)_requiresUserActionForVideoPlayback
</span><span class="cx"> {
</span><span class="cx"> return _requiresUserActionForVideoPlayback;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> @property (nonatomic, setter=_setMainContentUserGestureOverrideEnabled:) BOOL _mainContentUserGestureOverrideEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> @property (nonatomic, setter=_setInvisibleAutoplayNotPermitted:) BOOL _invisibleAutoplayNotPermitted WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> @property (nonatomic, setter=_setMediaDataLoadsAutomatically:) BOOL _mediaDataLoadsAutomatically WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><ins>+@property (nonatomic, setter=_setAttachmentElementEnabled:) BOOL _attachmentElementEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</ins><span class="cx">
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> @property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_AVAILABLE(NA, 9_0);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (198087 => 198088)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-13 22:54:12 UTC (rev 198087)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-14 01:09:17 UTC (rev 198088)
</span><span class="lines">@@ -2904,6 +2904,9 @@
</span><span class="cx"> settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey()));
</span><span class="cx"> settings.setInvisibleAutoplayNotPermitted(store.getBoolValueForKey(WebPreferencesKey::invisibleAutoplayNotPermittedKey()));
</span><span class="cx"> settings.setMediaDataLoadsAutomatically(store.getBoolValueForKey(WebPreferencesKey::mediaDataLoadsAutomaticallyKey()));
</span><ins>+#if ENABLE(ATTACHMENT_ELEMENT)
+ settings.setAttachmentElementEnabled(store.getBoolValueForKey(WebPreferencesKey::attachmentElementEnabledKey()));
+#endif
</ins><span class="cx"> settings.setAllowsPictureInPictureMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey()));
</span><span class="cx"> settings.setMediaControlsScaleWithPageZoom(store.getBoolValueForKey(WebPreferencesKey::mediaControlsScaleWithPageZoomKey()));
</span><span class="cx"> settings.setMockScrollbarsEnabled(store.getBoolValueForKey(WebPreferencesKey::mockScrollbarsEnabledKey()));
</span></span></pre>
</div>
</div>
</body>
</html>