<!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>[208983] 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/208983">208983</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-11-26 20:21:49 -0800 (Sat, 26 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
https://bugs.webkit.org/show_bug.cgi?id=164965
Patch by Sam Weinig <sam@webkit.org> on 2016-11-26
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* runtime/CommonIdentifiers.h:
Add identifiers needed for RuntimeEnabledFeatures.
Source/WebCore:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::reset):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled):
(WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled):
Add intersection observer setting.
* page/IntersectionObserver.idl:
* page/IntersectionObserverEntry.idl:
Convert to use EnabledAtRuntime extended attribute.
* page/Settings.in:
Remove the old intersection observer setting.
Source/WebKit/mac:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences intersectionObserverEnabled]):
(-[WebPreferences setIntersectionObserverEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add a preference, defaulting to off, for enabling IntersectionObserver.
Source/WebKit2:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIntersectionObserverEnabled):
(WKPreferencesGetIntersectionObserverEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference, defaulting to off, for enabling IntersectionObserver.
Tools:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Add new files.
* DumpRenderTree/TestOptions.h: Added.
* DumpRenderTree/TestOptions.mm: Added.
(parseBooleanTestHeaderValue):
(TestOptions::TestOptions):
Port TestOption parsing from WKTR to DRT.
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
(resetWebViewToConsistentStateBeforeTesting):
(runTest):
* WebKitTestRunner/TestController.cpp:
Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting
preferences conditionally.
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver.
LayoutTests:
* intersection-observer/intersection-observer-entry-interface.html:
* intersection-observer/intersection-observer-interface.html:
* resources/testharnessreport.js:
Switch from enabling IntersectionObserver via internals.settings to using
comment header switches.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsintersectionobserverintersectionobserverentryinterfacehtml">trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html</a></li>
<li><a href="#trunkLayoutTestsintersectionobserverintersectionobserverinterfacehtml">trunk/LayoutTests/intersection-observer/intersection-observer-interface.html</a></li>
<li><a href="#trunkLayoutTestsresourcestestharnessreportjs">trunk/LayoutTests/resources/testharnessreport.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebCorepageIntersectionObserveridl">trunk/Source/WebCore/page/IntersectionObserver.idl</a></li>
<li><a href="#trunkSourceWebCorepageIntersectionObserverEntryidl">trunk/Source/WebCore/page/IntersectionObserverEntry.idl</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</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="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj">trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestOptionsh">trunk/Tools/WebKitTestRunner/TestOptions.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsDumpRenderTreeTestOptionsh">trunk/Tools/DumpRenderTree/TestOptions.h</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestOptionsmm">trunk/Tools/DumpRenderTree/TestOptions.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/LayoutTests/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * intersection-observer/intersection-observer-entry-interface.html:
+ * intersection-observer/intersection-observer-interface.html:
+ * resources/testharnessreport.js:
+ Switch from enabling IntersectionObserver via internals.settings to using
+ comment header switches.
+
</ins><span class="cx"> 2016-11-26 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Composited negative z-index elements are hidden behind the body sometimes
</span></span></pre></div>
<a id="trunkLayoutTestsintersectionobserverintersectionobserverentryinterfacehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-<!DOCTYPE html>
</del><ins>+<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
</ins><span class="cx"> <head>
</span><span class="cx"> <title>IntersectionObserverEntry interface tests.</title>
</span><span class="cx"> <link rel="author" title="Simon Fraser" href="mailto:simon.fraser@apple.com" />
</span></span></pre></div>
<a id="trunkLayoutTestsintersectionobserverintersectionobserverinterfacehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/intersection-observer/intersection-observer-interface.html (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/intersection-observer/intersection-observer-interface.html        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/LayoutTests/intersection-observer/intersection-observer-interface.html        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-<!DOCTYPE html>
</del><ins>+<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
</ins><span class="cx"> <head>
</span><span class="cx"> <title>IntersectionObserver interface tests.</title>
</span><span class="cx"> <link rel="author" title="Simon Fraser" href="mailto:simon.fraser@apple.com" />
</span></span></pre></div>
<a id="trunkLayoutTestsresourcestestharnessreportjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/resources/testharnessreport.js (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/resources/testharnessreport.js        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/LayoutTests/resources/testharnessreport.js        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -90,6 +90,5 @@
</span><span class="cx">
</span><span class="cx"> if (window.internals) {
</span><span class="cx"> internals.setResourceTimingSupport(true);
</span><del>- internals.settings.setIntersectionObserverEnabled(true);
</del><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * runtime/CommonIdentifiers.h:
+ Add identifiers needed for RuntimeEnabledFeatures.
+
</ins><span class="cx"> 2016-11-23 Zan Dobersek <zdobersek@igalia.com>
</span><span class="cx">
</span><span class="cx"> Remove ENABLE_ASSEMBLER_WX_EXCLUSIVE code
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -64,6 +64,8 @@
</span><span class="cx"> macro(IDBVersionChangeEvent) \
</span><span class="cx"> macro(Infinity) \
</span><span class="cx"> macro(InputEvent) \
</span><ins>+ macro(IntersectionObserver) \
+ macro(IntersectionObserverEntry) \
</ins><span class="cx"> macro(Intl) \
</span><span class="cx"> macro(JSON) \
</span><span class="cx"> macro(Loader) \
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ (WebCore::RuntimeEnabledFeatures::reset):
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled):
+ (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled):
+ Add intersection observer setting.
+
+ * page/IntersectionObserver.idl:
+ * page/IntersectionObserverEntry.idl:
+ Convert to use EnabledAtRuntime extended attribute.
+
+ * page/Settings.in:
+ Remove the old intersection observer setting.
+
</ins><span class="cx"> 2016-11-26 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -109,7 +109,9 @@
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> m_cssGridLayoutEnabled = true;
</span><span class="cx"> #endif
</span><del>-
</del><ins>+#if ENABLE(INTERSECTION_OBSERVER)
+ m_intersectionObserverEnabled = false;
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -227,6 +227,11 @@
</span><span class="cx"> bool isCSSGridLayoutEnabled() const { return m_cssGridLayoutEnabled; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(INTERSECTION_OBSERVER)
+ void setIntersectionObserverEnabled(bool isEnabled) { m_intersectionObserverEnabled = isEnabled; }
+ bool intersectionObserverEnabled() const { return m_intersectionObserverEnabled; }
+#endif
+
</ins><span class="cx"> void setModernMediaControlsEnabled(bool areEnabled) { m_areModernMediaControlsEnabled = areEnabled; }
</span><span class="cx"> bool modernMediaControlsEnabled() const { return m_areModernMediaControlsEnabled; }
</span><span class="cx">
</span><span class="lines">@@ -353,6 +358,10 @@
</span><span class="cx"> bool m_encryptedMediaAPIEnabled { false };
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(INTERSECTION_OBSERVER)
+ bool m_intersectionObserverEnabled { false };
+#endif
+
</ins><span class="cx"> friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageIntersectionObserveridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/IntersectionObserver.idl (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/IntersectionObserver.idl        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/page/IntersectionObserver.idl        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> Conditional=INTERSECTION_OBSERVER,
</span><span class="cx"> Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
</span><span class="cx"> ImplementationLacksVTable,
</span><del>- EnabledBySetting=IntersectionObserver
</del><ins>+ EnabledAtRuntime=IntersectionObserver
</ins><span class="cx"> ] interface IntersectionObserver {
</span><span class="cx"> readonly attribute Element? root;
</span><span class="cx"> readonly attribute DOMString rootMargin;
</span></span></pre></div>
<a id="trunkSourceWebCorepageIntersectionObserverEntryidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/IntersectionObserverEntry.idl (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/IntersectionObserverEntry.idl        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/page/IntersectionObserverEntry.idl        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> Conditional=INTERSECTION_OBSERVER,
</span><span class="cx"> Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit),
</span><span class="cx"> ImplementationLacksVTable,
</span><del>- EnabledBySetting=IntersectionObserver
</del><ins>+ EnabledAtRuntime=IntersectionObserver
</ins><span class="cx"> ] interface IntersectionObserverEntry {
</span><span class="cx"> readonly attribute DOMHighResTimeStamp time;
</span><span class="cx"> readonly attribute DOMRectReadOnly rootBounds;
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebCore/page/Settings.in        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -279,7 +279,6 @@
</span><span class="cx">
</span><span class="cx"> # Runtime-enabled features
</span><span class="cx"> visualViewportEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
</span><del>-intersectionObserverEnabled initial=false
</del><span class="cx">
</span><span class="cx"> inputEventsEnabled initial=true
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences intersectionObserverEnabled]):
+ (-[WebPreferences setIntersectionObserverEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+ Add a preference, defaulting to off, for enabling IntersectionObserver.
+
</ins><span class="cx"> 2016-11-22 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the mouse cursor
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -216,6 +216,6 @@
</span><span class="cx"> #define WebKitMediaDataLoadsAutomaticallyPreferenceKey @"WebKitMediaDataLoadsAutomatically"
</span><span class="cx"> #define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled"
</span><span class="cx"> #define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection"
</span><del>-
</del><span class="cx"> #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
</span><ins>+#define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -2849,6 +2849,16 @@
</span><span class="cx"> [self _setBoolValue:flag forKey:WebKitModernMediaControlsEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)intersectionObserverEnabled
+{
+ return [self _boolValueForKey:WebKitIntersectionObserverEnabledPreferenceKey];
+}
+
+- (void)setIntersectionObserverEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitIntersectionObserverEnabledPreferenceKey];
+}
+
</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 (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -518,6 +518,6 @@
</span><span class="cx"> @property (nonatomic) BOOL mediaDataLoadsAutomatically;
</span><span class="cx"> @property (nonatomic) BOOL attachmentElementEnabled;
</span><span class="cx"> @property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen;
</span><ins>+@property (nonatomic) BOOL intersectionObserverEnabled;
</ins><span class="cx">
</span><del>-
</del><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -2862,6 +2862,10 @@
</span><span class="cx"> RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled([preferences webAnimationsEnabled]);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(INTERSECTION_OBSERVER)
+ RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(preferences.intersectionObserverEnabled);
+#endif
+
</ins><span class="cx"> NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
</span><span class="cx"> if (timeout > 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 (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetIntersectionObserverEnabled):
+ (WKPreferencesGetIntersectionObserverEnabled):
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ Add a preference, defaulting to off, for enabling IntersectionObserver.
+
</ins><span class="cx"> 2016-11-26 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -237,6 +237,7 @@
</span><span class="cx"> macro(AsyncImageDecodingEnabled, asyncImageDecodingEnabled, Bool, bool, true, "", "") \
</span><span class="cx"> macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, true, "", "") \
</span><span class="cx"> macro(EncryptedMediaAPIEnabled, encryptedMediaAPIEnabled, Bool, bool, false, "", "") \
</span><ins>+ macro(IntersectionObserverEnabled, intersectionObserverEnabled, Bool, bool, false, "Intersection Observer", "Enable Intersection Observer support") \
</ins><span class="cx"> \
</span><span class="cx">
</span><span class="cx"> #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1551,6 +1551,16 @@
</span><span class="cx"> return toImpl(preferencesRef)->es6ModulesEnabled();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
+}
+
+bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->intersectionObserverEnabled();
+}
+
</ins><span class="cx"> void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
</span><span class="cx"> {
</span><span class="cx"> toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -442,6 +442,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetES6ModulesEnabled(WKPreferencesRef, bool flag);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef);
</span><span class="cx">
</span><ins>+// Defaults to false
+WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -3191,6 +3191,10 @@
</span><span class="cx"> RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::encryptedMediaAPIEnabledKey()));
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(INTERSECTION_OBSERVER)
+ RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
+#endif
+
</ins><span class="cx"> platformPreferencesDidChange(store);
</span><span class="cx">
</span><span class="cx"> if (m_drawingArea)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Tools/ChangeLog        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-11-26 Sam Weinig <sam@webkit.org>
+
+ Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
+ https://bugs.webkit.org/show_bug.cgi?id=164965
+
+ Reviewed by Simon Fraser.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Add new files.
+
+ * DumpRenderTree/TestOptions.h: Added.
+ * DumpRenderTree/TestOptions.mm: Added.
+ (parseBooleanTestHeaderValue):
+ (TestOptions::TestOptions):
+ Port TestOption parsing from WKTR to DRT.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebPreferencesToConsistentValues):
+ (resetWebViewToConsistentStateBeforeTesting):
+ (runTest):
+ * WebKitTestRunner/TestController.cpp:
+ Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting
+ preferences conditionally.
+
+ (WTR::TestController::resetPreferencesToConsistentValues):
+ (WTR::updateTestOptionsFromTestHeader):
+ * WebKitTestRunner/TestOptions.h:
+ Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver.
+
</ins><span class="cx"> 2016-11-26 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx">                 5DB9AC9E0F722C3600684641 /* WebKitWeightWatcher700.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */; };
</span><span class="cx">                 5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; };
</span><span class="cx">                 5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */; };
</span><ins>+                7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */; };
</ins><span class="cx">                 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */; };
</span><span class="cx">                 8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */; };
</span><span class="cx">                 9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9830F31E15C81181005AB206 /* DumpRenderTreeCommon.cpp */; };
</span><span class="lines">@@ -321,6 +322,8 @@
</span><span class="cx">                 53CBB830134E42F3001CE6A4 /* CyclicRedundancyCheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyclicRedundancyCheck.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 53CBB831134E42F3001CE6A4 /* CyclicRedundancyCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyclicRedundancyCheck.h; sourceTree = "<group>"; };
</span><span class="cx">                 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libWebCoreTestSupport.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
</span><ins>+                7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestOptions.mm; sourceTree = "<group>"; };
+                7CBBC3221DDFCF9A00786B9D /* TestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; };
</ins><span class="cx">                 80045AEB147718E7008290A8 /* AccessibilityNotificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AccessibilityNotificationHandler.h; path = mac/AccessibilityNotificationHandler.h; sourceTree = "<group>"; };
</span><span class="cx">                 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityNotificationHandler.mm; path = mac/AccessibilityNotificationHandler.mm; sourceTree = "<group>"; };
</span><span class="cx">                 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PixelDumpSupport.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -489,6 +492,8 @@
</span><span class="cx">                                 A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */,
</span><span class="cx">                                 A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */,
</span><span class="cx">                                 A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */,
</span><ins>+                                7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */,
+                                7CBBC3221DDFCF9A00786B9D /* TestOptions.h */,
</ins><span class="cx">                                 BC4741290D038A4C0072B006 /* JavaScriptThreading.h */,
</span><span class="cx">                                 BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */,
</span><span class="cx">                                 BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */,
</span><span class="lines">@@ -1145,6 +1150,7 @@
</span><span class="cx">                                 0F18E6EC1D6B9C070027E547 /* UIScriptContext.cpp in Sources */,
</span><span class="cx">                                 0F18E6ED1D6B9C070027E547 /* UIScriptController.cpp in Sources */,
</span><span class="cx">                                 0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */,
</span><ins>+                                7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */,
</ins><span class="cx">                                 0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */,
</span><span class="cx">                                 4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */,
</span><span class="cx">                                 440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestOptionshfromrev208982trunkToolsWebKitTestRunnerTestOptionsh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/DumpRenderTree/TestOptions.h (from rev 208982, trunk/Tools/WebKitTestRunner/TestOptions.h) (0 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestOptions.h         (rev 0)
+++ trunk/Tools/DumpRenderTree/TestOptions.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -0,0 +1,32 @@
</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
+
+struct TestOptions {
+ bool enableIntersectionObserver { false };
+
+ TestOptions(NSURL *testURL);
+};
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestOptionsmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/DumpRenderTree/TestOptions.mm (0 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestOptions.mm         (rev 0)
+++ trunk/Tools/DumpRenderTree/TestOptions.mm        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -0,0 +1,82 @@
</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.
+ */
+
+#include "config.h"
+#include "TestOptions.h"
+
+#include <fstream>
+#include <string>
+
+static bool parseBooleanTestHeaderValue(const std::string& value)
+{
+ if (value == "true")
+ return true;
+ if (value == "false")
+ return false;
+
+ NSLog(@"Found unexpected value '%s' for boolean option. Expected 'true' or 'false'.", value.c_str());
+ return false;
+}
+
+TestOptions::TestOptions(NSURL *testURL)
+{
+ if (![testURL isFileURL])
+ return;
+
+ std::string path = [testURL fileSystemRepresentation];
+
+ std::string options;
+ std::ifstream testFile(path.data());
+ if (!testFile.good())
+ return;
+ getline(testFile, options);
+ std::string beginString("webkit-test-runner [ ");
+ std::string endString(" ]");
+ size_t beginLocation = options.find(beginString);
+ if (beginLocation == std::string::npos)
+ return;
+ size_t endLocation = options.find(endString, beginLocation);
+ if (endLocation == std::string::npos) {
+ NSLog(@"Could not find end of test header in %s", path.c_str());
+ return;
+ }
+ std::string pairString = options.substr(beginLocation + beginString.size(), endLocation - (beginLocation + beginString.size()));
+ size_t pairStart = 0;
+ while (pairStart < pairString.size()) {
+ size_t pairEnd = pairString.find(" ", pairStart);
+ if (pairEnd == std::string::npos)
+ pairEnd = pairString.size();
+ size_t equalsLocation = pairString.find("=", pairStart);
+ if (equalsLocation == std::string::npos) {
+ NSLog(@"Malformed option in test header (could not find '=' character) in %s", path.c_str());
+ break;
+ }
+ auto key = pairString.substr(pairStart, equalsLocation - pairStart);
+ auto value = pairString.substr(equalsLocation + 1, pairEnd - (equalsLocation + 1));
+ if (key == "enableIntersectionObserver")
+ this->enableIntersectionObserver = parseBooleanTestHeaderValue(value);
+ pairStart = pairEnd + 1;
+ }
+}
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> #import "PixelDumpSupport.h"
</span><span class="cx"> #import "PolicyDelegate.h"
</span><span class="cx"> #import "ResourceLoadDelegate.h"
</span><ins>+#import "TestOptions.h"
</ins><span class="cx"> #import "TestRunner.h"
</span><span class="cx"> #import "UIDelegate.h"
</span><span class="cx"> #import "WebArchiveDumpSupport.h"
</span><span class="lines">@@ -895,7 +896,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Called before each test.
</span><del>-static void resetWebPreferencesToConsistentValues()
</del><ins>+static void resetWebPreferencesToConsistentValues(const TestOptions& options)
</ins><span class="cx"> {
</span><span class="cx"> WebPreferences *preferences = [WebPreferences standardPreferences];
</span><span class="cx">
</span><span class="lines">@@ -999,6 +1000,8 @@
</span><span class="cx"> [preferences setHiddenPageDOMTimerThrottlingEnabled:NO];
</span><span class="cx"> [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO];
</span><span class="cx">
</span><ins>+ preferences.intersectionObserverEnabled = options.enableIntersectionObserver;
+
</ins><span class="cx"> [WebPreferences _clearNetworkLoaderSession];
</span><span class="cx"> [WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
</span><span class="cx"> }
</span><span class="lines">@@ -1818,7 +1821,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-static void resetWebViewToConsistentStateBeforeTesting()
</del><ins>+static void resetWebViewToConsistentStateBeforeTesting(const TestOptions& options)
</ins><span class="cx"> {
</span><span class="cx"> WebView *webView = [mainFrame webView];
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -1851,7 +1854,7 @@
</span><span class="cx">
</span><span class="cx"> [WebCache clearCachedCredentials];
</span><span class="cx">
</span><del>- resetWebPreferencesToConsistentValues();
</del><ins>+ resetWebPreferencesToConsistentValues(options);
</ins><span class="cx">
</span><span class="cx"> TestRunner::setSerializeHTTPLoads(false);
</span><span class="cx"> TestRunner::setAllowsAnySSLCertificate(false);
</span><span class="lines">@@ -1985,9 +1988,11 @@
</span><span class="cx"> NSString *informationString = [@"CRASHING TEST: " stringByAppendingString:testPath];
</span><span class="cx"> WKSetCrashReportApplicationSpecificInformation((CFStringRef)informationString);
</span><span class="cx">
</span><ins>+ TestOptions options(url);
+ resetWebViewToConsistentStateBeforeTesting(options);
+
</ins><span class="cx"> const char* testURL([[url absoluteString] UTF8String]);
</span><del>-
- resetWebViewToConsistentStateBeforeTesting();
</del><ins>+
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> changeWindowScaleIfNeeded(testURL);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2096,7 +2101,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- resetWebViewToConsistentStateBeforeTesting();
</del><ins>+ resetWebViewToConsistentStateBeforeTesting(options);
</ins><span class="cx">
</span><span class="cx"> // Loading an empty request synchronously replaces the document with a blank one, which is necessary
</span><span class="cx"> // to stop timers, WebSockets and other activity that could otherwise spill output into next test's results.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -649,6 +649,7 @@
</span><span class="cx"> WKPreferencesSetInteractiveFormValidationEnabled(preferences, true);
</span><span class="cx"> WKPreferencesSetMockScrollbarsEnabled(preferences, options.useMockScrollbars);
</span><span class="cx"> WKPreferencesSetNeedsSiteSpecificQuirks(preferences, options.needsSiteSpecificQuirks);
</span><ins>+ WKPreferencesSetIntersectionObserverEnabled(preferences, options.enableIntersectionObserver);
</ins><span class="cx">
</span><span class="cx"> static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
</span><span class="cx"> WKPreferencesSetDefaultTextEncodingName(preferences, defaultTextEncoding);
</span><span class="lines">@@ -954,6 +955,8 @@
</span><span class="cx"> testOptions.ignoresViewportScaleLimits = parseBooleanTestHeaderValue(value);
</span><span class="cx"> if (key == "useCharacterSelectionGranularity")
</span><span class="cx"> testOptions.useCharacterSelectionGranularity = parseBooleanTestHeaderValue(value);
</span><ins>+ if (key == "enableIntersectionObserver")
+ testOptions.enableIntersectionObserver = parseBooleanTestHeaderValue(value);
</ins><span class="cx"> pairStart = pairEnd + 1;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (208982 => 208983)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestOptions.h        2016-11-27 02:27:55 UTC (rev 208982)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h        2016-11-27 04:21:49 UTC (rev 208983)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> bool needsSiteSpecificQuirks { false };
</span><span class="cx"> bool ignoresViewportScaleLimits { false };
</span><span class="cx"> bool useCharacterSelectionGranularity { false };
</span><ins>+ bool enableIntersectionObserver { false };
</ins><span class="cx">
</span><span class="cx"> float deviceScaleFactor { 1 };
</span><span class="cx"> Vector<String> overrideLanguages;
</span></span></pre>
</div>
</div>
</body>
</html>