<!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 <simon.fraser@apple.com>
+
+ 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 <dino@apple.com>
</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 <simon.fraser@apple.com>
+
+ 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 <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> JSC should have a "microbenchmarks" directory instead of "regress" 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 => $codeGenerator,
+ idlFilePath => $idlFilePath,
+ };
+
+ bless($reference, $class);
+ return $reference;
+}
+
+sub GenerateInterface
+{
+}
+
+sub WriteData
+{
+ my ($self, $interface, $outputDir) = @_;
+
+ foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
+ open(FILE, ">", File::Spec->catfile($outputDir, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
+ print FILE @{$$file{contents}};
+ close(FILE) or die "Failed to close $$file{name} after writing: $!";
+ }
+}
+
+sub _className
+{
+ my ($idlType) = @_;
+
+ return "JS" . _implementationClassName($idlType);
+}
+
+sub _classRefGetter
+{
+ my ($self, $idlType) = @_;
+ return $$self{codeGenerator}->WK_lcfirst(_implementationClassName($idlType)) . "Class";
+}
+
+sub _parseLicenseBlock
+{
+ my ($fileHandle) = @_;
+
+ my ($copyright, $readCount, $buffer, $currentCharacter, $previousCharacter);
+ my $startSentinel = "/*";
+ my $lengthOfStartSentinel = length($startSentinel);
+ $readCount = read($fileHandle, $buffer, $lengthOfStartSentinel);
+ return "" if ($readCount < $lengthOfStartSentinel || $buffer ne $startSentinel);
+ $copyright = $buffer;
+
+ while ($readCount = read($fileHandle, $currentCharacter, 1)) {
+ $copyright .= $currentCharacter;
+ return $copyright if $currentCharacter eq "/" && $previousCharacter eq "*";
+ $previousCharacter = $currentCharacter;
+ }
+
+ return "";
+}
+
+sub _parseLicenseBlockFromFile
+{
+ my ($path) = @_;
+ open my $fileHandle, "<", $path or die "Failed to open $path for reading: $!";
+ my $licenseBlock = _parseLicenseBlock($fileHandle);
+ close($fileHandle);
+ return $licenseBlock;
+}
+
+sub _defaultLicenseBlock
+{
+ return <<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->{licenseBlock} if $self->{licenseBlock};
+
+ my $licenseBlock = _parseLicenseBlockFromFile($self->{idlFilePath}) || _defaultLicenseBlock();
+ $self->{licenseBlock} = $licenseBlock;
+ return $licenseBlock;
+}
+
+sub _generateHeaderFile
+{
+ my ($self, $interface) = @_;
+
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".h";
+
+ push(@contents, $self->_licenseBlock());
+
+ my $parentClassName = _parentClassName($interface);
+
+ push(@contents, <<EOF);
+
+#ifndef ${className}_h
+#define ${className}_h
+
+#include "${parentClassName}.h"
+EOF
+ push(@contents, <<EOF);
+
+namespace WTR {
+
+class ${implementationClassName};
+
+class ${className} : public ${parentClassName} {
+public:
+ static JSClassRef @{[$self->_classRefGetter($idlType)]}();
+
+private:
+ static const JSStaticFunction* staticFunctions();
+ static const JSStaticValue* staticValues();
+EOF
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n // Functions\n\n");
+ foreach my $function (@functions) {
+ push(@contents, " static JSValueRef @{[$function->signature->name]}(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*);\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n // Attributes\n\n");
+ foreach my $attribute (@attributes) {
+ push(@contents, " static JSValueRef @{[$self->_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n");
+ push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->isReadOnly;
+ }
+ }
+
+ push(@contents, <<EOF);
+};
+
+${implementationClassName}* to${implementationClassName}(JSContextRef, JSValueRef);
+
+} // namespace WTR
+
+#endif // ${className}_h
+EOF
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _generateImplementationFile
+{
+ my ($self, $interface) = @_;
+
+ my @contentsPrefix = ();
+ my %contentsIncludes = ();
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".cpp";
+
+ push(@contentsPrefix, $self->_licenseBlock());
+
+ my $classRefGetter = $self->_classRefGetter($idlType);
+ my $parentClassName = _parentClassName($interface);
+
+ $contentsIncludes{"${className}.h"} = 1;
+ $contentsIncludes{"${implementationClassName}.h"} = 1;
+
+ push(@contentsPrefix, <<EOF);
+
+EOF
+
+ push(@contents, <<EOF);
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <wtf/GetPtr.h>
+
+namespace WTR {
+
+${implementationClassName}* to${implementationClassName}(JSContextRef context, JSValueRef value)
+{
+ if (!context || !value || !${className}::${classRefGetter}() || !JSValueIsObjectOfClass(context, value, ${className}::${classRefGetter}()))
+ return 0;
+ return static_cast<${implementationClassName}*>(JSWrapper::unwrap(context, value));
+}
+
+JSClassRef ${className}::${classRefGetter}()
+{
+ static JSClassRef jsClass;
+ if (!jsClass) {
+ JSClassDefinition definition = kJSClassDefinitionEmpty;
+ definition.className = "${idlType}";
+ definition.parentClass = @{[$self->_parentClassRefGetterExpression($interface)]};
+ definition.staticValues = staticValues();
+ definition.staticFunctions = staticFunctions();
+EOF
+
+ push(@contents, " definition.initialize = initialize;\n") unless _parentInterface($interface);
+ push(@contents, " definition.finalize = finalize;\n") unless _parentInterface($interface);
+
+ push(@contents, <<EOF);
+ jsClass = JSClassCreate(&definition);
+ }
+ return jsClass;
+}
+
+EOF
+
+ push(@contents, $self->_staticFunctionsGetterImplementation($interface), "\n");
+ push(@contents, $self->_staticValuesGetterImplementation($interface));
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n// Functions\n");
+
+ foreach my $function (@functions) {
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::@{[$function->signature->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->signature->extendedAttributes->{"CustomArgumentHandling"}) {
+ $functionCall = "impl->" . $function->signature->name . "(context, argumentCount, arguments, exception)";
+ } else {
+ my @parameters = ();
+ my @specifiedParameters = @{$function->parameters};
+
+ $self->_includeHeaders(\%contentsIncludes, $function->signature->type, $function->signature);
+
+ if ($function->signature->extendedAttributes->{"PassContext"}) {
+ push(@parameters, "context");
+ }
+
+ foreach my $i (0..$#specifiedParameters) {
+ my $parameter = $specifiedParameters[$i];
+
+ $self->_includeHeaders(\%contentsIncludes, $idlType, $parameter);
+
+ push(@contents, " " . $self->_platformTypeVariableDeclaration($parameter, $parameter->name, "arguments[$i]", "argumentCount > $i") . "\n");
+
+ push(@parameters, $self->_parameterExpression($parameter));
+ }
+
+ $functionCall = "impl->" . $function->signature->name . "(" . join(", ", @parameters) . ")";
+ }
+
+ push(@contents, " ${functionCall};\n\n") if $function->signature->type eq "void";
+ push(@contents, " return " . $self->_returnExpression($function->signature, $functionCall) . ";\n}\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n// Attributes\n");
+ foreach my $attribute (@attributes) {
+ $self->_includeHeaders(\%contentsIncludes, $attribute->signature->type, $attribute->signature);
+
+ my $getterName = $self->_getterName($attribute);
+ my $getterExpression = "impl->${getterName}()";
+
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, object);
+ if (!impl)
+ return JSValueMakeUndefined(context);
+
+ return @{[$self->_returnExpression($attribute->signature, $getterExpression)]};
+}
+EOF
+
+ unless ($attribute->isReadOnly) {
+ push(@contents, <<EOF);
+
+bool ${className}::@{[$self->_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->_platformTypeConstructor($attribute->signature, "value");
+
+ push(@contents, <<EOF);
+ impl->@{[$self->_setterName($attribute)]}(${platformValue});
+
+ return true;
+}
+EOF
+ }
+ }
+ }
+
+ push(@contents, <<EOF);
+
+} // namespace WTR
+
+EOF
+
+ unshift(@contents, map { "#include \"$_\"\n" } sort keys(%contentsIncludes));
+ unshift(@contents, "#include \"config.h\"\n");
+ unshift(@contents, @contentsPrefix);
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _getterName
+{
+ my ($self, $attribute) = @_;
+
+ my $signature = $attribute->signature;
+ my $name = $signature->name;
+
+ return $name;
+}
+
+sub _includeHeaders
+{
+ my ($self, $headers, $idlType, $signature) = @_;
+
+ return unless defined $idlType;
+ return if $idlType eq "boolean";
+ return if $idlType eq "object";
+ return if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return if $$self{codeGenerator}->IsStringType($idlType);
+
+ $$headers{_className($idlType) . ".h"} = 1;
+ $$headers{_implementationClassName($idlType) . ".h"} = 1;
+}
+
+sub _implementationClassName
+{
+ my ($idlType) = @_;
+
+ return $idlType;
+}
+
+sub _parentClassName
+{
+ my ($interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? _className($parentInterface) : "JSWrapper";
+}
+
+sub _parentClassRefGetterExpression
+{
+ my ($self, $interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? $self->_classRefGetter($parentInterface) . "()" : "0";
+}
+
+sub _parentInterface
+{
+ my ($interface) = @_;
+ return $interface->parent;
+}
+
+sub _platformType
+{
+ my ($self, $idlType, $signature) = @_;
+
+ return undef unless defined $idlType;
+
+ return "bool" if $idlType eq "boolean";
+ return "JSValueRef" if $idlType eq "object";
+ return "JSRetainPtr<JSStringRef>" if $$self{codeGenerator}->IsStringType($idlType);
+ return "double" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return _implementationClassName($idlType);
+}
+
+sub _platformTypeConstructor
+{
+ my ($self, $signature, $argumentName) = @_;
+
+ my $idlType = $signature->type;
+
+ return "JSValueToBoolean(context, $argumentName)" if $idlType eq "boolean";
+ return "$argumentName" if $idlType eq "object";
+ return "JSRetainPtr<JSStringRef>(Adopt, JSValueToStringCopy(context, $argumentName, 0))" if $$self{codeGenerator}->IsStringType($idlType);
+ return "JSValueToNumber(context, $argumentName, 0)" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return "to" . _implementationClassName($idlType) . "(context, $argumentName)";
+}
+
+sub _platformTypeVariableDeclaration
+{
+ my ($self, $signature, $variableName, $argumentName, $condition) = @_;
+
+ my $platformType = $self->_platformType($signature->type, $signature);
+ my $constructor = $self->_platformTypeConstructor($signature, $argumentName);
+
+ my %nonPointerTypes = (
+ "bool" => 1,
+ "double" => 1,
+ "JSRetainPtr<JSStringRef>" => 1,
+ "JSValueRef" => 1,
+ );
+
+ my $nullValue = "0";
+ if ($platformType eq "JSValueRef") {
+ $nullValue = "JSValueMakeUndefined(context)";
+ } elsif (defined $nonPointerTypes{$platformType} && $platformType ne "double") {
+ $nullValue = "$platformType()";
+ }
+
+ $platformType .= "*" unless defined $nonPointerTypes{$platformType};
+
+ return "$platformType $variableName = $condition && $constructor;" if $condition && $platformType eq "bool";
+ return "$platformType $variableName = $condition ? $constructor : $nullValue;" if $condition;
+ return "$platformType $variableName = $constructor;";
+}
+
+sub _returnExpression
+{
+ my ($self, $signature, $expression) = @_;
+
+ my $returnIDLType = $signature->type;
+
+ return "JSValueMakeUndefined(context)" if $returnIDLType eq "void";
+ return "JSValueMakeBoolean(context, ${expression})" if $returnIDLType eq "boolean";
+ return "${expression}" if $returnIDLType eq "object";
+ return "JSValueMakeNumber(context, ${expression})" if $$self{codeGenerator}->IsNonPointerType($returnIDLType);
+ return "JSValueMakeStringOrNull(context, ${expression}.get())" if $$self{codeGenerator}->IsStringType($returnIDLType);
+ return "toJS(context, WTF::getPtr(${expression}))";
+}
+
+sub _parameterExpression
+{
+ my ($self, $parameter) = @_;
+
+ my $idlType = $parameter->type;
+ my $name = $parameter->name;
+
+ return "${name}.get()" if $$self{codeGenerator}->IsStringType($idlType);
+ return $name;
+}
+
+sub _setterName
+{
+ my ($self, $attribute) = @_;
+
+ my $name = $attribute->signature->name;
+
+ return "set" . $$self{codeGenerator}->WK_ucfirst($name);
+}
+
+sub _staticFunctionsGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ my $name = $_->signature->name;
+ my @attributes = qw(kJSPropertyAttributeDontDelete kJSPropertyAttributeReadOnly);
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$name\", $name, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "function", "{ 0, 0, 0 }", $mapFunction, $interface->functions);
+}
+
+sub _staticFunctionsOrValuesGetterImplementation
+{
+ my ($self, $interface, $functionOrValue, $arrayTerminator, $mapFunction, $functionsOrAttributes) = @_;
+
+ my $className = _className($interface->name);
+ my $uppercaseFunctionOrValue = $$self{codeGenerator}->WK_ucfirst($functionOrValue);
+
+ my $result = <<EOF;
+const JSStatic${uppercaseFunctionOrValue}* ${className}::static${uppercaseFunctionOrValue}s()
+{
+EOF
+
+ my @initializers = map(&$mapFunction, @{$functionsOrAttributes});
+ return $result . " return 0;\n}\n" unless @initializers;
+
+ $result .= <<EOF
+ static const JSStatic${uppercaseFunctionOrValue} ${functionOrValue}s[] = {
+ @{[join(",\n ", @initializers)]},
+ ${arrayTerminator}
+ };
+ return ${functionOrValue}s;
+}
+EOF
+}
+
+sub _staticValuesGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ return if $_->signature->extendedAttributes->{"NoImplementation"};
+
+ my $attributeName = $_->signature->name;
+ my $getterName = $self->_getterName($_);
+ my $setterName = $_->isReadOnly ? "0" : $self->_setterName($_);
+ my @attributes = qw(kJSPropertyAttributeDontDelete);
+ push(@attributes, "kJSPropertyAttributeReadOnly") if $_->isReadOnly;
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$attributeName\", $getterName, $setterName, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "value", "{ 0, 0, 0, 0 }", $mapFunction, $interface->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 "${TOOLS_DIR}/TestRunnerShared/")
+set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR "${TOOLS_DIR}/TestRunnerShared/UIScriptContext")
+
+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
+ "${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
+)
+
+GENERATE_BINDINGS(DumpRenderTree_SOURCES
+ "${DumpRenderTree_IDL_FILES}"
+ "${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings"
+ "--include=${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings"
+ "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
+ ${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 "" --include $(UISCRIPTCONTEXT_DIR) --outputDir . --generator DumpRenderTree $<
+
+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 "Derived Sources" */;
+                        buildPhases = (
+                                0F18E7011D6B9CC60027E547 /* ShellScript */,
+                        );
+                        dependencies = (
+                        );
+                        name = "Derived Sources";
+                        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 "All" */;
</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 = "Derived Sources";
+                };
</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 = "<group>"; };
</span><ins>+                0F18E6E81D6B9C070027E547 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.cpp; sourceTree = "<group>"; };
+                0F18E6E91D6B9C070027E547 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.h; sourceTree = "<group>"; };
+                0F18E6EA1D6B9C070027E547 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptController.cpp; sourceTree = "<group>"; };
+                0F18E6EB1D6B9C070027E547 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = ../TestRunnerShared/UIScriptContext/UIScriptController.h; sourceTree = "<group>"; };
+                0F18E6F01D6B9C240027E547 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = ../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl; sourceTree = "<group>"; };
+                0F18E6F11D6B9C640027E547 /* DerivedSources.make */ = {isa = PBXFileReference; lastKnownFileType = text; path = DerivedSources.make; sourceTree = "<group>"; };
+                0F18E7041D6BA0230027E547 /* JSUIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIScriptController.cpp; sourceTree = "<group>"; };
+                0F18E7051D6BA0230027E547 /* JSUIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIScriptController.h; sourceTree = "<group>"; };
+                0F18E7071D6BA4140027E547 /* CodeGeneratorDumpRenderTree.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = CodeGeneratorDumpRenderTree.pm; path = Bindings/CodeGeneratorDumpRenderTree.pm; sourceTree = "<group>"; };
+                0F18E70C1D6BAC8C0027E547 /* UIScriptControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIScriptControllerIOS.mm; path = ios/UIScriptControllerIOS.mm; sourceTree = "<group>"; };
+                0F18E70E1D6BACB60027E547 /* UIScriptControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIScriptControllerMac.mm; path = mac/UIScriptControllerMac.mm; sourceTree = "<group>"; };
+                0F18E7101D6BC43A0027E547 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrappable.h; path = ../TestRunnerShared/Bindings/JSWrappable.h; sourceTree = "<group>"; };
+                0F18E7111D6BC43A0027E547 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWrapper.cpp; path = ../TestRunnerShared/Bindings/JSWrapper.cpp; sourceTree = "<group>"; };
+                0F18E7121D6BC43A0027E547 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrapper.h; path = ../TestRunnerShared/Bindings/JSWrapper.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F37A4A611E6628700275F54 /* PluginObjectMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginObjectMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F4E43E11D5C037A008EBA5C /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launch.storyboard; path = ios/Launch.storyboard; sourceTree = "<group>"; };
</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 = "<group>";
</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 = "<group>";
+                };
+                0F18E6EE1D6B9C0C0027E547 /* Bindings */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7071D6BA4140027E547 /* CodeGeneratorDumpRenderTree.pm */,
+                                0F18E7101D6BC43A0027E547 /* JSWrappable.h */,
+                                0F18E7111D6BC43A0027E547 /* JSWrapper.cpp */,
+                                0F18E7121D6BC43A0027E547 /* JSWrapper.h */,
+                                0F18E6F01D6B9C240027E547 /* UIScriptController.idl */,
+                        );
+                        name = Bindings;
+                        sourceTree = "<group>";
+                };
+                0F18E6EF1D6B9C120027E547 /* Derived Sources */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7041D6BA0230027E547 /* JSUIScriptController.cpp */,
+                                0F18E7051D6BA0230027E547 /* JSUIScriptController.h */,
+                        );
+                        name = "Derived Sources";
+                        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 = "<group>";
</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 = "<group>";
</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 = "<group>";
</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 = "DumpRenderTree (Library)";
</span><span class="cx">                         productName = DumpRenderTree;
</span><span class="lines">@@ -883,6 +961,7 @@
</span><span class="cx">                         projectRoot = "";
</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 = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\"\n\nexport DumpRenderTree=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ ! $CC ]; then\n export CC=\"`xcrun -find clang`\"\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make -f \"${DumpRenderTree}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.activecpu`\nfi\n";
+                };
+/* 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 = "$(TARGET_NAME)";
+                        };
+                        name = Debug;
+                };
+                0F18E6FF1D6B9CAE0027E547 /* Release */ = {
+                        isa = XCBuildConfiguration;
+                        buildSettings = {
+                                PRODUCT_NAME = "$(TARGET_NAME)";
+                        };
+                        name = Release;
+                };
+                0F18E7001D6B9CAE0027E547 /* Production */ = {
+                        isa = XCBuildConfiguration;
+                        buildSettings = {
+                                PRODUCT_NAME = "$(TARGET_NAME)";
+                        };
+                        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 "Derived Sources" */ = {
+                        isa = XCConfigurationList;
+                        buildConfigurations = (
+                                0F18E6FE1D6B9CAE0027E547 /* Debug */,
+                                0F18E6FF1D6B9CAE0027E547 /* Release */,
+                                0F18E7001D6B9CAE0027E547 /* Production */,
+                        );
+                        defaultConfigurationIsVisible = 0;
+                        defaultConfigurationName = Production;
+                };
</ins><span class="cx">                 141BF221096A441E00E0753C /* Build configuration list for PBXNativeTarget "TestNetscapePlugIn" */ = {
</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 < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> script = argumentCount > 0 ? JSRetainPtr<JSStringRef>(Adopt, JSValueToStringCopy(context, arguments[0], 0)) : JSRetainPtr<JSStringRef>();
+ JSValueRef callback = argumentCount > 1 ? arguments[1] : JSValueMakeUndefined(context);
+
+ TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
+ controller->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<TestRunner*>(JSObjectGetPrivate(object));
</span><span class="lines">@@ -2208,6 +2222,7 @@
</span><span class="cx"> { "numberOfDFGCompiles", numberOfDFGCompiles, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "neverInlineFunction", neverInlineFunction, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "accummulateLogsForChannel", accummulateLogsForChannel, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+ { "runUIScript", runUIScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx"> { "imageCountInGeneralPasteboard", 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<unsigned, JSValueRef> CallbackMap;
+static CallbackMap& callbackMap()
+{
+ static CallbackMap& map = *new CallbackMap;
+ return map;
+}
+
+void TestRunner::cacheTestRunnerCallback(unsigned index, JSValueRef callback)
+{
+ if (!callback)
+ return;
+
+ if (callbackMap().contains(index)) {
+ fprintf(stderr, "FAIL: Tried to install a second TestRunner callback for the same event (id %d)\n", 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& 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<WTR::UIScriptContext>(*this);
+
+ String scriptString(JSStringGetCharactersPtr(script), JSStringGetLength(script));
+ m_UIScriptContext->runUIScript(scriptString, callbackID);
+}
+
+void TestRunner::callUIScriptCallback(unsigned callbackID, JSStringRef result)
+{
+ JSContextRef context = mainFrameJSContext();
+ JSValueRef resultValue = JSValueMakeString(context, result);
+ callTestRunnerCallback(callbackID, 1, &resultValue);
+}
+
+void TestRunner::uiScriptDidComplete(const String& result, unsigned callbackID)
+{
+ JSRetainPtr<JSStringRef> 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 "UIScriptContext.h"
</ins><span class="cx"> #include <JavaScriptCore/JSObjectRef.h>
</span><span class="cx"> #include <map>
</span><span class="cx"> #include <set>
</span><span class="lines">@@ -37,7 +38,8 @@
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><del>-class TestRunner : public RefCounted<TestRunner> {
</del><ins>+class TestRunner : public WTR::UIScriptContextDelegate, public RefCounted<TestRunner> {
+ WTF_MAKE_NONCOPYABLE(TestRunner);
</ins><span class="cx"> public:
</span><span class="cx"> static PassRefPtr<TestRunner> create(const std::string& testURL, const std::string& 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& testURL, const std::string& expectedPixelHash);
</span><span class="cx">
</span><ins>+ JSContextRef mainFrameJSContext();
+
+ // UIScriptContextDelegate
+ void uiScriptDidComplete(const String&, 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<std::string, std::string> m_URLsToRedirect;
</span><span class="cx">
</span><ins>+ struct UIScriptInvocationData {
+ unsigned callbackID;
+ String scriptString;
+ };
+
+ std::unique_ptr<WTR::UIScriptContext> 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 "config.h"
+#import "UIScriptController.h"
+
+#if PLATFORM(IOS)
+
+#import "UIScriptContext.h"
+
+namespace WTR {
+
+void UIScriptController::doAsyncTask(JSValueRef callback)
+{
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if (!m_context)
+ return;
+ m_context->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->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<CFStringRef> 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 "config.h"
+#import "UIScriptController.h"
+
+#import "UIScriptContext.h"
+
+#if PLATFORM(MAC)
+
+namespace WTR {
+
+void UIScriptController::doAsyncTask(JSValueRef callback)
+{
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if (!m_context)
+ return;
+ m_context->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->cleanup();
</ins><span class="cx"> ::gTestRunner = nullptr;
</span><span class="cx">
</span><span class="cx"> fputs("#EOF\n", 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->setAcceptsEditing(TRUE);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+JSContextRef TestRunner::mainFrameJSContext()
+{
+ COMPtr<IWebFramePrivate> framePrivate(Query, frame);
+ if (!framePrivate)
+ return;
+
+ return framePrivate->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 <JavaScriptCore/JavaScript.h>
+#include <wtf/RefCounted.h>
+
+namespace WTR {
+
+class JSWrappable : public RefCounted<JSWrappable> {
+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 "config.h"
+#include "JSWrapper.h"
+
+#include <JavaScriptCore/JSContextRefPrivate.h>
+
+namespace WTR {
+
+JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
+{
+ ASSERT_ARG(context, context);
+
+ if (!object)
+ return JSValueMakeNull(context);
+
+ JSClassRef objectClass = object->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<JSWrappable*>(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
+}
+
+static JSWrappable* unwrapObject(JSObjectRef object)
+{
+ JSWrappable* wrappable = static_cast<JSWrappable*>(JSObjectGetPrivate(object));
+ ASSERT(wrappable);
+ return wrappable;
+}
+
+void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->ref();
+}
+
+void JSWrapper::finalize(JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->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 "JSWrappable.h"
+#include <JavaScriptCore/JSRetainPtr.h>
+
+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<JSStringRef> 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;
+
+ // <select> 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 "config.h"
+#include "UIScriptContext.h"
+
+#include "UIScriptController.h"
+#include <JavaScriptCore/JSContextRef.h>
+#include <JavaScriptCore/JSValueRef.h>
+#include <WebCore/FloatRect.h>
+
+using namespace WTR;
+
+static inline bool isPersistentCallbackID(unsigned callbackID)
+{
+ return callbackID < firstNonPersistentCallbackID;
+}
+
+UIScriptContext::UIScriptContext(UIScriptContextDelegate& 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->makeWindowObject(m_context.get(), globalObject, &exception);
+}
+
+UIScriptContext::~UIScriptContext()
+{
+ m_controller->contextDestroyed();
+}
+
+void UIScriptContext::runUIScript(const String& script, unsigned scriptCallbackID)
+{
+ m_currentScriptCallbackID = scriptCallbackID;
+
+ JSRetainPtr<JSStringRef> stringRef(Adopt, JSStringCreateWithUTF8CString(script.utf8().data()));
+
+ JSValueRef exception = nullptr;
+ JSValueRef result = JSEvaluateScript(m_context.get(), stringRef.get(), 0, 0, 1, &exception);
+
+ if (!hasOutstandingAsyncTasks()) {
+ JSValueRef stringifyException = nullptr;
+ requestUIScriptCompletion(JSValueToStringCopy(m_context.get(), result, &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, &exception);
+
+ m_currentScriptCallbackID = task.parentScriptCallbackID;
+
+ exception = nullptr;
+ JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &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, &exception);
+
+ m_currentScriptCallbackID = task.parentScriptCallbackID;
+
+ exception = nullptr;
+ JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &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& rect) const
+{
+ JSObjectRef object = JSObjectMake(m_context.get(), nullptr, nullptr);
+
+ JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("left")).get(), JSValueMakeNumber(m_context.get(), rect.x()), kJSPropertyAttributeNone, nullptr);
+ JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("top")).get(), JSValueMakeNumber(m_context.get(), rect.y()), kJSPropertyAttributeNone, nullptr);
+ JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("width")).get(), JSValueMakeNumber(m_context.get(), rect.width()), kJSPropertyAttributeNone, nullptr);
+ JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("height")).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 && !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 <JavaScriptCore/JSRetainPtr.h>
+#include <wtf/HashMap.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+class FloatRect;
+}
+
+namespace WTR {
+
+class UIScriptController;
+
+class UIScriptContextDelegate {
+public:
+ virtual void uiScriptDidComplete(const String& 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&);
+ ~UIScriptContext();
+
+ void runUIScript(const String& 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&) const;
+
+private:
+ JSRetainPtr<JSGlobalContextRef> 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<unsigned, Task> m_callbacks;
+ HashMap<unsigned, JSStringRef> m_uiScriptResultsPendingCompletion;
+
+ UIScriptContextDelegate& m_delegate;
+ RefPtr<UIScriptController> 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 "config.h"
+#include "UIScriptController.h"
+
+#include "JSUIScriptController.h"
+#include "UIScriptContext.h"
+#include <JavaScriptCore/JSValueRef.h>
+
+namespace WTR {
+
+UIScriptController::UIScriptController(UIScriptContext& context)
+ : m_context(&context)
+{
+}
+
+void UIScriptController::contextDestroyed()
+{
+ m_context = nullptr;
+}
+
+void UIScriptController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+{
+ setProperty(context, windowObject, "uiController", 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->registerCallback(callback, CallbackTypeDidStartFormControlInteraction);
+ platformSetDidStartFormControlInteractionCallback();
+}
+
+JSValueRef UIScriptController::didStartFormControlInteractionCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeDidStartFormControlInteraction);
+}
+
+void UIScriptController::setDidEndFormControlInteractionCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeDidEndFormControlInteraction);
+ platformSetDidEndFormControlInteractionCallback();
+}
+
+JSValueRef UIScriptController::didEndFormControlInteractionCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeDidEndFormControlInteraction);
+}
+
+void UIScriptController::setWillBeginZoomingCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeWillBeginZooming);
+ platformSetWillBeginZoomingCallback();
+}
+
+JSValueRef UIScriptController::willBeginZoomingCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeWillBeginZooming);
+}
+
+void UIScriptController::setDidEndZoomingCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeDidEndZooming);
+ platformSetDidEndZoomingCallback();
+}
+
+JSValueRef UIScriptController::didEndZoomingCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeDidEndZooming);
+}
+
+void UIScriptController::setDidEndScrollingCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeDidEndScrolling);
+ platformSetDidEndScrollingCallback();
+}
+
+JSValueRef UIScriptController::didEndScrollingCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeDidEndScrolling);
+}
+
+void UIScriptController::setDidShowKeyboardCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeDidShowKeyboard);
+ platformSetDidShowKeyboardCallback();
+}
+
+JSValueRef UIScriptController::didShowKeyboardCallback() const
+{
+ return m_context->callbackWithID(CallbackTypeDidShowKeyboard);
+}
+
+void UIScriptController::setDidHideKeyboardCallback(JSValueRef callback)
+{
+ m_context->registerCallback(callback, CallbackTypeDidHideKeyboard);
+ platformSetDidHideKeyboardCallback();
+}
+
+JSValueRef UIScriptController::didHideKeyboardCallback() const
+{
+ return m_context->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->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 "JSWrappable.h"
+#include <wtf/Ref.h>
+
+namespace WebCore {
+class FloatRect;
+}
+
+namespace WTR {
+
+class UIScriptContext;
+
+class UIScriptController : public JSWrappable {
+public:
+ static Ref<UIScriptController> create(UIScriptContext& 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&);
+
+ void platformSetDidStartFormControlInteractionCallback();
+ void platformSetDidEndFormControlInteractionCallback();
+ void platformSetWillBeginZoomingCallback();
+ void platformSetDidEndZoomingCallback();
+ void platformSetDidShowKeyboardCallback();
+ void platformSetDidHideKeyboardCallback();
+ void platformSetDidEndScrollingCallback();
+ void platformClearAllCallbacks();
+
+ JSClassRef wrapperClass() final;
+
+ JSObjectRef objectFromRect(const WebCore::FloatRect&) 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 "${TOOLS_DIR}/WebKitTestRunner")
</span><span class="cx"> set(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
</span><del>-set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR "${TOOLS_DIR}/WebKitTestRunner/UIScriptContext")
</del><ins>+set(WEBKIT_TESTRUNNER_SHARED_DIR "${TOOLS_DIR}/TestRunnerShared/")
+set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR "${WEBKIT_TESTRUNNER_SHARED_DIR}/UIScriptContext")
+set(WEBKIT_TESTRUNNER_BINDINGS_DIR "${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings")
</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>- "${WEBKIT_TESTRUNNER_DIR}/UIScriptContext/Bindings/UIScriptController.idl"
</del><ins>+ "${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
</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 <JavaScriptCore/JavaScript.h>
-#include <wtf/RefCounted.h>
-
-namespace WTR {
-
-class JSWrappable : public RefCounted<JSWrappable> {
-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 "config.h"
-#include "JSWrapper.h"
-
-#include <JavaScriptCore/JSContextRefPrivate.h>
-
-namespace WTR {
-
-JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
-{
- ASSERT_ARG(context, context);
-
- if (!object)
- return JSValueMakeNull(context);
-
- JSClassRef objectClass = object->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<JSWrappable*>(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
-}
-
-static JSWrappable* unwrapObject(JSObjectRef object)
-{
- JSWrappable* wrappable = static_cast<JSWrappable*>(JSObjectGetPrivate(object));
- ASSERT(wrappable);
- return wrappable;
-}
-
-void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
-{
- JSWrappable* wrappable = unwrapObject(object);
- if (!wrappable)
- return;
- wrappable->ref();
-}
-
-void JSWrapper::finalize(JSObjectRef object)
-{
- JSWrappable* wrappable = unwrapObject(object);
- if (!wrappable)
- return;
- wrappable->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 "JSWrappable.h"
-#include <JavaScriptCore/JSRetainPtr.h>
-
-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<JSStringRef> 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<UIScriptContext>(*this);
</span><span class="cx">
</span><del>- m_UIScriptContext->runUIScript(script, scriptCallbackID);
</del><ins>+ m_UIScriptContext->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& result, unsigned scriptCallbackID)
</ins><span class="cx"> {
</span><span class="cx"> WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallUISideScriptCallback"));
</span><span class="cx">
</span><span class="lines">@@ -858,7 +858,7 @@
</span><span class="cx"> WKRetainPtr<WKStringRef> callbackIDKey(AdoptWK, WKStringCreateWithUTF8CString("CallbackID"));
</span><span class="cx"> WKRetainPtr<WKUInt64Ref> 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()->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& 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;
-
- // <select> 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 "config.h"
-#include "UIScriptContext.h"
-
-#include "StringFunctions.h"
-#include "UIScriptController.h"
-#include <JavaScriptCore/JSContextRef.h>
-#include <JavaScriptCore/JSValueRef.h>
-#include <WebKit/WKRetainPtr.h>
-#include <WebKit/WKString.h>
-#include <WebKit/WKStringPrivate.h>
-
-using namespace WTR;
-
-static inline bool isPersistentCallbackID(unsigned callbackID)
-{
- return callbackID < firstNonPersistentCallbackID;
-}
-
-UIScriptContext::UIScriptContext(UIScriptContextDelegate& 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->makeWindowObject(m_context.get(), globalObject, &exception);
-}
-
-UIScriptContext::~UIScriptContext()
-{
- m_controller->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, &exception);
-
- if (!hasOutstandingAsyncTasks()) {
- JSValueRef stringifyException = nullptr;
- requestUIScriptCompletion(JSValueToStringCopy(m_context.get(), result, &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, &exception);
-
- m_currentScriptCallbackID = task.parentScriptCallbackID;
-
- exception = nullptr;
- JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &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, &exception);
-
- m_currentScriptCallbackID = task.parentScriptCallbackID;
-
- exception = nullptr;
- JSObjectCallAsFunction(m_context.get(), callbackObject, JSContextGetGlobalObject(m_context.get()), 0, nullptr, &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<WKStringRef> uiScriptResult = adoptWK(WKStringCreateWithJSString(result));
- m_delegate.uiScriptDidComplete(uiScriptResult.get(), m_currentScriptCallbackID);
- m_currentScriptCallbackID = 0;
- if (result)
- JSStringRelease(result);
-}
-
-JSObjectRef UIScriptContext::objectFromRect(const WKRect& rect) const
-{
- JSObjectRef object = JSObjectMake(m_context.get(), nullptr, nullptr);
-
- JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("left")).get(), JSValueMakeNumber(m_context.get(), rect.origin.x), kJSPropertyAttributeNone, nullptr);
- JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("top")).get(), JSValueMakeNumber(m_context.get(), rect.origin.y), kJSPropertyAttributeNone, nullptr);
- JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("width")).get(), JSValueMakeNumber(m_context.get(), rect.size.width), kJSPropertyAttributeNone, nullptr);
- JSObjectSetProperty(m_context.get(), object, adopt(JSStringCreateWithUTF8CString("height")).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 && !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 <JavaScriptCore/JSRetainPtr.h>
-#include <wtf/HashMap.h>
-#include <wtf/RefPtr.h>
-
-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&);
- ~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&) const;
-
-private:
- JSRetainPtr<JSGlobalContextRef> 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<unsigned, Task> m_callbacks;
- HashMap<unsigned, JSStringRef> m_uiScriptResultsPendingCompletion;
-
- UIScriptContextDelegate& m_delegate;
- RefPtr<UIScriptController> 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 "config.h"
-#include "UIScriptController.h"
-
-#include "JSUIScriptController.h"
-#include "UIScriptContext.h"
-#include <JavaScriptCore/JSValueRef.h>
-
-namespace WTR {
-
-UIScriptController::UIScriptController(UIScriptContext& context)
- : m_context(&context)
-{
-}
-
-void UIScriptController::contextDestroyed()
-{
- m_context = nullptr;
-}
-
-void UIScriptController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
-{
- setProperty(context, windowObject, "uiController", 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->registerCallback(callback, CallbackTypeDidStartFormControlInteraction);
- platformSetDidStartFormControlInteractionCallback();
-}
-
-JSValueRef UIScriptController::didStartFormControlInteractionCallback() const
-{
- return m_context->callbackWithID(CallbackTypeDidStartFormControlInteraction);
-}
-
-void UIScriptController::setDidEndFormControlInteractionCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeDidEndFormControlInteraction);
- platformSetDidEndFormControlInteractionCallback();
-}
-
-JSValueRef UIScriptController::didEndFormControlInteractionCallback() const
-{
- return m_context->callbackWithID(CallbackTypeDidEndFormControlInteraction);
-}
-
-void UIScriptController::setWillBeginZoomingCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeWillBeginZooming);
- platformSetWillBeginZoomingCallback();
-}
-
-JSValueRef UIScriptController::willBeginZoomingCallback() const
-{
- return m_context->callbackWithID(CallbackTypeWillBeginZooming);
-}
-
-void UIScriptController::setDidEndZoomingCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeDidEndZooming);
- platformSetDidEndZoomingCallback();
-}
-
-JSValueRef UIScriptController::didEndZoomingCallback() const
-{
- return m_context->callbackWithID(CallbackTypeDidEndZooming);
-}
-
-void UIScriptController::setDidEndScrollingCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeDidEndScrolling);
- platformSetDidEndScrollingCallback();
-}
-
-JSValueRef UIScriptController::didEndScrollingCallback() const
-{
- return m_context->callbackWithID(CallbackTypeDidEndScrolling);
-}
-
-void UIScriptController::setDidShowKeyboardCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeDidShowKeyboard);
- platformSetDidShowKeyboardCallback();
-}
-
-JSValueRef UIScriptController::didShowKeyboardCallback() const
-{
- return m_context->callbackWithID(CallbackTypeDidShowKeyboard);
-}
-
-void UIScriptController::setDidHideKeyboardCallback(JSValueRef callback)
-{
- m_context->registerCallback(callback, CallbackTypeDidHideKeyboard);
- platformSetDidHideKeyboardCallback();
-}
-
-JSValueRef UIScriptController::didHideKeyboardCallback() const
-{
- return m_context->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->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 "JSWrappable.h"
-#include <wtf/Ref.h>
-
-namespace WTR {
-
-class UIScriptContext;
-
-class UIScriptController : public JSWrappable {
-public:
- static Ref<UIScriptController> create(UIScriptContext& 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&);
-
- void platformSetDidStartFormControlInteractionCallback();
- void platformSetDidEndFormControlInteractionCallback();
- void platformSetWillBeginZoomingCallback();
- void platformSetDidEndZoomingCallback();
- void platformSetDidShowKeyboardCallback();
- void platformSetDidHideKeyboardCallback();
- void platformSetDidEndScrollingCallback();
- void platformClearAllCallbacks();
-
- JSClassRef wrapperClass() final;
-
- JSObjectRef objectFromRect(const WKRect&) 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 = "<group>"; };
+                0F18E6DE1D6B9AAF0027E547 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = ../TestRunnerShared/UIScriptContext/UIScriptContext.h; sourceTree = "<group>"; };
+                0F18E6DF1D6B9AAF0027E547 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = ../TestRunnerShared/UIScriptContext/UIScriptController.cpp; sourceTree = "<group>"; };
+                0F18E6E01D6B9AAF0027E547 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = ../TestRunnerShared/UIScriptContext/UIScriptController.h; sourceTree = "<group>"; };
+                0F18E6E31D6B9ABF0027E547 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = ../TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl; sourceTree = "<group>"; };
+                0F18E7141D6BC4560027E547 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrappable.h; path = ../TestRunnerShared/Bindings/JSWrappable.h; sourceTree = "<group>"; };
+                0F18E7151D6BC4560027E547 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWrapper.cpp; path = ../TestRunnerShared/Bindings/JSWrapper.cpp; sourceTree = "<group>"; };
+                0F18E7161D6BC4560027E547 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWrapper.h; path = ../TestRunnerShared/Bindings/JSWrapper.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F2109C7189C650D00F879A3 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
</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 = "<group>"; };
</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 = "<group>"; };
+                0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUIScriptController.h; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIScriptControllerMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F87B6141BACC4B9004EC572 /* TestRunnerWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRunnerWKWebView.h; path = cocoa/TestRunnerWKWebView.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerWKWebView.mm; path = cocoa/TestRunnerWKWebView.mm; sourceTree = "<group>"; };
</span><del>-                0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptContext.cpp; path = UIScriptContext/UIScriptContext.cpp; sourceTree = "<group>"; };
-                0F87B61B1BACDA93004EC572 /* UIScriptContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptContext.h; path = UIScriptContext/UIScriptContext.h; sourceTree = "<group>"; };
-                0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIScriptController.cpp; path = UIScriptContext/UIScriptController.cpp; sourceTree = "<group>"; };
-                0F87B61D1BACDA93004EC572 /* UIScriptController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIScriptController.h; path = UIScriptContext/UIScriptController.h; sourceTree = "<group>"; };
-                0F87B6221BACDAA2004EC572 /* UIScriptController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = UIScriptController.idl; path = UIScriptContext/Bindings/UIScriptController.idl; sourceTree = "<group>"; };
</del><span class="cx">                 0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundlePageCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0FEB90A21905BC6A000FDBF3 /* CrashReporterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CrashReporterInfo.h; path = cocoa/CrashReporterInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CrashReporterInfo.mm; path = cocoa/CrashReporterInfo.mm; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 29210EB2144CACD400835BB5 /* AccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarker.h; sourceTree = "<group>"; };
</span><span class="cx">                 29210EB3144CACD400835BB5 /* AccessibilityTextMarkerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityTextMarkerMac.mm; path = mac/AccessibilityTextMarkerMac.mm; sourceTree = "<group>"; };
</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 = "<group>"; };
+                29210EDB146727E811835BB5 /* JSAccessibilityUIElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityUIElement.h; sourceTree = "<group>"; };
</ins><span class="cx">                 29210EDC144CD56E00835BB5 /* AccessibilityUIElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AccessibilityUIElement.idl; sourceTree = "<group>"; };
</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 = "<group>"; };
+                29210EE1145CDE6789815EE5 /* JSAccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityTextMarker.h; sourceTree = "<group>"; };
</ins><span class="cx">                 29A8FCC5145B93C6009045A6 /* AccessibilityTextMarker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AccessibilityTextMarker.idl; sourceTree = "<group>"; };
</span><span class="cx">                 29A8FCD2145EF8F2009045A6 /* AccessibilityTextMarkerRange.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AccessibilityTextMarkerRange.idl; sourceTree = "<group>"; };
</span><span class="cx">                 29A8FCDF145F0358009045A6 /* AccessibilityTextMarkerRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarkerRange.h; sourceTree = "<group>"; };
</span><span class="cx">                 29A8FCE1145F037B009045A6 /* AccessibilityTextMarkerRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTextMarkerRange.cpp; sourceTree = "<group>"; };
</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 = "<group>"; };
+                29A8FCE1345E7021006AA5A7 /* JSAccessibilityTextMarkerRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityTextMarkerRange.h; sourceTree = "<group>"; };
</ins><span class="cx">                 29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityTextMarkerRangeMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2DCE2CD11B84524500C7F832 /* TestControllerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestControllerCocoa.mm; path = cocoa/TestControllerCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2E63ED751891ACE9002A7AFC /* AccessibilityControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityControllerIOS.mm; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PixelDumpSupport.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5322FB4513FDA0EA0041ABCC /* PixelDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelDumpSupport.h; sourceTree = "<group>"; };
</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 = "<group>"; };
+                5641E2CF14335E95008307E5 /* JSTextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextInputController.h; sourceTree = "<group>"; };
</ins><span class="cx">                 5664A49614326377008881BE /* TextInputController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextInputController.idl; sourceTree = "<group>"; };
</span><span class="cx">                 5664A49814326384008881BE /* TextInputController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextInputController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5664A49914326384008881BE /* TextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputController.h; sourceTree = "<group>"; };
</span><span class="cx">                 5670B8261386FC13002EB355 /* EventSenderProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSenderProxy.h; sourceTree = "<group>"; };
</span><span class="cx">                 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = "<group>"; };
</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 = "<group>"; };
+                583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityController.h; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 BC14E4D9120E02D000826C0C /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BC14E4E1120E032000826C0C /* GCController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GCController.idl; sourceTree = "<group>"; };
</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 = "<group>"; };
+                BC14E4E9120E03D800826C0C /* JSGCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGCController.h; sourceTree = "<group>"; };
</ins><span class="cx">                 BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; };
</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 = "InjectedBundle-Info.plist"; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventSendingController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventSendingController.idl; sourceTree = "<group>"; };
</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 = "<group>"; };
+                BC8FD8D1120E545B00F3E71A /* JSEventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventSendingController.h; sourceTree = "<group>"; };
</ins><span class="cx">                 BC9192041333E4F8003011DC /* TestInvocationCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestInvocationCG.cpp; path = cg/TestInvocationCG.cpp; sourceTree = "<group>"; };
</span><del>-                BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = "<group>"; };
-                BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = "<group>"; };
-                BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = "<group>"; };
</del><span class="cx">                 BC952EC511F3C10F003398B4 /* DerivedSources.make */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DerivedSources.make; sourceTree = "<group>"; };
</span><span class="cx">                 BC952ED211F3C29F003398B4 /* TestRunner.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestRunner.idl; sourceTree = "<group>"; };
</span><span class="cx">                 BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = "<group>"; };
</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 = "<group>"; };
+                BC952F1E11F3C652003398B4 /* JSTestRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTestRunner.h; sourceTree = "<group>"; };
</ins><span class="cx">                 BC99A4841208901A007E9F08 /* StringFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringFunctions.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; };
</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 = "External Frameworks and Libraries";
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><ins>+                0F18E71A1D6BC4BC0027E547 /* TestRunnerShared */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E71B1D6BC4E60027E547 /* Bindings */,
+                                0F73B5471BA782FE004B3EF4 /* UIScriptContext */,
+                        );
+                        name = TestRunnerShared;
+                        sourceTree = "<group>";
+                };
+                0F18E71B1D6BC4E60027E547 /* Bindings */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F18E7141D6BC4560027E547 /* JSWrappable.h */,
+                                0F18E7151D6BC4560027E547 /* JSWrapper.cpp */,
+                                0F18E7161D6BC4560027E547 /* JSWrapper.h */,
+                        );
+                        name = Bindings;
+                        sourceTree = "<group>";
+                };
</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 = "<group>";
</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 = "<group>";
</span><span class="lines">@@ -481,7 +501,8 @@
</span><span class="cx">                                 0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */,
</span><span class="cx">                         );
</span><span class="cx">                         name = "Derived Sources";
</span><del>-                        sourceTree = "<group>";
</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 = "Derived Sources";
</span><del>-                        sourceTree = "<group>";
</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 "cmakeconfig.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#include <WebCore/PlatformExportMacros.h>
</ins><span class="cx"> #include <WebKit/WebKit2_C.h>
</span><span class="cx"> #include <wtf/Platform.h>
</span><span class="cx"> #include <wtf/ExportMacros.h>
</span><span class="cx"> #include <runtime/JSExportMacros.h>
</span><span class="cx">
</span><del>-// This is needed because we include WebCore's headers.
-// FIXME: We should include <WebCore/PlatformExportMacros.h> 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 "TestRunnerWKWebView.h"
</span><span class="cx"> #import "UIScriptContext.h"
</span><span class="cx"> #import <UIKit/UIKit.h>
</span><ins>+#import <WebCore/FloatRect.h>
</ins><span class="cx"> #import <WebKit/WKWebViewPrivate.h>
</span><span class="cx"> #import <WebKit/WebKit.h>
</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->objectFromRect(wkRect);
</del><ins>+ WebCore::FloatRect rect(contentVisibleRect.origin.x, contentVisibleRect.origin.y, contentVisibleRect.size.width, contentVisibleRect.size.height);
+ return m_context->objectFromRect(rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UIScriptController::platformSetDidStartFormControlInteractionCallback()
</span></span></pre>
</div>
</div>
</body>
</html>