<!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>[197921] 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/197921">197921</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-09 20:43:14 -0800 (Wed, 09 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add runtime flags for shadow DOM and custom elements
https://bugs.webkit.org/show_bug.cgi?id=155213

Reviewed by Dean Jackson.

Source/WebCore:

Added new runtime flags for shadow DOM and custom elements.

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled): Added.
(WebCore::RuntimeEnabledFeatures::shadowDOMEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setCustomElementsEnabled): Added.
(WebCore::RuntimeEnabledFeatures::customElementsEnabled): Added.
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
* dom/NonDocumentTypeChildNode.idl:
* dom/ShadowRoot.idl:
* html/HTMLSlotElement.idl:

Source/WebKit/mac:

Set the runtime flag based on preferences. Enable shadow DOM and disable custom elements by default.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences shadowDOMEnabled]):
(-[WebPreferences setShadowDOMEnabled:]):
(-[WebPreferences customElementsEnabled]):
(-[WebPreferences setCustomElementsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Set the runtime flag based on preferences. Enable shadow DOM and disable custom elements by default.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShadowDOMEnabled):
(WKPreferencesGetShadowDOMEnabled):
(WKPreferencesSetCustomElementsEnabled):
(WKPreferencesGetCustomElementsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WTF:

Removed the manual overrides of ENABLE_SHADOW_DOM and ENABLE_CUSTOM_ELEMENTS as they were
making --no-shadow-dom and --no-custom-elements flags on build-webkit useless.

* wtf/FeatureDefines.h:

Tools:

Always enable shadow DOM and custom elements during testing.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setShadowDOMEnabled): Added.
* WebKitTestRunner/InjectedBundle/TestRunner.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfFeatureDefinesh">trunk/Source/WTF/wtf/FeatureDefines.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCoredomElementidl">trunk/Source/WebCore/dom/Element.idl</a></li>
<li><a href="#trunkSourceWebCoredomNonDocumentTypeChildNodeidl">trunk/Source/WebCore/dom/NonDocumentTypeChildNode.idl</a></li>
<li><a href="#trunkSourceWebCoredomShadowRootidl">trunk/Source/WebCore/dom/ShadowRoot.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSlotElementidl">trunk/Source/WebCore/html/HTMLSlotElement.idl</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="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WTF/ChangeLog        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add runtime flags for shadow DOM and custom elements
+        https://bugs.webkit.org/show_bug.cgi?id=155213
+
+        Reviewed by Dean Jackson.
+
+        Removed the manual overrides of ENABLE_SHADOW_DOM and ENABLE_CUSTOM_ELEMENTS as they were
+        making --no-shadow-dom and --no-custom-elements flags on build-webkit useless.
+
+        * wtf/FeatureDefines.h:
+
</ins><span class="cx"> 2016-03-09  Keith Rollin  &lt;krollin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add state dumping facility
</span></span></pre></div>
<a id="trunkSourceWTFwtfFeatureDefinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/FeatureDefines.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/FeatureDefines.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WTF/wtf/FeatureDefines.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -134,14 +134,6 @@
</span><span class="cx"> #define ENABLE_RESPECT_EXIF_ORIENTATION 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !defined(ENABLE_SHADOW_DOM)
-#define ENABLE_SHADOW_DOM 1
-#endif
-
-#if !defined(ENABLE_CUSTOM_ELEMENTS)
-#define ENABLE_CUSTOM_ELEMENTS 1
-#endif
-
</del><span class="cx"> #if !defined(ENABLE_TEXT_CARET)
</span><span class="cx"> #define ENABLE_TEXT_CARET 0
</span><span class="cx"> #endif
</span><span class="lines">@@ -258,14 +250,6 @@
</span><span class="cx"> #define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !defined(ENABLE_SHADOW_DOM)
-#define ENABLE_SHADOW_DOM 1
-#endif
-
-#if !defined(ENABLE_CUSTOM_ELEMENTS)
-#define ENABLE_CUSTOM_ELEMENTS 1
-#endif
-
</del><span class="cx"> #if !defined(ENABLE_MAC_GESTURE_EVENTS) &amp;&amp; USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #define ENABLE_MAC_GESTURE_EVENTS 1
</span><span class="cx"> #endif
</span><span class="lines">@@ -695,14 +679,6 @@
</span><span class="cx"> #define ENABLE_RUBBER_BANDING 0
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !defined(ENABLE_SHADOW_DOM)
-#define ENABLE_SHADOW_DOM 0
-#endif
-
-#if !defined(ENABLE_CUSTOM_ELEMENTS)
-#define ENABLE_CUSTOM_ELEMENTS 0
-#endif
-
</del><span class="cx"> #if !defined(ENABLE_SMOOTH_SCROLLING)
</span><span class="cx"> #define ENABLE_SMOOTH_SCROLLING 0
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/ChangeLog        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Add runtime flags for shadow DOM and custom elements
+        https://bugs.webkit.org/show_bug.cgi?id=155213
+
+        Reviewed by Dean Jackson.
+
+        Added new runtime flags for shadow DOM and custom elements.
+
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setCustomElementsEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::customElementsEnabled): Added.
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/Node.idl:
+        * dom/NonDocumentTypeChildNode.idl:
+        * dom/ShadowRoot.idl:
+        * html/HTMLSlotElement.idl:
+
+2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
</ins><span class="cx">         defineElement should upgrade existing unresolved custom elements
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=155107
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -206,6 +206,16 @@
</span><span class="cx">     bool webAnimationsEnabled() const { return m_areWebAnimationsEnabled; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(SHADOW_DOM)
+    void setShadowDOMEnabled(bool isEnabled) { m_isShadowDOMEnabled = isEnabled; }
+    bool shadowDOMEnabled() const { return m_isShadowDOMEnabled; }
+#endif
+
+#if ENABLE(CUSTOM_ELEMENTS)
+    void setCustomElementsEnabled(bool areEnabled) { m_areCustomElementsEnabled = areEnabled; }
+    bool customElementsEnabled() const { return m_areCustomElementsEnabled; }
+#endif
+
</ins><span class="cx">     WEBCORE_EXPORT static RuntimeEnabledFeatures&amp; sharedFeatures();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -288,7 +298,15 @@
</span><span class="cx"> #if ENABLE(WEB_ANIMATIONS)
</span><span class="cx">     bool m_areWebAnimationsEnabled;
</span><span class="cx"> #endif
</span><ins>+    
+#if ENABLE(SHADOW_DOM)
+    bool m_isShadowDOMEnabled;
+#endif
</ins><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_ELEMENTS)
+    bool m_areCustomElementsEnabled;
+#endif
+
</ins><span class="cx">     friend class WTF::NeverDestroyed&lt;RuntimeEnabledFeatures&gt;;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/dom/Document.idl        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if defined(LANGUAGE_JAVASCRIPT) &amp;&amp; LANGUAGE_JAVASCRIPT
</span><del>-    [Custom, RaisesException, Conditional=CUSTOM_ELEMENTS]
</del><ins>+    [Custom, RaisesException, Conditional=CUSTOM_ELEMENTS, EnabledAtRuntime=CustomElements]
</ins><span class="cx">     void defineElement(DOMString localName, Function constructor);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.idl (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.idl        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/dom/Element.idl        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -171,9 +171,9 @@
</span><span class="cx"> 
</span><span class="cx">     // Shadow DOM API
</span><span class="cx"> #if defined(LANGUAGE_JAVASCRIPT) &amp;&amp; LANGUAGE_JAVASCRIPT
</span><del>-    [Conditional=SHADOW_DOM, RaisesException] ShadowRoot attachShadow(Dictionary options);
-    [Conditional=SHADOW_DOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot;
-    [Conditional=SHADOW_DOM, Reflect] attribute DOMString slot;
</del><ins>+    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, RaisesException] ShadowRoot attachShadow(Dictionary options);
+    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot;
+    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Event Handlers
</span></span></pre></div>
<a id="trunkSourceWebCoredomNonDocumentTypeChildNodeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NonDocumentTypeChildNode.idl (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NonDocumentTypeChildNode.idl        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/dom/NonDocumentTypeChildNode.idl        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -32,6 +32,6 @@
</span><span class="cx">     readonly attribute Element nextElementSibling;
</span><span class="cx"> 
</span><span class="cx"> #if defined(LANGUAGE_JAVASCRIPT) &amp;&amp; LANGUAGE_JAVASCRIPT
</span><del>-    [Conditional=SHADOW_DOM] readonly attribute HTMLSlotElement assignedSlot;
</del><ins>+    [Conditional=SHADOW_DOM, EnabledAtRuntime=ShadowDOM] readonly attribute HTMLSlotElement assignedSlot;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomShadowRootidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ShadowRoot.idl (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ShadowRoot.idl        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/dom/ShadowRoot.idl        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=SHADOW_DOM,
</span><ins>+    EnabledAtRuntime=ShadowDOM,
</ins><span class="cx">     JSGenerateToJSObject
</span><span class="cx"> ] interface ShadowRoot : DocumentFragment {
</span><span class="cx">     readonly attribute Element          activeElement;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSlotElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSlotElement.idl (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSlotElement.idl        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebCore/html/HTMLSlotElement.idl        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> // https://w3c.github.io/webcomponents/spec/shadow/#idl-def-HTMLSlotElement
</span><span class="cx"> [
</span><span class="cx">     Conditional=SHADOW_DOM,
</span><ins>+    EnabledAtRuntime=ShadowDOM,
</ins><span class="cx">     JSGenerateToNativeObject
</span><span class="cx"> ] interface HTMLSlotElement : HTMLElement {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add runtime flags for shadow DOM and custom elements
+        https://bugs.webkit.org/show_bug.cgi?id=155213
+
+        Reviewed by Dean Jackson.
+
+        Set the runtime flag based on preferences. Enable shadow DOM and disable custom elements by default.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences shadowDOMEnabled]):
+        (-[WebPreferences setShadowDOMEnabled:]):
+        (-[WebPreferences customElementsEnabled]):
+        (-[WebPreferences setCustomElementsEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2016-03-09  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r197149): Missing availability checks when soft-linking DataDetectors.framework
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -157,6 +157,8 @@
</span><span class="cx"> #define WebKitGamepadsEnabledPreferenceKey @&quot;WebKitGamepadsEnabled&quot;
</span><span class="cx"> #define WebKitServiceControlsEnabledPreferenceKey @&quot;WebKitServiceControlsEnabled&quot;
</span><span class="cx"> #define WebKitMediaKeysStorageDirectoryKey @&quot;WebKitMediaKeysStorageDirectory&quot;
</span><ins>+#define WebKitShadowDOMEnabledPreferenceKey @&quot;WebKitShadowDOMEnabled&quot;
+#define WebKitCustomElementsEnabledPreferenceKey @&quot;WebKitCustomElementsEnabled&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if !TARGET_OS_IPHONE
</span><span class="cx"> // These are private both because callers should be using the cover methods and because the
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -602,6 +602,12 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">         [NSNumber numberWithBool:NO], WebKitMockCaptureDevicesEnabledPreferenceKey,
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(SHADOW_DOM)
+        [NSNumber numberWithBool:YES], WebKitShadowDOMEnabledPreferenceKey,
+#endif
+#if ENABLE(CUSTOM_ELEMENTS)
+        [NSNumber numberWithBool:NO], WebKitCustomElementsEnabledPreferenceKey,
+#endif
</ins><span class="cx">         nil];
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -2639,6 +2645,26 @@
</span><span class="cx">     [self _setBoolValue:flag forKey:WebKitMockCaptureDevicesEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)shadowDOMEnabled
+{
+    return [self _boolValueForKey:WebKitShadowDOMEnabledPreferenceKey];
+}
+
+- (void)setShadowDOMEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitShadowDOMEnabledPreferenceKey];
+}
+
+- (BOOL)customElementsEnabled
+{
+    return [self _boolValueForKey:WebKitCustomElementsEnabledPreferenceKey];
+}
+
+- (void)setCustomElementsEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitCustomElementsEnabledPreferenceKey];
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @implementation WebPreferences (WebInternal)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -467,6 +467,12 @@
</span><span class="cx"> - (void)setMockCaptureDevicesEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)mockCaptureDevicesEnabled;
</span><span class="cx"> 
</span><ins>+- (void)setShadowDOMEnabled:(BOOL)flag;
+- (BOOL)shadowDOMEnabled;
+
+- (void)setCustomElementsEnabled:(BOOL)flag;
+- (BOOL)customElementsEnabled;
+
</ins><span class="cx"> @property (nonatomic) BOOL javaScriptMarkupEnabled;
</span><span class="cx"> @property (nonatomic) BOOL mediaDataLoadsAutomatically;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -2481,6 +2481,14 @@
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setWebkitIndexedDBEnabled(true);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(SHADOW_DOM)
+    RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled([preferences shadowDOMEnabled]);
+#endif
+#if ENABLE(CUSTOM_ELEMENTS)
+    RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled([preferences customElementsEnabled]);
+#endif
+
+
</ins><span class="cx">     NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
</span><span class="cx">     if (timeout &gt; 0)
</span><span class="cx">         settings.setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add runtime flags for shadow DOM and custom elements
+        https://bugs.webkit.org/show_bug.cgi?id=155213
+
+        Reviewed by Dean Jackson.
+
+        Set the runtime flag based on preferences. Enable shadow DOM and disable custom elements by default.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetShadowDOMEnabled):
+        (WKPreferencesGetShadowDOMEnabled):
+        (WKPreferencesSetCustomElementsEnabled):
+        (WKPreferencesGetCustomElementsEnabled):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2016-03-09  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Handling 'allowUniversalAccessFromFileURLs' on WKWebViewConfiguration causes test breakage
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -224,6 +224,8 @@
</span><span class="cx">     macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false) \
</span><span class="cx">     macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true) \
</span><span class="cx">     macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false) \
</span><ins>+    macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true) \
+    macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, false) \
</ins><span class="cx">     FOR_EACH_ADDITIONAL_WEBKIT_BOOL_PREFERENCE(macro) \
</span><span class="cx">     \
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1466,3 +1466,23 @@
</span><span class="cx"> {
</span><span class="cx">     return toImpl(preferencesRef)-&gt;mockCaptureDevicesEnabled();
</span><span class="cx"> }
</span><ins>+
+void WKPreferencesSetShadowDOMEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+    toImpl(preferencesRef)-&gt;setShadowDOMEnabled(flag);
+}
+
+bool WKPreferencesGetShadowDOMEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;shadowDOMEnabled();
+}
+
+void WKPreferencesSetCustomElementsEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+    toImpl(preferencesRef)-&gt;setShadowDOMEnabled(flag);
+}
+
+bool WKPreferencesGetCustomElementsEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;shadowDOMEnabled();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -402,7 +402,15 @@
</span><span class="cx"> // Defaults to false.
</span><span class="cx"> WK_EXPORT void WKPreferencesSetMockCaptureDevicesEnabled(WKPreferencesRef, bool);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetMockCaptureDevicesEnabled(WKPreferencesRef);
</span><ins>+    
+// Defaults to true
+WK_EXPORT void WKPreferencesSetShadowDOMEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetShadowDOMEnabled(WKPreferencesRef);
</ins><span class="cx"> 
</span><ins>+// Defaults to false
+WK_EXPORT void WKPreferencesSetCustomElementsEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetCustomElementsEnabled(WKPreferencesRef);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -192,7 +192,17 @@
</span><span class="cx">     if (preference == &quot;WebKitCSSCompositingEnabled&quot;)
</span><span class="cx">         RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(enabled);
</span><span class="cx"> #endif
</span><ins>+    
+#if ENABLE(SHADOW_DOM)
+    if (preference == &quot;WebKitShadowDOMEnabled&quot;)
+        RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(enabled);
+#endif
</ins><span class="cx"> 
</span><ins>+#if ENABLE(CUSTOM_ELEMENTS)
+    if (preference == &quot;WebKitCustomElementsEnabled&quot;)
+        RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(enabled);
+#endif
+
</ins><span class="cx">     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
</span><span class="cx"> #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
</span><span class="cx">     macro(WebKitAcceleratedCompositingEnabled, AcceleratedCompositingEnabled, acceleratedCompositingEnabled) \
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -3057,6 +3057,14 @@
</span><span class="cx">     settings.setServiceControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceControlsEnabledKey()));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(SHADOW_DOM)
+    RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(store.getBoolValueForKey(WebPreferencesKey::shadowDOMEnabledKey()));
+#endif
+
+#if ENABLE(CUSTOM_ELEMENTS)
+    RuntimeEnabledFeatures::sharedFeatures().setCustomElementsEnabled(store.getBoolValueForKey(WebPreferencesKey::customElementsEnabledKey()));
+#endif
+
</ins><span class="cx">     bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
</span><span class="cx">     if (m_processSuppressionEnabled != processSuppressionEnabled) {
</span><span class="cx">         m_processSuppressionEnabled = processSuppressionEnabled;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Tools/ChangeLog        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-03-09  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add runtime flags for shadow DOM and custom elements
+        https://bugs.webkit.org/show_bug.cgi?id=155213
+
+        Reviewed by Dean Jackson.
+
+        Always enable shadow DOM and custom elements during testing.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetWebPreferencesToConsistentValues):
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setShadowDOMEnabled): Added.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
</ins><span class="cx"> 2016-03-09  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Handling 'allowUniversalAccessFromFileURLs' on WKWebViewConfiguration causes test breakage
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -984,6 +984,9 @@
</span><span class="cx">     [preferences setMediaSourceEnabled:YES];
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    [preferences setShadowDOMEnabled:YES];
+    [preferences setCustomElementsEnabled:YES];
+
</ins><span class="cx">     [preferences setHiddenPageDOMTimerThrottlingEnabled:NO];
</span><span class="cx">     [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -304,6 +304,10 @@
</span><span class="cx">     m_testRunner-&gt;setShouldDumpFrameLoadCallbacks(booleanForKey(settings, &quot;DumpFrameLoadDelegates&quot;));
</span><span class="cx">     m_testRunner-&gt;setUserStyleSheetEnabled(false);
</span><span class="cx">     m_testRunner-&gt;setXSSAuditorEnabled(false);
</span><ins>+
+    m_testRunner-&gt;setShadowDOMEnabled(true);
+    m_testRunner-&gt;setCustomElementsEnabled(true);
+
</ins><span class="cx">     m_testRunner-&gt;setCloseRemainingWindowsWhenComplete(false);
</span><span class="cx">     m_testRunner-&gt;setAcceptsEditing(true);
</span><span class="cx">     m_testRunner-&gt;setTabKeyCyclesThroughElements(true);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -318,6 +318,20 @@
</span><span class="cx">     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void TestRunner::setShadowDOMEnabled(bool enabled)
+{
+    WKRetainPtr&lt;WKStringRef&gt; key(AdoptWK, WKStringCreateWithUTF8CString(&quot;WebKitShadowDOMEnabled&quot;));
+    auto&amp; injectedBundle = InjectedBundle::singleton();
+    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
+}
+
+void TestRunner::setCustomElementsEnabled(bool enabled)
+{
+    WKRetainPtr&lt;WKStringRef&gt; key(AdoptWK, WKStringCreateWithUTF8CString(&quot;WebKitCustomElementsEnabled&quot;));
+    auto&amp; injectedBundle = InjectedBundle::singleton();
+    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
+}
+
</ins><span class="cx"> void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
</span><span class="cx"> {
</span><span class="cx">     auto&amp; injectedBundle = InjectedBundle::singleton();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (197920 => 197921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2016-03-10 04:06:51 UTC (rev 197920)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2016-03-10 04:43:14 UTC (rev 197921)
</span><span class="lines">@@ -98,6 +98,8 @@
</span><span class="cx">     void setCanOpenWindows(bool);
</span><span class="cx">     void setCloseRemainingWindowsWhenComplete(bool value) { m_shouldCloseExtraWindows = value; }
</span><span class="cx">     void setXSSAuditorEnabled(bool);
</span><ins>+    void setShadowDOMEnabled(bool);
+    void setCustomElementsEnabled(bool);
</ins><span class="cx">     void setAllowUniversalAccessFromFileURLs(bool);
</span><span class="cx">     void setAllowFileAccessFromFileURLs(bool);
</span><span class="cx">     void setPluginsEnabled(bool);
</span></span></pre>
</div>
</div>

</body>
</html>