<!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>[204877] 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/204877">204877</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-08-23 19:03:43 -0700 (Tue, 23 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Hook up UIScriptController in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=161064

Reviewed by Sam Weinig.

Tools:

Add a skeleton implementation of UIScriptController to DumpRenderTree, building for both
Mac and iOS. Currently this is sufficient to test doAsyncTask(), enabling two tests
in fast/harness which test this.

Add a DerivedSources target to DumpRenderTree to invoke DerivedSources.make.

Move related code shared between WTR and DRT into Tools/TestRunnerShared, and cleanse it of
WK2-isms. Fix the makefiles to refer to the new location.

Hook up TestRunner::runUIScript() for DumpRenderTree, which requires keeping track of callbacks
by ID and firing them once they are complete.

* DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: Added (copied from WTR).
* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/DerivedSources.make: Copied from Tools/WebKitTestRunner/DerivedSources.make.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestRunner.cpp:
(runUIScriptCallback):
(TestRunner::staticFunctions):
(TestRunner::cacheTestRunnerCallback):
(TestRunner::callTestRunnerCallback):
(TestRunner::clearTestRunnerCallbacks):
(nextUIScriptCallbackID):
(TestRunner::runUIScript):
(TestRunner::callUIScriptCallback):
(TestRunner::uiScriptDidComplete):
(TestRunner::cleanup):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/ios/UIScriptControllerIOS.mm: Added.
* DumpRenderTree/mac/Configurations/Base.xcconfig: DerivedSources.make needs WEBCORE_PRIVATE_HEADERS_DIR to be defined.
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::mainFrameJSContext):
* DumpRenderTree/mac/UIScriptControllerMac.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h.
(WTR::UIScriptController::doAsyncTask):
* DumpRenderTree/win/DumpRenderTree.cpp:
* TestRunnerShared/Bindings/JSWrappable.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h.
(WTR::JSWrappable::~JSWrappable):
(WTR::JSValueMakeStringOrNull):
* TestRunnerShared/Bindings/JSWrapper.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp.
(WTR::JSWrapper::wrap):
(WTR::JSWrapper::unwrap):
(WTR::unwrapObject):
(WTR::JSWrapper::initialize):
(WTR::JSWrapper::finalize):
* TestRunnerShared/Bindings/JSWrapper.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h.
(WTR::toJS):
(WTR::setProperty):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Renamed from Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl.
* TestRunnerShared/UIScriptContext/UIScriptContext.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp.
* TestRunnerShared/UIScriptContext/UIScriptContext.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h.
(WTR::UIScriptContext::currentParentCallbackIsPendingCompletion):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp.
* TestRunnerShared/UIScriptContext/UIScriptController.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h.
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/DerivedSources.make:
* WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h:
(WTR::JSWrappable::~JSWrappable): Deleted.
(WTR::JSValueMakeStringOrNull): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp:
(WTR::JSWrapper::wrap): Deleted.
(WTR::JSWrapper::unwrap): Deleted.
(WTR::unwrapObject): Deleted.
(WTR::JSWrapper::initialize): Deleted.
(WTR::JSWrapper::finalize): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h:
(WTR::toJS): Deleted.
(WTR::setProperty): Deleted.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::runUISideScript):
(WTR::TestInvocation::uiScriptDidComplete):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/UIScriptContext/UIScriptContext.cpp: Moved
* WebKitTestRunner/UIScriptContext/UIScriptContext.h: Moved
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp: Moved
* WebKitTestRunner/UIScriptContext/UIScriptController.h: Moved
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/config.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::contentVisibleRect):

LayoutTests:

fast/harness/ui-side-scripts.html and fast/harness/concurrent-ui-side-scripts.html
pass in DumpRenderTree now.

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeCMakeListstxt">trunk/Tools/DumpRenderTree/CMakeLists.txt</a></li>
<li><a href="#trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj">trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnercpp">trunk/Tools/DumpRenderTree/TestRunner.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnerh">trunk/Tools/DumpRenderTree/TestRunner.h</a></li>
<li><a href="#trunkToolsDumpRenderTreemacConfigurationsBasexcconfig">trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacTestRunnerMacmm">trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerCMakeListstxt">trunk/Tools/WebKitTestRunner/CMakeLists.txt</a></li>
<li><a href="#trunkToolsWebKitTestRunnerDerivedSourcesmake">trunk/Tools/WebKitTestRunner/DerivedSources.make</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationh">trunk/Tools/WebKitTestRunner/TestInvocation.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj">trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsWebKitTestRunnerconfigh">trunk/Tools/WebKitTestRunner/config.h</a></li>
<li><a href="#trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm">trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Tools/DumpRenderTree/Bindings/</li>
<li><a href="#trunkToolsDumpRenderTreeBindingsCodeGeneratorDumpRenderTreepm">trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm</a></li>
<li><a href="#trunkToolsDumpRenderTreeDerivedSourcesmake">trunk/Tools/DumpRenderTree/DerivedSources.make</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm">trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacUIScriptControllerMacmm">trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm</a></li>
<li>trunk/Tools/TestRunnerShared/</li>
<li>trunk/Tools/TestRunnerShared/Bindings/</li>
<li><a href="#trunkToolsTestRunnerSharedBindingsJSWrappableh">trunk/Tools/TestRunnerShared/Bindings/JSWrappable.h</a></li>
<li><a href="#trunkToolsTestRunnerSharedBindingsJSWrappercpp">trunk/Tools/TestRunnerShared/Bindings/JSWrapper.cpp</a></li>
<li><a href="#trunkToolsTestRunnerSharedBindingsJSWrapperh">trunk/Tools/TestRunnerShared/Bindings/JSWrapper.h</a></li>
<li>trunk/Tools/TestRunnerShared/UIScriptContext/</li>
<li>trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/</li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextBindingsUIScriptControlleridl">trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptContextcpp">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptContexth">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptControllercpp">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptControllerh">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappableh">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrapperh">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerUIScriptContextBindingsUIScriptControlleridl">trunk/Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerUIScriptContextUIScriptContextcpp">trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerUIScriptContextUIScriptContexth">trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllercpp">trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllerh">trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/LayoutTests/ChangeLog        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-08-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Hook up UIScriptController in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=161064
+
+        Reviewed by Sam Weinig.
+
+        fast/harness/ui-side-scripts.html and fast/harness/concurrent-ui-side-scripts.html
+        pass in DumpRenderTree now.
+
+        * platform/ios-simulator-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2016-08-23  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         fast/canvas/canvas-alphaImageData-behavior.html doesn't appear to be flakey any
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -6,8 +6,6 @@
</span><span class="cx"> # Platform-specific directories. Skipped globally, then re-enabled here.
</span><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> 
</span><del>-fast/harness/ui-side-scripts.html [ Pass ]
-fast/harness/concurrent-ui-side-scripts.html [ Pass ]
</del><span class="cx"> fast/scrolling/ios [ Pass ]
</span><span class="cx"> fast/viewport/ios [ Pass ]
</span><span class="cx"> fast/zooming/ios [ Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -22,6 +22,9 @@
</span><span class="cx"> 
</span><span class="cx"> fast/attachment/attachment-subtitle-resize.html [ Pass ]
</span><span class="cx"> 
</span><ins>+fast/harness/ui-side-scripts.html [ Pass ]
+fast/harness/concurrent-ui-side-scripts.html [ Pass ]
+
</ins><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End platform-specific directories.
</span><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -15,9 +15,6 @@
</span><span class="cx"> fast/events/force-click-on-link-navigation.html [ Pass ]
</span><span class="cx"> fast/events/force-click-text-selection-behavior.html [ Failure ]
</span><span class="cx"> 
</span><del>-fast/harness/ui-side-scripts.html [ Pass ]
-fast/harness/concurrent-ui-side-scripts.html [ Pass ]
-
</del><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End platform-specific directories.
</span><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/ChangeLog        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,3 +1,92 @@
</span><ins>+2016-08-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Hook up UIScriptController in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=161064
+
+        Reviewed by Sam Weinig.
+
+        Add a skeleton implementation of UIScriptController to DumpRenderTree, building for both
+        Mac and iOS. Currently this is sufficient to test doAsyncTask(), enabling two tests
+        in fast/harness which test this.
+
+        Add a DerivedSources target to DumpRenderTree to invoke DerivedSources.make.
+
+        Move related code shared between WTR and DRT into Tools/TestRunnerShared, and cleanse it of
+        WK2-isms. Fix the makefiles to refer to the new location.
+
+        Hook up TestRunner::runUIScript() for DumpRenderTree, which requires keeping track of callbacks
+        by ID and firing them once they are complete.
+
+        * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: Added (copied from WTR).
+        * DumpRenderTree/CMakeLists.txt:
+        * DumpRenderTree/DerivedSources.make: Copied from Tools/WebKitTestRunner/DerivedSources.make.
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+        * DumpRenderTree/TestRunner.cpp:
+        (runUIScriptCallback):
+        (TestRunner::staticFunctions):
+        (TestRunner::cacheTestRunnerCallback):
+        (TestRunner::callTestRunnerCallback):
+        (TestRunner::clearTestRunnerCallbacks):
+        (nextUIScriptCallbackID):
+        (TestRunner::runUIScript):
+        (TestRunner::callUIScriptCallback):
+        (TestRunner::uiScriptDidComplete):
+        (TestRunner::cleanup):
+        * DumpRenderTree/TestRunner.h:
+        * DumpRenderTree/ios/UIScriptControllerIOS.mm: Added.
+        * DumpRenderTree/mac/Configurations/Base.xcconfig: DerivedSources.make needs WEBCORE_PRIVATE_HEADERS_DIR to be defined.
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (runTest):
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        (TestRunner::mainFrameJSContext):
+        * DumpRenderTree/mac/UIScriptControllerMac.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h.
+        (WTR::UIScriptController::doAsyncTask):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        * TestRunnerShared/Bindings/JSWrappable.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h.
+        (WTR::JSWrappable::~JSWrappable):
+        (WTR::JSValueMakeStringOrNull):
+        * TestRunnerShared/Bindings/JSWrapper.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp.
+        (WTR::JSWrapper::wrap):
+        (WTR::JSWrapper::unwrap):
+        (WTR::unwrapObject):
+        (WTR::JSWrapper::initialize):
+        (WTR::JSWrapper::finalize):
+        * TestRunnerShared/Bindings/JSWrapper.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h.
+        (WTR::toJS):
+        (WTR::setProperty):
+        * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Renamed from Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl.
+        * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp.
+        * TestRunnerShared/UIScriptContext/UIScriptContext.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h.
+        (WTR::UIScriptContext::currentParentCallbackIsPendingCompletion):
+        * TestRunnerShared/UIScriptContext/UIScriptController.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp.
+        * TestRunnerShared/UIScriptContext/UIScriptController.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h.
+        * WebKitTestRunner/CMakeLists.txt:
+        * WebKitTestRunner/DerivedSources.make:
+        * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h:
+        (WTR::JSWrappable::~JSWrappable): Deleted.
+        (WTR::JSValueMakeStringOrNull): Deleted.
+        * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp:
+        (WTR::JSWrapper::wrap): Deleted.
+        (WTR::JSWrapper::unwrap): Deleted.
+        (WTR::unwrapObject): Deleted.
+        (WTR::JSWrapper::initialize): Deleted.
+        (WTR::JSWrapper::finalize): Deleted.
+        * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h:
+        (WTR::toJS): Deleted.
+        (WTR::setProperty): Deleted.
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::runUISideScript):
+        (WTR::TestInvocation::uiScriptDidComplete):
+        * WebKitTestRunner/TestInvocation.h:
+        * WebKitTestRunner/UIScriptContext/UIScriptContext.cpp: Moved
+        * WebKitTestRunner/UIScriptContext/UIScriptContext.h: Moved
+        * WebKitTestRunner/UIScriptContext/UIScriptController.cpp: Moved
+        * WebKitTestRunner/UIScriptContext/UIScriptController.h: Moved
+        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+        * WebKitTestRunner/config.h:
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptController::contentVisibleRect):
+
</ins><span class="cx"> 2016-08-23  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         JSC should have a &quot;microbenchmarks&quot; directory instead of &quot;regress&quot; directory
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeBindingsCodeGeneratorDumpRenderTreepm"></a>
<div class="addfile"><h4>Added: trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm                                (rev 0)
+++ trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,569 @@
</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.
+
+use strict;
+use warnings;
+use File::Spec;
+
+package CodeGeneratorDumpRenderTree;
+
+sub new
+{
+    my ($class, $codeGenerator, $writeDependencies, $verbose, $idlFilePath) = @_;
+
+    my $reference = {
+        codeGenerator =&gt; $codeGenerator,
+        idlFilePath =&gt; $idlFilePath,
+    };
+
+    bless($reference, $class);
+    return $reference;
+}
+
+sub GenerateInterface
+{
+}
+
+sub WriteData
+{
+    my ($self, $interface, $outputDir) = @_;
+
+    foreach my $file ($self-&gt;_generateHeaderFile($interface), $self-&gt;_generateImplementationFile($interface)) {
+        open(FILE, &quot;&gt;&quot;, File::Spec-&gt;catfile($outputDir, $$file{name})) or die &quot;Failed to open $$file{name} for writing: $!&quot;;
+        print FILE @{$$file{contents}};
+        close(FILE) or die &quot;Failed to close $$file{name} after writing: $!&quot;;
+    }
+}
+
+sub _className
+{
+    my ($idlType) = @_;
+
+    return &quot;JS&quot; . _implementationClassName($idlType);
+}
+
+sub _classRefGetter
+{
+    my ($self, $idlType) = @_;
+    return $$self{codeGenerator}-&gt;WK_lcfirst(_implementationClassName($idlType)) . &quot;Class&quot;;
+}
+
+sub _parseLicenseBlock
+{
+    my ($fileHandle) = @_;
+
+    my ($copyright, $readCount, $buffer, $currentCharacter, $previousCharacter);
+    my $startSentinel = &quot;/*&quot;;
+    my $lengthOfStartSentinel = length($startSentinel);
+    $readCount = read($fileHandle, $buffer, $lengthOfStartSentinel);
+    return &quot;&quot; if ($readCount &lt; $lengthOfStartSentinel || $buffer ne $startSentinel);
+    $copyright = $buffer;
+
+    while ($readCount = read($fileHandle, $currentCharacter, 1)) {
+        $copyright .= $currentCharacter;
+        return $copyright if $currentCharacter eq &quot;/&quot; &amp;&amp; $previousCharacter eq &quot;*&quot;;
+        $previousCharacter = $currentCharacter;
+    }
+
+    return &quot;&quot;;
+}
+
+sub _parseLicenseBlockFromFile
+{
+    my ($path) = @_;
+    open my $fileHandle, &quot;&lt;&quot;, $path or die &quot;Failed to open $path for reading: $!&quot;;
+    my $licenseBlock = _parseLicenseBlock($fileHandle);
+    close($fileHandle);
+    return $licenseBlock;
+}
+
+sub _defaultLicenseBlock
+{
+    return &lt;&lt;EOF;
+/*
+ * 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.
+ */
+EOF
+}
+
+sub _licenseBlock
+{
+    my ($self) = @_;
+    return $self-&gt;{licenseBlock} if $self-&gt;{licenseBlock};
+
+    my $licenseBlock = _parseLicenseBlockFromFile($self-&gt;{idlFilePath}) || _defaultLicenseBlock();
+    $self-&gt;{licenseBlock} = $licenseBlock;
+    return $licenseBlock;
+}
+
+sub _generateHeaderFile
+{
+    my ($self, $interface) = @_;
+
+    my @contents = ();
+
+    my $idlType = $interface-&gt;name;
+    my $className = _className($idlType);
+    my $implementationClassName = _implementationClassName($idlType);
+    my $filename = $className . &quot;.h&quot;;
+
+    push(@contents, $self-&gt;_licenseBlock());
+
+    my $parentClassName = _parentClassName($interface);
+
+    push(@contents, &lt;&lt;EOF);
+
+#ifndef ${className}_h
+#define ${className}_h
+
+#include &quot;${parentClassName}.h&quot;
+EOF
+    push(@contents, &lt;&lt;EOF);
+
+namespace WTR {
+
+class ${implementationClassName};
+
+class ${className} : public ${parentClassName} {
+public:
+    static JSClassRef @{[$self-&gt;_classRefGetter($idlType)]}();
+
+private:
+    static const JSStaticFunction* staticFunctions();
+    static const JSStaticValue* staticValues();
+EOF
+
+    if (my @functions = @{$interface-&gt;functions}) {
+        push(@contents, &quot;\n    // Functions\n\n&quot;);
+        foreach my $function (@functions) {
+            push(@contents, &quot;    static JSValueRef @{[$function-&gt;signature-&gt;name]}(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*);\n&quot;);
+        }
+    }
+
+    if (my @attributes = @{$interface-&gt;attributes}) {
+        push(@contents, &quot;\n    // Attributes\n\n&quot;);
+        foreach my $attribute (@attributes) {
+            push(@contents, &quot;    static JSValueRef @{[$self-&gt;_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n&quot;);
+            push(@contents, &quot;    static bool @{[$self-&gt;_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n&quot;) unless $attribute-&gt;isReadOnly;
+        }
+    }
+
+    push(@contents, &lt;&lt;EOF);
+};
+    
+${implementationClassName}* to${implementationClassName}(JSContextRef, JSValueRef);
+
+} // namespace WTR
+
+#endif // ${className}_h
+EOF
+
+    return { name =&gt; $filename, contents =&gt; \@contents };
+}
+
+sub _generateImplementationFile
+{
+    my ($self, $interface) = @_;
+
+    my @contentsPrefix = ();
+    my %contentsIncludes = ();
+    my @contents = ();
+
+    my $idlType = $interface-&gt;name;
+    my $className = _className($idlType);
+    my $implementationClassName = _implementationClassName($idlType);
+    my $filename = $className . &quot;.cpp&quot;;
+
+    push(@contentsPrefix, $self-&gt;_licenseBlock());
+
+    my $classRefGetter = $self-&gt;_classRefGetter($idlType);
+    my $parentClassName = _parentClassName($interface);
+
+    $contentsIncludes{&quot;${className}.h&quot;} = 1;
+    $contentsIncludes{&quot;${implementationClassName}.h&quot;} = 1;
+
+    push(@contentsPrefix, &lt;&lt;EOF);
+
+EOF
+
+    push(@contents, &lt;&lt;EOF);
+#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
+#include &lt;wtf/GetPtr.h&gt;
+
+namespace WTR {
+
+${implementationClassName}* to${implementationClassName}(JSContextRef context, JSValueRef value)
+{
+    if (!context || !value || !${className}::${classRefGetter}() || !JSValueIsObjectOfClass(context, value, ${className}::${classRefGetter}()))
+        return 0;
+    return static_cast&lt;${implementationClassName}*&gt;(JSWrapper::unwrap(context, value));
+}
+
+JSClassRef ${className}::${classRefGetter}()
+{
+    static JSClassRef jsClass;
+    if (!jsClass) {
+        JSClassDefinition definition = kJSClassDefinitionEmpty;
+        definition.className = &quot;${idlType}&quot;;
+        definition.parentClass = @{[$self-&gt;_parentClassRefGetterExpression($interface)]};
+        definition.staticValues = staticValues();
+        definition.staticFunctions = staticFunctions();
+EOF
+
+    push(@contents, &quot;        definition.initialize = initialize;\n&quot;) unless _parentInterface($interface);
+    push(@contents, &quot;        definition.finalize = finalize;\n&quot;) unless _parentInterface($interface);
+
+    push(@contents, &lt;&lt;EOF);
+        jsClass = JSClassCreate(&amp;definition);
+    }
+    return jsClass;
+}
+
+EOF
+
+    push(@contents, $self-&gt;_staticFunctionsGetterImplementation($interface), &quot;\n&quot;);
+    push(@contents, $self-&gt;_staticValuesGetterImplementation($interface));
+
+    if (my @functions = @{$interface-&gt;functions}) {
+        push(@contents, &quot;\n// Functions\n&quot;);
+
+        foreach my $function (@functions) {
+            push(@contents, &lt;&lt;EOF);
+
+JSValueRef ${className}::@{[$function-&gt;signature-&gt;name]}(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    ${implementationClassName}* impl = to${implementationClassName}(context, thisObject);
+    if (!impl)
+        return JSValueMakeUndefined(context);
+
+EOF
+            my $functionCall;
+            if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;CustomArgumentHandling&quot;}) {
+                $functionCall = &quot;impl-&gt;&quot; . $function-&gt;signature-&gt;name . &quot;(context, argumentCount, arguments, exception)&quot;;
+            } else {
+                my @parameters = ();
+                my @specifiedParameters = @{$function-&gt;parameters};
+
+                $self-&gt;_includeHeaders(\%contentsIncludes, $function-&gt;signature-&gt;type, $function-&gt;signature);
+
+                if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;PassContext&quot;}) {
+                    push(@parameters, &quot;context&quot;);
+                }
+
+                foreach my $i (0..$#specifiedParameters) {
+                    my $parameter = $specifiedParameters[$i];
+
+                    $self-&gt;_includeHeaders(\%contentsIncludes, $idlType, $parameter);
+
+                    push(@contents, &quot;    &quot; . $self-&gt;_platformTypeVariableDeclaration($parameter, $parameter-&gt;name, &quot;arguments[$i]&quot;, &quot;argumentCount &gt; $i&quot;) . &quot;\n&quot;);
+                    
+                    push(@parameters, $self-&gt;_parameterExpression($parameter));
+                }
+
+                $functionCall = &quot;impl-&gt;&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @parameters) . &quot;)&quot;;
+            }
+            
+            push(@contents, &quot;    ${functionCall};\n\n&quot;) if $function-&gt;signature-&gt;type eq &quot;void&quot;;
+            push(@contents, &quot;    return &quot; . $self-&gt;_returnExpression($function-&gt;signature, $functionCall) . &quot;;\n}\n&quot;);
+        }
+    }
+
+    if (my @attributes = @{$interface-&gt;attributes}) {
+        push(@contents, &quot;\n// Attributes\n&quot;);
+        foreach my $attribute (@attributes) {
+            $self-&gt;_includeHeaders(\%contentsIncludes, $attribute-&gt;signature-&gt;type, $attribute-&gt;signature);
+
+            my $getterName = $self-&gt;_getterName($attribute);
+            my $getterExpression = &quot;impl-&gt;${getterName}()&quot;;
+
+            push(@contents, &lt;&lt;EOF);
+
+JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef* exception)
+{
+    ${implementationClassName}* impl = to${implementationClassName}(context, object);
+    if (!impl)
+        return JSValueMakeUndefined(context);
+
+    return @{[$self-&gt;_returnExpression($attribute-&gt;signature, $getterExpression)]};
+}
+EOF
+
+            unless ($attribute-&gt;isReadOnly) {
+                push(@contents, &lt;&lt;EOF);
+
+bool ${className}::@{[$self-&gt;_setterName($attribute)]}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef value, JSValueRef* exception)
+{
+    ${implementationClassName}* impl = to${implementationClassName}(context, object);
+    if (!impl)
+        return false;
+
+EOF
+
+                my $platformValue = $self-&gt;_platformTypeConstructor($attribute-&gt;signature, &quot;value&quot;);
+
+                push(@contents, &lt;&lt;EOF);
+    impl-&gt;@{[$self-&gt;_setterName($attribute)]}(${platformValue});
+
+    return true;
+}
+EOF
+            }
+        }
+    }
+
+    push(@contents, &lt;&lt;EOF);
+
+} // namespace WTR
+
+EOF
+
+    unshift(@contents, map { &quot;#include \&quot;$_\&quot;\n&quot; } sort keys(%contentsIncludes));
+    unshift(@contents, &quot;#include \&quot;config.h\&quot;\n&quot;);
+    unshift(@contents, @contentsPrefix);
+
+    return { name =&gt; $filename, contents =&gt; \@contents };
+}
+
+sub _getterName
+{
+    my ($self, $attribute) = @_;
+
+    my $signature = $attribute-&gt;signature;
+    my $name = $signature-&gt;name;
+
+    return $name;
+}
+
+sub _includeHeaders
+{
+    my ($self, $headers, $idlType, $signature) = @_;
+
+    return unless defined $idlType;
+    return if $idlType eq &quot;boolean&quot;;
+    return if $idlType eq &quot;object&quot;;
+    return if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
+    return if $$self{codeGenerator}-&gt;IsStringType($idlType);
+
+    $$headers{_className($idlType) . &quot;.h&quot;} = 1;
+    $$headers{_implementationClassName($idlType) . &quot;.h&quot;} = 1;
+}
+
+sub _implementationClassName
+{
+    my ($idlType) = @_;
+
+    return $idlType;
+}
+
+sub _parentClassName
+{
+    my ($interface) = @_;
+
+    my $parentInterface = _parentInterface($interface);
+    return $parentInterface ? _className($parentInterface) : &quot;JSWrapper&quot;;
+}
+
+sub _parentClassRefGetterExpression
+{
+    my ($self, $interface) = @_;
+
+    my $parentInterface = _parentInterface($interface);
+    return $parentInterface ? $self-&gt;_classRefGetter($parentInterface) . &quot;()&quot; : &quot;0&quot;;
+}
+
+sub _parentInterface
+{
+    my ($interface) = @_;
+    return $interface-&gt;parent;
+}
+
+sub _platformType
+{
+    my ($self, $idlType, $signature) = @_;
+
+    return undef unless defined $idlType;
+
+    return &quot;bool&quot; if $idlType eq &quot;boolean&quot;;
+    return &quot;JSValueRef&quot; if $idlType eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
+    return &quot;double&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
+    return _implementationClassName($idlType);
+}
+
+sub _platformTypeConstructor
+{
+    my ($self, $signature, $argumentName) = @_;
+
+    my $idlType = $signature-&gt;type;
+
+    return &quot;JSValueToBoolean(context, $argumentName)&quot; if $idlType eq &quot;boolean&quot;;
+    return &quot;$argumentName&quot; if $idlType eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, $argumentName, 0))&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
+    return &quot;JSValueToNumber(context, $argumentName, 0)&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
+    return &quot;to&quot; . _implementationClassName($idlType) . &quot;(context, $argumentName)&quot;;
+}
+
+sub _platformTypeVariableDeclaration
+{
+    my ($self, $signature, $variableName, $argumentName, $condition) = @_;
+
+    my $platformType = $self-&gt;_platformType($signature-&gt;type, $signature);
+    my $constructor = $self-&gt;_platformTypeConstructor($signature, $argumentName);
+
+    my %nonPointerTypes = (
+        &quot;bool&quot; =&gt; 1,
+        &quot;double&quot; =&gt; 1,
+        &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; =&gt; 1,
+        &quot;JSValueRef&quot; =&gt; 1,
+    );
+
+    my $nullValue = &quot;0&quot;;
+    if ($platformType eq &quot;JSValueRef&quot;) {
+        $nullValue = &quot;JSValueMakeUndefined(context)&quot;;
+    } elsif (defined $nonPointerTypes{$platformType} &amp;&amp; $platformType ne &quot;double&quot;) {
+        $nullValue = &quot;$platformType()&quot;;
+    }
+
+    $platformType .= &quot;*&quot; unless defined $nonPointerTypes{$platformType};
+
+    return &quot;$platformType $variableName = $condition &amp;&amp; $constructor;&quot; if $condition &amp;&amp; $platformType eq &quot;bool&quot;;
+    return &quot;$platformType $variableName = $condition ? $constructor : $nullValue;&quot; if $condition;
+    return &quot;$platformType $variableName = $constructor;&quot;;
+}
+
+sub _returnExpression
+{
+    my ($self, $signature, $expression) = @_;
+
+    my $returnIDLType = $signature-&gt;type;
+
+    return &quot;JSValueMakeUndefined(context)&quot; if $returnIDLType eq &quot;void&quot;;
+    return &quot;JSValueMakeBoolean(context, ${expression})&quot; if $returnIDLType eq &quot;boolean&quot;;
+    return &quot;${expression}&quot; if $returnIDLType eq &quot;object&quot;;
+    return &quot;JSValueMakeNumber(context, ${expression})&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($returnIDLType);
+    return &quot;JSValueMakeStringOrNull(context, ${expression}.get())&quot; if $$self{codeGenerator}-&gt;IsStringType($returnIDLType);
+    return &quot;toJS(context, WTF::getPtr(${expression}))&quot;;
+}
+
+sub _parameterExpression
+{
+    my ($self, $parameter) = @_;
+
+    my $idlType = $parameter-&gt;type;
+    my $name = $parameter-&gt;name;
+
+    return &quot;${name}.get()&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
+    return $name;
+}
+
+sub _setterName
+{
+    my ($self, $attribute) = @_;
+
+    my $name = $attribute-&gt;signature-&gt;name;
+
+    return &quot;set&quot; . $$self{codeGenerator}-&gt;WK_ucfirst($name);
+}
+
+sub _staticFunctionsGetterImplementation
+{
+    my ($self, $interface) = @_;
+
+    my $mapFunction = sub {
+        my $name = $_-&gt;signature-&gt;name;
+        my @attributes = qw(kJSPropertyAttributeDontDelete kJSPropertyAttributeReadOnly);
+        push(@attributes, &quot;kJSPropertyAttributeDontEnum&quot;) if $_-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DontEnum&quot;};
+
+        return  &quot;{ \&quot;$name\&quot;, $name, &quot; . join(&quot; | &quot;, @attributes) . &quot; }&quot;;
+    };
+
+    return $self-&gt;_staticFunctionsOrValuesGetterImplementation($interface, &quot;function&quot;, &quot;{ 0, 0, 0 }&quot;, $mapFunction, $interface-&gt;functions);
+}
+
+sub _staticFunctionsOrValuesGetterImplementation
+{
+    my ($self, $interface, $functionOrValue, $arrayTerminator, $mapFunction, $functionsOrAttributes) = @_;
+
+    my $className = _className($interface-&gt;name);
+    my $uppercaseFunctionOrValue = $$self{codeGenerator}-&gt;WK_ucfirst($functionOrValue);
+
+    my $result = &lt;&lt;EOF;
+const JSStatic${uppercaseFunctionOrValue}* ${className}::static${uppercaseFunctionOrValue}s()
+{
+EOF
+
+    my @initializers = map(&amp;$mapFunction, @{$functionsOrAttributes});
+    return $result . &quot;    return 0;\n}\n&quot; unless @initializers;
+
+    $result .= &lt;&lt;EOF
+    static const JSStatic${uppercaseFunctionOrValue} ${functionOrValue}s[] = {
+        @{[join(&quot;,\n        &quot;, @initializers)]},
+        ${arrayTerminator}
+    };
+    return ${functionOrValue}s;
+}
+EOF
+}
+
+sub _staticValuesGetterImplementation
+{
+    my ($self, $interface) = @_;
+
+    my $mapFunction = sub {
+        return if $_-&gt;signature-&gt;extendedAttributes-&gt;{&quot;NoImplementation&quot;};
+
+        my $attributeName = $_-&gt;signature-&gt;name;
+        my $getterName = $self-&gt;_getterName($_);
+        my $setterName = $_-&gt;isReadOnly ? &quot;0&quot; : $self-&gt;_setterName($_);
+        my @attributes = qw(kJSPropertyAttributeDontDelete);
+        push(@attributes, &quot;kJSPropertyAttributeReadOnly&quot;) if $_-&gt;isReadOnly;
+        push(@attributes, &quot;kJSPropertyAttributeDontEnum&quot;) if $_-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DontEnum&quot;};
+
+        return &quot;{ \&quot;$attributeName\&quot;, $getterName, $setterName, &quot; . join(&quot; | &quot;, @attributes) . &quot; }&quot;;
+    };
+
+    return $self-&gt;_staticFunctionsOrValuesGetterImplementation($interface, &quot;value&quot;, &quot;{ 0, 0, 0, 0 }&quot;, $mapFunction, $interface-&gt;attributes);
+}
+
+1;
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreeCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/CMakeLists.txt (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/CMakeLists.txt        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/CMakeLists.txt        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+set(WEBKIT_TESTRUNNER_SHARED_DIR &quot;${TOOLS_DIR}/TestRunnerShared/&quot;)
+set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR &quot;${TOOLS_DIR}/TestRunnerShared/UIScriptContext&quot;)
+
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/DumpRenderTree)
+
</ins><span class="cx"> set(DumpRenderTree_SOURCES
</span><span class="cx">     AccessibilityController.cpp
</span><span class="cx">     AccessibilityTextMarker.cpp
</span><span class="lines">@@ -9,6 +14,9 @@
</span><span class="cx">     PixelDumpSupport.cpp
</span><span class="cx">     TestRunner.cpp
</span><span class="cx">     WorkQueue.cpp
</span><ins>+    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptContext.cpp
+    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptController.cpp
+    ${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings/JSWrapper.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(DumpRenderTree_LIBRARIES
</span><span class="lines">@@ -58,6 +66,9 @@
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
</span><span class="cx">     ${DERIVED_SOURCES_DIR}/ForwardingHeaders
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</span><ins>+    ${DERIVED_SOURCES_DIR}/DumpRenderTree
+    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}
+    ${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings
</ins><span class="cx">     ${TOOLS_DIR}/DumpRenderTree
</span><span class="cx">     ${WTF_DIR}
</span><span class="cx">     ${CMAKE_SOURCE_DIR}/Source
</span><span class="lines">@@ -103,6 +114,18 @@
</span><span class="cx">     WebCoreTestSupport
</span><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set(DumpRenderTree_IDL_FILES
+    &quot;${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl&quot;
+)
+
+GENERATE_BINDINGS(DumpRenderTree_SOURCES
+    &quot;${DumpRenderTree_IDL_FILES}&quot;
+    &quot;${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings&quot;
+    &quot;--include=${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings&quot;
+    &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
+    ${DERIVED_SOURCES_DIR}/DumpRenderTree JS DumpRenderTree cpp
+    ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
+
</ins><span class="cx"> WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
</span><span class="cx"> 
</span><span class="cx"> include_directories(${DumpRenderTree_INCLUDE_DIRECTORIES})
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeDerivedSourcesmakefromrev204876trunkToolsWebKitTestRunnerDerivedSourcesmake"></a>
<div class="copfile"><h4>Copied: trunk/Tools/DumpRenderTree/DerivedSources.make (from rev 204876, trunk/Tools/WebKitTestRunner/DerivedSources.make) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/DerivedSources.make                                (rev 0)
+++ trunk/Tools/DumpRenderTree/DerivedSources.make        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,50 @@
</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.
+
+UISCRIPTCONTEXT_DIR = $(DumpRenderTree)/../TestRunnerShared/UIScriptContext/Bindings
+
+VPATH = \
+    $(UISCRIPTCONTEXT_DIR) \
+#
+
+UICONTEXT_INTERFACES = \
+    UIScriptController \
+#
+
+SCRIPTS = \
+    $(WebCoreScripts)/CodeGenerator.pm \
+    $(DumpRenderTree)/Bindings/CodeGeneratorDumpRenderTree.pm \
+    $(WebCoreScripts)/IDLParser.pm \
+    $(WebCoreScripts)/generate-bindings.pl \
+#
+
+.PHONY : all
+
+JS%.h JS%.cpp : %.idl $(SCRIPTS)
+        @echo Generating bindings for $*...
+        @perl -I $(WebCoreScripts) -I $(UISCRIPTCONTEXT_DIR) -I $(DumpRenderTree)/Bindings $(WebCoreScripts)/generate-bindings.pl --defines &quot;&quot; --include $(UISCRIPTCONTEXT_DIR) --outputDir . --generator DumpRenderTree $&lt;
+
+all : \
+    $(UICONTEXT_INTERFACES:%=JS%.h) \
+    $(UICONTEXT_INTERFACES:%=JS%.cpp) \
+#
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -7,6 +7,17 @@
</span><span class="cx">         objects = {
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXAggregateTarget section */
</span><ins>+                0F18E6F21D6B9CAE0027E547 /* Derived Sources */ = {
+                        isa = PBXAggregateTarget;
+                        buildConfigurationList = 0F18E6FD1D6B9CAE0027E547 /* Build configuration list for PBXAggregateTarget &quot;Derived Sources&quot; */;
+                        buildPhases = (
+                                0F18E7011D6B9CC60027E547 /* ShellScript */,
+                        );
+                        dependencies = (
+                        );
+                        name = &quot;Derived Sources&quot;;
+                        productName = All;
+                };
</ins><span class="cx">                 A84F608D08B1370600E9745F /* All */ = {
</span><span class="cx">                         isa = PBXAggregateTarget;
</span><span class="cx">                         buildConfigurationList = A84F609208B1371400E9745F /* Build configuration list for PBXAggregateTarget &quot;All&quot; */;
</span><span class="lines">@@ -26,6 +37,12 @@
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXBuildFile section */
</span><span class="cx">                 00F048541A0C3C9A000244DB /* URLRedirect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00F048531A0C3C9A000244DB /* URLRedirect.cpp */; };
</span><ins>+                0F18E6EC1D6B9C070027E547 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E6E81D6B9C070027E547 /* UIScriptContext.cpp */; };
+                0F18E6ED1D6B9C070027E547 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E6EA1D6B9C070027E547 /* UIScriptController.cpp */; };
+                0F18E7061D6BA0230027E547 /* JSUIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E7041D6BA0230027E547 /* JSUIScriptController.cpp */; };
+                0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E70C1D6BAC8C0027E547 /* UIScriptControllerIOS.mm */; };
+                0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E70E1D6BACB60027E547 /* UIScriptControllerMac.mm */; };
+                0F18E7131D6BC43A0027E547 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E7111D6BC43A0027E547 /* JSWrapper.cpp */; };
</ins><span class="cx">                 0F37A4A711E6628700275F54 /* PluginObjectMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F37A4A611E6628700275F54 /* PluginObjectMac.mm */; };
</span><span class="cx">                 0F37A4AA11E6629100275F54 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A752A108AF5D1F00138E45 /* QuartzCore.framework */; };
</span><span class="cx">                 0F4E43E31D5C2BAF008EBA5C /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F4E43E11D5C037A008EBA5C /* Launch.storyboard */; };
</span><span class="lines">@@ -136,6 +153,13 @@
</span><span class="cx"> /* End PBXBuildFile section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXContainerItemProxy section */
</span><ins>+                0F18E7021D6B9CFE0027E547 /* PBXContainerItemProxy */ = {
+                        isa = PBXContainerItemProxy;
+                        containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+                        proxyType = 1;
+                        remoteGlobalIDString = 0F18E6F21D6B9CAE0027E547;
+                        remoteInfo = &quot;Derived Sources&quot;;
+                };
</ins><span class="cx">                 141BF237096A451E00E0753C /* PBXContainerItemProxy */ = {
</span><span class="cx">                         isa = PBXContainerItemProxy;
</span><span class="cx">                         containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
</span><span class="lines">@@ -194,9 +218,9 @@
</span><span class="cx">                         dstPath = DumpRenderTree.resources;
</span><span class="cx">                         dstSubfolderSpec = 7;
</span><span class="cx">                         files = (
</span><ins>+                                5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */,
</ins><span class="cx">                                 C23EA2081BC9F05100C980B7 /* FontWithFeatures.otf in Copy Font Files */,
</span><span class="cx">                                 C23EA2091BC9F05100C980B7 /* FontWithFeatures.ttf in Copy Font Files */,
</span><del>-                                5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */,
</del><span class="cx">                                 5DB9AC980F722C3600684641 /* WebKitWeightWatcher100.ttf in Copy Font Files */,
</span><span class="cx">                                 5DB9AC990F722C3600684641 /* WebKitWeightWatcher200.ttf in Copy Font Files */,
</span><span class="cx">                                 5DB9AC9A0F722C3600684641 /* WebKitWeightWatcher300.ttf in Copy Font Files */,
</span><span class="lines">@@ -214,6 +238,20 @@
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXFileReference section */
</span><span class="cx">                 00F048531A0C3C9A000244DB /* URLRedirect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLRedirect.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F18E6E81D6B9C070027E547 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6E91D6B9C070027E547 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6EA1D6B9C070027E547 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6EB1D6B9C070027E547 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = ../TestRunnerShared/UIScriptContext/UIScriptController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6F01D6B9C240027E547 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = ../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6F11D6B9C640027E547 /* DerivedSources.make */ = {isa = PBXFileReference; lastKnownFileType = text; path = DerivedSources.make; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7041D6BA0230027E547 /* JSUIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIScriptController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7051D6BA0230027E547 /* JSUIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIScriptController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7071D6BA4140027E547 /* CodeGeneratorDumpRenderTree.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = CodeGeneratorDumpRenderTree.pm; path = Bindings/CodeGeneratorDumpRenderTree.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E70C1D6BAC8C0027E547 /* UIScriptControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIScriptControllerIOS.mm; path = ios/UIScriptControllerIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E70E1D6BACB60027E547 /* UIScriptControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIScriptControllerMac.mm; path = mac/UIScriptControllerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7101D6BC43A0027E547 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrappable.h; path = ../TestRunnerShared/Bindings/JSWrappable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7111D6BC43A0027E547 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWrapper.cpp; path = ../TestRunnerShared/Bindings/JSWrapper.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7121D6BC43A0027E547 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrapper.h; path = ../TestRunnerShared/Bindings/JSWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F37A4A611E6628700275F54 /* PluginObjectMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginObjectMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F4E43E11D5C037A008EBA5C /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launch.storyboard; path = ios/Launch.storyboard; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestNetscapePlugIn.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="lines">@@ -433,6 +471,8 @@
</span><span class="cx">                 08FB7794FE84155DC02AAC07 /* DumpRenderTree */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                0F18E6F11D6B9C640027E547 /* DerivedSources.make */,
+                                0F18E6E71D6B9BF50027E547 /* UIScriptContext */,
</ins><span class="cx">                                 A1158D6A18927CE10088C17B /* ios */,
</span><span class="cx">                                 A134E53418905E6C00901D06 /* config.h */,
</span><span class="cx">                                 1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */,
</span><span class="lines">@@ -454,6 +494,7 @@
</span><span class="cx">                                 A8D79CE80FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h */,
</span><span class="cx">                                 A8D79CE90FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m */,
</span><span class="cx">                                 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */,
</span><ins>+                                0F18E70E1D6BACB60027E547 /* UIScriptControllerMac.mm */,
</ins><span class="cx">                                 44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */,
</span><span class="cx">                                 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */,
</span><span class="cx">                                 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */,
</span><span class="lines">@@ -473,6 +514,41 @@
</span><span class="cx">                         name = DumpRenderTree;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                0F18E6E71D6B9BF50027E547 /* UIScriptContext */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E6EE1D6B9C0C0027E547 /* Bindings */,
+                                0F18E6EF1D6B9C120027E547 /* Derived Sources */,
+                                0F18E6E81D6B9C070027E547 /* UIScriptContext.cpp */,
+                                0F18E6E91D6B9C070027E547 /* UIScriptContext.h */,
+                                0F18E6EA1D6B9C070027E547 /* UIScriptController.cpp */,
+                                0F18E6EB1D6B9C070027E547 /* UIScriptController.h */,
+                        );
+                        name = UIScriptContext;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                0F18E6EE1D6B9C0C0027E547 /* Bindings */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7071D6BA4140027E547 /* CodeGeneratorDumpRenderTree.pm */,
+                                0F18E7101D6BC43A0027E547 /* JSWrappable.h */,
+                                0F18E7111D6BC43A0027E547 /* JSWrapper.cpp */,
+                                0F18E7121D6BC43A0027E547 /* JSWrapper.h */,
+                                0F18E6F01D6B9C240027E547 /* UIScriptController.idl */,
+                        );
+                        name = Bindings;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                0F18E6EF1D6B9C120027E547 /* Derived Sources */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7041D6BA0230027E547 /* JSUIScriptController.cpp */,
+                                0F18E7051D6BA0230027E547 /* JSUIScriptController.h */,
+                        );
+                        name = &quot;Derived Sources&quot;;
+                        path = DerivedSources/DumpRenderTree;
+                        sourceTree = BUILT_PRODUCTS_DIR;
+                };
</ins><span class="cx">                 141BF1F5096A439800E0753C /* TestNetscapePlugIn */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -618,9 +694,9 @@
</span><span class="cx">                                 9340995408540CAF007F3BC8 /* DumpRenderTree */,
</span><span class="cx">                                 B5A7526708AF4A4A00138E45 /* ImageDiff */,
</span><span class="cx">                                 2D403F19150871F9005358D2 /* LayoutTestHelper */,
</span><ins>+                                A1158D7F18927E7A0088C17B /* DumpRenderTree.app */,
+                                A1321C9E188F9A3600125434 /* libDumpRenderTree.a */,
</ins><span class="cx">                                 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */,
</span><del>-                                A1321C9E188F9A3600125434 /* libDumpRenderTree.a */,
-                                A1158D7F18927E7A0088C17B /* DumpRenderTree.app */,
</del><span class="cx">                         );
</span><span class="cx">                         name = Products;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -629,6 +705,8 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */,
</span><ins>+                                C23EA2061BC9EABA00C980B7 /* FontWithFeatures.otf */,
+                                C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */,
</ins><span class="cx">                                 375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */,
</span><span class="cx">                                 375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */,
</span><span class="cx">                                 375F09730DAC3CB600C8B4E5 /* WebKitWeightWatcher300.ttf */,
</span><span class="lines">@@ -638,8 +716,6 @@
</span><span class="cx">                                 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */,
</span><span class="cx">                                 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */,
</span><span class="cx">                                 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */,
</span><del>-                                C23EA2061BC9EABA00C980B7 /* FontWithFeatures.otf */,
-                                C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */,
</del><span class="cx">                         );
</span><span class="cx">                         name = Resources;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -647,11 +723,12 @@
</span><span class="cx">                 A1158D6A18927CE10088C17B /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                0F4E43E11D5C037A008EBA5C /* Launch.storyboard */,
</del><span class="cx">                                 4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */,
</span><span class="cx">                                 A1158D55189273EB0088C17B /* DumpRenderTreeBrowserView.h */,
</span><span class="cx">                                 A1158D56189273EB0088C17B /* DumpRenderTreeBrowserView.mm */,
</span><span class="cx">                                 A19317FC1892855F001C52B1 /* Info.plist */,
</span><ins>+                                0F4E43E11D5C037A008EBA5C /* Launch.storyboard */,
+                                0F18E70C1D6BAC8C0027E547 /* UIScriptControllerIOS.mm */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = ios;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -659,11 +736,11 @@
</span><span class="cx">                 A803FF6409CAACC1009B2A37 /* Frameworks */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                1CB6741F195BAE7B000F35B5 /* CoreText.framework */,
-                                1A7961061803454C00FE42CD /* IOKit.framework */,
</del><span class="cx">                                 BCB284B20CFA82CB007E533E /* ApplicationServices.framework */,
</span><span class="cx">                                 AE8257EF08D22389000507AB /* Carbon.framework */,
</span><span class="cx">                                 A84F608908B136DA00E9745F /* Cocoa.framework */,
</span><ins>+                                1CB6741F195BAE7B000F35B5 /* CoreText.framework */,
+                                1A7961061803454C00FE42CD /* IOKit.framework */,
</ins><span class="cx">                                 A817090308B164D300CCB9FB /* JavaScriptCore.framework */,
</span><span class="cx">                                 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */,
</span><span class="cx">                                 23BCB88F0EA57623003C6289 /* OpenGL.framework */,
</span><span class="lines">@@ -832,6 +909,7 @@
</span><span class="cx">                         buildRules = (
</span><span class="cx">                         );
</span><span class="cx">                         dependencies = (
</span><ins>+                                0F18E7031D6B9CFE0027E547 /* PBXTargetDependency */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = &quot;DumpRenderTree (Library)&quot;;
</span><span class="cx">                         productName = DumpRenderTree;
</span><span class="lines">@@ -883,6 +961,7 @@
</span><span class="cx">                         projectRoot = &quot;&quot;;
</span><span class="cx">                         targets = (
</span><span class="cx">                                 A84F608D08B1370600E9745F /* All */,
</span><ins>+                                0F18E6F21D6B9CAE0027E547 /* Derived Sources */,
</ins><span class="cx">                                 A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */,
</span><span class="cx">                                 9340994A08540CAE007F3BC8 /* DumpRenderTree */,
</span><span class="cx">                                 A1158D7E18927E7A0088C17B /* DumpRenderTree.app */,
</span><span class="lines">@@ -911,6 +990,22 @@
</span><span class="cx">                 };
</span><span class="cx"> /* End PBXResourcesBuildPhase section */
</span><span class="cx"> 
</span><ins>+/* Begin PBXShellScriptBuildPhase section */
+                0F18E7011D6B9CC60027E547 /* ShellScript */ = {
+                        isa = PBXShellScriptBuildPhase;
+                        buildActionMask = 2147483647;
+                        files = (
+                        );
+                        inputPaths = (
+                        );
+                        outputPaths = (
+                        );
+                        runOnlyForDeploymentPostprocessing = 0;
+                        shellPath = /bin/sh;
+                        shellScript = &quot;mkdir -p \&quot;${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\&quot;\ncd \&quot;${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\&quot;\n\nexport DumpRenderTree=\&quot;${SRCROOT}\&quot;\nexport WebCoreScripts=\&quot;${WEBCORE_PRIVATE_HEADERS_DIR}\&quot;\n\nif [ ! $CC ]; then\n    export CC=\&quot;`xcrun -find clang`\&quot;\nfi\n\nif [ \&quot;${ACTION}\&quot; = \&quot;build\&quot; -o \&quot;${ACTION}\&quot; = \&quot;install\&quot; -o \&quot;${ACTION}\&quot; = \&quot;installhdrs\&quot; ]; then\n    make -f \&quot;${DumpRenderTree}/DerivedSources.make\&quot; -j `/usr/sbin/sysctl -n hw.activecpu`\nfi\n&quot;;
+                };
+/* End PBXShellScriptBuildPhase section */
+
</ins><span class="cx"> /* Begin PBXSourcesBuildPhase section */
</span><span class="cx">                 141BF21C096A441D00E0753C /* Sources */ = {
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="lines">@@ -917,7 +1012,6 @@
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><span class="cx">                                 1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */,
</span><del>-                                1A4CCD4F171375A300981040 /* ToStringAndValueOfObject.cpp in Sources */,
</del><span class="cx">                                 1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */,
</span><span class="cx">                                 1A215BE711F27658008AD0F5 /* DocumentOpenInDestroyStream.cpp in Sources */,
</span><span class="cx">                                 C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */,
</span><span class="lines">@@ -924,7 +1018,6 @@
</span><span class="cx">                                 51CACBD815D96FD000EB53A2 /* EvaluateJSWithinNPP_New.cpp in Sources */,
</span><span class="cx">                                 4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */,
</span><span class="cx">                                 1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */,
</span><del>-                                520206CF1A0ADA5900AD5154 /* SetMuted.cpp in Sources */,
</del><span class="cx">                                 1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */,
</span><span class="cx">                                 1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */,
</span><span class="cx">                                 1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */,
</span><span class="lines">@@ -945,9 +1038,11 @@
</span><span class="cx">                                 515F429C15C07872007C8F90 /* PluginScriptableObjectOverridesAllProperties.cpp in Sources */,
</span><span class="cx">                                 1A215A8111F2609C008AD0F5 /* PluginTest.cpp in Sources */,
</span><span class="cx">                                 1A1E4298141141C400388758 /* PrivateBrowsing.cpp in Sources */,
</span><ins>+                                520206CF1A0ADA5900AD5154 /* SetMuted.cpp in Sources */,
</ins><span class="cx">                                 5106803E15CC7B10001A8A23 /* SlowNPPNew.cpp in Sources */,
</span><span class="cx">                                 1A14C8A51406DE0400B254F7 /* SupportsCarbonEventModel.cpp in Sources */,
</span><span class="cx">                                 1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */,
</span><ins>+                                1A4CCD4F171375A300981040 /* ToStringAndValueOfObject.cpp in Sources */,
</ins><span class="cx">                                 00F048541A0C3C9A000244DB /* URLRedirect.cpp in Sources */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="lines">@@ -964,15 +1059,16 @@
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><ins>+                                A134E53618905EFF00901D06 /* AccessibilityCommonMac.mm in Sources */,
</ins><span class="cx">                                 BCD08B3A0E1057EF00A7D0C1 /* AccessibilityController.cpp in Sources */,
</span><span class="cx">                                 AA5A15EF16E15CD000F7C561 /* AccessibilityControllerIOS.mm in Sources */,
</span><span class="cx">                                 BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */,
</span><span class="cx">                                 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */,
</span><span class="cx">                                 29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */,
</span><ins>+                                A9BB7C5C1C505278002C525B /* AccessibilityTextMarkerIOS.mm in Sources */,
</ins><span class="cx">                                 29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */,
</span><span class="cx">                                 BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */,
</span><span class="cx">                                 AA5A15F016E15CD000F7C561 /* AccessibilityUIElementIOS.mm in Sources */,
</span><del>-                                A134E53618905EFF00901D06 /* AccessibilityCommonMac.mm in Sources */,
</del><span class="cx">                                 BC0E26150E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm in Sources */,
</span><span class="cx">                                 BCA18B390C9B021900114369 /* AppleScriptController.m in Sources */,
</span><span class="cx">                                 A8B91BFD0CF522B4008F91FF /* CheckedMalloc.cpp in Sources */,
</span><span class="lines">@@ -979,9 +1075,9 @@
</span><span class="cx">                                 53CBB832134E42F3001CE6A4 /* CyclicRedundancyCheck.cpp in Sources */,
</span><span class="cx">                                 1A2FB84F178C80930059FD96 /* DefaultPolicyDelegate.m in Sources */,
</span><span class="cx">                                 BCA18C470C9B5B9400114369 /* DumpRenderTree.mm in Sources */,
</span><ins>+                                A1158D581892740C0088C17B /* DumpRenderTreeBrowserView.mm in Sources */,
</ins><span class="cx">                                 9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */,
</span><span class="cx">                                 BCA18B7B0C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm in Sources */,
</span><del>-                                A9BB7C5C1C505278002C525B /* AccessibilityTextMarkerIOS.mm in Sources */,
</del><span class="cx">                                 A8D79CEB0FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m in Sources */,
</span><span class="cx">                                 A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */,
</span><span class="cx">                                 A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */,
</span><span class="lines">@@ -990,9 +1086,10 @@
</span><span class="cx">                                 BCA18B640C9B08C200114369 /* FrameLoadDelegate.mm in Sources */,
</span><span class="cx">                                 BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */,
</span><span class="cx">                                 BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */,
</span><del>-                                A1158D581892740C0088C17B /* DumpRenderTreeBrowserView.mm in Sources */,
</del><span class="cx">                                 5185F6B210714E07007AA393 /* HistoryDelegate.mm in Sources */,
</span><span class="cx">                                 2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */,
</span><ins>+                                0F18E7061D6BA0230027E547 /* JSUIScriptController.cpp in Sources */,
+                                0F18E7131D6BC43A0027E547 /* JSWrapper.cpp in Sources */,
</ins><span class="cx">                                 E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */,
</span><span class="cx">                                 31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */,
</span><span class="cx">                                 BCA18B720C9B08DB00114369 /* NavigationController.m in Sources */,
</span><span class="lines">@@ -999,9 +1096,9 @@
</span><span class="cx">                                 BCA18B320C9B01B400114369 /* ObjCController.m in Sources */,
</span><span class="cx">                                 BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */,
</span><span class="cx">                                 BCA18B800C9B08F100114369 /* ObjCPluginFunction.m in Sources */,
</span><del>-                                A1158D59189274360088C17B /* PixelDumpSupportIOS.mm in Sources */,
</del><span class="cx">                                 8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */,
</span><span class="cx">                                 BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */,
</span><ins>+                                A1158D59189274360088C17B /* PixelDumpSupportIOS.mm in Sources */,
</ins><span class="cx">                                 BCB284D60CFA83D1007E533E /* PixelDumpSupportMac.mm in Sources */,
</span><span class="cx">                                 BCA18B660C9B08C200114369 /* PolicyDelegate.mm in Sources */,
</span><span class="cx">                                 BCA18B680C9B08C200114369 /* ResourceLoadDelegate.mm in Sources */,
</span><span class="lines">@@ -1009,6 +1106,10 @@
</span><span class="cx">                                 BCA18B240C9B014B00114369 /* TestRunnerMac.mm in Sources */,
</span><span class="cx">                                 BCA18B490C9B02C400114369 /* TextInputController.m in Sources */,
</span><span class="cx">                                 BCA18B6A0C9B08C200114369 /* UIDelegate.mm in Sources */,
</span><ins>+                                0F18E6EC1D6B9C070027E547 /* UIScriptContext.cpp in Sources */,
+                                0F18E6ED1D6B9C070027E547 /* UIScriptController.cpp in Sources */,
+                                0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */,
+                                0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */,
</ins><span class="cx">                                 4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */,
</span><span class="cx">                                 440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,
</span><span class="cx">                                 BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */,
</span><span class="lines">@@ -1043,6 +1144,11 @@
</span><span class="cx"> /* End PBXSourcesBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXTargetDependency section */
</span><ins>+                0F18E7031D6B9CFE0027E547 /* PBXTargetDependency */ = {
+                        isa = PBXTargetDependency;
+                        target = 0F18E6F21D6B9CAE0027E547 /* Derived Sources */;
+                        targetProxy = 0F18E7021D6B9CFE0027E547 /* PBXContainerItemProxy */;
+                };
</ins><span class="cx">                 141BF238096A451E00E0753C /* PBXTargetDependency */ = {
</span><span class="cx">                         isa = PBXTargetDependency;
</span><span class="cx">                         target = 141BF21E096A441D00E0753C /* TestNetscapePlugIn */;
</span><span class="lines">@@ -1081,6 +1187,27 @@
</span><span class="cx"> /* End PBXTargetDependency section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin XCBuildConfiguration section */
</span><ins>+                0F18E6FE1D6B9CAE0027E547 /* Debug */ = {
+                        isa = XCBuildConfiguration;
+                        buildSettings = {
+                                PRODUCT_NAME = &quot;$(TARGET_NAME)&quot;;
+                        };
+                        name = Debug;
+                };
+                0F18E6FF1D6B9CAE0027E547 /* Release */ = {
+                        isa = XCBuildConfiguration;
+                        buildSettings = {
+                                PRODUCT_NAME = &quot;$(TARGET_NAME)&quot;;
+                        };
+                        name = Release;
+                };
+                0F18E7001D6B9CAE0027E547 /* Production */ = {
+                        isa = XCBuildConfiguration;
+                        buildSettings = {
+                                PRODUCT_NAME = &quot;$(TARGET_NAME)&quot;;
+                        };
+                        name = Production;
+                };
</ins><span class="cx">                 141BF222096A441E00E0753C /* Debug */ = {
</span><span class="cx">                         isa = XCBuildConfiguration;
</span><span class="cx">                         baseConfigurationReference = BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */;
</span><span class="lines">@@ -1295,6 +1422,16 @@
</span><span class="cx"> /* End XCBuildConfiguration section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin XCConfigurationList section */
</span><ins>+                0F18E6FD1D6B9CAE0027E547 /* Build configuration list for PBXAggregateTarget &quot;Derived Sources&quot; */ = {
+                        isa = XCConfigurationList;
+                        buildConfigurations = (
+                                0F18E6FE1D6B9CAE0027E547 /* Debug */,
+                                0F18E6FF1D6B9CAE0027E547 /* Release */,
+                                0F18E7001D6B9CAE0027E547 /* Production */,
+                        );
+                        defaultConfigurationIsVisible = 0;
+                        defaultConfigurationName = Production;
+                };
</ins><span class="cx">                 141BF221096A441E00E0753C /* Build configuration list for PBXNativeTarget &quot;TestNetscapePlugIn&quot; */ = {
</span><span class="cx">                         isa = XCConfigurationList;
</span><span class="cx">                         buildConfigurations = (
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -2004,6 +2004,20 @@
</span><span class="cx">     return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef runUIScriptCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    if (argumentCount &lt; 1)
+        return JSValueMakeUndefined(context);
+
+    JSRetainPtr&lt;JSStringRef&gt; script = argumentCount &gt; 0 ? JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, arguments[0], 0)) : JSRetainPtr&lt;JSStringRef&gt;();
+    JSValueRef callback = argumentCount &gt; 1 ? arguments[1] : JSValueMakeUndefined(context);
+
+    TestRunner* controller = static_cast&lt;TestRunner*&gt;(JSObjectGetPrivate(thisObject));
+    controller-&gt;runUIScript(context, script.get(), callback);
+
+    return JSValueMakeUndefined(context);
+}
+
</ins><span class="cx"> static void testRunnerObjectFinalize(JSObjectRef object)
</span><span class="cx"> {
</span><span class="cx">     TestRunner* controller = static_cast&lt;TestRunner*&gt;(JSObjectGetPrivate(object));
</span><span class="lines">@@ -2208,6 +2222,7 @@
</span><span class="cx">         { &quot;numberOfDFGCompiles&quot;, numberOfDFGCompiles, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;neverInlineFunction&quot;, neverInlineFunction, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;accummulateLogsForChannel&quot;, accummulateLogsForChannel, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;runUIScript&quot;, runUIScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { &quot;imageCountInGeneralPasteboard&quot;, imageCountInGeneralPasteboardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { 0, 0, 0 }
</span><span class="cx">     };
</span><span class="lines">@@ -2306,7 +2321,95 @@
</span><span class="cx">     WebCoreTestSupport::setLogChannelToAccumulate({ buffer.get() });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+typedef WTF::HashMap&lt;unsigned, JSValueRef&gt; CallbackMap;
+static CallbackMap&amp; callbackMap()
+{
+    static CallbackMap&amp; map = *new CallbackMap;
+    return map;
+}
+
+void TestRunner::cacheTestRunnerCallback(unsigned index, JSValueRef callback)
+{
+    if (!callback)
+        return;
+
+    if (callbackMap().contains(index)) {
+        fprintf(stderr, &quot;FAIL: Tried to install a second TestRunner callback for the same event (id %d)\n&quot;, index);
+        return;
+    }
+
+    JSContextRef context = mainFrameJSContext();
+    JSValueProtect(context, callback);
+    callbackMap().add(index, callback);
+}
+
+void TestRunner::callTestRunnerCallback(unsigned index, size_t argumentCount, const JSValueRef arguments[])
+{
+    if (!callbackMap().contains(index))
+        return;
+
+    JSContextRef context = mainFrameJSContext();
+    if (JSObjectRef callback = JSValueToObject(context, callbackMap().take(index), 0)) {
+        JSObjectCallAsFunction(context, callback, JSContextGetGlobalObject(context), argumentCount, arguments, 0);
+        JSValueUnprotect(context, callback);
+    }
+}
+
+void TestRunner::clearTestRunnerCallbacks()
+{
+    JSContextRef context = mainFrameJSContext();
+
+    for (auto&amp; iter : callbackMap()) {
+        if (JSObjectRef callback = JSValueToObject(context, iter.value, 0))
+            JSValueUnprotect(context, callback);
+    }
+
+    callbackMap().clear();
+}
+
+enum {
+    FirstUIScriptCallbackID = 100
+};
+
+static unsigned nextUIScriptCallbackID()
+{
+    static unsigned callbackID = FirstUIScriptCallbackID;
+    return callbackID++;
+}
+
+void TestRunner::runUIScript(JSContextRef context, JSStringRef script, JSValueRef callback)
+{
+    m_pendingUIScriptInvocationData = nullptr;
+
+    unsigned callbackID = nextUIScriptCallbackID();
+    cacheTestRunnerCallback(callbackID, callback);
+
+    if (!m_UIScriptContext)
+        m_UIScriptContext = std::make_unique&lt;WTR::UIScriptContext&gt;(*this);
+
+    String scriptString(JSStringGetCharactersPtr(script), JSStringGetLength(script));
+    m_UIScriptContext-&gt;runUIScript(scriptString, callbackID);
+}
+
+void TestRunner::callUIScriptCallback(unsigned callbackID, JSStringRef result)
+{
+    JSContextRef context = mainFrameJSContext();
+    JSValueRef resultValue = JSValueMakeString(context, result);
+    callTestRunnerCallback(callbackID, 1, &amp;resultValue);
+}
+
+void TestRunner::uiScriptDidComplete(const String&amp; result, unsigned callbackID)
+{
+    JSRetainPtr&lt;JSStringRef&gt; stringRef(Adopt, JSStringCreateWithCharacters(result.characters16(), result.length()));
+    callUIScriptCallback(callbackID, stringRef.get());
+}
+
</ins><span class="cx"> void TestRunner::setAllowsAnySSLCertificate(bool allowsAnySSLCertificate)
</span><span class="cx"> {
</span><span class="cx">     WebCoreTestSupport::setAllowsAnySSLCertificate(allowsAnySSLCertificate);
</span><span class="cx"> }
</span><ins>+
+void TestRunner::cleanup()
+{
+    clearTestRunnerCallbacks();
+}
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/TestRunner.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #ifndef TestRunner_h
</span><span class="cx"> #define TestRunner_h
</span><span class="cx"> 
</span><ins>+#include &quot;UIScriptContext.h&quot;
</ins><span class="cx"> #include &lt;JavaScriptCore/JSObjectRef.h&gt;
</span><span class="cx"> #include &lt;map&gt;
</span><span class="cx"> #include &lt;set&gt;
</span><span class="lines">@@ -37,7 +38,8 @@
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><del>-class TestRunner : public RefCounted&lt;TestRunner&gt; {
</del><ins>+class TestRunner : public WTR::UIScriptContextDelegate, public RefCounted&lt;TestRunner&gt; {
+    WTF_MAKE_NONCOPYABLE(TestRunner);
</ins><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;TestRunner&gt; create(const std::string&amp; testURL, const std::string&amp; expectedPixelHash);
</span><span class="cx"> 
</span><span class="lines">@@ -47,7 +49,9 @@
</span><span class="cx">     static const unsigned w3cSVGViewWidth;
</span><span class="cx">     static const unsigned w3cSVGViewHeight;
</span><span class="cx"> 
</span><del>-    ~TestRunner();
</del><ins>+    virtual ~TestRunner();
+    
+    void cleanup();
</ins><span class="cx"> 
</span><span class="cx">     void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
</span><span class="cx"> 
</span><span class="lines">@@ -139,6 +143,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setAccummulateLogsForChannel(JSStringRef);
</span><span class="cx"> 
</span><ins>+    void runUIScript(JSContextRef, JSStringRef, JSValueRef callback);
+
</ins><span class="cx">     // Legacy here refers to the old TestRunner API for handling web notifications, not the legacy web notification API.
</span><span class="cx">     void ignoreLegacyWebNotificationPermissionRequests();
</span><span class="cx">     // Legacy here refers to the old TestRunner API for handling web notifications, not the legacy web notification API.
</span><span class="lines">@@ -366,9 +372,20 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned imageCountInGeneralPasteboard() const;
</span><span class="cx">     
</span><ins>+    void callUIScriptCallback(unsigned callbackID, JSStringRef result);
+
</ins><span class="cx"> private:
</span><span class="cx">     TestRunner(const std::string&amp; testURL, const std::string&amp; expectedPixelHash);
</span><span class="cx"> 
</span><ins>+    JSContextRef mainFrameJSContext();
+
+    // UIScriptContextDelegate
+    void uiScriptDidComplete(const String&amp;, unsigned callbackID) override;
+    
+    void cacheTestRunnerCallback(unsigned index, JSValueRef);
+    void callTestRunnerCallback(unsigned index, size_t argumentCount = 0, const JSValueRef arguments[] = nullptr);
+    void clearTestRunnerCallbacks();
+
</ins><span class="cx">     void setGeolocationPermissionCommon(bool allow);
</span><span class="cx"> 
</span><span class="cx">     bool m_disallowIncreaseForApplicationCacheQuota;
</span><span class="lines">@@ -439,6 +456,14 @@
</span><span class="cx"> 
</span><span class="cx">     std::map&lt;std::string, std::string&gt; m_URLsToRedirect;
</span><span class="cx"> 
</span><ins>+    struct UIScriptInvocationData {
+        unsigned callbackID;
+        String scriptString;
+    };
+
+    std::unique_ptr&lt;WTR::UIScriptContext&gt; m_UIScriptContext;
+    UIScriptInvocationData* m_pendingUIScriptInvocationData { nullptr };
+
</ins><span class="cx">     static JSClassRef getJSClass();
</span><span class="cx">     static JSStaticValue* staticValues();
</span><span class="cx">     static JSStaticFunction* staticFunctions();
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm                                (rev 0)
+++ trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,156 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;UIScriptController.h&quot;
+
+#if PLATFORM(IOS)
+
+#import &quot;UIScriptContext.h&quot;
+
+namespace WTR {
+
+void UIScriptController::doAsyncTask(JSValueRef callback)
+{
+    unsigned callbackID = m_context-&gt;prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (!m_context)
+            return;
+        m_context-&gt;asyncTaskComplete(callbackID);
+    });
+}
+
+void UIScriptController::zoomToScale(double scale, JSValueRef callback)
+{
+}
+
+double UIScriptController::zoomScale() const
+{
+    return 1;
+}
+
+void UIScriptController::touchDownAtPoint(long x, long y, long touchCount, JSValueRef callback)
+{
+}
+
+void UIScriptController::liftUpAtPoint(long x, long y, long touchCount, JSValueRef callback)
+{
+}
+
+void UIScriptController::singleTapAtPoint(long x, long y, JSValueRef callback)
+{
+}
+
+void UIScriptController::doubleTapAtPoint(long x, long y, JSValueRef callback)
+{
+}
+
+void UIScriptController::dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback)
+{
+}
+
+void UIScriptController::typeCharacterUsingHardwareKeyboard(JSStringRef character, JSValueRef callback)
+{
+}
+
+void UIScriptController::keyDownUsingHardwareKeyboard(JSStringRef character, JSValueRef callback)
+{
+}
+
+void UIScriptController::keyUpUsingHardwareKeyboard(JSStringRef character, JSValueRef callback)
+{
+}
+
+void UIScriptController::dismissFormAccessoryView()
+{
+}
+
+void UIScriptController::selectFormAccessoryPickerRow(long rowIndex)
+{
+}
+
+void UIScriptController::scrollToOffset(long, long)
+{
+}
+
+void UIScriptController::keyboardAccessoryBarNext()
+{
+}
+
+void UIScriptController::keyboardAccessoryBarPrevious()
+{
+}
+
+double UIScriptController::minimumZoomScale() const
+{
+    return 1;
+}
+
+double UIScriptController::maximumZoomScale() const
+{
+    return 1;
+}
+
+JSObjectRef UIScriptController::contentVisibleRect() const
+{
+    return nullptr;
+}
+
+void UIScriptController::platformSetDidStartFormControlInteractionCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndFormControlInteractionCallback()
+{
+}
+
+void UIScriptController::platformSetWillBeginZoomingCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndZoomingCallback()
+{
+}
+
+void UIScriptController::platformSetDidShowKeyboardCallback()
+{
+}
+
+void UIScriptController::platformSetDidHideKeyboardCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndScrollingCallback()
+{
+}
+
+void UIScriptController::platformClearAllCallbacks()
+{
+}
+
+}
+
+#endif // PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreemacConfigurationsBasexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -87,6 +87,12 @@
</span><span class="cx"> 
</span><span class="cx"> SDKROOT = macosx.internal;
</span><span class="cx"> 
</span><ins>+WEBCORE_PRIVATE_HEADERS_DIR = $(WEBCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
+WEBCORE_PRIVATE_HEADERS_DIR_Release = $(WEBCORE_PRIVATE_HEADERS_DIR_engineering);
+WEBCORE_PRIVATE_HEADERS_DIR_Debug = $(WEBCORE_PRIVATE_HEADERS_DIR_engineering);
+WEBCORE_PRIVATE_HEADERS_DIR_Production = $(PRODUCTION_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
+WEBCORE_PRIVATE_HEADERS_DIR_engineering = $(BUILT_PRODUCTS_DIR)/WebCore.framework/PrivateHeaders;
+
</ins><span class="cx"> WEBKIT_SYSTEM_INTERFACE_LIBRARY = WebKitSystemInterface
</span><span class="cx"> 
</span><span class="cx"> SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx tvos tvsimulator watchos watchsimulator;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -2101,6 +2101,7 @@
</span><span class="cx">     ASSERT(CFArrayGetCount(openWindowsRef) == 1);
</span><span class="cx">     ASSERT(CFArrayGetValueAtIndex(openWindowsRef, 0) == [[mainFrame webView] window]);
</span><span class="cx"> 
</span><ins>+    gTestRunner-&gt;cleanup();
</ins><span class="cx">     gTestRunner = nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (ignoreWebCoreNodeLeaks)
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacTestRunnerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -132,6 +132,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSContextRef TestRunner::mainFrameJSContext()
+{
+    return [mainFrame globalContext];
+}
+
</ins><span class="cx"> void TestRunner::addDisallowedURL(JSStringRef url)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;CFStringRef&gt; urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacUIScriptControllerMacmmfromrev204876trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappableh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm (from rev 204876, trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm                                (rev 0)
+++ trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;UIScriptController.h&quot;
+
+#import &quot;UIScriptContext.h&quot;
+
+#if PLATFORM(MAC)
+
+namespace WTR {
+
+void UIScriptController::doAsyncTask(JSValueRef callback)
+{
+    unsigned callbackID = m_context-&gt;prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (!m_context)
+            return;
+        m_context-&gt;asyncTaskComplete(callbackID);
+    });
+}
+
+}
+
+#endif // PLATFORM(MAC)
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1197,6 +1197,7 @@
</span><span class="cx"> 
</span><span class="cx"> exit:
</span><span class="cx">     removeFontFallbackIfPresent(fallbackPath);
</span><ins>+    ::gTestRunner-&gt;cleanup();
</ins><span class="cx">     ::gTestRunner = nullptr;
</span><span class="cx"> 
</span><span class="cx">     fputs(&quot;#EOF\n&quot;, stderr);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -74,6 +74,15 @@
</span><span class="cx">         editingDelegate-&gt;setAcceptsEditing(TRUE);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSContextRef TestRunner::mainFrameJSContext()
+{
+    COMPtr&lt;IWebFramePrivate&gt; framePrivate(Query, frame);
+    if (!framePrivate)
+        return;
+
+    return framePrivate-&gt;globalContext();
+}
+
</ins><span class="cx"> void TestRunner::addDisallowedURL(JSStringRef url)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement!
</span></span></pre></div>
<a id="trunkToolsTestRunnerSharedBindingsJSWrappablehfromrev204876trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappableh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/Bindings/JSWrappable.h (from rev 204876, trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/Bindings/JSWrappable.h                                (rev 0)
+++ trunk/Tools/TestRunnerShared/Bindings/JSWrappable.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef JSWrappable_h
+#define JSWrappable_h
+
+#include &lt;JavaScriptCore/JavaScript.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WTR {
+
+class JSWrappable : public RefCounted&lt;JSWrappable&gt; {
+public:
+    virtual ~JSWrappable() { }
+    virtual JSClassRef wrapperClass() = 0;
+};
+
+inline JSValueRef JSValueMakeStringOrNull(JSContextRef context, JSStringRef stringOrNull)
+{
+    return stringOrNull ? JSValueMakeString(context, stringOrNull) : JSValueMakeNull(context);
+}
+
+} // namespace WTR
+
+#endif // JSWrappable_h
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedBindingsJSWrappercppfromrev204876trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappercpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/Bindings/JSWrapper.cpp (from rev 204876, trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/Bindings/JSWrapper.cpp                                (rev 0)
+++ trunk/Tools/TestRunnerShared/Bindings/JSWrapper.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * Copyright (C) 2010 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 &quot;config.h&quot;
+#include &quot;JSWrapper.h&quot;
+
+#include &lt;JavaScriptCore/JSContextRefPrivate.h&gt;
+
+namespace WTR {
+
+JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
+{
+    ASSERT_ARG(context, context);
+
+    if (!object)
+        return JSValueMakeNull(context);
+
+    JSClassRef objectClass = object-&gt;wrapperClass();
+    ASSERT(objectClass);
+    JSObjectRef wrapperObject = JSObjectMake(context, objectClass, object);
+    ASSERT(wrapperObject);
+
+    return wrapperObject;
+}
+
+JSWrappable* JSWrapper::unwrap(JSContextRef context, JSValueRef value)
+{
+    ASSERT_ARG(context, context);
+    ASSERT_ARG(value, value);
+    if (!context || !value)
+        return 0;
+    return static_cast&lt;JSWrappable*&gt;(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
+}
+
+static JSWrappable* unwrapObject(JSObjectRef object)
+{
+    JSWrappable* wrappable = static_cast&lt;JSWrappable*&gt;(JSObjectGetPrivate(object));
+    ASSERT(wrappable);
+    return wrappable;
+}
+
+void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
+{
+    JSWrappable* wrappable = unwrapObject(object);
+    if (!wrappable)
+        return;
+    wrappable-&gt;ref();
+}
+
+void JSWrapper::finalize(JSObjectRef object)
+{
+    JSWrappable* wrappable = unwrapObject(object);
+    if (!wrappable)
+        return;
+    wrappable-&gt;deref();
+}
+
+} // namespace WTR
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedBindingsJSWrapperhfromrev204876trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrapperh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/Bindings/JSWrapper.h (from rev 204876, trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/Bindings/JSWrapper.h                                (rev 0)
+++ trunk/Tools/TestRunnerShared/Bindings/JSWrapper.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef JSWrapper_h
+#define JSWrapper_h
+
+#include &quot;JSWrappable.h&quot;
+#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
+
+namespace WTR {
+
+// FIXME: If necessary, we can do wrapper caching here.
+class JSWrapper {
+public:
+    static JSValueRef wrap(JSContextRef, JSWrappable*);
+    static JSWrappable* unwrap(JSContextRef, JSValueRef);
+
+    static void initialize(JSContextRef, JSObjectRef);
+    static void finalize(JSObjectRef);
+};
+
+inline JSValueRef toJS(JSContextRef context, JSWrappable* impl)
+{
+    return JSWrapper::wrap(context, impl);
+}
+
+inline void setProperty(JSContextRef context, JSObjectRef object, const char* propertyName, JSWrappable* value, JSPropertyAttributes attributes, JSValueRef* exception)
+{
+    JSRetainPtr&lt;JSStringRef&gt; propertyNameString(Adopt, JSStringCreateWithUTF8CString(propertyName));
+    JSObjectSetProperty(context, object, propertyNameString.get(), JSWrapper::wrap(context, value), attributes, exception);
+}
+
+} // namespace WTR
+
+#endif // JSWrapper_h
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextBindingsUIScriptControlleridlfromrev204876trunkToolsWebKitTestRunnerUIScriptContextBindingsUIScriptControlleridl"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl (from rev 204876, trunk/Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl                                (rev 0)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+interface UIScriptController {
+
+    void doAsyncTask(object callback); // Used to test the harness.
+
+    void zoomToScale(double scale, object callback);
+
+    // Interaction.
+    // These functions post events asynchronously. The callback is fired when the events have been dispatched, but any
+    // resulting behavior may also be asynchronous.
+    void touchDownAtPoint(long x, long y, long touchCount, object callback);
+    void liftUpAtPoint(long x, long y, long touchCount, object callback);
+    void singleTapAtPoint(long x, long y, object callback);
+    void doubleTapAtPoint(long x, long y, object callback);
+    void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, object callback);
+
+    void typeCharacterUsingHardwareKeyboard(DOMString character, object callback);
+    void keyDownUsingHardwareKeyboard(DOMString character, object callback);
+    void keyUpUsingHardwareKeyboard(DOMString character, object callback);
+
+    // Equivalent of pressing the Done button in the form accessory bar.
+    void dismissFormAccessoryView();
+
+    // Form control handling
+    attribute object didStartFormControlInteractionCallback;
+    attribute object didEndFormControlInteractionCallback;
+
+    // &lt;select&gt; picker
+    void selectFormAccessoryPickerRow(long rowIndex);
+
+    void keyboardAccessoryBarNext();
+    void keyboardAccessoryBarPrevious();
+
+    // These callbacks also work for the form accessory views.
+    attribute object didShowKeyboardCallback;
+    attribute object didHideKeyboardCallback;
+
+    attribute object willBeginZoomingCallback;
+    attribute object didEndZoomingCallback;
+
+    void scrollToOffset(long x, long y); // Initiate an animated scroll in the UI process.
+    attribute object didEndScrollingCallback;
+
+    // View state
+    readonly attribute double zoomScale;
+    readonly attribute double minimumZoomScale;
+    readonly attribute double maximumZoomScale;
+
+    readonly attribute object contentVisibleRect; // Returned object has 'left', 'top', 'width', 'height' properties.
+
+    void uiScriptComplete(DOMString result);
+};
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptContextcppfromrev204876trunkToolsWebKitTestRunnerUIScriptContextUIScriptContextcpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp (from rev 204876, trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp                                (rev 0)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,200 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+#include &quot;UIScriptContext.h&quot;
+
+#include &quot;UIScriptController.h&quot;
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+#include &lt;JavaScriptCore/JSValueRef.h&gt;
+#include &lt;WebCore/FloatRect.h&gt;
+
+using namespace WTR;
+
+static inline bool isPersistentCallbackID(unsigned callbackID)
+{
+    return callbackID &lt; firstNonPersistentCallbackID;
+}
+
+UIScriptContext::UIScriptContext(UIScriptContextDelegate&amp; delegate)
+    : m_context(Adopt, JSGlobalContextCreate(nullptr))
+    , m_delegate(delegate)
+{
+    m_controller = UIScriptController::create(*this);
+
+    JSObjectRef globalObject = JSContextGetGlobalObject(m_context.get());
+
+    JSValueRef exception = nullptr;
+    m_controller-&gt;makeWindowObject(m_context.get(), globalObject, &amp;exception);
+}
+
+UIScriptContext::~UIScriptContext()
+{
+    m_controller-&gt;contextDestroyed();
+}
+
+void UIScriptContext::runUIScript(const String&amp; script, unsigned scriptCallbackID)
+{
+    m_currentScriptCallbackID = scriptCallbackID;
+
+    JSRetainPtr&lt;JSStringRef&gt; stringRef(Adopt, JSStringCreateWithUTF8CString(script.utf8().data()));
+
+    JSValueRef exception = nullptr;
+    JSValueRef result = JSEvaluateScript(m_context.get(), stringRef.get(), 0, 0, 1, &amp;exception);
+    
+    if (!hasOutstandingAsyncTasks()) {
+        JSValueRef stringifyException = nullptr;
+        requestUIScriptCompletion(JSValueToStringCopy(m_context.get(), result, &amp;stringifyException));
+        tryToCompleteUIScriptForCurrentParentCallback();
+    }
+}
+
+unsigned UIScriptContext::nextTaskCallbackID(CallbackType type)
+{
+    if (type == CallbackTypeNonPersistent)
+        return ++m_nextTaskCallbackID + firstNonPersistentCallbackID;
+
+    return type;
+}
+
+unsigned UIScriptContext::prepareForAsyncTask(JSValueRef callback, CallbackType type)
+{
+    unsigned callbackID = nextTaskCallbackID(type);
+    
+    JSValueProtect(m_context.get(), callback);
+    Task task;
+    task.parentScriptCallbackID = m_currentScriptCallbackID;
+    task.callback = callback;
+
+    ASSERT(!m_callbacks.contains(callbackID));
+    m_callbacks.add(callbackID, task);
+    
+    return callbackID;
+}
+
+void UIScriptContext::asyncTaskComplete(unsigned callbackID)
+{
+    Task task = m_callbacks.take(callbackID);
+    ASSERT(task.callback);
+
+    JSValueRef exception = nullptr;
+    JSObjectRef callbackObject = JSValueToObject(m_context.get(), task.callback, &amp;exception);
+
+    m_currentScriptCallbackID = task.parentScriptCallbackID;
+
+    exception = nullptr;
+    JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &amp;exception);
+    JSValueUnprotect(m_context.get(), task.callback);
+    
+    tryToCompleteUIScriptForCurrentParentCallback();
+    m_currentScriptCallbackID = 0;
+}
+
+unsigned UIScriptContext::registerCallback(JSValueRef taskCallback, CallbackType type)
+{
+    if (m_callbacks.contains(type))
+        unregisterCallback(type);
+
+    return prepareForAsyncTask(taskCallback, type);
+}
+
+void UIScriptContext::unregisterCallback(unsigned callbackID)
+{
+    Task task = m_callbacks.take(callbackID);
+    ASSERT(task.callback);
+    JSValueUnprotect(m_context.get(), task.callback);
+}
+
+JSValueRef UIScriptContext::callbackWithID(unsigned callbackID)
+{
+    Task task = m_callbacks.get(callbackID);
+    return task.callback;
+}
+
+void UIScriptContext::fireCallback(unsigned callbackID)
+{
+    Task task = m_callbacks.get(callbackID);
+    ASSERT(task.callback);
+
+    JSValueRef exception = nullptr;
+    JSObjectRef callbackObject = JSValueToObject(m_context.get(), task.callback, &amp;exception);
+
+    m_currentScriptCallbackID = task.parentScriptCallbackID;
+
+    exception = nullptr;
+    JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &amp;exception);
+    
+    tryToCompleteUIScriptForCurrentParentCallback();
+    m_currentScriptCallbackID = 0;
+}
+
+void UIScriptContext::requestUIScriptCompletion(JSStringRef result)
+{
+    ASSERT(m_currentScriptCallbackID);
+    if (currentParentCallbackIsPendingCompletion())
+        return;
+
+    // This request for the UI script to complete is not fulfilled until the last non-persistent task for the parent callback is finished.
+    m_uiScriptResultsPendingCompletion.add(m_currentScriptCallbackID, result ? JSStringRetain(result) : nullptr);
+}
+
+void UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback()
+{
+    if (!currentParentCallbackIsPendingCompletion() || currentParentCallbackHasOutstandingAsyncTasks())
+        return;
+
+    JSStringRef result = m_uiScriptResultsPendingCompletion.take(m_currentScriptCallbackID);
+    String scriptResult(JSStringGetCharactersPtr(result), JSStringGetLength(result));
+
+    m_delegate.uiScriptDidComplete(scriptResult, m_currentScriptCallbackID);
+    m_currentScriptCallbackID = 0;
+    if (result)
+        JSStringRelease(result);
+}
+
+JSObjectRef UIScriptContext::objectFromRect(const WebCore::FloatRect&amp; rect) const
+{
+    JSObjectRef object = JSObjectMake(m_context.get(), nullptr, nullptr);
+
+    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;left&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.x()), kJSPropertyAttributeNone, nullptr);
+    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;top&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.y()), kJSPropertyAttributeNone, nullptr);
+    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;width&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.width()), kJSPropertyAttributeNone, nullptr);
+    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;height&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.height()), kJSPropertyAttributeNone, nullptr);
+    
+    return object;
+}
+
+bool UIScriptContext::currentParentCallbackHasOutstandingAsyncTasks() const
+{
+    for (auto entry : m_callbacks) {
+        unsigned callbackID = entry.key;
+        Task task = entry.value;
+        if (task.parentScriptCallbackID == m_currentScriptCallbackID &amp;&amp; !isPersistentCallbackID(callbackID))
+            return true;
+    }
+
+    return false;
+}
+
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptContexthfromrev204876trunkToolsWebKitTestRunnerUIScriptContextUIScriptContexth"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h (from rev 204876, trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h                                (rev 0)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+/*
+ * Copyright (C) 2015 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
+
+#ifndef UIScriptContext_h
+#define UIScriptContext_h
+
+#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+class FloatRect;
+}
+
+namespace WTR {
+
+class UIScriptController;
+
+class UIScriptContextDelegate {
+public:
+    virtual void uiScriptDidComplete(const String&amp; result, unsigned callbackID) = 0;
+};
+
+const unsigned firstNonPersistentCallbackID = 1000;
+
+typedef enum  {
+    CallbackTypeWillBeginZooming = 0,
+    CallbackTypeDidEndZooming,
+    CallbackTypeDidShowKeyboard,
+    CallbackTypeDidHideKeyboard,
+    CallbackTypeDidEndScrolling,
+    CallbackTypeDidStartFormControlInteraction,
+    CallbackTypeDidEndFormControlInteraction,
+    CallbackTypeNonPersistent = firstNonPersistentCallbackID
+} CallbackType;
+
+class UIScriptContext {
+    WTF_MAKE_NONCOPYABLE(UIScriptContext);
+public:
+    UIScriptContext(UIScriptContextDelegate&amp;);
+    ~UIScriptContext();
+
+    void runUIScript(const String&amp; script, unsigned scriptCallbackID);
+    void requestUIScriptCompletion(JSStringRef);
+
+    // For one-shot tasks callbacks.
+    unsigned prepareForAsyncTask(JSValueRef taskCallback, CallbackType);
+    void asyncTaskComplete(unsigned taskCallbackID);
+
+    // For persistent callbacks.
+    unsigned registerCallback(JSValueRef taskCallback, CallbackType);
+    JSValueRef callbackWithID(unsigned callbackID);
+    void unregisterCallback(unsigned callbackID);
+    void fireCallback(unsigned callbackID);
+
+    unsigned nextTaskCallbackID(CallbackType);
+
+    JSObjectRef objectFromRect(const WebCore::FloatRect&amp;) const;
+
+private:
+    JSRetainPtr&lt;JSGlobalContextRef&gt; m_context;
+    
+    bool hasOutstandingAsyncTasks() const { return !m_callbacks.isEmpty(); }
+    bool currentParentCallbackIsPendingCompletion() const { return m_uiScriptResultsPendingCompletion.contains(m_currentScriptCallbackID); }
+    bool currentParentCallbackHasOutstandingAsyncTasks() const;
+    void tryToCompleteUIScriptForCurrentParentCallback();
+    
+    struct Task {
+        unsigned parentScriptCallbackID { 0 };
+        JSValueRef callback { nullptr };
+    };
+    HashMap&lt;unsigned, Task&gt; m_callbacks;
+    HashMap&lt;unsigned, JSStringRef&gt; m_uiScriptResultsPendingCompletion;
+
+    UIScriptContextDelegate&amp; m_delegate;
+    RefPtr&lt;UIScriptController&gt; m_controller;
+    
+    unsigned m_currentScriptCallbackID { 0 };
+    unsigned m_nextTaskCallbackID { 0 };
+};
+
+}
+
+#endif // UIScriptContext_h
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptControllercppfromrev204876trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllercpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp (from rev 204876, trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp                                (rev 0)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,254 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+#include &quot;UIScriptController.h&quot;
+
+#include &quot;JSUIScriptController.h&quot;
+#include &quot;UIScriptContext.h&quot;
+#include &lt;JavaScriptCore/JSValueRef.h&gt;
+
+namespace WTR {
+
+UIScriptController::UIScriptController(UIScriptContext&amp; context)
+    : m_context(&amp;context)
+{
+}
+
+void UIScriptController::contextDestroyed()
+{
+    m_context = nullptr;
+}
+
+void UIScriptController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+{
+    setProperty(context, windowObject, &quot;uiController&quot;, this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
+}
+
+JSClassRef UIScriptController::wrapperClass()
+{
+    return JSUIScriptController::uIScriptControllerClass();
+}
+
+#if !PLATFORM(COCOA)
+void UIScriptController::doAsyncTask(JSValueRef)
+{
+}
+#endif
+
+void UIScriptController::setDidStartFormControlInteractionCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidStartFormControlInteraction);
+    platformSetDidStartFormControlInteractionCallback();
+}
+
+JSValueRef UIScriptController::didStartFormControlInteractionCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidStartFormControlInteraction);
+}
+
+void UIScriptController::setDidEndFormControlInteractionCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidEndFormControlInteraction);
+    platformSetDidEndFormControlInteractionCallback();
+}
+
+JSValueRef UIScriptController::didEndFormControlInteractionCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidEndFormControlInteraction);
+}
+
+void UIScriptController::setWillBeginZoomingCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeWillBeginZooming);
+    platformSetWillBeginZoomingCallback();
+}
+
+JSValueRef UIScriptController::willBeginZoomingCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeWillBeginZooming);
+}
+
+void UIScriptController::setDidEndZoomingCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidEndZooming);
+    platformSetDidEndZoomingCallback();
+}
+
+JSValueRef UIScriptController::didEndZoomingCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidEndZooming);
+}
+
+void UIScriptController::setDidEndScrollingCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidEndScrolling);
+    platformSetDidEndScrollingCallback();
+}
+
+JSValueRef UIScriptController::didEndScrollingCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidEndScrolling);
+}
+
+void UIScriptController::setDidShowKeyboardCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidShowKeyboard);
+    platformSetDidShowKeyboardCallback();
+}
+
+JSValueRef UIScriptController::didShowKeyboardCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidShowKeyboard);
+}
+
+void UIScriptController::setDidHideKeyboardCallback(JSValueRef callback)
+{
+    m_context-&gt;registerCallback(callback, CallbackTypeDidHideKeyboard);
+    platformSetDidHideKeyboardCallback();
+}
+
+JSValueRef UIScriptController::didHideKeyboardCallback() const
+{
+    return m_context-&gt;callbackWithID(CallbackTypeDidHideKeyboard);
+}
+
+#if !PLATFORM(IOS)
+void UIScriptController::zoomToScale(double, JSValueRef)
+{
+}
+
+void UIScriptController::touchDownAtPoint(long x, long y, long touchCount, JSValueRef)
+{
+}
+
+void UIScriptController::liftUpAtPoint(long x, long y, long touchCount, JSValueRef)
+{
+}
+
+void UIScriptController::singleTapAtPoint(long x, long y, JSValueRef)
+{
+}
+
+void UIScriptController::doubleTapAtPoint(long x, long y, JSValueRef)
+{
+}
+
+void UIScriptController::dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback)
+{
+}
+
+void UIScriptController::typeCharacterUsingHardwareKeyboard(JSStringRef, JSValueRef)
+{
+}
+
+void UIScriptController::keyUpUsingHardwareKeyboard(JSStringRef, JSValueRef)
+{
+}
+
+void UIScriptController::keyDownUsingHardwareKeyboard(JSStringRef, JSValueRef)
+{
+}
+
+void UIScriptController::dismissFormAccessoryView()
+{
+}
+
+void UIScriptController::selectFormAccessoryPickerRow(long)
+{
+}
+
+void UIScriptController::scrollToOffset(long x, long y)
+{
+}
+
+void UIScriptController::keyboardAccessoryBarNext()
+{
+}
+
+void UIScriptController::keyboardAccessoryBarPrevious()
+{
+}
+
+double UIScriptController::zoomScale() const
+{
+    return 1;
+}
+
+double UIScriptController::minimumZoomScale() const
+{
+    return 1;
+}
+
+double UIScriptController::maximumZoomScale() const
+{
+    return 1;
+}
+
+JSObjectRef UIScriptController::contentVisibleRect() const
+{
+    return nullptr;
+}
+
+void UIScriptController::platformSetDidStartFormControlInteractionCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndFormControlInteractionCallback()
+{
+}
+
+void UIScriptController::platformSetWillBeginZoomingCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndZoomingCallback()
+{
+}
+
+void UIScriptController::platformSetDidEndScrollingCallback()
+{
+}
+
+void UIScriptController::platformSetDidShowKeyboardCallback()
+{
+}
+
+void UIScriptController::platformSetDidHideKeyboardCallback()
+{
+}
+
+void UIScriptController::platformClearAllCallbacks()
+{
+}
+#endif
+
+void UIScriptController::uiScriptComplete(JSStringRef result)
+{
+    m_context-&gt;requestUIScriptCompletion(result);
+    platformClearAllCallbacks();
+}
+
+}
</ins></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptControllerhfromrev204876trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllerh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h (from rev 204876, trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h) (0 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h                                (rev 0)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef UIScriptController_h
+#define UIScriptController_h
+
+#include &quot;JSWrappable.h&quot;
+#include &lt;wtf/Ref.h&gt;
+
+namespace WebCore {
+class FloatRect;
+}
+
+namespace WTR {
+
+class UIScriptContext;
+
+class UIScriptController : public JSWrappable {
+public:
+    static Ref&lt;UIScriptController&gt; create(UIScriptContext&amp; context)
+    {
+        return adoptRef(*new UIScriptController(context));
+    }
+
+    void contextDestroyed();
+
+    void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
+    
+    void doAsyncTask(JSValueRef callback);
+    void zoomToScale(double scale, JSValueRef callback);
+
+    void touchDownAtPoint(long x, long y, long touchCount, JSValueRef callback);
+    void liftUpAtPoint(long x, long y, long touchCount, JSValueRef callback);
+    void singleTapAtPoint(long x, long y, JSValueRef callback);
+    void doubleTapAtPoint(long x, long y, JSValueRef callback);
+    void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback);
+    
+    void typeCharacterUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
+    void keyDownUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
+    void keyUpUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
+
+    void keyboardAccessoryBarNext();
+    void keyboardAccessoryBarPrevious();
+    
+    void dismissFormAccessoryView();
+    void selectFormAccessoryPickerRow(long);
+    
+    void scrollToOffset(long x, long y);
+
+    void setDidStartFormControlInteractionCallback(JSValueRef);
+    JSValueRef didStartFormControlInteractionCallback() const;
+
+    void setDidEndFormControlInteractionCallback(JSValueRef);
+    JSValueRef didEndFormControlInteractionCallback() const;
+
+    void setWillBeginZoomingCallback(JSValueRef);
+    JSValueRef willBeginZoomingCallback() const;
+
+    void setDidEndZoomingCallback(JSValueRef);
+    JSValueRef didEndZoomingCallback() const;
+
+    void setDidShowKeyboardCallback(JSValueRef);
+    JSValueRef didShowKeyboardCallback() const;
+
+    void setDidHideKeyboardCallback(JSValueRef);
+    JSValueRef didHideKeyboardCallback() const;
+
+    void setDidEndScrollingCallback(JSValueRef);
+    JSValueRef didEndScrollingCallback() const;
+
+    double zoomScale() const;
+    double minimumZoomScale() const;
+    double maximumZoomScale() const;
+
+    JSObjectRef contentVisibleRect() const;
+    
+    void uiScriptComplete(JSStringRef result);
+
+private:
+    UIScriptController(UIScriptContext&amp;);
+
+    void platformSetDidStartFormControlInteractionCallback();
+    void platformSetDidEndFormControlInteractionCallback();
+    void platformSetWillBeginZoomingCallback();
+    void platformSetDidEndZoomingCallback();
+    void platformSetDidShowKeyboardCallback();
+    void platformSetDidHideKeyboardCallback();
+    void platformSetDidEndScrollingCallback();
+    void platformClearAllCallbacks();
+
+    JSClassRef wrapperClass() final;
+
+    JSObjectRef objectFromRect(const WebCore::FloatRect&amp;) const;
+
+    UIScriptContext* m_context;
+};
+
+}
+
+#endif // UIScriptController_h
</ins></span></pre></div>
<a id="trunkToolsWebKitTestRunnerCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/CMakeLists.txt        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,6 +1,8 @@
</span><span class="cx"> set(WEBKIT_TESTRUNNER_DIR &quot;${TOOLS_DIR}/WebKitTestRunner&quot;)
</span><span class="cx"> set(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR &quot;${TOOLS_DIR}/WebKitTestRunner/InjectedBundle&quot;)
</span><del>-set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR &quot;${TOOLS_DIR}/WebKitTestRunner/UIScriptContext&quot;)
</del><ins>+set(WEBKIT_TESTRUNNER_SHARED_DIR &quot;${TOOLS_DIR}/TestRunnerShared/&quot;)
+set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR &quot;${WEBKIT_TESTRUNNER_SHARED_DIR}/UIScriptContext&quot;)
+set(WEBKIT_TESTRUNNER_BINDINGS_DIR &quot;${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings&quot;)
</ins><span class="cx"> 
</span><span class="cx"> file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
</span><span class="cx"> file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/UIScriptContext)
</span><span class="lines">@@ -17,8 +19,7 @@
</span><span class="cx">     ${WEBKIT_TESTRUNNER_DIR}/WorkQueueManager.cpp
</span><span class="cx">     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptContext.cpp
</span><span class="cx">     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptController.cpp
</span><del>-
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/JSWrapper.cpp
</del><ins>+    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(WebKitTestRunner_LIBRARIES
</span><span class="lines">@@ -33,7 +34,7 @@
</span><span class="cx">     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
</span><span class="cx">     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/atk
</span><span class="cx">     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}
</span><del>-    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings
</del><ins>+    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}
</ins><span class="cx">     ${JAVASCRIPTCORE_DIR}
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</span><span class="lines">@@ -78,7 +79,7 @@
</span><span class="cx">     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TestRunner.cpp
</span><span class="cx">     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TextInputController.cpp
</span><span class="cx"> 
</span><del>-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/JSWrapper.cpp
</del><ins>+    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(WebKitTestRunnerInjectedBundle_IDL_FILES
</span><span class="lines">@@ -93,7 +94,7 @@
</span><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(WebKitTestRunner_IDL_FILES
</span><del>-    &quot;${WEBKIT_TESTRUNNER_DIR}/UIScriptContext/Bindings/UIScriptController.idl&quot;
</del><ins>+    &quot;${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl&quot;
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/DerivedSources.make (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/DerivedSources.make        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/DerivedSources.make        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> 
</span><span class="cx"> VPATH = \
</span><span class="cx">     $(WebKitTestRunner)/InjectedBundle/Bindings \
</span><del>-    $(WebKitTestRunner)/UIScriptContext/Bindings \
</del><ins>+    $(WebKitTestRunner)/../TestRunnerShared/UIScriptContext/Bindings \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><span class="cx"> INJECTED_BUNDLE_INTERFACES = \
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappableh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef JSWrappable_h
-#define JSWrappable_h
-
-#include &lt;JavaScriptCore/JavaScript.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace WTR {
-
-class JSWrappable : public RefCounted&lt;JSWrappable&gt; {
-public:
-    virtual ~JSWrappable() { }
-    virtual JSClassRef wrapperClass() = 0;
-};
-
-inline JSValueRef JSValueMakeStringOrNull(JSContextRef context, JSStringRef stringOrNull)
-{
-    return stringOrNull ? JSValueMakeString(context, stringOrNull) : JSValueMakeNull(context);
-}
-
-} // namespace WTR
-
-#endif // JSWrappable_h
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrappercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,80 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 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 &quot;config.h&quot;
-#include &quot;JSWrapper.h&quot;
-
-#include &lt;JavaScriptCore/JSContextRefPrivate.h&gt;
-
-namespace WTR {
-
-JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
-{
-    ASSERT_ARG(context, context);
-
-    if (!object)
-        return JSValueMakeNull(context);
-
-    JSClassRef objectClass = object-&gt;wrapperClass();
-    ASSERT(objectClass);
-    JSObjectRef wrapperObject = JSObjectMake(context, objectClass, object);
-    ASSERT(wrapperObject);
-
-    return wrapperObject;
-}
-
-JSWrappable* JSWrapper::unwrap(JSContextRef context, JSValueRef value)
-{
-    ASSERT_ARG(context, context);
-    ASSERT_ARG(value, value);
-    if (!context || !value)
-        return 0;
-    return static_cast&lt;JSWrappable*&gt;(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
-}
-
-static JSWrappable* unwrapObject(JSObjectRef object)
-{
-    JSWrappable* wrappable = static_cast&lt;JSWrappable*&gt;(JSObjectGetPrivate(object));
-    ASSERT(wrappable);
-    return wrappable;
-}
-
-void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
-{
-    JSWrappable* wrappable = unwrapObject(object);
-    if (!wrappable)
-        return;
-    wrappable-&gt;ref();
-}
-
-void JSWrapper::finalize(JSObjectRef object)
-{
-    JSWrappable* wrappable = unwrapObject(object);
-    if (!wrappable)
-        return;
-    wrappable-&gt;deref();
-}
-
-} // namespace WTR
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsJSWrapperh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef JSWrapper_h
-#define JSWrapper_h
-
-#include &quot;JSWrappable.h&quot;
-#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
-
-namespace WTR {
-
-// FIXME: If necessary, we can do wrapper caching here.
-class JSWrapper {
-public:
-    static JSValueRef wrap(JSContextRef context, JSWrappable* object);
-    static JSWrappable* unwrap(JSContextRef context, JSValueRef value);
-
-    static void initialize(JSContextRef, JSObjectRef);
-    static void finalize(JSObjectRef);
-};
-
-inline JSValueRef toJS(JSContextRef context, JSWrappable* impl)
-{
-    return JSWrapper::wrap(context, impl);
-}
-
-inline void setProperty(JSContextRef context, JSObjectRef object, const char* propertyName, JSWrappable* value, JSPropertyAttributes attributes, JSValueRef* exception)
-{
-    JSRetainPtr&lt;JSStringRef&gt; propertyNameString(Adopt, JSStringCreateWithUTF8CString(propertyName));
-    JSObjectSetProperty(context, object, propertyNameString.get(), JSWrapper::wrap(context, value), attributes, exception);
-}
-
-} // namespace WTR
-
-#endif // JSWrapper_h
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -846,10 +846,10 @@
</span><span class="cx">     if (!m_UIScriptContext)
</span><span class="cx">         m_UIScriptContext = std::make_unique&lt;UIScriptContext&gt;(*this);
</span><span class="cx">     
</span><del>-    m_UIScriptContext-&gt;runUIScript(script, scriptCallbackID);
</del><ins>+    m_UIScriptContext-&gt;runUIScript(toWTFString(script), scriptCallbackID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestInvocation::uiScriptDidComplete(WKStringRef result, unsigned scriptCallbackID)
</del><ins>+void TestInvocation::uiScriptDidComplete(const String&amp; result, unsigned scriptCallbackID)
</ins><span class="cx"> {
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; messageName = adoptWK(WKStringCreateWithUTF8CString(&quot;CallUISideScriptCallback&quot;));
</span><span class="cx"> 
</span><span class="lines">@@ -858,7 +858,7 @@
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; callbackIDKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;CallbackID&quot;));
</span><span class="cx">     WKRetainPtr&lt;WKUInt64Ref&gt; callbackIDValue = adoptWK(WKUInt64Create(scriptCallbackID));
</span><span class="cx"> 
</span><del>-    WKDictionarySetItem(messageBody.get(), resultKey.get(), result);
</del><ins>+    WKDictionarySetItem(messageBody.get(), resultKey.get(), toWK(result).get());
</ins><span class="cx">     WKDictionarySetItem(messageBody.get(), callbackIDKey.get(), callbackIDValue.get());
</span><span class="cx"> 
</span><span class="cx">     WKPagePostMessageToInjectedBundle(TestController::singleton().mainWebView()-&gt;page(), messageName.get(), messageBody.get());
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx">     void runUISideScript(WKStringRef, unsigned callbackID);
</span><span class="cx">     // UIScriptContextDelegate
</span><del>-    void uiScriptDidComplete(WKStringRef result, unsigned callbackID) override;
</del><ins>+    void uiScriptDidComplete(const String&amp; result, unsigned callbackID) override;
</ins><span class="cx"> 
</span><span class="cx">     const TestOptions m_options;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerUIScriptContextBindingsUIScriptControlleridl"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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.
- */
-
-interface UIScriptController {
-
-    void doAsyncTask(object callback); // Used to test the harness.
-
-    void zoomToScale(double scale, object callback);
-
-    // Interaction.
-    // These functions post events asynchronously. The callback is fired when the events have been dispatched, but any
-    // resulting behavior may also be asynchronous.
-    void touchDownAtPoint(long x, long y, long touchCount, object callback);
-    void liftUpAtPoint(long x, long y, long touchCount, object callback);
-    void singleTapAtPoint(long x, long y, object callback);
-    void doubleTapAtPoint(long x, long y, object callback);
-    void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, object callback);
-
-    void typeCharacterUsingHardwareKeyboard(DOMString character, object callback);
-    void keyDownUsingHardwareKeyboard(DOMString character, object callback);
-    void keyUpUsingHardwareKeyboard(DOMString character, object callback);
-
-    // Equivalent of pressing the Done button in the form accessory bar.
-    void dismissFormAccessoryView();
-
-    // Form control handling
-    attribute object didStartFormControlInteractionCallback;
-    attribute object didEndFormControlInteractionCallback;
-
-    // &lt;select&gt; picker
-    void selectFormAccessoryPickerRow(long rowIndex);
-
-    void keyboardAccessoryBarNext();
-    void keyboardAccessoryBarPrevious();
-
-    // These callbacks also work for the form accessory views.
-    attribute object didShowKeyboardCallback;
-    attribute object didHideKeyboardCallback;
-
-    attribute object willBeginZoomingCallback;
-    attribute object didEndZoomingCallback;
-
-    void scrollToOffset(long x, long y); // Initiate an animated scroll in the UI process.
-    attribute object didEndScrollingCallback;
-
-    // View state
-    readonly attribute double zoomScale;
-    readonly attribute double minimumZoomScale;
-    readonly attribute double maximumZoomScale;
-
-    readonly attribute object contentVisibleRect; // Returned object has 'left', 'top', 'width', 'height' properties.
-
-    void uiScriptComplete(DOMString result);
-};
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerUIScriptContextUIScriptContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,202 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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 &quot;config.h&quot;
-#include &quot;UIScriptContext.h&quot;
-
-#include &quot;StringFunctions.h&quot;
-#include &quot;UIScriptController.h&quot;
-#include &lt;JavaScriptCore/JSContextRef.h&gt;
-#include &lt;JavaScriptCore/JSValueRef.h&gt;
-#include &lt;WebKit/WKRetainPtr.h&gt;
-#include &lt;WebKit/WKString.h&gt;
-#include &lt;WebKit/WKStringPrivate.h&gt;
-
-using namespace WTR;
-
-static inline bool isPersistentCallbackID(unsigned callbackID)
-{
-    return callbackID &lt; firstNonPersistentCallbackID;
-}
-
-UIScriptContext::UIScriptContext(UIScriptContextDelegate&amp; delegate)
-    : m_context(Adopt, JSGlobalContextCreate(nullptr))
-    , m_delegate(delegate)
-{
-    m_controller = UIScriptController::create(*this);
-
-    JSObjectRef globalObject = JSContextGetGlobalObject(m_context.get());
-
-    JSValueRef exception = nullptr;
-    m_controller-&gt;makeWindowObject(m_context.get(), globalObject, &amp;exception);
-}
-
-UIScriptContext::~UIScriptContext()
-{
-    m_controller-&gt;contextDestroyed();
-}
-
-void UIScriptContext::runUIScript(WKStringRef script, unsigned scriptCallbackID)
-{
-    m_currentScriptCallbackID = scriptCallbackID;
-
-    auto scriptRef = toJS(script);
-    
-    JSValueRef exception = nullptr;
-    JSValueRef result = JSEvaluateScript(m_context.get(), scriptRef.get(), 0, 0, 1, &amp;exception);
-    
-    if (!hasOutstandingAsyncTasks()) {
-        JSValueRef stringifyException = nullptr;
-        requestUIScriptCompletion(JSValueToStringCopy(m_context.get(), result, &amp;stringifyException));
-        tryToCompleteUIScriptForCurrentParentCallback();
-    }
-}
-
-unsigned UIScriptContext::nextTaskCallbackID(CallbackType type)
-{
-    if (type == CallbackTypeNonPersistent)
-        return ++m_nextTaskCallbackID + firstNonPersistentCallbackID;
-
-    return type;
-}
-
-unsigned UIScriptContext::prepareForAsyncTask(JSValueRef callback, CallbackType type)
-{
-    unsigned callbackID = nextTaskCallbackID(type);
-    
-    JSValueProtect(m_context.get(), callback);
-    Task task;
-    task.parentScriptCallbackID = m_currentScriptCallbackID;
-    task.callback = callback;
-
-    ASSERT(!m_callbacks.contains(callbackID));
-    m_callbacks.add(callbackID, task);
-    
-    return callbackID;
-}
-
-void UIScriptContext::asyncTaskComplete(unsigned callbackID)
-{
-    Task task = m_callbacks.take(callbackID);
-    ASSERT(task.callback);
-
-    JSValueRef exception = nullptr;
-    JSObjectRef callbackObject = JSValueToObject(m_context.get(), task.callback, &amp;exception);
-
-    m_currentScriptCallbackID = task.parentScriptCallbackID;
-
-    exception = nullptr;
-    JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &amp;exception);
-    JSValueUnprotect(m_context.get(), task.callback);
-    
-    tryToCompleteUIScriptForCurrentParentCallback();
-    m_currentScriptCallbackID = 0;
-}
-
-unsigned UIScriptContext::registerCallback(JSValueRef taskCallback, CallbackType type)
-{
-    if (m_callbacks.contains(type))
-        unregisterCallback(type);
-
-    return prepareForAsyncTask(taskCallback, type);
-}
-
-void UIScriptContext::unregisterCallback(unsigned callbackID)
-{
-    Task task = m_callbacks.take(callbackID);
-    ASSERT(task.callback);
-    JSValueUnprotect(m_context.get(), task.callback);
-}
-
-JSValueRef UIScriptContext::callbackWithID(unsigned callbackID)
-{
-    Task task = m_callbacks.get(callbackID);
-    return task.callback;
-}
-
-void UIScriptContext::fireCallback(unsigned callbackID)
-{
-    Task task = m_callbacks.get(callbackID);
-    ASSERT(task.callback);
-
-    JSValueRef exception = nullptr;
-    JSObjectRef callbackObject = JSValueToObject(m_context.get(), task.callback, &amp;exception);
-
-    m_currentScriptCallbackID = task.parentScriptCallbackID;
-
-    exception = nullptr;
-    JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &amp;exception);
-    
-    tryToCompleteUIScriptForCurrentParentCallback();
-    m_currentScriptCallbackID = 0;
-}
-
-void UIScriptContext::requestUIScriptCompletion(JSStringRef result)
-{
-    ASSERT(m_currentScriptCallbackID);
-    if (currentParentCallbackIsPendingCompletion())
-        return;
-
-    // This request for the UI script to complete is not fulfilled until the last non-persistent task for the parent callback is finished.
-    m_uiScriptResultsPendingCompletion.add(m_currentScriptCallbackID, result ? JSStringRetain(result) : nullptr);
-}
-
-void UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback()
-{
-    if (!currentParentCallbackIsPendingCompletion() || currentParentCallbackHasOutstandingAsyncTasks())
-        return;
-
-    JSStringRef result = m_uiScriptResultsPendingCompletion.take(m_currentScriptCallbackID);
-    WKRetainPtr&lt;WKStringRef&gt; uiScriptResult = adoptWK(WKStringCreateWithJSString(result));
-    m_delegate.uiScriptDidComplete(uiScriptResult.get(), m_currentScriptCallbackID);
-    m_currentScriptCallbackID = 0;
-    if (result)
-        JSStringRelease(result);
-}
-
-JSObjectRef UIScriptContext::objectFromRect(const WKRect&amp; rect) const
-{
-    JSObjectRef object = JSObjectMake(m_context.get(), nullptr, nullptr);
-
-    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;left&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.origin.x), kJSPropertyAttributeNone, nullptr);
-    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;top&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.origin.y), kJSPropertyAttributeNone, nullptr);
-    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;width&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.size.width), kJSPropertyAttributeNone, nullptr);
-    JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString(&quot;height&quot;)).get(), JSValueMakeNumber(m_context.get(), rect.size.height), kJSPropertyAttributeNone, nullptr);
-    
-    return object;
-}
-
-bool UIScriptContext::currentParentCallbackHasOutstandingAsyncTasks() const
-{
-    for (auto entry : m_callbacks) {
-        unsigned callbackID = entry.key;
-        Task task = entry.value;
-        if (task.parentScriptCallbackID == m_currentScriptCallbackID &amp;&amp; !isPersistentCallbackID(callbackID))
-            return true;
-    }
-
-    return false;
-}
-
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerUIScriptContextUIScriptContexth"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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.
- */
-
-#ifndef UIScriptContext_h
-#define UIScriptContext_h
-
-#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WTR {
-
-class UIScriptController;
-
-class UIScriptContextDelegate {
-public:
-    virtual void uiScriptDidComplete(WKStringRef result, unsigned callbackID) = 0;
-};
-
-const unsigned firstNonPersistentCallbackID = 1000;
-
-typedef enum  {
-    CallbackTypeWillBeginZooming = 0,
-    CallbackTypeDidEndZooming,
-    CallbackTypeDidShowKeyboard,
-    CallbackTypeDidHideKeyboard,
-    CallbackTypeDidEndScrolling,
-    CallbackTypeDidStartFormControlInteraction,
-    CallbackTypeDidEndFormControlInteraction,
-    CallbackTypeNonPersistent = firstNonPersistentCallbackID
-} CallbackType;
-
-class UIScriptContext {
-    WTF_MAKE_NONCOPYABLE(UIScriptContext);
-public:
-    UIScriptContext(UIScriptContextDelegate&amp;);
-    ~UIScriptContext();
-
-    void runUIScript(WKStringRef script, unsigned scriptCallbackID);
-    void requestUIScriptCompletion(JSStringRef);
-
-    // For one-shot tasks callbacks.
-    unsigned prepareForAsyncTask(JSValueRef taskCallback, CallbackType);
-    void asyncTaskComplete(unsigned taskCallbackID);
-
-    // For persistent callbacks.
-    unsigned registerCallback(JSValueRef taskCallback, CallbackType);
-    JSValueRef callbackWithID(unsigned callbackID);
-    void unregisterCallback(unsigned callbackID);
-    void fireCallback(unsigned callbackID);
-
-    unsigned nextTaskCallbackID(CallbackType);
-
-    JSObjectRef objectFromRect(const WKRect&amp;) const;
-
-private:
-    JSRetainPtr&lt;JSGlobalContextRef&gt; m_context;
-    
-    bool hasOutstandingAsyncTasks() const { return !m_callbacks.isEmpty(); }
-    bool currentParentCallbackIsPendingCompletion() const { return m_uiScriptResultsPendingCompletion.contains(m_currentScriptCallbackID); }
-    bool currentParentCallbackHasOutstandingAsyncTasks() const;
-    void tryToCompleteUIScriptForCurrentParentCallback();
-    
-    struct Task {
-        unsigned parentScriptCallbackID { 0 };
-        JSValueRef callback { nullptr };
-    };
-    HashMap&lt;unsigned, Task&gt; m_callbacks;
-    HashMap&lt;unsigned, JSStringRef&gt; m_uiScriptResultsPendingCompletion;
-
-    UIScriptContextDelegate&amp; m_delegate;
-    RefPtr&lt;UIScriptController&gt; m_controller;
-    
-    unsigned m_currentScriptCallbackID { 0 };
-    unsigned m_nextTaskCallbackID { 0 };
-};
-
-}
-
-#endif // UIScriptContext_h
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,254 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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 &quot;config.h&quot;
-#include &quot;UIScriptController.h&quot;
-
-#include &quot;JSUIScriptController.h&quot;
-#include &quot;UIScriptContext.h&quot;
-#include &lt;JavaScriptCore/JSValueRef.h&gt;
-
-namespace WTR {
-
-UIScriptController::UIScriptController(UIScriptContext&amp; context)
-    : m_context(&amp;context)
-{
-}
-
-void UIScriptController::contextDestroyed()
-{
-    m_context = nullptr;
-}
-
-void UIScriptController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
-{
-    setProperty(context, windowObject, &quot;uiController&quot;, this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
-}
-
-JSClassRef UIScriptController::wrapperClass()
-{
-    return JSUIScriptController::uIScriptControllerClass();
-}
-
-#if !PLATFORM(COCOA)
-void UIScriptController::doAsyncTask(JSValueRef)
-{
-}
-#endif
-
-void UIScriptController::setDidStartFormControlInteractionCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidStartFormControlInteraction);
-    platformSetDidStartFormControlInteractionCallback();
-}
-
-JSValueRef UIScriptController::didStartFormControlInteractionCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidStartFormControlInteraction);
-}
-
-void UIScriptController::setDidEndFormControlInteractionCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidEndFormControlInteraction);
-    platformSetDidEndFormControlInteractionCallback();
-}
-
-JSValueRef UIScriptController::didEndFormControlInteractionCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidEndFormControlInteraction);
-}
-
-void UIScriptController::setWillBeginZoomingCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeWillBeginZooming);
-    platformSetWillBeginZoomingCallback();
-}
-
-JSValueRef UIScriptController::willBeginZoomingCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeWillBeginZooming);
-}
-
-void UIScriptController::setDidEndZoomingCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidEndZooming);
-    platformSetDidEndZoomingCallback();
-}
-
-JSValueRef UIScriptController::didEndZoomingCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidEndZooming);
-}
-
-void UIScriptController::setDidEndScrollingCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidEndScrolling);
-    platformSetDidEndScrollingCallback();
-}
-
-JSValueRef UIScriptController::didEndScrollingCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidEndScrolling);
-}
-
-void UIScriptController::setDidShowKeyboardCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidShowKeyboard);
-    platformSetDidShowKeyboardCallback();
-}
-
-JSValueRef UIScriptController::didShowKeyboardCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidShowKeyboard);
-}
-
-void UIScriptController::setDidHideKeyboardCallback(JSValueRef callback)
-{
-    m_context-&gt;registerCallback(callback, CallbackTypeDidHideKeyboard);
-    platformSetDidHideKeyboardCallback();
-}
-
-JSValueRef UIScriptController::didHideKeyboardCallback() const
-{
-    return m_context-&gt;callbackWithID(CallbackTypeDidHideKeyboard);
-}
-
-#if !PLATFORM(IOS)
-void UIScriptController::zoomToScale(double, JSValueRef)
-{
-}
-
-void UIScriptController::touchDownAtPoint(long x, long y, long touchCount, JSValueRef)
-{
-}
-
-void UIScriptController::liftUpAtPoint(long x, long y, long touchCount, JSValueRef)
-{
-}
-
-void UIScriptController::singleTapAtPoint(long x, long y, JSValueRef)
-{
-}
-
-void UIScriptController::doubleTapAtPoint(long x, long y, JSValueRef)
-{
-}
-
-void UIScriptController::dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback)
-{
-}
-
-void UIScriptController::typeCharacterUsingHardwareKeyboard(JSStringRef, JSValueRef)
-{
-}
-
-void UIScriptController::keyUpUsingHardwareKeyboard(JSStringRef, JSValueRef)
-{
-}
-
-void UIScriptController::keyDownUsingHardwareKeyboard(JSStringRef, JSValueRef)
-{
-}
-
-void UIScriptController::dismissFormAccessoryView()
-{
-}
-
-void UIScriptController::selectFormAccessoryPickerRow(long)
-{
-}
-
-void UIScriptController::scrollToOffset(long x, long y)
-{
-}
-
-void UIScriptController::keyboardAccessoryBarNext()
-{
-}
-
-void UIScriptController::keyboardAccessoryBarPrevious()
-{
-}
-
-double UIScriptController::zoomScale() const
-{
-    return 1;
-}
-
-double UIScriptController::minimumZoomScale() const
-{
-    return 1;
-}
-
-double UIScriptController::maximumZoomScale() const
-{
-    return 1;
-}
-
-JSObjectRef UIScriptController::contentVisibleRect() const
-{
-    return nullptr;
-}
-
-void UIScriptController::platformSetDidStartFormControlInteractionCallback()
-{
-}
-
-void UIScriptController::platformSetDidEndFormControlInteractionCallback()
-{
-}
-
-void UIScriptController::platformSetWillBeginZoomingCallback()
-{
-}
-
-void UIScriptController::platformSetDidEndZoomingCallback()
-{
-}
-
-void UIScriptController::platformSetDidEndScrollingCallback()
-{
-}
-
-void UIScriptController::platformSetDidShowKeyboardCallback()
-{
-}
-
-void UIScriptController::platformSetDidHideKeyboardCallback()
-{
-}
-
-void UIScriptController::platformClearAllCallbacks()
-{
-}
-#endif
-
-void UIScriptController::uiScriptComplete(JSStringRef result)
-{
-    m_context-&gt;requestUIScriptCompletion(result);
-    platformClearAllCallbacks();
-}
-
-}
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerUIScriptContextUIScriptControllerh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -1,118 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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.
- */
-
-#ifndef UIScriptController_h
-#define UIScriptController_h
-
-#include &quot;JSWrappable.h&quot;
-#include &lt;wtf/Ref.h&gt;
-
-namespace WTR {
-
-class UIScriptContext;
-
-class UIScriptController : public JSWrappable {
-public:
-    static Ref&lt;UIScriptController&gt; create(UIScriptContext&amp; context)
-    {
-        return adoptRef(*new UIScriptController(context));
-    }
-
-    void contextDestroyed();
-
-    void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
-    
-    void doAsyncTask(JSValueRef callback);
-    void zoomToScale(double scale, JSValueRef callback);
-
-    void touchDownAtPoint(long x, long y, long touchCount, JSValueRef callback);
-    void liftUpAtPoint(long x, long y, long touchCount, JSValueRef callback);
-    void singleTapAtPoint(long x, long y, JSValueRef callback);
-    void doubleTapAtPoint(long x, long y, JSValueRef callback);
-    void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback);
-    
-    void typeCharacterUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
-    void keyDownUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
-    void keyUpUsingHardwareKeyboard(JSStringRef character, JSValueRef callback);
-
-    void keyboardAccessoryBarNext();
-    void keyboardAccessoryBarPrevious();
-    
-    void dismissFormAccessoryView();
-    void selectFormAccessoryPickerRow(long);
-    
-    void scrollToOffset(long x, long y);
-
-    void setDidStartFormControlInteractionCallback(JSValueRef);
-    JSValueRef didStartFormControlInteractionCallback() const;
-
-    void setDidEndFormControlInteractionCallback(JSValueRef);
-    JSValueRef didEndFormControlInteractionCallback() const;
-
-    void setWillBeginZoomingCallback(JSValueRef);
-    JSValueRef willBeginZoomingCallback() const;
-
-    void setDidEndZoomingCallback(JSValueRef);
-    JSValueRef didEndZoomingCallback() const;
-
-    void setDidShowKeyboardCallback(JSValueRef);
-    JSValueRef didShowKeyboardCallback() const;
-
-    void setDidHideKeyboardCallback(JSValueRef);
-    JSValueRef didHideKeyboardCallback() const;
-
-    void setDidEndScrollingCallback(JSValueRef);
-    JSValueRef didEndScrollingCallback() const;
-
-    double zoomScale() const;
-    double minimumZoomScale() const;
-    double maximumZoomScale() const;
-
-    JSObjectRef contentVisibleRect() const;
-    
-    void uiScriptComplete(JSStringRef result);
-
-private:
-    UIScriptController(UIScriptContext&amp;);
-
-    void platformSetDidStartFormControlInteractionCallback();
-    void platformSetDidEndFormControlInteractionCallback();
-    void platformSetWillBeginZoomingCallback();
-    void platformSetDidEndZoomingCallback();
-    void platformSetDidShowKeyboardCallback();
-    void platformSetDidHideKeyboardCallback();
-    void platformSetDidEndScrollingCallback();
-    void platformClearAllCallbacks();
-
-    JSClassRef wrapperClass() final;
-
-    JSObjectRef objectFromRect(const WKRect&amp;) const;
-
-    UIScriptContext* m_context;
-};
-
-}
-
-#endif // UIScriptController_h
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -33,17 +33,19 @@
</span><span class="cx"> /* End PBXAggregateTarget section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXBuildFile section */
</span><ins>+                0F18E6E41D6B9ABF0027E547 /* UIScriptController.idl in Resources */ = {isa = PBXBuildFile; fileRef = 0F18E6E31D6B9ABF0027E547 /* UIScriptController.idl */; };
+                0F18E6E51D6B9B9E0027E547 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E6DD1D6B9AAF0027E547 /* UIScriptContext.cpp */; };
+                0F18E6E61D6B9BA20027E547 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E6DF1D6B9AAF0027E547 /* UIScriptController.cpp */; };
+                0F18E7181D6BC4560027E547 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E7151D6BC4560027E547 /* JSWrapper.cpp */; };
</ins><span class="cx">                 0F4B08731D5BE88D00EC1B78 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F4B08721D5BE88D00EC1B78 /* Launch.storyboard */; };
</span><span class="cx">                 0F5169CC1445222D00E0A9D7 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F5169CA1445222D00E0A9D7 /* WebKit.framework */; };
</span><span class="cx">                 0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */; };
</span><ins>+                0F6E89031D6BC5A2008ED0FA /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F18E7151D6BC4560027E547 /* JSWrapper.cpp */; };
</ins><span class="cx">                 0F73B5511BA78968004B3EF4 /* JSUIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F73B54F1BA78968004B3EF4 /* JSUIScriptController.cpp */; };
</span><span class="cx">                 0F73B5521BA78968004B3EF4 /* JSUIScriptController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */; };
</span><del>-                0F73B55A1BA792FF004B3EF4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
</del><span class="cx">                 0F73B55C1BA89042004B3EF4 /* UIScriptControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */; };
</span><span class="cx">                 0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */; };
</span><span class="cx">                 0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */; };
</span><del>-                0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */; };
-                0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */; };
</del><span class="cx">                 0FEB90A01905A834000FDBF3 /* InjectedBundlePageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */; };
</span><span class="cx">                 0FEB90A51905C016000FDBF3 /* CrashReporterInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */; };
</span><span class="cx">                 0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEBF8591BB61DF20028722D /* HIDEventGenerator.mm */; };
</span><span class="lines">@@ -115,7 +117,6 @@
</span><span class="cx">                 BC8DAD7B1316D91000EC96FC /* InjectedBundleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */; };
</span><span class="cx">                 BC8FD8CA120E527F00F3E71A /* EventSendingController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */; };
</span><span class="cx">                 BC8FD8D2120E545B00F3E71A /* JSEventSendingController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8FD8D0120E545B00F3E71A /* JSEventSendingController.cpp */; };
</span><del>-                BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
</del><span class="cx">                 BC952F1F11F3C652003398B4 /* JSTestRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952F1D11F3C652003398B4 /* JSTestRunner.cpp */; };
</span><span class="cx">                 BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; };
</span><span class="cx">                 BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */; };
</span><span class="lines">@@ -186,22 +187,25 @@
</span><span class="cx"> /* End PBXCopyFilesBuildPhase section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXFileReference section */
</span><ins>+                0F18E6DD1D6B9AAF0027E547 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6DE1D6B9AAF0027E547 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6DF1D6B9AAF0027E547 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6E01D6B9AAF0027E547 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = ../TestRunnerShared/UIScriptContext/UIScriptController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E6E31D6B9ABF0027E547 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = ../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7141D6BC4560027E547 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrappable.h; path = ../TestRunnerShared/Bindings/JSWrappable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7151D6BC4560027E547 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWrapper.cpp; path = ../TestRunnerShared/Bindings/JSWrapper.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F18E7161D6BC4560027E547 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrapper.h; path = ../TestRunnerShared/Bindings/JSWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F2109C7189C650D00F879A3 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F4B08721D5BE88D00EC1B78 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launch.storyboard; path = ios/Launch.storyboard; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 0F5169CA1445222D00E0A9D7 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestOptions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                0F73B54F1BA78968004B3EF4 /* JSUIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSUIScriptController.cpp; path = DerivedSources/WebKitTestRunner/JSUIScriptController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSUIScriptController.h; path = DerivedSources/WebKitTestRunner/JSUIScriptController.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                0F73B54F1BA78968004B3EF4 /* JSUIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIScriptController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIScriptController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F73B5571BA7929E004B3EF4 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
</span><span class="cx">                 0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIScriptControllerIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIScriptControllerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F87B6141BACC4B9004EC572 /* TestRunnerWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRunnerWKWebView.h; path = cocoa/TestRunnerWKWebView.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerWKWebView.mm; path = cocoa/TestRunnerWKWebView.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = UIScriptContext/UIScriptContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                0F87B61B1BACDA93004EC572 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = UIScriptContext/UIScriptContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = UIScriptContext/UIScriptController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                0F87B61D1BACDA93004EC572 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = UIScriptContext/UIScriptController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                0F87B6221BACDAA2004EC572 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = UIScriptContext/Bindings/UIScriptController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundlePageCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FEB90A21905BC6A000FDBF3 /* CrashReporterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CrashReporterInfo.h; path = cocoa/CrashReporterInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CrashReporterInfo.mm; path = cocoa/CrashReporterInfo.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -224,17 +228,17 @@
</span><span class="cx">                 29210EB1144CACD400835BB5 /* AccessibilityTextMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTextMarker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29210EB2144CACD400835BB5 /* AccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29210EB3144CACD400835BB5 /* AccessibilityTextMarkerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityTextMarkerMac.mm; path = mac/AccessibilityTextMarkerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                29210EDB146727E711835BB5 /* JSAccessibilityUIElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSAccessibilityUIElement.cpp; path = DerivedSources/WebKitTestRunner/JSAccessibilityUIElement.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                29210EDB146727E811835BB5 /* JSAccessibilityUIElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSAccessibilityUIElement.h; path = DerivedSources/WebKitTestRunner/JSAccessibilityUIElement.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                29210EDB146727E711835BB5 /* JSAccessibilityUIElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityUIElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                29210EDB146727E811835BB5 /* JSAccessibilityUIElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityUIElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 29210EDC144CD56E00835BB5 /* AccessibilityUIElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AccessibilityUIElement.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                29210EE1144CDE6789815EE5 /* JSAccessibilityTextMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSAccessibilityTextMarker.cpp; path = DerivedSources/WebKitTestRunner/JSAccessibilityTextMarker.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                29210EE1145CDE6789815EE5 /* JSAccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSAccessibilityTextMarker.h; path = DerivedSources/WebKitTestRunner/JSAccessibilityTextMarker.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                29210EE1144CDE6789815EE5 /* JSAccessibilityTextMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityTextMarker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                29210EE1145CDE6789815EE5 /* JSAccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityTextMarker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 29A8FCC5145B93C6009045A6 /* AccessibilityTextMarker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AccessibilityTextMarker.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29A8FCD2145EF8F2009045A6 /* AccessibilityTextMarkerRange.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AccessibilityTextMarkerRange.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29A8FCDF145F0358009045A6 /* AccessibilityTextMarkerRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarkerRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29A8FCE1145F037B009045A6 /* AccessibilityTextMarkerRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTextMarkerRange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                29A8FCE1345E7021006AA5A6 /* JSAccessibilityTextMarkerRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSAccessibilityTextMarkerRange.cpp; path = DerivedSources/WebKitTestRunner/JSAccessibilityTextMarkerRange.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                29A8FCE1345E7021006AA5A7 /* JSAccessibilityTextMarkerRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSAccessibilityTextMarkerRange.h; path = DerivedSources/WebKitTestRunner/JSAccessibilityTextMarkerRange.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                29A8FCE1345E7021006AA5A6 /* JSAccessibilityTextMarkerRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityTextMarkerRange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                29A8FCE1345E7021006AA5A7 /* JSAccessibilityTextMarkerRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityTextMarkerRange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityTextMarkerRangeMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DCE2CD11B84524500C7F832 /* TestControllerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestControllerCocoa.mm; path = cocoa/TestControllerCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E63ED751891ACE9002A7AFC /* AccessibilityControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityControllerIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -262,15 +266,15 @@
</span><span class="cx">                 5322FB4213FDA0CD0041ABCC /* CyclicRedundancyCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyclicRedundancyCheck.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PixelDumpSupport.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5322FB4513FDA0EA0041ABCC /* PixelDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelDumpSupport.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5641E2CE14335E95008307E5 /* JSTextInputController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSTextInputController.cpp; path = DerivedSources/WebKitTestRunner/JSTextInputController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                5641E2CF14335E95008307E5 /* JSTextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSTextInputController.h; path = DerivedSources/WebKitTestRunner/JSTextInputController.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                5641E2CE14335E95008307E5 /* JSTextInputController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextInputController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5641E2CF14335E95008307E5 /* JSTextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextInputController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5664A49614326377008881BE /* TextInputController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextInputController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5664A49814326384008881BE /* TextInputController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextInputController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5664A49914326384008881BE /* TextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5670B8261386FC13002EB355 /* EventSenderProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSenderProxy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSAccessibilityController.cpp; path = DerivedSources/WebKitTestRunner/JSAccessibilityController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSAccessibilityController.h; path = DerivedSources/WebKitTestRunner/JSAccessibilityController.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 5C45C31217398E480079714E /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = SOURCE_ROOT; };
</span><span class="lines">@@ -298,8 +302,8 @@
</span><span class="cx">                 BC14E4D8120E02D000826C0C /* GCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC14E4D9120E02D000826C0C /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC14E4E1120E032000826C0C /* GCController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GCController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC14E4E8120E03D800826C0C /* JSGCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSGCController.cpp; path = DerivedSources/WebKitTestRunner/JSGCController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                BC14E4E9120E03D800826C0C /* JSGCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSGCController.h; path = DerivedSources/WebKitTestRunner/JSGCController.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                BC14E4E8120E03D800826C0C /* JSGCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGCController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                BC14E4E9120E03D800826C0C /* JSGCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGCController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC25186211D15D54002EBC01 /* WebKitTestRunnerInjectedBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebKitTestRunnerInjectedBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = &quot;InjectedBundle-Info.plist&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -319,17 +323,14 @@
</span><span class="cx">                 BC8FD8C8120E527F00F3E71A /* EventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSendingController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventSendingController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventSendingController.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC8FD8D0120E545B00F3E71A /* JSEventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSEventSendingController.cpp; path = DerivedSources/WebKitTestRunner/JSEventSendingController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                BC8FD8D1120E545B00F3E71A /* JSEventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSEventSendingController.h; path = DerivedSources/WebKitTestRunner/JSEventSendingController.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                BC8FD8D0120E545B00F3E71A /* JSEventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventSendingController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                BC8FD8D1120E545B00F3E71A /* JSEventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventSendingController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 BC9192041333E4F8003011DC /* TestInvocationCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestInvocationCG.cpp; path = cg/TestInvocationCG.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 BC952EC511F3C10F003398B4 /* DerivedSources.make */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DerivedSources.make; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC952ED211F3C29F003398B4 /* TestRunner.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestRunner.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC952F1D11F3C652003398B4 /* JSTestRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSTestRunner.cpp; path = DerivedSources/WebKitTestRunner/JSTestRunner.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
-                BC952F1E11F3C652003398B4 /* JSTestRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSTestRunner.h; path = DerivedSources/WebKitTestRunner/JSTestRunner.h; sourceTree = BUILT_PRODUCTS_DIR; };
</del><ins>+                BC952F1D11F3C652003398B4 /* JSTestRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTestRunner.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                BC952F1E11F3C652003398B4 /* JSTestRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTestRunner.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 BC99A4841208901A007E9F08 /* StringFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringFunctions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -392,6 +393,7 @@
</span><span class="cx">                 08FB7794FE84155DC02AAC07 /* WebKitTestRunner */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                0F18E71A1D6BC4BC0027E547 /* TestRunnerShared */,
</ins><span class="cx">                                 BC952EC511F3C10F003398B4 /* DerivedSources.make */,
</span><span class="cx">                                 2EE52CEA1890A9A80010ED21 /* WebKitTestRunnerApp-Info.plist */,
</span><span class="cx">                                 BC99CBF11207642D00FDEE76 /* Shared */,
</span><span class="lines">@@ -414,7 +416,6 @@
</span><span class="cx">                                 0FEB90A11905BC4A000FDBF3 /* cocoa */,
</span><span class="cx">                                 2EE52D121890A9FB0010ED21 /* ios */,
</span><span class="cx">                                 BC7933FE118F7C74005EA8E2 /* mac */,
</span><del>-                                0F73B5471BA782FE004B3EF4 /* UIScriptContext */,
</del><span class="cx">                                 5322FB4113FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp */,
</span><span class="cx">                                 5322FB4213FDA0CD0041ABCC /* CyclicRedundancyCheck.h */,
</span><span class="cx">                                 5670B8261386FC13002EB355 /* EventSenderProxy.h */,
</span><span class="lines">@@ -453,15 +454,34 @@
</span><span class="cx">                         name = &quot;External Frameworks and Libraries&quot;;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                0F18E71A1D6BC4BC0027E547 /* TestRunnerShared */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E71B1D6BC4E60027E547 /* Bindings */,
+                                0F73B5471BA782FE004B3EF4 /* UIScriptContext */,
+                        );
+                        name = TestRunnerShared;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                0F18E71B1D6BC4E60027E547 /* Bindings */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7141D6BC4560027E547 /* JSWrappable.h */,
+                                0F18E7151D6BC4560027E547 /* JSWrapper.cpp */,
+                                0F18E7161D6BC4560027E547 /* JSWrapper.h */,
+                        );
+                        name = Bindings;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 0F73B5471BA782FE004B3EF4 /* UIScriptContext */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 0F73B54B1BA78350004B3EF4 /* Bindings */,
</span><span class="cx">                                 0F73B54E1BA78954004B3EF4 /* Derived Sources */,
</span><del>-                                0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */,
-                                0F87B61B1BACDA93004EC572 /* UIScriptContext.h */,
-                                0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */,
-                                0F87B61D1BACDA93004EC572 /* UIScriptController.h */,
</del><ins>+                                0F18E6DD1D6B9AAF0027E547 /* UIScriptContext.cpp */,
+                                0F18E6DE1D6B9AAF0027E547 /* UIScriptContext.h */,
+                                0F18E6DF1D6B9AAF0027E547 /* UIScriptController.cpp */,
+                                0F18E6E01D6B9AAF0027E547 /* UIScriptController.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = UIScriptContext;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -469,7 +489,7 @@
</span><span class="cx">                 0F73B54B1BA78350004B3EF4 /* Bindings */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                0F87B6221BACDAA2004EC572 /* UIScriptController.idl */,
</del><ins>+                                0F18E6E31D6B9ABF0027E547 /* UIScriptController.idl */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = Bindings;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -481,7 +501,8 @@
</span><span class="cx">                                 0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */,
</span><span class="cx">                         );
</span><span class="cx">                         name = &quot;Derived Sources&quot;;
</span><del>-                        sourceTree = &quot;&lt;group&gt;&quot;;
</del><ins>+                        path = DerivedSources/WebKitTestRunner;
+                        sourceTree = BUILT_PRODUCTS_DIR;
</ins><span class="cx">                 };
</span><span class="cx">                 0FEB909D1905A75D000FDBF3 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="lines">@@ -711,9 +732,6 @@
</span><span class="cx">                                 BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */,
</span><span class="cx">                                 BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */,
</span><span class="cx">                                 BC14E4E1120E032000826C0C /* GCController.idl */,
</span><del>-                                BC952C0E11F3B97B003398B4 /* JSWrappable.h */,
-                                BC952C0C11F3B965003398B4 /* JSWrapper.cpp */,
-                                BC952C0B11F3B965003398B4 /* JSWrapper.h */,
</del><span class="cx">                                 BC952ED211F3C29F003398B4 /* TestRunner.idl */,
</span><span class="cx">                                 5664A49614326377008881BE /* TextInputController.idl */,
</span><span class="cx">                         );
</span><span class="lines">@@ -741,7 +759,8 @@
</span><span class="cx">                                 5641E2CF14335E95008307E5 /* JSTextInputController.h */,
</span><span class="cx">                         );
</span><span class="cx">                         name = &quot;Derived Sources&quot;;
</span><del>-                        sourceTree = &quot;&lt;group&gt;&quot;;
</del><ins>+                        path = DerivedSources/WebKitTestRunner;
+                        sourceTree = BUILT_PRODUCTS_DIR;
</ins><span class="cx">                 };
</span><span class="cx">                 BC99CBF11207642D00FDEE76 /* Shared */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="lines">@@ -886,6 +905,7 @@
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><span class="cx">                                 0F4B08731D5BE88D00EC1B78 /* Launch.storyboard in Resources */,
</span><ins>+                                0F18E6E41D6B9ABF0027E547 /* UIScriptController.idl in Resources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -964,7 +984,7 @@
</span><span class="cx">                                 A185103E1B9AE12200744AEB /* CyclicRedundancyCheck.cpp in Sources */,
</span><span class="cx">                                 A185103F1B9AE12900744AEB /* GeolocationProviderMock.cpp in Sources */,
</span><span class="cx">                                 0F73B5511BA78968004B3EF4 /* JSUIScriptController.cpp in Sources */,
</span><del>-                                0F73B55A1BA792FF004B3EF4 /* JSWrapper.cpp in Sources */,
</del><ins>+                                0F18E7181D6BC4560027E547 /* JSWrapper.cpp in Sources */,
</ins><span class="cx">                                 A185103C1B9AE0FE00744AEB /* Options.cpp in Sources */,
</span><span class="cx">                                 A18510401B9AE13100744AEB /* PixelDumpSupport.cpp in Sources */,
</span><span class="cx">                                 A18510411B9AE13800744AEB /* TestController.cpp in Sources */,
</span><span class="lines">@@ -973,8 +993,8 @@
</span><span class="cx">                                 A185103D1B9AE10600744AEB /* TestInvocationCG.cpp in Sources */,
</span><span class="cx">                                 0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */,
</span><span class="cx">                                 0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */,
</span><del>-                                0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */,
-                                0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */,
</del><ins>+                                0F18E6E51D6B9B9E0027E547 /* UIScriptContext.cpp in Sources */,
+                                0F18E6E61D6B9BA20027E547 /* UIScriptController.cpp in Sources */,
</ins><span class="cx">                                 0F73B55C1BA89042004B3EF4 /* UIScriptControllerIOS.mm in Sources */,
</span><span class="cx">                                 A18510431B9AE14500744AEB /* WebNotificationProvider.cpp in Sources */,
</span><span class="cx">                                 A18510441B9AE14A00744AEB /* WorkQueueManager.cpp in Sources */,
</span><span class="lines">@@ -1017,7 +1037,7 @@
</span><span class="cx">                                 BC14E4EA120E03D800826C0C /* JSGCController.cpp in Sources */,
</span><span class="cx">                                 BC952F1F11F3C652003398B4 /* JSTestRunner.cpp in Sources */,
</span><span class="cx">                                 5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */,
</span><del>-                                BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
</del><ins>+                                0F6E89031D6BC5A2008ED0FA /* JSWrapper.cpp in Sources */,
</ins><span class="cx">                                 2E63EDA61891BDC0002A7AFC /* TestRunner.cpp in Sources */,
</span><span class="cx">                                 C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
</span><span class="cx">                                 5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerconfigh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/config.h (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/config.h        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/config.h        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -29,13 +29,10 @@
</span><span class="cx"> #include &quot;cmakeconfig.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#include &lt;WebCore/PlatformExportMacros.h&gt;
</ins><span class="cx"> #include &lt;WebKit/WebKit2_C.h&gt;
</span><span class="cx"> #include &lt;wtf/Platform.h&gt;
</span><span class="cx"> #include &lt;wtf/ExportMacros.h&gt;
</span><span class="cx"> #include &lt;runtime/JSExportMacros.h&gt;
</span><span class="cx"> 
</span><del>-// This is needed because we include WebCore's headers.
-// FIXME: We should include &lt;WebCore/PlatformExportMacros.h&gt; instead.
-#define WEBCORE_EXPORT
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (204876 => 204877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm        2016-08-24 02:00:13 UTC (rev 204876)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm        2016-08-24 02:03:43 UTC (rev 204877)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #import &quot;TestRunnerWKWebView.h&quot;
</span><span class="cx"> #import &quot;UIScriptContext.h&quot;
</span><span class="cx"> #import &lt;UIKit/UIKit.h&gt;
</span><ins>+#import &lt;WebCore/FloatRect.h&gt;
</ins><span class="cx"> #import &lt;WebKit/WKWebViewPrivate.h&gt;
</span><span class="cx"> #import &lt;WebKit/WebKit.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -239,8 +240,8 @@
</span><span class="cx"> 
</span><span class="cx">     CGRect contentVisibleRect = webView._contentVisibleRect;
</span><span class="cx">     
</span><del>-    WKRect wkRect = WKRectMake(contentVisibleRect.origin.x, contentVisibleRect.origin.y, contentVisibleRect.size.width, contentVisibleRect.size.height);
-    return m_context-&gt;objectFromRect(wkRect);
</del><ins>+    WebCore::FloatRect rect(contentVisibleRect.origin.x, contentVisibleRect.origin.y, contentVisibleRect.size.width, contentVisibleRect.size.height);
+    return m_context-&gt;objectFromRect(rect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UIScriptController::platformSetDidStartFormControlInteractionCallback()
</span></span></pre>
</div>
</div>

</body>
</html>