[WHLSL] Ensure that isLValue is copied by the rewriter
[WebKit-https.git] / Tools / ChangeLog
1 2018-08-29  Thomas Denney  <tdenney@apple.com>
2
3         [WHLSL] Ensure that isLValue is copied by the rewriter
4         https://bugs.webkit.org/show_bug.cgi?id=189083
5
6         The value of isLValue was not propagated when new TernaryExpressions are
7         created in Rewriter.
8
9         Reviewed by Myles C. Maxfield.
10
11         * WebGPUShadingLanguageRI/Rewriter.js:
12         (Rewriter.prototype.visitTernaryExpression):
13         * WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is
14         propagated.
15
16 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
17
18         [WHLSL] Add more functions to the standard library
19         https://bugs.webkit.org/show_bug.cgi?id=188873
20
21         Reviewed by Filip Pizlo.
22
23         This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it.
24
25         There are a few major pieces:
26         1. Swizzle operators are now implemented in the language, instead of as native functions
27         2. Vector constructors are now implemented in the language, instead of as native functions
28         3. The matrix type is implemented
29         4. Vector operator&[] is illegal, and is removed from the compiler
30         5. Vector index setters & index getters are now implemented in the language, instead of as native functions
31         6. Vector and matrix equality operators are implemented in the language, instead of as native functions
32         7. Casting a scalar to a boolean is implemented in the language, instead of as native functions
33         8. Casting a vector to a boolean is not part of the language, and is removed from the compiler
34         9. Half-precision floating point types are implemented
35
36         * WebGPUShadingLanguageRI/All.js:
37         * WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
38         (BuiltinMatrixGetter):
39         (BuiltinMatrixGetter.prototype.get height):
40         (BuiltinMatrixGetter.prototype.get width):
41         (BuiltinMatrixGetter.prototype.toString):
42         (BuiltinMatrixGetter.functions):
43         (BuiltinMatrixGetter.prototype.instantiateImplementation):
44         * WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
45         (BuiltinMatrixSetter):
46         (BuiltinMatrixSetter.prototype.get height):
47         (BuiltinMatrixSetter.prototype.get width):
48         (BuiltinMatrixSetter.prototype.toString):
49         (BuiltinMatrixSetter.functions):
50         (BuiltinMatrixSetter.prototype.instantiateImplementation):
51         * WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed.
52         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed.
53         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js:
54         (BuiltinVectorGetter.prototype.instantiateImplementation):
55         (BuiltinVectorGetter):
56         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js:
57         (BuiltinVectorSetter.functions):
58         (BuiltinVectorSetter.prototype.instantiateImplementation):
59         (BuiltinVectorSetter):
60         * WebGPUShadingLanguageRI/CallExpression.js:
61         (CallExpression.prototype.resolve):
62         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js:
63         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
64         (checkTypesWithArguments.TypeWithArgumentsChecker):
65         (checkTypesWithArguments):
66         * WebGPUShadingLanguageRI/Checker.js:
67         (Checker.prototype.visitVectorType):
68         (Checker.prototype.visitMatrixType):
69         * WebGPUShadingLanguageRI/ConstexprFolder.js:
70         (ConstexprFolder.prototype.visitCallExpression):
71         (ConstexprFolder):
72         * WebGPUShadingLanguageRI/Evaluator.js:
73         (Evaluator.prototype.visitTernaryExpression):
74         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
75         (FlattenedStructOffsetGatherer.prototype.visitMatrixType):
76         (FlattenedStructOffsetGatherer):
77         * WebGPUShadingLanguageRI/Intrinsics.js:
78         (Intrinsics.):
79         (Intrinsics):
80         * WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js.
81         (MatrixType):
82         (MatrixType.prototype.get elementType):
83         (MatrixType.prototype.get numRows):
84         (MatrixType.prototype.get numColumns):
85         (MatrixType.prototype.get numRowsValue):
86         (MatrixType.prototype.get numColumnsValue):
87         (MatrixType.prototype.get size):
88         (MatrixType.prototype.unifyImpl):
89         (MatrixType.prototype.populateDefaultValue):
90         (MatrixType.prototype.toString):
91         * WebGPUShadingLanguageRI/NameContext.js:
92         (NameContext.prototype.add):
93         * WebGPUShadingLanguageRI/NativeType.js:
94         (NativeType.create):
95         (NativeType):
96         * WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js.
97         (OperatorAnderIndexer):
98         * WebGPUShadingLanguageRI/OperatorBool.js: Removed.
99         * WebGPUShadingLanguageRI/Prepare.js:
100         (let.prepare):
101         * WebGPUShadingLanguageRI/Program.js:
102         (Program.prototype.add):
103         * WebGPUShadingLanguageRI/Rewriter.js:
104         (Rewriter.prototype.visitMatrixType):
105         (Rewriter):
106         * WebGPUShadingLanguageRI/SPIRV.html:
107         * WebGPUShadingLanguageRI/StandardLibrary.js:
108         (operator.bool):
109         (bool.operator):
110         (uchar.operator):
111         (ushort.operator):
112         (char.operator):
113         (short.operator):
114         (uint.operator):
115         (int.operator):
116         (half.operator):
117         (float.operator):
118         (uchar2.operator):
119         (uchar3.operator):
120         (uchar4.operator):
121         (ushort2.operator):
122         (ushort3.operator):
123         (ushort4.operator):
124         (uint2.operator):
125         (uint3.operator):
126         (uint4.operator):
127         (char2.operator):
128         (char3.operator):
129         (char4.operator):
130         (short2.operator):
131         (short3.operator):
132         (short4.operator):
133         (int2.operator):
134         (int3.operator):
135         (int4.operator):
136         (half2.operator):
137         (half3.operator):
138         (half4.operator):
139         (float2.operator):
140         (float3.operator):
141         (float4.operator):
142         (half2x2.operator):
143         (half2x3.operator):
144         (half2x4.operator):
145         (half3x2.operator):
146         (half3x3.operator):
147         (half3x4.operator):
148         (half4x2.operator):
149         (half4x3.operator):
150         (half4x4.operator):
151         (float2x2.operator):
152         (float2x3.operator):
153         (float2x4.operator):
154         (float3x2.operator):
155         (float3x3.operator):
156         (float3x4.operator):
157         (float4x2.operator):
158         (float4x3.operator):
159         (float4x4.operator):
160         (operator.bool2):
161         (operator.bool3):
162         (operator.bool4):
163         (uint.operator.length):
164         (operator.uchar2):
165         (operator.uchar3):
166         (operator.uchar4):
167         (operator.ushort2):
168         (operator.ushort3):
169         (operator.ushort4):
170         (operator.uint2):
171         (operator.uint3):
172         (operator.uint4):
173         (operator.char2):
174         (operator.char3):
175         (operator.char4):
176         (operator.short2):
177         (operator.short3):
178         (operator.short4):
179         (operator.int2):
180         (operator.int3):
181         (operator.int4):
182         (operator.half2):
183         (operator.half3):
184         (operator.half4):
185         (operator.float2):
186         (operator.float3):
187         (operator.float4):
188         (bool2.operator):
189         (bool3.operator):
190         (bool4.operator):
191         (allVectorTypeNames):
192         * WebGPUShadingLanguageRI/SwizzleOp.js: Removed.
193         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
194         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType):
195         (synthesizeDefaultConstructorOperator.FindAllTypes):
196         (synthesizeDefaultConstructorOperator):
197         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed.
198         * WebGPUShadingLanguageRI/Test.html:
199         * WebGPUShadingLanguageRI/Test.js:
200         (makeHalf):
201         (checkHalf):
202         * WebGPUShadingLanguageRI/Visitor.js:
203         (Visitor.prototype.visitMatrixType):
204         (Visitor):
205         * WebGPUShadingLanguageRI/index.html:
206
207 2018-08-29  Simon Fraser  <simon.fraser@apple.com>
208
209         Teach webkitpy how to check leaks and treat leaks as test failures
210         https://bugs.webkit.org/show_bug.cgi?id=189067
211
212         Reviewed by Darin Adler.
213         
214         Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched
215         with a --world-leaks argument (which is renamed in this patch for consistency). This enables the
216         behavior added in r235408, namely that they check for leaked documents after each test, and at
217         the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the
218         "#CHECK FOR WORLD LEAKS" command to get still-live documents.
219         
220         LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(),
221         and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block.
222         If this results block includes leaks, we convert an existing TestResult into a LEAK failure
223         in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html
224
225         Unit tests are updated with some leak examples.
226
227         * DumpRenderTree/mac/DumpRenderTree.mm:
228         (initializeGlobalsFromCommandLineOptions):
229         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
230         (ParsedJSONResultsTest):
231         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
232         (LayoutTestRunner._annotate_results_with_additional_failures):
233         (LayoutTestRunner._handle_finished_test_group):
234         (Worker.handle):
235         (Worker._run_test):
236         (Worker._do_post_tests_work):
237         (Worker._finished_test_group):
238         (Worker._run_test_in_another_thread):
239         * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
240         (JSONLayoutResultsGenerator):
241         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
242         (TestExpectationParser):
243         (TestExpectations):
244         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
245         (Base.get_basic_tests):
246         * Scripts/webkitpy/layout_tests/models/test_failures.py:
247         (determine_result_type):
248         (FailureLeak):
249         (FailureLeak.__init__):
250         (FailureLeak.message):
251         (FailureDocumentLeak):
252         (FailureDocumentLeak.__init__):
253         (FailureDocumentLeak.message):
254         * Scripts/webkitpy/layout_tests/models/test_results.py:
255         (TestResult.convert_to_failure):
256         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
257         (TestRunResults.change_result_to_failure):
258         (_interpret_test_failures):
259         (summarize_results):
260         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
261         (get_result):
262         (run_results):
263         (summarized_results):
264         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
265         (parse_args):
266         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
267         (parse_args):
268         (RunTest.test_check_for_world_leaks):
269         * Scripts/webkitpy/port/driver.py:
270         (DriverPostTestOutput):
271         (DriverPostTestOutput.__init__):
272         (Driver.do_post_tests_work):
273         (Driver._parse_world_leaks_output):
274         (Driver.cmd_line):
275         (DriverProxy.do_post_tests_work):
276         * Scripts/webkitpy/port/test.py:
277         (unit_test_list):
278         * WebKitTestRunner/Options.cpp:
279         (WTR::OptionsHandler::OptionsHandler):
280         * WebKitTestRunner/TestController.cpp:
281         (WTR::TestController::checkForWorldLeaks):
282
283 2018-08-29  David Kilzer  <ddkilzer@apple.com>
284
285         Remove empty directories from from svn.webkit.org repository
286         <https://webkit.org/b/189081>
287
288         * DumpRenderTree/TestNetscapePlugIn/unix: Removed.
289         * WebKitTestRunner/UIScriptContext: Removed.
290
291 2018-08-29  Pablo Saavedra  <psaavedra@igalia.com>
292
293         [GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP
294         https://bugs.webkit.org/show_bug.cgi?id=189077
295
296         Reviewed by Michael Catanzaro.
297
298         Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP
299         This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly
300         Linux ARMv7 Thumb2 SoftFP Release' buildjob.
301
302         * BuildSlaveSupport/build.webkit.org-config/config.json:
303         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
304
305 2018-08-28  Daniel Bates  <dabates@apple.com>
306
307         lldb-webkit: KeyError thrown for OptionSet
308         https://bugs.webkit.org/show_bug.cgi?id=189062
309
310         Reviewed by Simon Fraser.
311
312         For some reason lldb(1) may not retrieve the enumerator names for an enum value
313         when it calls update() on the synthetic children provider. If this occurs then
314         bail out as we cannot compute what enumerators are in the set.
315
316         * lldb/lldb_webkit.py:
317         (WTFOptionSetProvider.update):
318
319 2018-08-28  Sihui Liu  <sihui_liu@apple.com>
320
321         Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
322         https://bugs.webkit.org/show_bug.cgi?id=189037
323
324         Reviewed by Chris Dumez.
325
326         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
327         (TEST):
328
329 2018-08-28  David Kilzer  <ddkilzer@apple.com>
330
331         Fix incorrect use of `sourceTree = "<group>";` for built products and frameworks in Xcode projects
332
333         Found by tidy-Xcode-project-file script (see Bug 188754).
334
335         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
336         (IOKit.framework): Use `sourceTree = "<absolute>";` to match
337         other frameworks in the project.
338         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
339         (WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for
340         built product instead of relative build directory path.
341         * jsc-cli/jsc-cli.xcodeproj/project.pbxproj:
342         (JavaScriptCore.framework): Ditto.
343         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
344         (libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built
345         product.
346
347 2018-08-28  Alex Christensen  <achristensen@webkit.org>
348
349         Fix 32-bit Mac build.
350
351         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
352
353 2018-08-28  Alex Christensen  <achristensen@webkit.org>
354
355         REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out
356         https://bugs.webkit.org/show_bug.cgi?id=189050
357
358         Reviewed by Tim Horton.
359
360         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
361         This test wasn't run on iOS before.  Let's re-introduce the WK_HAVE_C_SPI guard.
362
363 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
364
365         [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
366         https://bugs.webkit.org/show_bug.cgi?id=189049
367
368         Reviewed by Tim Horton.
369
370         Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the
371         load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`.
372
373         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
374         (simulateFolderDragWithURL):
375
376 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
377
378         [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
379         https://bugs.webkit.org/show_bug.cgi?id=189004
380
381         Reviewed by Dan Bernstein.
382
383         Move off of deprecated attachment insertion SPI.
384
385         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
386         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
387         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
388         (-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted.
389
390 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
391
392         Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
393         https://bugs.webkit.org/show_bug.cgi?id=188994
394
395         Reviewed by Tim Horton.
396         
397         This patch adds the notion of a "control command" in the protocol between webkitpy and 
398         WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a #
399         that is checked for before trying to parse the input as test URL. For now, just one
400         commmand is supported, which is "#CHECK FOR WORLD LEAKS".
401         
402         In response to the command, the tool dumps an output block in the usual pseudo-MIME-style,
403         with a trailing "#EOF". Future patches will add support to webkitpy to parse this output.
404         
405         DumpRenderTree stubs out the command, returning an empty block.
406         
407         WebKitTestRunner responds to the command by dumping the list of live documents, if it was
408         run with the --check-for-world-leaks option.
409         
410         When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via
411         WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test
412         that leaked a document), and keeps them in a map of document identifier to test and live document URL.
413         Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to
414         clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense)
415         after which it requests the list of live documents for a final time, excluding any that are loaded
416         in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this
417         list are therefore leaked (or abandoned).
418         
419         Future patches will hook up webkitpy reporting for leaked documents.
420
421         * DumpRenderTree/mac/DumpRenderTree.mm:
422         (initializeGlobalsFromCommandLineOptions):
423         (handleControlCommand):
424         (runTestingServerLoop):
425         * DumpRenderTree/win/DumpRenderTree.cpp:
426         (handleControlCommand):
427         (main):
428         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
429         (WTR::postGCTask):
430         (WTR::InjectedBundle::reportLiveDocuments):
431         (WTR::InjectedBundle::didReceiveMessageToPage):
432         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
433         * WebKitTestRunner/Options.cpp:
434         (WTR::handleOptionCheckForWorldLeaks):
435         (WTR::OptionsHandler::OptionsHandler):
436         * WebKitTestRunner/Options.h:
437         * WebKitTestRunner/TestController.cpp:
438         (WTR::AsyncTask::run):
439         (WTR::AsyncTask::currentTask):
440         (WTR::TestController::initialize):
441         (WTR::TestController::ensureViewSupportsOptionsForTest):
442         (WTR::TestController::resetStateToConsistentValues):
443         (WTR::TestController::updateLiveDocumentsAfterTest):
444         (WTR::TestController::checkForWorldLeaks):
445         (WTR::TestController::findAndDumpWorldLeaks):
446         (WTR::TestController::willDestroyWebView):
447         (WTR::parseInputLine):
448         (WTR::TestController::waitForCompletion):
449         (WTR::TestController::handleControlCommand):
450         (WTR::TestController::runTestingServerLoop):
451         (WTR::TestController::run):
452         (WTR::TestController::didReceiveLiveDocumentsList):
453         (WTR::TestController::didReceiveMessageFromInjectedBundle):
454         * WebKitTestRunner/TestController.h:
455         (WTR::AsyncTask::AsyncTask):
456         (WTR::AsyncTask::taskComplete):
457         (WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo):
458         * WebKitTestRunner/TestInvocation.cpp:
459         (WTR::TestInvocation::invoke):
460         * WebKitTestRunner/TestOptions.h:
461         (WTR::TestOptions::hasSameInitializationOptions const):
462
463 2018-08-27  Alex Christensen  <achristensen@webkit.org>
464
465         Fix API test after r235398
466         https://bugs.webkit.org/show_bug.cgi?id=188997
467
468         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
469         (TestWebKitAPI::setPageLoaderClient):
470         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
471         willGoToBackForwardListItem is unused and unsupported.  Removing its check.
472
473 2018-08-27  Daniel Bates  <dabates@apple.com>
474
475         Partial revert of r235376
476         https://bugs.webkit.org/show_bug.cgi?id=189011
477
478         For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra
479         Debug and Apple High Sierra Debug bots:
480
481             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple
482             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple
483
484         Will investigate offline.
485
486         * lldb/lldbWebKitTester/main.cpp:
487         (testSummaryProviders):
488         * lldb/lldb_webkit_unittest.py:
489         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
490         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted.
491         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted.
492         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted.
493         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted.
494
495 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
496
497         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
498         https://bugs.webkit.org/show_bug.cgi?id=188931
499
500         Reviewed by Wenson Hsieh.
501
502         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
503
504 2018-08-27  Justin Fan  <justin_fan@apple.com>
505
506         Add Justin Fan to list of WebKit contributors
507         https://bugs.webkit.org/show_bug.cgi?id=184431
508
509         * Scripts/webkitpy/common/config/contributors.json:
510
511 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
512
513         Convert timeout values in WebKitTestRunner to WTF::Seconds
514         https://bugs.webkit.org/show_bug.cgi?id=188987
515
516         Reviewed by Ryosuke Niwa.
517         
518         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
519         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
520         using integers, convert to and from milliseconds.
521         
522         Also do some #pragma once, and initializer cleanup.
523
524         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
525         (WTR::InjectedBundle::didReceiveMessageToPage):
526         (WTR::InjectedBundle::beginTesting):
527         (WTR::InjectedBundle::InjectedBundle): Deleted.
528         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
529         * WebKitTestRunner/InjectedBundle/TestRunner.h:
530         (WTR::TestRunner::timeout):
531         (WTR::TestRunner::setCustomTimeout):
532         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
533         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
534         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
535         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
536         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
537         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
538         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
539         * WebKitTestRunner/TestController.cpp:
540         (WTR::TestController::TestController):
541         (WTR::parseInputLine):
542         (WTR::TestController::runTest):
543         (WTR::TestController::runUntil):
544         (WTR::TestController::didReceiveMessageFromInjectedBundle):
545         * WebKitTestRunner/TestController.h:
546         * WebKitTestRunner/TestInvocation.cpp:
547         (WTR::TestInvocation::shortTimeout const):
548         (WTR::TestInvocation::createTestSettingsDictionary):
549         * WebKitTestRunner/TestInvocation.h:
550         * WebKitTestRunner/TestOptions.h:
551         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
552         (WTR::TestController::platformRunUntil):
553         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
554         (WTR::TestController::platformRunUntil):
555         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
556         (WTR::TestController::platformRunUntil):
557
558 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
559
560         Convert timeout values in WebKitTestRunner to WTF::Seconds
561         https://bugs.webkit.org/show_bug.cgi?id=188987
562
563         Reviewed by Ryosuke Niwa.
564         
565         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
566         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
567         using integers, convert to and from milliseconds.
568         
569         Also do some #pragma once, and initializer cleanup.
570
571         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
572         (WTR::InjectedBundle::didReceiveMessageToPage):
573         (WTR::InjectedBundle::beginTesting):
574         (WTR::InjectedBundle::InjectedBundle): Deleted.
575         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
576         * WebKitTestRunner/InjectedBundle/TestRunner.h:
577         (WTR::TestRunner::timeout):
578         (WTR::TestRunner::setCustomTimeout):
579         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
580         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
581         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
582         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
583         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
584         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
585         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
586         * WebKitTestRunner/TestController.cpp:
587         (WTR::TestController::TestController):
588         (WTR::parseInputLine):
589         (WTR::TestController::runTest):
590         (WTR::TestController::runUntil):
591         (WTR::TestController::didReceiveMessageFromInjectedBundle):
592         * WebKitTestRunner/TestController.h:
593         * WebKitTestRunner/TestInvocation.cpp:
594         (WTR::TestInvocation::shortTimeout const):
595         (WTR::TestInvocation::createTestSettingsDictionary):
596         * WebKitTestRunner/TestInvocation.h:
597         * WebKitTestRunner/TestOptions.h:
598         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
599         (WTR::TestController::platformRunUntil):
600         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
601         (WTR::TestController::platformRunUntil):
602         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
603         (WTR::TestController::platformRunUntil):
604
605 2018-08-27  Alex Christensen  <achristensen@webkit.org>
606
607         REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
608         https://bugs.webkit.org/show_bug.cgi?id=189002
609
610         Reviewed by Tim Horton.
611
612         * TestWebKitAPI/Tests/WebKit/WillLoad.cpp:
613         (TestWebKitAPI::TEST_F):
614
615 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
616
617         [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory
618         https://bugs.webkit.org/show_bug.cgi?id=188903
619         <rdar://problem/43702993>
620
621         Reviewed by Tim Horton.
622
623         Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in
624         both iOS and macOS:
625         •       Dropping a folder as an attachment element, and then moving that attachment element in the document by
626                 dragging and dropping.
627         •       Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more
628                 _WKAttachment SPI to swap the attachments' backing file wrappers.
629
630         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
631         (runTestWithTemporaryFolder):
632
633         Add a helper function to run a test with a new folder path, created in the temporary directory and populated
634         with some sample content. This folder is deleted after running the test.
635
636         (simulateFolderDragWithURL):
637
638         Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source
639         external to the web view.
640
641         (platformCopyRichTextWithMultipleAttachments):
642         (platformCopyRichTextWithImage):
643         (platformCopyPNG):
644         (TestWebKitAPI::TEST):
645
646         Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically,
647         ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would
648         preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but
649         this quirk is no longer supported.
650
651         Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC.
652
653         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
654
655         Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient
656         when using the same DragAndDropSimulator to perform multiple drags in a single test.
657
658         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
659         (-[DragAndDropSimulator clearExternalDragInformation]):
660         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
661         (-[DragAndDropSimulator clearExternalDragInformation]):
662
663 2018-08-27  Alex Christensen  <achristensen@webkit.org>
664
665         Translate 4 tests using WKPageLoaderClient to ObjC
666         https://bugs.webkit.org/show_bug.cgi?id=188827
667
668         Reviewed by Tim Horton.
669
670         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
671         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
672         willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
673         bundle functionality any more.
674
675         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
676         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
677         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
678         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
679         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
680         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
681         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
682         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
683         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
684         (TestWebKitAPI::TEST):
685         (): Deleted.
686         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
687         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
688         (TestWebKitAPI::setPageLoaderClient): Deleted.
689         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
690         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
691         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
692         (TestWebKitAPI::TEST):
693         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
694         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
695         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
696         (TestWebKitAPI::setInjectedBundleClient): Deleted.
697         (TestWebKitAPI::setPageLoaderClient): Deleted.
698         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
699         (-[SessionStateDelegate webView:didFinishNavigation:]):
700         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
701         (TestWebKitAPI::createSessionStateData):
702         (TestWebKitAPI::TEST):
703         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
704         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
705         (TestWebKitAPI::setPageLoaderClient): Deleted.
706         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
707         (-[BackForwardClient webView:didFinishNavigation:]):
708         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
709         (TestWebKitAPI::TEST):
710         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
711         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
712         (TestWebKitAPI::setPageLoaderClient): Deleted.
713
714 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
715
716         [Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project
717         https://bugs.webkit.org/show_bug.cgi?id=188989
718
719         Reviewed by Andy Estes.
720
721         Move this into the Tests/WebKit/Resources group in the project.
722
723         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
724
725 2018-08-27  Thomas Denney  <tdenney@apple.com>
726
727         Avoid an exception in the interactive interpreter
728         https://bugs.webkit.org/show_bug.cgi?id=188991
729
730         Reviewed by Myles C. Maxfield.
731
732         * WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a
733         local variable
734
735 2018-08-27  Thomas Denney  <tdenney@apple.com>
736
737         Allow new vector types to work with the interactive interpreter
738         https://bugs.webkit.org/show_bug.cgi?id=188988
739
740         Reviewed by Myles C. Maxfield.
741
742         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
743         (FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not
744         unncessarily visit the type arguments of a TypeRef, as by this point
745         there are none that are relevant.
746         * WebGPUShadingLanguageRI/Intrinsics.js:
747         (Intrinsics): Treat VectorType as a primitive type.
748
749 2018-08-27  Keith Rollin  <krollin@apple.com>
750
751         Build system support for LTO
752         https://bugs.webkit.org/show_bug.cgi?id=187785
753         <rdar://problem/42353132>
754
755         Reviewed by Dan Bernstein.
756
757         Add tools/scripts support for controlling LTO builds.
758
759         * Scripts/build-webkit: Add --lto-mode={none,thin,full}.
760         * Scripts/set-webkit-configuration: Add support for saving LTO
761         configuration to WebKitBuild/LTO.
762         * Scripts/webkitdirs.pm: Add support for reading configuration from
763         WebKitBuild/LTO and providing it to xcodebuild.
764         (determineLTOMode):
765         (ltoMode):
766         (XcodeOptions):
767
768 2018-08-27  Daniel Bates  <dabates@apple.com>
769
770         lldb-webkit: Pretty-print OptionSet
771         https://bugs.webkit.org/show_bug.cgi?id=188936
772
773         Reviewed by Simon Fraser.
774
775         Add LLDB formatters to pretty-print an OptionSet.
776
777         * lldb/lldbWebKitTester/main.cpp:
778         (testSummaryProviders):
779         * lldb/lldb_webkit.py:
780         (__lldb_init_module):
781         (__lldb_init_module.lldb_webkit):
782         (WTFOptionSet_SummaryProvider):
783         (WTFOptionSetProvider):
784         (WTFOptionSetProvider.__init__):
785         (WTFOptionSetProvider.has_children):
786         (WTFOptionSetProvider.num_children):
787         (WTFOptionSetProvider.get_child_index):
788         (WTFOptionSetProvider.get_child_at_index):
789         (WTFOptionSetProvider.update):
790         * lldb/lldb_webkit_unittest.py:
791         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
792         (TestSummaryProviders):
793         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty):
794         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple):
795         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty):
796         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple):
797
798 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
799
800         [Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose
801         https://bugs.webkit.org/show_bug.cgi?id=188957
802         <rdar://problem/43737715>
803
804         Reviewed by Darin Adler.
805
806         Add a new API test to verify that pasting a web archive containing several image elements with alt attributes
807         generates _WKAttachments whose names reflect those alt attributes.
808
809         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
810         (testGIFFileURL):
811         (testGIFData):
812         (TestWebKitAPI::TEST):
813
814 2018-08-27  Alex Christensen  <achristensen@webkit.org>
815
816         Unreviewed, rolling out r235367.
817
818         Broke iOS build.
819
820         Reverted changeset:
821
822         "Translate 4 tests using WKPageLoaderClient to ObjC"
823         https://bugs.webkit.org/show_bug.cgi?id=188827
824         https://trac.webkit.org/changeset/235367
825
826 2018-08-27  Alex Christensen  <achristensen@webkit.org>
827
828         Fix GTK build.
829
830         * TestWebKitAPI/CMakeLists.txt:
831
832 2018-08-27  Alex Christensen  <achristensen@webkit.org>
833
834         Fix iOS build.
835
836         * TestWebKitAPI/PlatformWebView.h:
837
838 2018-08-27  Alex Christensen  <achristensen@webkit.org>
839
840         Translate 4 tests using WKPageLoaderClient to ObjC
841         https://bugs.webkit.org/show_bug.cgi?id=188827
842
843         Reviewed by Tim Horton.
844
845         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
846         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
847         willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
848         bundle functionality any more.
849
850         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
851         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
852         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
853         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
854         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
855         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
856         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
857         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
858         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
859         (TestWebKitAPI::TEST):
860         (): Deleted.
861         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
862         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
863         (TestWebKitAPI::setPageLoaderClient): Deleted.
864         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
865         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
866         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
867         (TestWebKitAPI::TEST):
868         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
869         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
870         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
871         (TestWebKitAPI::setInjectedBundleClient): Deleted.
872         (TestWebKitAPI::setPageLoaderClient): Deleted.
873         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
874         (-[SessionStateDelegate webView:didFinishNavigation:]):
875         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
876         (TestWebKitAPI::createSessionStateData):
877         (TestWebKitAPI::TEST):
878         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
879         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
880         (TestWebKitAPI::setPageLoaderClient): Deleted.
881         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
882         (-[BackForwardClient webView:didFinishNavigation:]):
883         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
884         (TestWebKitAPI::TEST):
885         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
886         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
887         (TestWebKitAPI::setPageLoaderClient): Deleted.
888
889 2018-08-27  Keith Miller  <keith_miller@apple.com>
890
891         test262-runner -s --test-only should replace test results
892         https://bugs.webkit.org/show_bug.cgi?id=188450
893
894         Reviewed by Michael Saboff.
895
896         * Scripts/test262/Runner.pm:
897         (main):
898         (SetFailureForTest):
899         (UpdateResults):
900
901 2018-08-26  Sam Weinig  <sam@webkit.org>
902
903         Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
904         https://bugs.webkit.org/show_bug.cgi?id=188958
905
906         Reviewed by Anders Carlsson.
907
908         * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
909         Update test protocol to have inheritance.
910
911 2018-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
912
913         [Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments
914         https://bugs.webkit.org/show_bug.cgi?id=188933
915         <rdar://problem/43699724>
916
917         Reviewed by Darin Adler.
918
919         Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new
920         tests. These new tests exercise the following cases:
921         •       Inserting and removing newlines before an inline image with an attachment element does not cause new
922                 _WKAttachments to be created and destroyed.
923         •       Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI
924                 process with the original _WKAttachment.
925         •       A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to
926                 lose a _WKAttachment.
927
928         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
929         (-[TestWKWebView expectElementCount:tagName:]):
930         (TestWebKitAPI::TEST):
931
932         Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted
933         as image elements, but still have associated attachment elements whose attachment identifiers (observed via
934         script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process.
935
936         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
937         (-[DragAndDropSimulator runFrom:to:]):
938         (-[DragAndDropSimulator continueDragSession]):
939         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
940
941         Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning
942         execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't
943         flaky, due to how the promised data is retrieved asynchronously when performing the drop.
944
945         (-[DragAndDropSimulator _webView:didPerformDragOperation:]):
946
947 2018-08-26  Lucas Forschler  <lforschler@apple.com>
948
949         Open svn.webkit.org for commits.
950
951 2018-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
952
953         Unreviewed test fix after r235249
954         https://bugs.webkit.org/show_bug.cgi?id=178981
955
956         * WebGPUShadingLanguageRI/Test.js:
957
958 2018-08-24  Alex Christensen  <achristensen@webkit.org>
959
960         Introduce _WKInspector
961         https://bugs.webkit.org/show_bug.cgi?id=188923
962         <rdar://problem/34657861>
963
964         Reviewed by Brian Burg.
965
966         * MiniBrowser/mac/WK2BrowserWindowController.m:
967         (-[WK2BrowserWindowController validateMenuItem:]):
968         (-[WK2BrowserWindowController showHideWebInspector:]):
969
970 2018-08-24  Jonathan Bedard  <jbedard@apple.com>
971
972         Fix handling of iOS minor versions in default_baseline_search_path
973         https://bugs.webkit.org/show_bug.cgi?id=188902
974
975         Reviewed by Aakash Jain.
976
977         * Scripts/webkitpy/port/ios.py:
978         (IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat
979         it as a the CURRENT_VERSION.
980
981 2018-08-24  Antti Koivisto  <antti@apple.com>
982
983         Allow creating WeakPtrs to const objects
984         https://bugs.webkit.org/show_bug.cgi?id=188785
985
986         Reviewed by Geoff Garen.
987
988         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
989         (TestWebKitAPI::Base::weakPtrFactory const):
990         (TestWebKitAPI::TEST):
991         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
992
993 2018-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
994
995         [GTK][WPE] Add API to inject/register user content in isolated worlds
996         https://bugs.webkit.org/show_bug.cgi?id=188883
997
998         Reviewed by Michael Catanzaro.
999
1000         Add test cases for the new API.
1001
1002         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
1003         (isStyleSheetInjectedForURLAtPath):
1004         (isScriptInjectedForURLAtPath):
1005         (testUserContentManagerInjectedStyleSheet):
1006         (testUserContentManagerInjectedScript):
1007         (UserScriptMessageTest::registerHandler):
1008         (UserScriptMessageTest::unregisterHandler):
1009         (UserScriptMessageTest::postMessageAndWaitUntilReceived):
1010         (testUserContentManagerScriptMessageInWorldReceived):
1011         (beforeAll):
1012
1013 2018-08-23  Simon Fraser  <simon.fraser@apple.com>
1014
1015         Add support for dumping GC heap snapshots, and a viewer
1016         https://bugs.webkit.org/show_bug.cgi?id=186416
1017
1018         Reviewed by Joseph Pecoraro.
1019
1020         Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this
1021         page for inspection (or set via the 'filename' URL parameter).
1022
1023         For now, this page shows all objects, all roots, and the shortest path from a root
1024         to all HTMLDocuments and Windows.
1025
1026         * GCHeapInspector/gc-heap-inspector.html: Added.
1027         * GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js.
1028         * GCHeapInspector/script/interface.js: Added.
1029
1030 2018-08-23  Alex Christensen  <achristensen@webkit.org>
1031
1032         Add new _webViewRequestPointerLock SPI with a completionHandler
1033         https://bugs.webkit.org/show_bug.cgi?id=188907
1034         <rdar://problem/35871109>
1035
1036         Reviewed by Andy Estes.
1037
1038         * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
1039         (-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]):
1040         (-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
1041         (TEST):
1042
1043 2018-08-23  David Fenton  <david_fenton@apple.com>
1044
1045         Unreviewed, rolling out r235129.
1046
1047         broke internal builds
1048
1049         Reverted changeset:
1050
1051         "Allow creating WeakPtrs to const objects"
1052         https://bugs.webkit.org/show_bug.cgi?id=188785
1053         https://trac.webkit.org/changeset/235129
1054
1055 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1056
1057         API tests should output json results
1058         https://bugs.webkit.org/show_bug.cgi?id=188869
1059         <rdar://problem/43615652>
1060
1061         Reviewed by Aakash Jain.
1062
1063         JSON output for API tests is of the form:
1064             {
1065                 "Failed": [{"name": <test name>, "output": <test log>}],
1066                 "Timedout": [...],
1067                 "Skipped": [...],
1068                 "Crashed": [...]
1069             }
1070         Tests which are successful are not displayed in the json output.
1071
1072         * Scripts/webkitpy/api_tests/manager.py:
1073         (Manager.run): Print test results to provided file as a json dictionary.
1074         * Scripts/webkitpy/api_tests/run_api_tests.py:
1075         (run): Pass json option.
1076         (parse_args): Add --json-output flag.
1077
1078 2018-08-23  Andy Estes  <aestes@apple.com>
1079
1080         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
1081         https://bugs.webkit.org/show_bug.cgi?id=188829
1082
1083         Reviewed by Tim Horton.
1084
1085         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1086
1087 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
1088
1089         [WSL] Ternary expressions appear to be unimplemented
1090         https://bugs.webkit.org/show_bug.cgi?id=178981
1091
1092         Reviewed by Saam Barati.
1093
1094         Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e)
1095         is parsed as (a ? b : (c ? d : e)).
1096
1097         * WebGPUShadingLanguageRI/All.js:
1098         * WebGPUShadingLanguageRI/Checker.js:
1099         (Checker.prototype.visitTernaryExpression):
1100         * WebGPUShadingLanguageRI/Evaluator.js:
1101         (Evaluator.prototype.visitTernaryExpression):
1102         * WebGPUShadingLanguageRI/NormalUsePropertyResolver.js:
1103         (NormalUsePropertyResolver.prototype.visitTernaryExpression):
1104         (NormalUsePropertyResolver):
1105         * WebGPUShadingLanguageRI/Parse.js:
1106         (parsePossibleTernaryConditional):
1107         * WebGPUShadingLanguageRI/PropertyResolver.js:
1108         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression):
1109         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
1110         (PropertyResolver.prototype._visitRValuesWithinLValue):
1111         * WebGPUShadingLanguageRI/Rewriter.js:
1112         (Rewriter.prototype.visitTernaryExpression):
1113         * WebGPUShadingLanguageRI/SPIRV.html:
1114         * WebGPUShadingLanguageRI/Test.html:
1115         * WebGPUShadingLanguageRI/Test.js:
1116         * WebGPUShadingLanguageRI/Visitor.js:
1117         (Visitor.prototype.visitProtocolDecl):
1118         * WebGPUShadingLanguageRI/index.html:
1119
1120 2018-08-22  Ryosuke Niwa  <rniwa@webkit.org>
1121
1122         Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
1123         https://bugs.webkit.org/show_bug.cgi?id=188880
1124
1125         Reviewed by Saam Barati.
1126
1127         Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
1128         were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
1129         test WebKit's behavior in layout tests.
1130
1131         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1132         (WTR::TestRunner::terminateNetworkProcess):
1133         (WTR::TestRunner::terminateServiceWorkerProcess):
1134         (WTR::TestRunner::terminateStorageProcess):
1135         * WebKitTestRunner/TestInvocation.cpp:
1136         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
1137         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1138
1139 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
1140
1141         [WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
1142         https://bugs.webkit.org/show_bug.cgi?id=188773
1143
1144         Reviewed by Filip Pizlo.
1145
1146         Before this patch, it was impossible to represent "native typedef vector<float, 4>" because NativeTypes couldn't have
1147         typeArguments.
1148
1149         Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like
1150         "vector<int, 3>" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then,
1151         there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could
1152         be uniquely identified by name. That name was then matched to the string-only NativeType name.
1153
1154         This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D<float4>) because they don't have any
1155         natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D<float4> is
1156         the same as Texture2D<vector<float, 4>>. Similarly, an author may wish to typedef float4 to a different name.
1157
1158         It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner
1159         type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D<float4> because that
1160         information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to
1161         implement in the future.
1162
1163         So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have
1164         typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each
1165         TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field
1166         which had been set - this was true even before this patch.
1167
1168         This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types
1169         that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the
1170         NameContext for the appropriate array. This is the same way that function resolution works.
1171
1172         We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is
1173         an okay start. This works just about the same way that function overload resolution works. 
1174
1175         * WebGPUShadingLanguageRI/All.js:
1176         * WebGPUShadingLanguageRI/CallExpression.js:
1177         (CallExpression.prototype.resolve):
1178         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types
1179         have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check.
1180         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
1181         (checkTypesWithArguments.TypeWithArgumentsChecker):
1182         (checkTypesWithArguments):
1183         * WebGPUShadingLanguageRI/Checker.js:
1184         (Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with
1185         typeArguments share names, this has to be updated to map strings to arrays for these types.
1186         (Checker.prototype.visitTypeRef):
1187         * WebGPUShadingLanguageRI/InferTypesForCall.js:
1188         (inferTypesForCall): Don't know why this was here.
1189         (inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments.
1190         * WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they
1191         don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This
1192         moves in the direction of matching the standard library in the spec.
1193         (Intrinsics.cast):
1194         (Intrinsics.bitwiseCast):
1195         (Intrinsics.castToHalf):
1196         (Intrinsics.):
1197         (Intrinsics):
1198         * WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays.
1199         (NameContext.prototype.add):
1200         (NameContext.prototype.get let):
1201         (NameContext.underlyingThings.prototype.else):
1202         (NameContext.prototype.Symbol.iterator):
1203         (NameContext):
1204         * WebGPUShadingLanguageRI/NameResolver.js:
1205         (NameResolver.prototype.visitTypeRef): Call TypeRef.resolve().
1206         (NameResolver.prototype.visitCallExpression):
1207         (NameResolver):
1208         (NameResolver.prototype.visitVectorType): Deleted.
1209         * WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now.
1210         (NativeType):
1211         (NativeType.prototype.get typeArguments):
1212         (NativeType.prototype.toString):
1213         (NativeType.create):
1214         * WebGPUShadingLanguageRI/Prepare.js:
1215         (let.prepare):
1216         * WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays.
1217         (Program.prototype.add):
1218         (Program.prototype.toString):
1219         (Program):
1220         * WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed.
1221         * WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays.
1222         (resolveNamesInTypes):
1223         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments.
1224         * WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays.
1225         (resolveTypeDefsInTypes):
1226         * WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments.
1227         (Rewriter.prototype.visitTypeRef):
1228         (Rewriter.prototype.visitVectorType):
1229         (Rewriter):
1230         * WebGPUShadingLanguageRI/SPIRV.html:
1231         * WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics.
1232         (bool.operator):
1233         * WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments.
1234         (StatementCloner.prototype.visitNativeType):
1235         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too.
1236         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType):
1237         (synthesizeDefaultConstructorOperator.FindAllTypes):
1238         (synthesizeDefaultConstructorOperator):
1239         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef.
1240         (synthesizeStructAccessors.createTypeRef):
1241         * WebGPUShadingLanguageRI/Test.html:
1242         * WebGPUShadingLanguageRI/Test.js:
1243         * WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js.
1244         (TypeOverloadResolutionFailure):
1245         (TypeOverloadResolutionFailure.prototype.get type):
1246         (TypeOverloadResolutionFailure.prototype.get reason):
1247         (TypeOverloadResolutionFailure.prototype.toString):
1248         * WebGPUShadingLanguageRI/TypeRef.js:
1249         (TypeRef.wrap):
1250         (TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this.
1251         (TypeRef.prototype.toString):
1252         (TypeRef):
1253         (TypeRef.instantiate): Deleted.
1254         * WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This
1255         adds this facility back into the compiler (it was previously deleted).
1256         (UnificationContext.prototype.verify):
1257         * WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments.
1258         (VectorType):
1259         (VectorType.prototype.get elementType):
1260         (VectorType.prototype.get numElements):
1261         (VectorType.prototype.get numElementsValue):
1262         (VectorType.prototype.toString):
1263         * WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments.
1264         (Visitor.prototype.visitTypeRef):
1265         (Visitor.prototype.visitNativeType):
1266         (Visitor.prototype.visitVectorType):
1267         (Visitor):
1268         * WebGPUShadingLanguageRI/index.html:
1269
1270 2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1271
1272         [Attachment Support] Attachment elements don't appear in drag images on macOS
1273         https://bugs.webkit.org/show_bug.cgi?id=188823
1274         <rdar://problem/43616378>
1275
1276         Reviewed by Tim Horton.
1277
1278         Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
1279         attachment element in macOS is not completely transparent.
1280
1281         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1282         (isCompletelyTransparent):
1283         (TestWebKitAPI::TEST):
1284
1285 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1286
1287         Explain test name matching in run-api-tests help
1288         https://bugs.webkit.org/show_bug.cgi?id=188280
1289
1290         Reviewed by Ryosuke Niwa.
1291
1292         Improve the run-api-tests help message to explain how test
1293         name matching works.
1294
1295         * Scripts/webkitpy/api_tests/run_api_tests.py:
1296         (parse_args):
1297         * Scripts/webkitpy/port/base.py:
1298         (Port):
1299         (Port.path_to_api_test_binaries): Make binary names a globally accessible array.
1300         * Scripts/webkitpy/port/win.py:
1301         (WinPort):
1302         (WinPort.path_to_api_test_binaries): Ditto.
1303
1304 2018-08-23  Youenn Fablet  <youenn@apple.com>
1305
1306         Use "wpt serve" to launch WPT server
1307         https://bugs.webkit.org/show_bug.cgi?id=188848
1308
1309         Reviewed by Ryosuke Niwa.
1310
1311         Use "wpt serve" provided by WPT instead of using our custom launcher.
1312         This simplifies things and will avoid future breakage.
1313         Further simplify web_platform_test_server.py by removing no longer needed actions.
1314         - Do not copy files but use alias
1315         - Do not kill main pid, which leaves subprocesses alive, use interrupt instead.
1316         - Stop enumerating subprocess pids.
1317
1318         * Scripts/webkitpy/common/system/executive_mock.py:
1319         (MockExecutive.interrupt):
1320         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed.
1321         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
1322         (WebPlatformTestServer.__init__):
1323         (WebPlatformTestServer.ports_to_forward):
1324         (WebPlatformTestServer._prepare_config):
1325         (WebPlatformTestServer._spawn_process):
1326         (WebPlatformTestServer._stop_running_server):
1327
1328 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1329
1330         run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests 
1331         https://bugs.webkit.org/show_bug.cgi?id=188262
1332
1333         Reviewed by Ryosuke Niwa.
1334
1335         * Scripts/webkitpy/api_tests/run_api_tests.py:
1336         (parse_args):
1337
1338 2018-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1339
1340         [Attachment Support] Support dragging attachment elements out as files on macOS
1341         https://bugs.webkit.org/show_bug.cgi?id=181294
1342         <rdar://problem/36298801>
1343
1344         Reviewed by Tim Horton.
1345
1346         Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This
1347         enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment
1348         elements.
1349
1350         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1351         (-[TestWKWebView attachmentElementMidPoint]):
1352
1353         Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first
1354         attachment element in the document.
1355
1356         (TestWebKitAPI::TEST):
1357
1358         Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be
1359         used to write attachment data to a path on disk. Additionally, refactor an existing API test,
1360         MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move
1361         attachment elements around in a document by using drag and drop.
1362
1363         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
1364         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
1365         (-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]):
1366         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
1367         (-[DragAndDropSimulator dealloc]):
1368         (-[DragAndDropSimulator runFrom:to:]):
1369         (-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]):
1370
1371         Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins
1372         the main runloop until dragging ends, this version returns execution to the web view and schedules dragging
1373         updates asynchronously. This matches AppKit behavior.
1374
1375         (-[DragAndDropSimulator continueDragSession]):
1376
1377         Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to
1378         itself until the progress reaches 1.
1379
1380         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
1381         (-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]):
1382
1383         Pull out common logic for creating a new TestDraggingInfo after starting a drag.
1384
1385         (-[DragAndDropSimulator insertedAttachments]):
1386         (-[DragAndDropSimulator removedAttachments]):
1387         (-[DragAndDropSimulator draggingSession]):
1388         (-[DragAndDropSimulator receivePromisedFiles]):
1389
1390         Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These
1391         files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes.
1392
1393         (-[DragAndDropSimulator endDataTransfer]):
1394
1395         Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform.
1396
1397         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
1398         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
1399
1400         Implement method stubs to keep track of inserted or removed attachments while simulating a drag.
1401
1402 2018-08-22  Aditya Keerthi  <akeerthi@apple.com>
1403
1404         [iOS] Add support for the inputmode attribute
1405         https://bugs.webkit.org/show_bug.cgi?id=183621
1406
1407         Reviewed by Tim Horton.
1408
1409         Added an API test to verify that the correct UIKeyboardType is set depending on
1410         the type, inputmode, and pattern specified for an input field.
1411
1412         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
1413         (TestWebKitAPI::TEST):
1414         * TestWebKitAPI/ios/UIKitSPI.h:
1415
1416 2018-08-22  Alex Christensen  <achristensen@webkit.org>
1417
1418         Fix API test on Sierra after r235139
1419         https://bugs.webkit.org/show_bug.cgi?id=188810
1420
1421         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
1422         (TEST):
1423
1424 2018-08-22  David Kilzer  <ddkilzer@apple.com>
1425
1426         Move files in WebCore project to match Xcode folder structure
1427         <https://webkit.org/b/188851>
1428
1429         Reviewed by Tim Horton.
1430
1431         * Scripts/extract-localizable-strings:
1432         * Scripts/update-webkit-localizable-strings:
1433         - Update to match new location of extract-localizable-strings.pl.
1434
1435 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1436
1437         Roll out r235139 and r235146
1438         https://bugs.webkit.org/show_bug.cgi?id=188805
1439
1440         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1441         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
1442
1443 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1444
1445         [Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation
1446         https://bugs.webkit.org/show_bug.cgi?id=188715
1447         <rdar://problem/43541790>
1448
1449         Reviewed by Tim Horton.
1450
1451         Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe
1452         navigation, and (2) the UI client is notified of attachment removal upon web content process termination.
1453
1454         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1455         (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
1456         (TestWebKitAPI::TEST):
1457
1458 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1459
1460         Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient
1461         https://bugs.webkit.org/show_bug.cgi?id=188821
1462
1463         Reviewed by Simon Fraser.
1464
1465         * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
1466         (TestWebKitAPI::didLayout):
1467         (TestWebKitAPI::TEST):
1468
1469 2018-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
1470
1471         [WHLSL] Call expressions shouldn't have type arguments
1472         https://bugs.webkit.org/show_bug.cgi?id=188770
1473
1474         Reviewed by Filip Pizlo.
1475
1476         Call expressions only had type arguments for casts, becuase native types can have type arguments.
1477         However, instead of putting those type arguments on the CallExpression, we should parse the casted
1478         type as a real type and not as an identifier, which puts the type arguments in the TypeRef.
1479
1480         Test: casts
1481
1482         * WebGPUShadingLanguageRI/CallExpression.js:
1483         (CallExpression):
1484         (CallExpression.prototype.get name):
1485         (CallExpression.resolve):
1486         (CallExpression.prototype.get typeArguments): Deleted.
1487         (CallExpression.prototype.becomeCast): Deleted.
1488         * WebGPUShadingLanguageRI/NameResolver.js:
1489         (NameResolver.prototype.visitCallExpression):
1490         * WebGPUShadingLanguageRI/Parse.js:
1491         (parseConstexpr):
1492         (parseTypeDef):
1493         (parseLeftOperatorCall):
1494         (parseCallExpression.let.parseArguments):
1495         (parsePossiblePrefix):
1496         (parsePossibleRelationalEquality):
1497         (parseLeftLogicalExpression):
1498         (parseIfStatement):
1499         (parseWhile):
1500         (parseFor):
1501         (parseDo):
1502         * WebGPUShadingLanguageRI/RemoveTypeArguments.js:
1503         * WebGPUShadingLanguageRI/Rewriter.js:
1504         (Rewriter.prototype.visitCallExpression):
1505
1506 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1507
1508         Translate WebKit.LimitTitleSize API test into ObjC
1509         https://bugs.webkit.org/show_bug.cgi?id=188810
1510
1511         Reviewed by Andy Estes.
1512
1513         It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO.
1514         I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient.
1515
1516         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1517         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed.
1518         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
1519         (TEST):
1520         (-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]):
1521         (TestWebKitAPI::TEST): Deleted.
1522
1523 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1524
1525         Remove unused shouldKeepCurrentBackForwardListItemInList check
1526         https://bugs.webkit.org/show_bug.cgi?id=188805
1527
1528         Reviewed by Andy Estes.
1529
1530         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1531         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed.
1532
1533 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1534
1535         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
1536         https://bugs.webkit.org/show_bug.cgi?id=188813
1537
1538         Reviewed by Andy Estes.
1539
1540         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp:
1541         (TestWebKitAPI::didLayout):
1542         (TestWebKitAPI::setPageLoaderClient):
1543         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
1544         (TestWebKitAPI::didFinishNavigation):
1545         (TestWebKitAPI::didLayout):
1546         (TestWebKitAPI::setPageLoaderClient):
1547         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1548         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp:
1549         (TestWebKitAPI::didLayout):
1550         (TestWebKitAPI::setPageLoaderClient):
1551
1552 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1553
1554         [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData
1555         https://bugs.webkit.org/show_bug.cgi?id=188496
1556         <rdar://problem/43216836>
1557
1558         Reviewed by Tim Horton.
1559
1560         Adjusts existing attachment API tests. See below for more detail.
1561
1562         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1563         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
1564         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
1565         (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
1566         (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
1567
1568         Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or
1569         update an existing attachment with a file wrapper.
1570
1571         (-[_WKAttachment expectRequestedDataToBe:]):
1572         (TestWebKitAPI::TEST):
1573
1574         Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data.
1575         Also augment an existing test to check that an attachment element which has been copied and pasted within the
1576         same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are
1577         backed by the same NSFileWrapper that was originally used to insert the attachment.
1578
1579         Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled
1580         editable area inserts attachment elements into the document and notifies the UI client with the inserted
1581         attachment data.
1582
1583         (-[_WKAttachment synchronouslyRequestInfo:]): Deleted.
1584         (-[_WKAttachment synchronouslyRequestData:]): Deleted.
1585         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
1586         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
1587
1588         Move off of -_webView:didInsertAttachment:.
1589
1590         (-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted.
1591
1592 2018-08-21  David Kilzer  <ddkilzer@apple.com>
1593
1594         sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name
1595         <https://webkit.org/b/188755>
1596
1597         Reviewed by Andy Estes.
1598
1599         * Scripts/sort-Xcode-project-file: Fix regular expression to
1600         make `mainGroup` name optional.
1601
1602 2018-08-21  Andy VanWagoner  <andy@vanwagoner.family>
1603
1604         Unreviewed, add myself to committers list.
1605
1606         * Scripts/webkitpy/common/config/contributors.json:
1607
1608 2018-08-21  Antti Koivisto  <antti@apple.com>
1609
1610         Allow creating WeakPtrs to const objects
1611         https://bugs.webkit.org/show_bug.cgi?id=188785
1612
1613         Reviewed by Geoffrey Garen.
1614
1615         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
1616         (TestWebKitAPI::Base::weakPtrFactory const):
1617         (TestWebKitAPI::TEST):
1618         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
1619
1620 2018-08-21  Per Arne Vollan  <pvollan@apple.com>
1621
1622         [WebGL] Contexts are not updated when display configuration changed.
1623         https://bugs.webkit.org/show_bug.cgi?id=188750
1624
1625         Reviewed by Brent Fulgham.
1626
1627         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1628         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1629         (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
1630         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1631         * WebKitTestRunner/TestController.cpp:
1632         (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
1633         * WebKitTestRunner/TestController.h:
1634         * WebKitTestRunner/TestInvocation.cpp:
1635         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1636
1637 2018-08-21  John Wilander  <wilander@apple.com>
1638
1639         Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
1640         https://bugs.webkit.org/show_bug.cgi?id=188757
1641         <rdar://problem/38713390>
1642
1643         Reviewed by Alex Christensen.
1644
1645         These changes add the new WebKitTestRunner function
1646         isStatisticsRegisteredAsSubresourceUnder().
1647
1648         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1649         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1650         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
1651         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1652         * WebKitTestRunner/TestController.cpp:
1653         (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
1654         * WebKitTestRunner/TestController.h:
1655         * WebKitTestRunner/TestInvocation.cpp:
1656         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1657
1658 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1659
1660         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
1661         https://bugs.webkit.org/show_bug.cgi?id=188797
1662
1663         Reviewed by Tim Horton.
1664
1665         * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
1666         (TestWebKitAPI::didFinishNavigation):
1667         (TestWebKitAPI::TEST):
1668         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1669         * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
1670         (TestWebKitAPI::didSameDocumentNavigation):
1671         (TestWebKitAPI::TEST):
1672         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1673         * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
1674         (TestWebKitAPI::didFailProvisionalNavigation):
1675         (TestWebKitAPI::TEST):
1676         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
1677         * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
1678         (TestWebKitAPI::didStartProvisionalNavigation):
1679         (TestWebKitAPI::didCommitNavigation):
1680         (TestWebKitAPI::didFinishNavigation):
1681         (TestWebKitAPI::TEST):
1682         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1683         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1684         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1685         * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
1686         (TestWebKitAPI::didStartProvisionalNavigation):
1687         (TestWebKitAPI::didCommitNavigation):
1688         (TestWebKitAPI::didFinishNavigation):
1689         (TestWebKitAPI::TEST):
1690         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1691         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1692         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1693         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
1694         (TestWebKitAPI::renderingProgressDidChange):
1695         (TestWebKitAPI::TEST):
1696         (TestWebKitAPI::didLayout): Deleted.
1697         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp:
1698         (TestWebKitAPI::didFinishNavigation):
1699         (TestWebKitAPI::renderingProgressDidChange):
1700         (TestWebKitAPI::setPageLoaderClient):
1701         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1702         (TestWebKitAPI::didLayout): Deleted.
1703         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
1704         (TestWebKitAPI::State::State):
1705         (TestWebKitAPI::didStartProvisionalNavigation):
1706         (TestWebKitAPI::didCommitNavigation):
1707         (TestWebKitAPI::didFinishNavigation):
1708         (TestWebKitAPI::decidePolicyForNavigationAction):
1709         (TestWebKitAPI::decidePolicyForResponse):
1710         (TestWebKitAPI::TEST):
1711         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1712         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1713         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1714         (TestWebKitAPI::decidePolicyForNewWindowAction): Deleted.
1715         * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
1716         (TestWebKitAPI::didSameDocumentNavigation):
1717         (TestWebKitAPI::TEST):
1718         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1719         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1720         * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
1721         (TestWebKitAPI::TEST):
1722         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1723         * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
1724         (TestWebKitAPI::didFinishLoad):
1725         (TestWebKitAPI::TEST):
1726         * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp:
1727         (TestWebKitAPI::didFinishNavigation):
1728         (TestWebKitAPI::TEST):
1729         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1730         * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
1731         (TestWebKitAPI::didFinishLoad):
1732         (TestWebKitAPI::TEST):
1733         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
1734         (WebKit2_CommandBackForwardTestWKView::SetUp):
1735         (WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted.
1736
1737 2018-08-20  Alex Christensen  <achristensen@webkit.org>
1738
1739         Replace WKPageLoaderClient with WKPageNavigationClient in many API tests
1740         https://bugs.webkit.org/show_bug.cgi?id=188771
1741
1742         Reviewed by Tim Horton.
1743
1744         * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
1745         (TestWebKitAPI::didFinishNavigation):
1746         (TestWebKitAPI::TEST):
1747         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1748         * TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
1749         (TestWebKitAPI::didFinishNavigation):
1750         (TestWebKitAPI::TEST):
1751         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1752         * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
1753         (TestWebKitAPI::didFinishNavigation):
1754         (TestWebKitAPI::setPageLoaderClient):
1755         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1756         * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp:
1757         (TestWebKitAPI::TEST):
1758         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1759         * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
1760         (TestWebKitAPI::didFinishNavigation):
1761         (TestWebKitAPI::setPageLoaderClient):
1762         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1763         * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
1764         (TestWebKitAPI::didFinishNavigation):
1765         (TestWebKitAPI::setClients):
1766         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1767         * TestWebKitAPI/Tests/WebKit/Find.cpp:
1768         (TestWebKitAPI::didFinishNavigation):
1769         (TestWebKitAPI::TEST):
1770         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1771         * TestWebKitAPI/Tests/WebKit/FindMatches.mm:
1772         (TestWebKitAPI::didFinishNavigation):
1773         (TestWebKitAPI::TEST):
1774         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1775         * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
1776         (TestWebKitAPI::didFinishNavigation):
1777         (TestWebKitAPI::TEST):
1778         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1779         * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
1780         (TestWebKitAPI::didFinishNavigation):
1781         (TestWebKitAPI::TEST):
1782         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1783         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
1784         (TestWebKitAPI::didFinishNavigation):
1785         (TestWebKitAPI::TEST):
1786         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1787         * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
1788         (TestWebKitAPI::didFinishNavigation):
1789         (TestWebKitAPI::setPageLoaderClient):
1790         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1791         * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp:
1792         (TestWebKitAPI::didFinishNavigation):
1793         (TestWebKitAPI::TEST):
1794         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1795         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp:
1796         (TestWebKitAPI::didFinishLoadForFrame):
1797         * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
1798         (TestWebKitAPI::didFinishNavigation):
1799         (TestWebKitAPI::loadAlternateHTMLString):
1800         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1801         * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp:
1802         (TestWebKitAPI::didFinishNavigation):
1803         (TestWebKitAPI::TEST):
1804         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1805         * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
1806         (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
1807         (TestWebKitAPI::didFinishLoad):
1808         * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
1809         (TestWebKitAPI::didFinishNavigation):
1810         (TestWebKitAPI::setPageLoaderClient):
1811         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1812         * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp:
1813         (TestWebKitAPI::didFinishNavigation):
1814         (TestWebKitAPI::setPageLoaderClient):
1815         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1816         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
1817         (TestWebKitAPI::didFinishLoadForFrame):
1818         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
1819         (TestWebKitAPI::TEST):
1820         * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
1821         (TestWebKitAPI::TEST):
1822         * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
1823         (TestWebKitAPI::didFinishLoad):
1824         (TestWebKitAPI::TEST):
1825         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
1826         (TestWebKitAPI::didFinishNavigation):
1827         (TestWebKitAPI::setPageLoaderClient):
1828         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1829         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
1830         (TestWebKitAPI::didFinishNavigation):
1831         (TestWebKitAPI::setPageLoaderClient):
1832         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1833         * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
1834         (TestWebKitAPI::didFinishNavigation):
1835         (TestWebKitAPI::TEST):
1836         (TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted.
1837         * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:
1838         (TestWebKitAPI::didFinishNavigation):
1839         (TestWebKitAPI::TEST):
1840         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1841         * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp:
1842         (TestWebKitAPI::didFailProvisionalNavigation):
1843         (TestWebKitAPI::TEST):
1844         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
1845         * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
1846         (TestWebKitAPI::didFinishNavigation):
1847         (TestWebKitAPI::TEST):
1848         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1849         * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp:
1850         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation):
1851         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient):
1852         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted.
1853         * TestWebKitAPI/Tests/WebKit/UserMessage.cpp:
1854         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation):
1855         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient):
1856         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted.
1857         * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
1858         (TestWebKitAPI::didFinishNavigation):
1859         (TestWebKitAPI::setPageLoaderClient):
1860         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1861         * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
1862         (TestWebKitAPI::didFinishNavigation):
1863         (TestWebKitAPI::setPageLoaderClient):
1864         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1865         * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
1866         (TestWebKitAPI::didFinishNavigation):
1867         (TestWebKitAPI::setPageLoaderClient):
1868         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1869         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
1870         (TestWebKitAPI::didFinishNavigation):
1871         (TestWebKitAPI::setUpClients):
1872         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1873         * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
1874         (TestWebKitAPI::didFinishNavigation):
1875         (TestWebKitAPI::setPageLoaderClient):
1876         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1877         * TestWebKitAPI/Tests/WebKit/WebArchive.cpp:
1878         (TestWebKitAPI::didFinishNavigation):
1879         (TestWebKitAPI::TEST):
1880         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1881         * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
1882         (TestWebKitAPI::didFinishNavigation):
1883         (TestWebKitAPI::TEST):
1884         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1885         * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
1886         (TestWebKitAPI::didFinishNavigation):
1887         (TestWebKitAPI::TEST):
1888         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1889         * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
1890         (TestWebKitAPI::didFinishNavigation):
1891         (TestWebKitAPI::TEST):
1892         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1893         * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
1894         (TestWebKitAPI::didFinishNavigation):
1895         (TestWebKitAPI::TEST):
1896         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1897         * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
1898         (TestWebKitAPI::didFinishNavigation):
1899         (TestWebKitAPI::TEST):
1900         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1901         * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp:
1902         (TestWebKitAPI::didFinishNavigation):
1903         (TestWebKitAPI::TEST):
1904         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1905         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
1906         (didFinishNavigation):
1907         (TestWebKitAPI::TEST):
1908         (didFinishLoadForFrame): Deleted.
1909         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
1910         (didFinishNavigation):
1911         (TestWebKitAPI::TEST):
1912         (didFinishLoadForFrame): Deleted.
1913         * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm:
1914         (TestWebKitAPI::didFinishNavigation):
1915         (TestWebKitAPI::TEST):
1916         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1917         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
1918         (TestWebKitAPI::didFinishNavigation):
1919         (TestWebKitAPI::setPageLoaderClient):
1920         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1921
1922 2018-08-21  Adrian Perez de Castro  <aperez@igalia.com>
1923
1924         [WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0
1925         https://bugs.webkit.org/show_bug.cgi?id=188782
1926
1927         Reviewed by Michael Catanzaro.
1928
1929         Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development
1930         environments to use version 1.0.0 of libwpe and WPEBackend-fdo.
1931
1932         * flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from
1933         release tarballs, and removed the (now unneeded) Lua and LuaJIT modules.
1934         * wpe/jhbuild.modules: Ditto.
1935
1936 2018-08-21  Michael Catanzaro  <mcatanzaro@igalia.com>
1937
1938         [Flatpak] Update to GNOME master runtime
1939         https://bugs.webkit.org/show_bug.cgi?id=188731
1940
1941         Reviewed by Philippe Normand.
1942
1943         The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30
1944         runtime, but I don't think there's any need to stick with the stable runtime when we have
1945         the ability to pin to a particular version of the master runtime. There are also several
1946         advantages to switching to the master runtime.
1947
1948         * flatpak/files/httpd-autogen.sh: Removed.
1949         * flatpak/flatpakutils.py:
1950         (WebkitFlatpak.clean_args):
1951         * flatpak/org.webkit.GTK.yaml:
1952         * flatpak/org.webkit.WebKit.yaml:
1953         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
1954         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
1955
1956 2018-08-20  Jonathan Bedard  <jbedard@apple.com>
1957
1958         WebKitTestRunner: Add watchOS entitlements
1959         https://bugs.webkit.org/show_bug.cgi?id=188758
1960
1961         Reviewed by Tim Horton.
1962
1963         watchOS needs an additional entitlement to open up a socket for on-device testing.
1964
1965         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added.
1966         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
1967         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1968
1969 2018-08-20  Thomas Denney  <tdenney@apple.com>
1970
1971         [WHLSL] Remove generics from the interpreter
1972         https://bugs.webkit.org/show_bug.cgi?id=187988
1973
1974         Reviewed by Myles C. Maxfield.
1975
1976         This patch completely removes generic and protocol support from WHLSL
1977         whilst adding back any features that were originally implemented with
1978         generics.
1979
1980         Many of the changes in this patch just remove occurrences of type
1981         arguments and type parameters --- although there are some cases where
1982         they have been deliberately left in --- as well as removing tests only
1983         relevant to those features. These changes are not listed below.
1984
1985         * WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies
1986         * WebGPUShadingLanguageRI/AutoWrapper.js:
1987         (AutoWrapper.prototype.visitConstexprTypeParameter): Deleted.
1988         * WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in
1989         vectors have many constructors for different scalar and vector types.
1990         These were originally implemented with generics.
1991         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the
1992         equality operator for built-in vectors, again this was removed with
1993         generics.
1994         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above.
1995         Built-in vectors only support the getter and setter, and not the ander.
1996         * WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added.
1997         * WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added.
1998         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added.
1999         * WebGPUShadingLanguageRI/CallExpression.js: Adds support for
2000         instantiating functions which cannot be discovered earlier in
2001         preparation because their types are absent (specifically support for the
2002         operator &[] for array references and the length operator for array
2003         references). Previously support for these was implemented with generics.
2004         (CallExpression.resolve):
2005         (CallExpression.prototype.resolve):
2006         (CallExpression.prototype._resolveByInstantiation):
2007         (CallExpression.prototype._resolveToOperatorAnderIndexer):
2008         (CallExpression.prototype._resolveToOperatorLength):
2009         (CallExpression.prototype.resolveToOverload):
2010         (CallExpression.prototype.becomeCast):
2011         (CallExpression.prototype.toString):
2012         (CallExpression):
2013         * WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added.
2014         We support syntax like vector<int, 2>(a, b) for constructing vectors;
2015         this new preparation step resolves them to specific constructors.
2016         * WebGPUShadingLanguageRI/CallFunction.js:
2017         * WebGPUShadingLanguageRI/Checker.js:
2018         * WebGPUShadingLanguageRI/ConstexprFolder.js:
2019         * WebGPUShadingLanguageRI/CreateLiteralType.js:
2020         * WebGPUShadingLanguageRI/ExpressionFinder.js:
2021         * WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed.
2022         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
2023         * WebGPUShadingLanguageRI/Func.js:
2024         * WebGPUShadingLanguageRI/FuncDef.js:
2025         * WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted.
2026         * WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments.
2027         * WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator.
2028         * WebGPUShadingLanguageRI/Inliner.js: Ditto.
2029         * WebGPUShadingLanguageRI/Intrinsics.js:
2030         * WebGPUShadingLanguageRI/Lexer.js:
2031         * WebGPUShadingLanguageRI/LiteralTypeChecker.js:
2032         * WebGPUShadingLanguageRI/NameContext.js:
2033         (NameContext.prototype.add):
2034         (NameContext.prototype.get let):
2035         (NameContext.underlyingThings.prototype.else):
2036         (NameContext.prototype.resolveFuncOverload):
2037         * WebGPUShadingLanguageRI/NameFinder.js:
2038         * WebGPUShadingLanguageRI/NameResolver.js:
2039         (NameResolver.prototype.visitFunc):
2040         (NameResolver.prototype.visitFuncDef):
2041         (NameResolver.prototype.visitTypeDef):
2042         (NameResolver.prototype.visitStructType):
2043         (NameResolver.prototype.visitTypeRef):
2044         (NameResolver.prototype.visitCallExpression):
2045         (NameResolver.prototype.visitVectorType):
2046         (NameResolver):
2047         (NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted.
2048         (NameResolver.prototype.visitProtocolDecl): Deleted.
2049         * WebGPUShadingLanguageRI/NativeFunc.js:
2050         (NativeFunc):
2051         * WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted.
2052         * WebGPUShadingLanguageRI/NativeType.js:
2053         (NativeType):
2054         (NativeType.prototype.get name):
2055         (NativeType.prototype.toString):
2056         (NativeType.prototype.get typeParameters): Deleted.
2057         (NativeType.prototype.instantiate): Deleted.
2058         * WebGPUShadingLanguageRI/Node.js:
2059         (Node.prototype.commit):
2060         (Node):
2061         (Node.prototype.substitute): Deleted.
2062         (Node.prototype.substituteToUnification): Deleted.
2063         * WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously
2064         implemented with generics.
2065         * WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto.
2066         * WebGPUShadingLanguageRI/OperatorBool.js: Ditto.
2067         * WebGPUShadingLanguageRI/Parse.js: Removed everything related to
2068         generics and protocols.
2069         * WebGPUShadingLanguageRI/Prepare.js: Added new stages.
2070         * WebGPUShadingLanguageRI/Program.js:
2071         (Program):
2072         (Program.prototype.get types):
2073         (Program.prototype.add):
2074         (Program.prototype.get protocols): Deleted.
2075         * WebGPUShadingLanguageRI/ProtocolDecl.js: Removed.
2076         * WebGPUShadingLanguageRI/ProtocolRef.js: Removed.
2077         * WebGPUShadingLanguageRI/RecursiveTypeChecker.js:
2078         * WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added.
2079         * WebGPUShadingLanguageRI/ResolveNames.js:
2080         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
2081         * WebGPUShadingLanguageRI/ResolveTypeDefs.js:
2082         (resolveTypeDefsInProtocols): Deleted.
2083         * WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes.
2084         * WebGPUShadingLanguageRI/SPIRV.html:
2085         * WebGPUShadingLanguageRI/SPIRVCodegen.js:
2086         * WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features.
2087         * WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes.
2088         (StructLayoutBuilder):
2089         * WebGPUShadingLanguageRI/StructType.js:
2090         * WebGPUShadingLanguageRI/SwizzleOp.js:
2091         (SwizzleOp):
2092         (SwizzleOp.prototype.get baseTypeName):
2093         (SwizzleOp.prototype.toString):
2094         (SwizzleOp.functions.):
2095         (SwizzleOp.functions):
2096         (SwizzleOp.prototype.instantiateImplementation):
2097         (SwizzleOp.allSwizzleOperators.): Deleted.
2098         (SwizzleOp.allSwizzleOperators): Deleted.
2099         * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added,
2100         previously implemented with generics.
2101         * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto.
2102         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto.
2103         * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto.
2104         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto.
2105         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
2106         (synthesizeStructAccessors.setupImplementationData):
2107         (synthesizeStructAccessors.createFieldType):
2108         (synthesizeStructAccessors.createTypeRef):
2109         (synthesizeStructAccessors.setupAnder):
2110         (synthesizeStructAccessors):
2111         (synthesizeStructAccessors.createTypeParameters): Deleted.
2112         (synthesizeStructAccessors.): Deleted.
2113         * WebGPUShadingLanguageRI/Test.html:
2114         * WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new
2115         tests for changed language features.
2116         * WebGPUShadingLanguageRI/Type.js:
2117         * WebGPUShadingLanguageRI/TypeDef.js:
2118         * WebGPUShadingLanguageRI/TypeDefResolver.js:
2119         * WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed.
2120         * WebGPUShadingLanguageRI/TypeRef.js:
2121         * WebGPUShadingLanguageRI/TypeVariable.js: Removed.
2122         * WebGPUShadingLanguageRI/UnificationContext.js:
2123         * WebGPUShadingLanguageRI/VectorType.js: Added.
2124         * WebGPUShadingLanguageRI/Visitor.js: Changes for new classes.
2125         * WebGPUShadingLanguageRI/WSL.md: Removed description of
2126         generics/protocols.
2127         * WebGPUShadingLanguageRI/WrapChecker.js:
2128         (WrapChecker):
2129         (WrapChecker.visitConstexprTypeParameter): Deleted.
2130         (WrapChecker.prototype.visitFuncParameter): Deleted.
2131         (WrapChecker.prototype.visitTypeVariable): Deleted.
2132         * WebGPUShadingLanguageRI/index.html:
2133
2134 2018-08-20  Thomas Denney  <tdenney@apple.com>
2135
2136         Added Thomas Denney to contributors.json.
2137         https://bugs.webkit.org/show_bug.cgi?id=188525
2138
2139         Reviewed by Myles C. Maxfield.
2140
2141         * Scripts/webkitpy/common/config/contributors.json:
2142
2143 2018-08-20  Bernhard M. Wiedemann  <bwiedemann@suse.de>
2144
2145         [GTK] Sort inspector GResource manifest to ensure reproducible builds
2146         https://bugs.webkit.org/show_bug.cgi?id=188738
2147
2148         Reviewed by Michael Catanzaro.
2149
2150         * glib/generate-inspector-gresource-manifest.py:
2151         (get_filenames): sort list of input files
2152
2153 2018-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2154
2155         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
2156         https://bugs.webkit.org/show_bug.cgi?id=184271
2157         <rdar://problem/39256708>
2158
2159         Reviewed by Andy Estes.
2160
2161         This API test is failing when run against older macOS builds, where custom pasteboard
2162         data is not enabled by default.
2163
2164         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
2165         (TestWebKitAPI::TEST):
2166
2167 2018-08-20  Claudio Saavedra  <csaavedra@igalia.com>
2168
2169         Add WPE Debug configuration to the flakiness dashboard
2170         https://bugs.webkit.org/show_bug.cgi?id=188743
2171
2172         Reviewed by Michael Catanzaro.
2173
2174         * TestResultServer/static-dashboards/builders.jsonp:
2175         * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
2176
2177 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2178
2179         [GLIB] Add API to throw exceptions using printf formatted strings
2180         https://bugs.webkit.org/show_bug.cgi?id=188698
2181
2182         Reviewed by Michael Catanzaro.
2183
2184         Add cases to test the new API.
2185
2186         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
2187         (createFormattedError):
2188         (createCustomFormattedError):
2189         (testJSCExceptions):
2190
2191 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2192
2193         [GLIB] Complete the JSCException API
2194         https://bugs.webkit.org/show_bug.cgi?id=188695
2195
2196         Reviewed by Michael Catanzaro.
2197
2198         Add cases to test the new API.
2199
2200         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
2201         (testJSCCheckSyntax):
2202         (createCustomError):
2203         (testJSCExceptions):
2204
2205 2018-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2206
2207         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
2208         https://bugs.webkit.org/show_bug.cgi?id=184271
2209         <rdar://problem/39256708>
2210
2211         Reviewed by Ryosuke Niwa.
2212
2213         Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
2214         matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
2215
2216         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
2217         (TestWebKitAPI::TEST):
2218         (imagePath): Deleted.
2219         (writeTypesAndDataToPasteboard): Deleted.
2220         (setUpWebView): Deleted.
2221         (markupString): Deleted.
2222
2223         Make this test file no longer exclusive to macOS.
2224
2225         * TestWebKitAPI/cocoa/TestWKWebView.h:
2226         * TestWebKitAPI/cocoa/TestWKWebView.mm:
2227         (-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
2228
2229         Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL.
2230
2231         (-[TestWKWebView synchronouslyLoadHTMLString:]):
2232
2233 2018-08-17  Jonathan Bedard  <jbedard@apple.com>
2234
2235         Add back --wtf-only to run-api-tests
2236         https://bugs.webkit.org/show_bug.cgi?id=187893
2237         <rdar://problem/42483983>
2238
2239         Reviewed by Aakash Jain.
2240
2241         When doing WTF development, it is not necessary to build or run all of the API
2242         tests. Generally, if a user has specified a specific binary (or binaries) that
2243         they are interested in testing, it is not necessary to check all API test binaries.
2244
2245         * Scripts/webkitpy/api_tests/manager.py:
2246         (Manager._collect_tests): Only use the binaries matching the program arguments
2247         when collecting tests.
2248         (Manager._binaries_for_arguments): Generate a list of binaries which match the
2249         program arguments.
2250         (Manager.run): Pass a list binaries to check.
2251         * Scripts/webkitpy/api_tests/run_api_tests.py:
2252         (parse_args):
2253         * Scripts/webkitpy/port/base.py:
2254         (Port.check_api_test_build): If the caller specifies which API test binaries it
2255         requires, only check the ones specified.
2256         (Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests.
2257         (Port._build_api_tests): Allow the caller to only build the WTF API tests.
2258         * Scripts/webkitpy/port/win.py:
2259         (WinPort.path_to_api_test_binaries):
2260
2261 2018-08-17  Jer Noble  <jer.noble@apple.com>
2262
2263         REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
2264         https://bugs.webkit.org/show_bug.cgi?id=188470
2265         <rdar://problem/43144969>
2266
2267         Reviewed by Alex Christensen.
2268
2269         On a loaded server, the WebContent process may send the "playing" message before the
2270         UIProcess has a chance to register a listener for that message. Restructure the tests
2271         so that the listener is registered before the page is loaded.
2272
2273         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
2274         (PreferredAudioBufferSize::runPlayingTestWithPageNamed):
2275         (TEST_F):
2276
2277 2018-08-16  Wenson Hsieh  <wenson_hsieh@apple.com>
2278
2279         [macOS] [WK2] Add infrastructure to test receiving file promises on drop
2280         https://bugs.webkit.org/show_bug.cgi?id=188583
2281
2282         Reviewed by Andy Estes.
2283
2284         Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of
2285         NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the
2286         concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also
2287         introduces 3 new macOS tests. See below for more details.
2288
2289         A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a
2290         future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and
2291         DumpRenderTree, and make this code shared among all three testing harnesses.
2292
2293         Tests:  DragAndDropTests.DragImageElementIntoFileUpload
2294                 DragAndDropTests.DragPromisedImageFileIntoFileUpload
2295                 DragAndDropTests.DragImageFileIntoFileUpload
2296
2297         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2298         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
2299         (TEST):
2300
2301         Drive-by fix: Replace NSMakePoint with CGPointMake.
2302
2303         * TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html:
2304
2305         Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to
2306         load the dropped image.
2307
2308         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
2309         (waitForConditionWithLogging):
2310
2311         Add a helper function to wait for a condition to evaluate to true. To make failures more informative,
2312         additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met.
2313
2314         (TEST):
2315
2316         Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element,
2317         (2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs.
2318
2319         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2320
2321         Surface the new functionality provided by the file promise receiver mock via two new methods on
2322         DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths
2323         directly to the pasteboard.
2324
2325         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2326         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2327         (-[DragAndDropSimulator externalPromisedFiles]):
2328         (getFilePathsAndTypeIdentifiers):
2329         (-[DragAndDropSimulator writePromisedFiles:]):
2330         (-[DragAndDropSimulator writeFiles:]):
2331         * TestWebKitAPI/mac/TestDraggingInfo.h:
2332         * TestWebKitAPI/mac/TestDraggingInfo.mm:
2333         (-[TestDraggingInfo initWithDragAndDropSimulator:]):
2334         (-[TestDraggingInfo filePromiseReceivers]):
2335         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2336
2337         Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are
2338         unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is
2339         currently sufficient for testing purposes.
2340
2341         * TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h.
2342         * TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added.
2343         (-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]):
2344         (-[TestFilePromiseReceiver fileTypes]):
2345         (-[TestFilePromiseReceiver fileNames]):
2346         (-[TestFilePromiseReceiver dealloc]):
2347         (-[TestFilePromiseReceiver draggingSource]):
2348         (-[TestFilePromiseReceiver setDraggingSource:]):
2349         (fileNameWithNumericSuffix):
2350         (copyFile):
2351
2352         Add a helper to copy a file into a destination directory. Used to implement the main functionality of our
2353         NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by
2354         WebKit.
2355
2356         (-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
2357
2358 2018-08-16  Alex Christensen  <achristensen@webkit.org>
2359
2360         Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service
2361         https://bugs.webkit.org/show_bug.cgi?id=188677
2362
2363         Reviewed by Tim Horton.
2364
2365         * MiniBrowser/MiniBrowser.entitlements:
2366         SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement
2367         on released operating systems.  See <rdar://problem/42749777>
2368
2369 2018-08-16  Jer Noble  <jer.noble@apple.com>
2370
2371         Add option to run-api-tests to force running of DISABLED tests.
2372         https://bugs.webkit.org/show_bug.cgi?id=188674
2373
2374         Reviewed by Joseph Pecoraro.
2375
2376         * Scripts/webkitpy/api_tests/run_api_tests.py:
2377         (parse_args):
2378         * Scripts/webkitpy/api_tests/runner.py:
2379         (Runner.command_for_port):
2380         (_Worker._run_single_test):
2381
2382 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2383
2384         [ews-build] Separate queues for Builders and Testers - macOS High Sierra
2385         https://bugs.webkit.org/show_bug.cgi?id=188540
2386
2387         Reviewed by Lucas Forschler.
2388
2389         * BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers. 
2390
2391 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2392
2393         [ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults
2394         https://bugs.webkit.org/show_bug.cgi?id=188666
2395
2396         Reviewed by Lucas Forschler.
2397
2398         * BuildSlaveSupport/ews-build/steps.py:
2399         (ArchiveTestResults): Build step to Archive the test results.
2400         (UploadTestResults): Build step to upload the archive.
2401         (ExtractTestResults): Build step to unzip the archive on server and generate a link.
2402         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2403         (ExpectMasterShellCommand): Copied from other similar internal code.
2404
2405 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2406
2407         [ews-build] Separate queues for Builders and Testers - macOS Sierra
2408         https://bugs.webkit.org/show_bug.cgi?id=188516
2409
2410         Reviewed by Lucas Forschler.
2411
2412         * BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers.
2413         * BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers.
2414
2415 2018-08-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2416
2417         [Win][DumpRenderTree] Remove error message for duplicated tests.
2418         https://bugs.webkit.org/show_bug.cgi?id=188662
2419
2420         Reviewed by Per Arne Vollan.
2421
2422         This was added to track down an issue where the same tests appeared
2423         to be run multiple times. This turned out to not be the case.
2424         See https://bugs.webkit.org/show_bug.cgi?id=166760 .
2425
2426         * DumpRenderTree/win/DumpRenderTree.cpp:
2427         (runTest):
2428
2429 2018-08-16  Alex Christensen  <achristensen@webkit.org>
2430
2431         Re-introduce assertion removed in r234890
2432         https://bugs.webkit.org/show_bug.cgi?id=188611
2433
2434         Reviewed by Geoffrey Garen.
2435
2436         * TestWebKitAPI/Tests/WTF/Vector.cpp:
2437         (TestWebKitAPI::TEST):
2438
2439 2018-08-16  Jer Noble  <jer.noble@apple.com>
2440
2441         Add Experimental Feature support for SourceBuffer.changeType()
2442         https://bugs.webkit.org/show_bug.cgi?id=188626
2443         <rdar://problem/43356021>
2444
2445         Reviewed by Eric Carlson.
2446
2447         * DumpRenderTree/mac/DumpRenderTree.mm:
2448         (enableExperimentalFeatures):
2449         (resetWebPreferencesToConsistentValues):
2450         * WebKitTestRunner/TestController.cpp:
2451         (WTR::TestController::resetPreferencesToConsistentValues):
2452
2453 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
2454
2455         Support drag-and-drop for input[type=color]
2456         https://bugs.webkit.org/show_bug.cgi?id=188464
2457
2458         Reviewed by Wenson Hsieh.
2459
2460         Added five cross-platform API tests, to verify that dragging and dropping with
2461         color inputs changes the value of the drop target if and only if both inputs are
2462         enabled. Also tests that the change and input events are fired when changing the
2463         value of a color input through drag and drop. 
2464
2465         Additionally, added a macOS-specific test to verify that dropping an item with
2466         NSColorPboardType changes the value of the color input.
2467
2468         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2469         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
2470         (TestWebKitAPI::TEST):
2471         * TestWebKitAPI/Tests/WebKitCocoa/color-drop.html: Added.
2472         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
2473         (TestWebKitAPI::TEST):
2474
2475 2018-08-16  Antti Koivisto  <antti@apple.com>
2476
2477         Use OptionSet for ActivityState::Flags
2478         https://bugs.webkit.org/show_bug.cgi?id=188554
2479
2480         Reviewed by Brent Fulgham.
2481
2482         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
2483         (TestWebKitAPI::TEST):
2484
2485 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2486
2487         [GTK] MiniBrowser: web view doesn't get the focus when new window is created
2488         https://bugs.webkit.org/show_bug.cgi?id=188546
2489
2490         Reviewed by Michael Catanzaro.
2491
2492         When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We
2493         always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused
2494         instead. This was causing failures in WebDriver tests that create a popup window with an input element that is
2495         filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget
2496         is the toolbar, so key events are sent to the toolbar instead of the web view.
2497
2498         * MiniBrowser/gtk/BrowserWindow.c:
2499         (webViewCreate):
2500         (newTabCallback):
2501         (openPrivateWindow):
2502         (browser_window_get_or_create_web_view_for_automation):
2503
2504 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2505
2506         Unreviewed. Fix WebDriver tests after r234839.
2507
2508         New pytest requires to autoinstall attrs too.
2509
2510         * Scripts/webkitpy/thirdparty/__init__.py:
2511         (AutoinstallImportHook._install_pytest):
2512
2513 2018-08-15  Ansh Shukla  <ansh_shukla@apple.com>
2514
2515         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
2516         https://bugs.webkit.org/show_bug.cgi?id=186870
2517         <rdar://problem/41314410>
2518
2519         Reviewed by Alex Christensen.
2520
2521         * WebKitTestRunner/TestController.cpp:
2522         (WTR::toString):
2523         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
2524         (WTR::TestController::didReceiveAuthenticationChallenge):
2525
2526 2018-08-15  Ben Richards  <benton_richards@apple.com>
2527
2528         We should cache the compiled sandbox profile in a data vault
2529         https://bugs.webkit.org/show_bug.cgi?id=184991
2530
2531         Reviewed by Ryosuke Niwa.
2532
2533         Added trace points for sandbox initialization
2534
2535         * Tracing/SystemTracePoints.plist:
2536
2537 2018-08-15  Ryan Haddad  <ryanhaddad@apple.com>
2538
2539         Unreviewed, rolling out r234870.
2540
2541         The test introduced with this change is a flaky failure.
2542
2543         Reverted changeset:
2544
2545         "NSURLAuthenticationMethodOAuth challenges are surfaced to
2546         clients in -didReceiveAuthenticationChallenge as
2547         NSURLAuthenticationMethodDefault"
2548         https://bugs.webkit.org/show_bug.cgi?id=186870
2549         https://trac.webkit.org/changeset/234870
2550
2551 2018-08-15  Jonathan Bedard  <jbedard@apple.com>
2552
2553         WebKitTestRunner should support watch devices
2554         https://bugs.webkit.org/show_bug.cgi?id=188570
2555
2556         Reviewed by Alex Christensen.
2557
2558         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
2559
2560 2018-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2561
2562         [Attachment SPI] Remove attachment display mode options
2563         https://bugs.webkit.org/show_bug.cgi?id=188596
2564
2565         Reviewed by Dan Bernstein.
2566
2567         Remove API tests and API test helpers for verifying the behavior of in-place media attachment elements.
2568
2569         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2570         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
2571         (TestWebKitAPI::TEST):
2572         (testVideoData): Deleted.
2573         (displayOptionsWithMode): Deleted.
2574         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:options:]): Deleted.
2575
2576 2018-08-14  Devin Rousso  <drousso@apple.com>
2577
2578         Unreviewed, change my emails.
2579
2580         * Scripts/webkitpy/common/config/contributors.json:
2581         * Scripts/webkitpy/common/config/watchlist:
2582
2583 2018-08-14  Saam barati  <sbarati@apple.com>
2584
2585         HashMap<Ref<P>, V> asserts when V is not zero for its empty value
2586         https://bugs.webkit.org/show_bug.cgi?id=188582
2587
2588         Reviewed by Sam Weinig.
2589
2590         * TestWebKitAPI/Tests/WTF/HashMap.cpp:
2591         (TestWebKitAPI::TEST):
2592
2593 2018-08-14  Zalan Bujtas  <zalan@apple.com>
2594
2595         [LFC][Floating] Add support for negative clearance.
2596         https://bugs.webkit.org/show_bug.cgi?id=188555
2597
2598         Reviewed by Simon Fraser.
2599
2600         * LayoutReloaded/misc/LFC-passing-tests.txt:
2601
2602 2018-08-14 Sihui Liu <sihui_liu@apple.com>
2603
2604         Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache
2605         https://bugs.webkit.org/show_bug.cgi?id=188576
2606         <rdar://problem/43148977>
2607
2608         Reviewed by Alex Christensen.
2609
2610         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2611         * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added.
2612         (TEST):
2613
2614 2018-08-14  Alex Christensen  <achristensen@webkit.org>
2615
2616         isValidCSSSelector is unsafe to be called from a non-main thread
2617         https://bugs.webkit.org/show_bug.cgi?id=188581
2618         <rdar://problem/40517358>
2619
2620         Reviewed by Sam Weinig.
2621
2622         * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
2623         (TestWebKitAPI::InMemoryCompiledContentExtension::create):
2624         (TestWebKitAPI::checkCompilerError):
2625
2626 2018-08-14  Ansh Shukla  <ansh_shukla@apple.com>
2627
2628         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
2629         https://bugs.webkit.org/show_bug.cgi?id=186870
2630         <rdar://problem/41314410>
2631
2632         Reviewed by Alex Christensen.
2633
2634         * WebKitTestRunner/TestController.cpp:
2635         (WTR::toString):
2636         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
2637         (WTR::TestController::didReceiveAuthenticationChallenge):
2638
2639 2018-08-14  Fujii Hironori  <Hironori.Fujii@sony.com>
2640
2641         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
2642         https://bugs.webkit.org/show_bug.cgi?id=187973
2643
2644         Reviewed by Alex Christensen.
2645
2646         In LayoutTests, test names have been canonicalized in Unix style
2647         since Bug 63597, for example 'fast/css/001.html'. But Bug 179219,
2648         Bug 179572, Bug 180660, and Bug 181814 have changed to use
2649         os.path.seq instead of slash if Windows Python is used.
2650
2651         Revert parts of those changes. Change relative_test_filename to
2652         return a slash-separated test name as chromium_win.py used to do.
2653
2654         This change fixes all 41 test-webkitpy failures in WinCairo port.
2655
2656         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
2657         (TestExpectationParser._parse_line): Do not convert test names with normpath.
2658         * Scripts/webkitpy/port/base.py:
2659         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
2660         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
2661         (Port.abspath_for_test): Replace self.TEST_PATH_SEPARATOR with self.host.filesystem.sep.
2662         * Scripts/webkitpy/port/driver.py:
2663         (Driver): Use '/' instead of os.sep.
2664         * Scripts/webkitpy/port/win.py:
2665         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
2666
2667 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
2668
2669         [ews-build] Add build step to run WK1 layout-test
2670         https://bugs.webkit.org/show_bug.cgi?id=188498
2671
2672         Reviewed by Lucas Forschler.
2673
2674         * BuildSlaveSupport/ews-build/steps.py:
2675         (RunWebKit1Tests): Class to run WebKit1Tests.
2676         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2677
2678 2018-08-14  Patrick Griffis  <pgriffis@igalia.com>
2679
2680         [Flatpak] Fix --cmakeargs
2681         https://bugs.webkit.org/show_bug.cgi?id=188567
2682
2683         Reviewed by Michael Catanzaro.
2684
2685         * flatpak/flatpakutils.py:
2686         (WebkitFlatpak.setup_dev_env):
2687
2688 2018-08-14  Darshan Kadu  <dkadu@igalia.com>
2689
2690         Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
2691         https://bugs.webkit.org/show_bug.cgi?id=186140
2692
2693         Reviewed by Youenn Fablet.
2694
2695         Added an optional parameter see_also to post_comment_to_bug function and used it for adding see_also variable's content in "See Also"
2696         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
2697         (Bugzilla.post_comment_to_bug):
2698         Modified mock for see_also parameter
2699         * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
2700         (MockBugzilla.post_comment_to_bug):
2701         Made following unit tests to have see_also in bug comment
2702         * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
2703         * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
2704         (SheriffTest.test_post_blame_comment_on_bug):
2705         * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
2706         * Scripts/webkitpy/tool/commands/queues_unittest.py:
2707         * Scripts/webkitpy/tool/commands/upload_unittest.py:
2708         * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
2709         * Scripts/webkitpy/w3c/test_exporter.py:
2710         (WebPlatformTestExporter.make_pull_request):
2711         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
2712         (TestExporterTest.MockBugzilla.post_comment_to_bug):
2713         (TestExporterTest.test_export):
2714
2715 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
2716
2717         [ews-build] Add support for max_builds parameter for workers
2718         https://bugs.webkit.org/show_bug.cgi?id=188531
2719
2720         Reviewed by Lucas Forschler.
2721
2722         * BuildSlaveSupport/ews-build/loadConfig.py:
2723         (loadBuilderConfig): Added support for max_builds.
2724
2725 2018-08-14  Zalan Bujtas  <zalan@apple.com>
2726
2727         [LFC][Floating] Adjust vertical position with non-collapsing previous sibling margin.
2728         https://bugs.webkit.org/show_bug.cgi?id=188543
2729
2730         Reviewed by Antti Koivisto.
2731
2732         * LayoutReloaded/misc/LFC-passing-tests.txt:
2733
2734 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2735
2736         Unreviewed. Fix WebDriver tests after r234839.
2737
2738         New pytest requires to autoinstall more_itertools and six too.
2739
2740         * Scripts/webkitpy/thirdparty/__init__.py:
2741         (AutoinstallImportHook._install_pytest):
2742
2743 2018-08-14  Tomas Popela  <tpopela@redhat.com>
2744
2745         [GTK] Minibrowser: Add labels for buttons
2746         https://bugs.webkit.org/show_bug.cgi?id=188549
2747
2748         Reviewed by Carlos Garcia Campos.
2749
2750         So they are accessible easier (i.e. while testing WebKitGTK+ through Minibrowser in Dogtail).
2751
2752         * MiniBrowser/gtk/BrowserWindow.c:
2753         (webViewIsLoadingChanged):
2754         (browserWindowSetupEditorToolbar):
2755         (browser_window_init):
2756
2757 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2758
2759         Unreviewed. Fix WebDriver tests after r234839.
2760
2761         New pytest requires to autoinstall atomicwrites too.
2762
2763         * Scripts/webkitpy/thirdparty/__init__.py:
2764         (AutoinstallImportHook._install_pytest):
2765
2766 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2767
2768         Unreviewed. Fix WebDriver tests after r234839.
2769
2770         New pytest requires to autoinstall pluggy and funcsigs too.
2771
2772         * Scripts/webkitpy/thirdparty/__init__.py:
2773         (AutoinstallImportHook._install_pytest):
2774
2775 2018-08-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2776
2777         Unreviewed. Update W3C WebDriver imported tests.
2778
2779         Bump pytest version to 3.6.2.
2780
2781         * Scripts/webkitpy/thirdparty/__init__.py:
2782         (AutoinstallImportHook._install_pytest):
2783
2784 2018-08-13  Thomas Denney  <tdenney@apple.com>
2785
2786         Allow the substring 'me' in contributor names and email addresses
2787         https://bugs.webkit.org/show_bug.cgi?id=188538
2788
2789         Reviewed by Tim Horton.
2790
2791         A test didn't permit the string "me" in email addresses or names of contributors.
2792
2793         * Scripts/webkitpy/common/config/committers_unittest.py:
2794         (CommittersTest.test_contributors_by_fuzzy_match):
2795
2796 2018-08-13  Commit Queue  <commit-queue@webkit.org>
2797
2798         Unreviewed, rolling out r234812.
2799         https://bugs.webkit.org/show_bug.cgi?id=188536
2800
2801         broke the build (Requested by ThomasDenney on #webkit).
2802
2803         Reverted changeset:
2804
2805         "Added Thomas Denney to contributors.json."
2806         https://bugs.webkit.org/show_bug.cgi?id=188525
2807         https://trac.webkit.org/changeset/234812
2808
2809 2018-08-13  Sihui Liu  <sihui_liu@apple.com>
2810
2811         Avoid timeout resulted from calling waitUntilDone when test is not running
2812         https://bugs.webkit.org/show_bug.cgi?id=188389
2813
2814         Reviewed by Chris Dumez.
2815
2816         If test is not running, we should not set the waitUntilDone flag, or it may cause subsequent tests timeout.
2817
2818         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2819         (WTR::TestRunner::waitUntilDone):
2820
2821 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2822
2823         [WK2] [macOS] Implement a mechanism to test drag and drop
2824         https://bugs.webkit.org/show_bug.cgi?id=181898
2825         <rdar://problem/39181698>
2826
2827         Reviewed by Simon Fraser.
2828
2829         Implements the currently stubbed DragAndDropSimulator on macOS, and introduces a new API test for r227266. See
2830         comments below for more detail.
2831
2832         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2833         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
2834
2835         Introduce a file for cross-platform drag and drop tests, currently for iOS and macOS. Additionally add a test
2836         for r227266, which was fixed earlier this year but could not be tested due to a lack of testing mechanism on
2837         macOS in WebKit2.
2838
2839         (TEST):
2840         * TestWebKitAPI/Tests/WebKitCocoa/full-page-dropzone.html: Added.
2841
2842         Minor tweaks to this test page to add "dragover" and "drop" event handlers.
2843
2844         * TestWebKitAPI/Tests/WebKitCocoa/image-in-link-and-input.html:
2845         * TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html: Added.
2846
2847         Add a new test page that includes a link embedded within an iframe below a plain text input.
2848
2849         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: Added.
2850         (TEST):
2851         * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: Renamed from Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm.
2852
2853         Move only existing WebKit2 macOS drag and drop test (DragAndDropPasteboardTests.NumberOfValidItemsForDrop) out
2854         of DragAndDropPasteboardTests.mm and into a new file, DragAndDropTestsMac.mm. Additionally, rename
2855         DragAndDropPasteboardTests to LegacyDragAndDropTests, since it now only contains two legacy WebView tests for
2856         drag and drop.
2857
2858         (+[FrameLoadCompletionListener listenerWithCompletionBlock:]):
2859         (-[FrameLoadCompletionListener initWithCompletionBlock:]):
2860         (-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]):
2861         (-[DragSource draggingSourceOperationMaskForLocal:]):
2862         (-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]):
2863         (-[DragInfo lastMousePosition]):
2864         (-[DragInfo setLastMousePosition:]):
2865         (-[DragInfo draggingDestinationWindow]):
2866         (-[DragInfo draggingSourceOperationMask]):
2867         (-[DragInfo draggingLocation]):
2868         (-[DragInfo draggedImageLocation]):
2869         (-[DragInfo draggedImage]):
2870         (-[DragInfo draggingPasteboard]):
2871         (-[DragInfo draggingSource]):
2872         (-[DragInfo draggingSequenceNumber]):
2873         (-[DragInfo slideDraggedImageTo:]):
2874         (-[DragInfo namesOfPromisedFilesDroppedAtDestination:]):
2875         (-[DragInfo draggingFormation]):
2876         (-[DragInfo setDraggingFormation:]):
2877         (-[DragInfo animatesToDestination]):
2878         (-[DragInfo setAnimatesToDestination:]):
2879         (-[DragInfo numberOfValidItemsForDrop]):
2880         (-[DragInfo setNumberOfValidItemsForDrop:]):
2881         (-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2882         (-[DragInfo springLoadingHighlight]):
2883         (-[DragInfo resetSpringLoading]):
2884         (TestWebKitAPI::getTestImage):
2885         (TestWebKitAPI::webViewAfterPerformingDragOperation):
2886         (TestWebKitAPI::TEST):
2887         * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Removed.
2888         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2889
2890         Flesh out some of the DragAndDropSimulator API for macOS, exposing (among other things) the drag pasteboard,
2891         the current NSDraggingInfo, the initial location of the drag image, and the drag image itself.
2892
2893         * TestWebKitAPI/cocoa/TestWKWebView.h:
2894         * TestWebKitAPI/cocoa/TestWKWebView.mm:
2895         (-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
2896         (-[TestWKWebView mouseUpAtPoint:]):
2897         (-[TestWKWebView mouseMoveToPoint:withFlags:]):
2898         (-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
2899         (-[TestWKWebView mouseEnterAtPoint:]):
2900         (-[TestWKWebView mouseExitAtPoint:]):
2901         (-[TestWKWebView mouseDragToPoint:]):
2902         (-[TestWKWebView _mouseEventWithType:atLocation:]):
2903         (-[TestWKWebView _mouseEventWithType:atLocation:flags:timestamp:clickCount:]):
2904
2905         Add TestWKWebView helpers to send MouseMove, MouseEnter and MouseDrag NSEvents to the web view. Additionally,
2906         rename parameter names to these helpers to make it more obvious that these locations are all in NSWindow
2907         coordinates.
2908
2909         (-[TestWKWebView typeCharacter:]):
2910
2911         Drive-by style fix: put this opening brace on the beginning of the next line.
2912
2913         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2914         (-[DragAndDropSimulator initWithWebViewFrame:]):
2915         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
2916         (-[DragAndDropSimulator webView]):
2917
2918         Small iOS DragAndDropSimulator adjustments for new DragAndDropSimulator interfaces.
2919
2920         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2921         (-[DragAndDropTestWKWebView initWithFrame:configuration:simulator:]):
2922
2923         Introduce a WKWebView subclass for testing drag and drop that overrides `-dragImage:at:offset:…`, and instead
2924         allows DragAndDropSimulator to take over the drag.
2925
2926         (-[DragAndDropTestWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]):
2927
2928         Override this entry point into drag and drop code, and instead call out to the DragAndDropSimulator to
2929         coordinate the drag.
2930
2931         (-[DragAndDropTestWKWebView waitForPendingMouseEvents]):
2932
2933         Helper method to wait for the web process to finish handling all in-flight mouse events.
2934
2935         (defaultExternalDragImage):
2936
2937         Set this image as the default drag image when simulating an incoming drag session from outside of the web view.
2938
2939         (-[DragAndDropSimulator initWithWebViewFrame:]):
2940         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
2941         (-[DragAndDropSimulator flipAboutXAxisInHostWindow:]):
2942
2943         Helper method to flip a given point about the X axis of the window.
2944
2945         (-[DragAndDropSimulator locationInViewForCurrentProgress]):
2946
2947         Map a progress value (between 0 and 1) to a drag location.
2948
2949         (-[DragAndDropSimulator initialProgressForMouseDrag]):
2950
2951         Determines the initial progress value when initiation a drag in web content. This is the initial progress
2952         required to ensure that the first mouse drag event exceeds the drag distance hysteresis and causes any drag
2953         (if applicable) to begin.
2954
2955         (-[DragAndDropSimulator runFrom:to:]):
2956         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2957
2958         Helper to coordinate drag updates in both the cases where we're simulating a drag session entering from outside
2959         of the web view, and in the case where we've initiated a drag from the web view itself.
2960
2961         (-[DragAndDropSimulator webView]):
2962         (-[DragAndDropSimulator setExternalDragPasteboard:]):
2963         (-[DragAndDropSimulator externalDragPasteboard]):
2964
2965         Just like its iOS counterpart (setExternalItemProviders:), setting an external drag pasteboard on macOS puts the
2966         DragAndDropSimulator in a mode that simulates a drag coming in from outside the web view, using the given
2967         pasteboard.
2968
2969         (-[DragAndDropSimulator setExternalDragImage:]):
2970         (-[DragAndDropSimulator externalDragImage]):
2971
2972         May be optionally set when specifying an external drag pasteboard to specify the drag image used. If no external
2973         drag image is specified, falls back to the default image returned by `defaultExternalDragImage()`.
2974
2975         (-[DragAndDropSimulator draggingInfo]):
2976         (-[DragAndDropSimulator willEndDraggingHandler]):
2977         (-[DragAndDropSimulator setWillEndDraggingHandler:]):
2978
2979         Hook to allow tests to run logic right before performing the drop (if the current drag operation is not none) or
2980         ending the drag session without performing a drag operation.
2981
2982         (-[DragAndDropSimulator initWithWebView:]): Deleted.
2983         (-[DragAndDropSimulator dealloc]): Deleted.
2984         (-[DragAndDropSimulator phase]): Deleted.
2985         * TestWebKitAPI/mac/TestDraggingInfo.h: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
2986         * TestWebKitAPI/mac/TestDraggingInfo.mm: Added.
2987
2988         Mock object conforming to NSDraggingInfo that is passed to WKWebView when invoking -draggingUpdated:,
2989         -draggingEntered: and -draggingExited:.
2990
2991         (-[TestDraggingInfo draggingPasteboard]):
2992         (-[TestDraggingInfo setDraggingPasteboard:]):
2993         (-[TestDraggingInfo draggingSource]):
2994         (-[TestDraggingInfo setDraggingSource:]):
2995         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2996         (-[TestDraggingInfo draggingDestinationWindow]):
2997         (-[TestDraggingInfo draggedImage]):
2998         (-[TestDraggingInfo setDraggedImage:]):
2999         (-[TestDraggingInfo slideDraggedImageTo:]):
3000         (-[TestDraggingInfo namesOfPromisedFilesDroppedAtDestination:]):
3001         (-[TestDraggingInfo resetSpringLoading]):
3002
3003         Empty method stubs, to be implemented in the future as needed.
3004
3005 2018-08-13  Thomas Denney  <tdenney@apple.com>
3006
3007         Added Thomas Denney to contributors.json.
3008         https://bugs.webkit.org/show_bug.cgi?id=188525
3009
3010         Reviewed by Myles C. Maxfield.
3011
3012         * Scripts/webkitpy/common/config/contributors.json:
3013
3014 2018-08-13  Antti Koivisto  <antti@apple.com>
3015
3016         Meaning of OptionSet::contains is unclear when used with OptionSet argument
3017         https://bugs.webkit.org/show_bug.cgi?id=188501
3018
3019         Reviewed by Anders Carlsson.
3020
3021         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
3022         (TestWebKitAPI::TEST):
3023
3024 2018-08-13  Commit Queue  <commit-queue@webkit.org>
3025
3026         Unreviewed, rolling out r234747.
3027         https://bugs.webkit.org/show_bug.cgi?id=188524
3028
3029         plugin processes crash on launch (Requested by smfr on
3030         #webkit).
3031
3032         Reverted changeset:
3033
3034         "We should cache the compiled sandbox profile in a data vault"
3035         https://bugs.webkit.org/show_bug.cgi?id=184991
3036         https://trac.webkit.org/changeset/234747
3037
3038 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3039
3040         [iOS] Dragging a non-editable text selection into a plain text input inserts HTML markup
3041         https://bugs.webkit.org/show_bug.cgi?id=188485
3042         <rdar://problem/43168784>
3043
3044         Reviewed by Tim Horton.
3045
3046         Add a new API test to verify that dropping selected non-editable rich text into a textarea inserts text as
3047         expected, rather than markup.
3048
3049         It's somewhat interesting to note that this particular use case isn't exercised by any existing tests; the
3050         closest test is DragAndDropTests.ContentEditableToTextarea, which drags a rich text selection from a
3051         contenteditable element to a text area. However, due to logic in `DragController::concludeEditDrag` that handles
3052         drag and drop across editable content differently than drag and drop from non-editable to editable content, the
3053         bug that is fixed here doesn't surface in that existing test.
3054
3055         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3056         * TestWebKitAPI/Tests/WebKitCocoa/selected-text-and-textarea.html: Added.
3057         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3058         (TestWebKitAPI::TEST):
3059
3060 2018-08-13  Alex Christensen  <achristensen@webkit.org>
3061
3062         Use a 1-byte enum class for TextDirection
3063         https://bugs.webkit.org/show_bug.cgi?id=188350
3064
3065         Reviewed by Simon Fraser.
3066
3067         * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
3068         (TestWebKitAPI::TEST_F):
3069         * TestWebKitAPI/Tests/WebCore/StringWithDirection.cpp:
3070         (WebCore::operator<<):
3071         (TestWebKitAPI::TEST):
3072         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
3073         (TEST_F):
3074
3075 2018-08-13  Zalan Bujtas  <zalan@apple.com>
3076
3077         [LFC][Floating] Add basic clearance support
3078         https://bugs.webkit.org/show_bug.cgi?id=188492
3079
3080         Reviewed by Antti Koivisto.
3081
3082         * LayoutReloaded/misc/LFC-passing-tests.txt:
3083
3084 2018-08-12  Zalan Bujtas  <zalan@apple.com>
3085
3086         [LFC] Float prev/next sibling should prevent top/bottom margin collapsing with parent.
3087         https://bugs.webkit.org/show_bug.cgi?id=188487
3088
3089         Reviewed by Antti Koivisto.
3090
3091         * LayoutReloaded/misc/LFC-passing-tests.txt:
3092
3093 2018-08-11  Aakash Jain  <aakash_jain@apple.com>
3094
3095         [ews-build] Separate queues for Builders and Testers - iOS
3096         https://bugs.webkit.org/show_bug.cgi?id=188396
3097
3098         Reviewed by Lucas Forschler.
3099
3100         * BuildSlaveSupport/ews-build/config.json: Splitted iOS queues into builders and testers.
3101         Also added ews121 and ews122 to match with current EWS configuration.
3102         * BuildSlaveSupport/ews-build/factories.py:
3103         (TestsFactory): Base classes for various Test factories.
3104         (TestsFactory.getProduct): Download and extract the archive.
3105
3106 2018-08-10  Daniel Bates  <dabates@apple.com>
3107
3108         webkit-patch setup-git-clone should set Git core editor to commit-log-editor
3109         https://bugs.webkit.org/show_bug.cgi?id=188473
3110
3111         Reviewed by Ryosuke Niwa.
3112
3113         Have "webkit-patch setup-git-clone" set the Git core editor to "perl Tools/Scripts/commit-log-editor --regenerate-log"
3114         so that the Git commit message is generated from the ChangeLog for developers that manually
3115         generate their ChangeLog using prepare-ChangeLog.
3116
3117         * Scripts/webkitpy/tool/commands/setupgitclone.py:
3118         (SetupGitClone.execute):
3119
3120 2018-08-10  Truitt Savell  <tsavell@apple.com>
3121
3122         Unreviewed, rolling out r234749.
3123
3124         Caused all perf tests to fail in Sierra
3125
3126         Reverted changeset:
3127
3128         "[webkitpy][Win] LayoutTests: test names should be Unix style,
3129         separated by slash not backslash"
3130         https://bugs.webkit.org/show_bug.cgi?id=187973
3131         https://trac.webkit.org/changeset/234749
3132
3133 2018-08-10  David Fenton  <david_fenton@apple.com>
3134
3135         Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio.
3136         https://bugs.webkit.org/show_bug.cgi?id=188470.
3137
3138         Unreviewed test gardening, disabling the tests.
3139
3140         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
3141         (TEST_F):
3142
3143 2018-08-10  Joseph Pecoraro  <pecoraro@apple.com>
3144
3145         Eliminate remaining instances of "ElCapitan" from LayoutTests / Tools
3146         https://bugs.webkit.org/show_bug.cgi?id=188458
3147
3148         Reviewed by Alex Christensen.
3149
3150         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
3151         (TestExpectationParser):
3152         * TestResultServer/static-dashboards/flakiness_dashboard.js:
3153
3154 2018-08-09  Fujii Hironori  <Hironori.Fujii@sony.com>
3155
3156         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
3157         https://bugs.webkit.org/show_bug.cgi?id=187973
3158
3159         Reviewed by Alex Christensen.
3160
3161         In LayoutTests, test names have been canonicalized in Unix style
3162         since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219,
3163         Bug 179572, Bug 180660 and Bug 181814 have changed to use
3164         os.path.seq instead of slash if Windows Python is used.
3165
3166         Revert parts of those changes. Change relative_test_filename to
3167         return a slash sperated test name as well as chromium_win.py used
3168         to do.
3169
3170         This change fixes all 41 test-webkitpy failures in WinCairo port.
3171
3172         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
3173         (TestExpectationParser._parse_line): Do not convert a test name by using normpath.
3174         * Scripts/webkitpy/port/base.py:
3175         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
3176         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
3177         (Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR.
3178         * Scripts/webkitpy/port/driver.py:
3179         (Driver): Use '/' instead of os.sep.
3180         * Scripts/webkitpy/port/win.py:
3181         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
3182
3183 2018-08-09  Thomas Denney  <tdenney@apple.com>
3184
3185         [WHLSL] Add individual test durations to output
3186         https://bugs.webkit.org/show_bug.cgi?id=188448
3187
3188         Reviewed by Myles C. Maxfield.
3189
3190         * WebGPUShadingLanguageRI/Test.js: Add timing output.
3191
3192 2018-08-09  Ben Richards  <benton_richards@apple.com>
3193
3194         We should cache the compiled sandbox profile in a data vault
3195         https://bugs.webkit.org/show_bug.cgi?id=184991
3196
3197         Reviewed by Ryosuke Niwa.
3198
3199         Added trace points for sandbox initialization
3200
3201         * Tracing/SystemTracePoints.plist:
3202
3203 2018-08-09  Jer Noble  <jer.noble@apple.com>
3204
3205         Video playback is using more power
3206         https://bugs.webkit.org/show_bug.cgi?id=188452
3207         <rdar://problem/42298937>
3208
3209         Reviewed by Eric Carlson.
3210
3211         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
3212         (PreferredAudioBufferSize::createView):
3213         (PreferredAudioBufferSize::preferredAudioBufferSize const):
3214         (TEST_F):
3215
3216 2018-08-09  Alex Christensen  <achristensen@webkit.org>
3217
3218         REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
3219         https://bugs.webkit.org/show_bug.cgi?id=188453
3220         <rdar://problem/43102553>
3221
3222         Reviewed by Chris Dumez
3223
3224         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3225         (TEST):
3226         (+[NullLookupContext sharedLookupContext]):
3227         (TestWebKitAPI::TEST): Deleted.
3228
3229 2018-08-09  Alex Christensen  <achristensen@webkit.org>
3230
3231         WKURLSchemeHandler crashes when sent errors with sync XHR
3232         https://bugs.webkit.org/show_bug.cgi?id=188358
3233
3234         Reviewed by Chris Dumez.
3235
3236         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
3237         (-[SyncErrorScheme webView:startURLSchemeTask:]):
3238         (-[SyncErrorScheme webView:stopURLSchemeTask:]):
3239         (-[SyncErrorScheme webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
3240
3241 2018-08-09  Per Arne Vollan  <pvollan@apple.com>
3242
3243         REGRESSION(r234652): fast/scrolling/rtl-scrollbars-animation-property.html is failing
3244         https://bugs.webkit.org/show_bug.cgi?id=188397
3245
3246         Reviewed by Tim Horton.
3247
3248         After r234652, [NSScroller preferredScrollerStyle] is called in the UI process, and we need to set the same
3249         user defaults related to scrollbars in the UI process as we do in the WebProcess.
3250
3251         * WebKitTestRunner/mac/main.mm:
3252         (setDefaultsToConsistentValuesForTesting):
3253
3254 2018-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3255
3256         [iOS WK2] Rename and refactor DataInteractionTests and DataInteractionSimulator
3257         https://bugs.webkit.org/show_bug.cgi?id=188439
3258
3259         Reviewed by Andy Estes and Megan Gardner.
3260
3261         Refactor DataInteractionSimulator (currently used for drag and drop testing on iOS) so that it exists across
3262         macOS and iOS, and rename it to DragAndDropSimulator. Additionally, rename DataInteractionTests to
3263         DragAndDropTests.
3264
3265         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3266         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3267         (TestWebKitAPI::TEST):
3268         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm.
3269         (testIconImage):
3270         (testZIPArchive):
3271         (-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
3272         (-[TestWKWebView editorContainsImageElement]):
3273         (-[TestWKWebView editorValue]):
3274         (makeCGRectValue):
3275         (checkCGRectIsEqualToCGRectWithLogging):
3276         (checkSelectionRectsWithLogging):
3277         (checkRichTextTypePrecedesPlainTextType):
3278         (checkFirstTypeIsPresentAndSecondTypeIsMissing):
3279         (checkTypeIdentifierIsRegisteredAtIndex):
3280         (checkEstimatedSize):
3281         (checkSuggestedNameAndEstimatedSize):
3282         (checkStringArraysAreEqual):
3283         (checkDragCaretRectIsContainedInRect):
3284         (checkJSONWithLogging):
3285         (testIconImageData):
3286         (runTestWithTemporaryTextFile):
3287         (runTestWithTemporaryFolder):
3288         (TestWebKitAPI::TEST):
3289         (TestWebKitAPI::setUpTestWebViewForDataTransferItems):
3290         (TestWebKitAPI::testDragAndDropOntoTargetElements):
3291         (TestWebKitAPI::testIconImageData):
3292         * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.h.
3293         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm.
3294         (-[WKWebView dropInteractionDelegate]):
3295         (-[WKWebView dragInteractionDelegate]):
3296         (-[WKWebView dropInteraction]):
3297         (-[WKWebView dragInteraction]):
3298         (-[MockDragDropSession initWithItems:location:window:allowMove:]):
3299         (-[MockDragDropSession allowsMoveOperation]):
3300         (-[MockDragDropSession isRestrictedToDraggingApplication]):
3301         (-[MockDragDropSession hasItemsConformingToTypeIdentifiers:]):
3302         (-[MockDragDropSession canLoadObjectsOfClass:]):
3303         (-[MockDragDropSession canLoadObjectsOfClasses:]):
3304         (-[MockDragDropSession items]):
3305         (-[MockDragDropSession setItems:]):
3306         (-[MockDragDropSession addItems:]):
3307         (-[MockDragDropSession locationInView:]):
3308         (-[MockDropSession initWithProviders:location:window:allowMove:]):
3309         (-[MockDropSession isLocal]):
3310         (-[MockDropSession progress]):
3311         (-[MockDropSession setProgressIndicatorStyle:]):
3312         (-[MockDropSession progressIndicatorStyle]):
3313         (-[MockDropSession operationMask]):
3314         (-[MockDropSession localDragSession]):
3315         (-[MockDropSession hasItemsConformingToTypeIdentifier:]):
3316         (-[MockDropSession canCreateItemsOfClass:]):
3317         (-[MockDropSession loadObjectsOfClass:completion:]):
3318         (-[MockDragSession initWithWindow:allowMove:]):
3319         (-[MockDragSession localOperationMask]):
3320         (-[MockDragSession externalOperationMask]):
3321         (-[MockDragSession session]):
3322         (-[MockDragSession localContext]):
3323         (-[MockDragSession setLocalContext:]):
3324         (dragAndDropEventNames):
3325         (-[DragAndDropSimulatorApplication _cancelAllTouches]):
3326         (-[DragAndDropSimulator initWithWebView:]):
3327         (-[DragAndDropSimulator dealloc]):
3328         (-[DragAndDropSimulator _resetSimulatedState]):
3329         (-[DragAndDropSimulator observedEventNames]):
3330         (-[DragAndDropSimulator simulateAllTouchesCanceled:]):
3331         (-[DragAndDropSimulator runFrom:to:]):
3332         (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
3333         (-[DragAndDropSimulator finalSelectionRects]):
3334         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
3335         (-[DragAndDropSimulator _enqueuePendingAdditionalItemRequestLocations]):
3336         (-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]):
3337         (-[DragAndDropSimulator _advanceProgress]):
3338         (-[DragAndDropSimulator _currentLocation]):
3339         (-[DragAndDropSimulator _scheduleAdvanceProgress]):
3340         (-[DragAndDropSimulator sourceItemProviders]):
3341         (-[DragAndDropSimulator externalItemProviders]):
3342         (-[DragAndDropSimulator setExternalItemProviders:]):
3343         (-[DragAndDropSimulator phase]):
3344         (-[DragAndDropSimulator liftPreviews]):
3345         (-[DragAndDropSimulator lastKnownDragCaretRect]):
3346         (-[DragAndDropSimulator waitForInputSession]):
3347         (-[DragAndDropSimulator insertedAttachments]):
3348         (-[DragAndDropSimulator removedAttachments]):
3349         (-[DragAndDropSimulator endDataTransfer]):
3350         (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
3351         (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]):
3352         (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
3353         (-[DragAndDropSimulator _webView:showCustomSheetForElement:]):
3354         (-[DragAndDropSimulator _webView:willPerformDropWithSession:]):
3355         (-[DragAndDropSimulator _webView:didInsertAttachment:]):
3356         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
3357         (-[DragAndDropSimulator _webView:focusShouldStartInputSession:]):
3358         (-[DragAndDropSimulator _webView:didStartInputSession:]):
3359         * TestWebKitAPI/ios/UIKitSPI.h:
3360         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: Added.
3361         (-[DragAndDropSimulator initWithWebView:]):
3362         (-[DragAndDropSimulator dealloc]):
3363         (-[DragAndDropSimulator runFrom:to:]):
3364         (-[DragAndDropSimulator insertedAttachments]):
3365         (-[DragAndDropSimulator removedAttachments]):
3366
3367 2018-08-09  Sihui Liu  <sihui_liu@apple.com>
3368
3369         REGRESSION (r232083): WKWebView loses first-party cookies on iOS
3370         https://bugs.webkit.org/show_bug.cgi?id=188443
3371         <rdar://problem/42991584>
3372
3373         Reviewed by Chris Dumez.
3374
3375         Skip WebKit.WKHTTPCookieStoreWithoutProcessPool on iOS.
3376
3377         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
3378
3379 2018-08-09  Ross Kirsling  <ross.kirsling@sony.com>
3380
3381         Unreviewed follow-up fix for r234720.
3382
3383         * Scripts/webkitpy/bindings/main.py:
3384         (BindingsTests.close_and_remove):
3385         (BindingsTests.main):
3386         Return to the original approach, since this seems to be the simplest cross-platform solution.
3387
3388 2018-08-09  Ali Juma  <ajuma@chromium.org>
3389
3390         Import WPTs for IntersectionObserver
3391         https://bugs.webkit.org/show_bug.cgi?id=188416
3392
3393         Reviewed by Simon Fraser.
3394
3395         Enable IntersectionObserver in DumpRenderTree. 
3396
3397         * DumpRenderTree/mac/DumpRenderTree.mm:
3398         (enableExperimentalFeatures):
3399         (setWebPreferencesForTestOptions):
3400         * WebKitTestRunner/TestController.cpp:
3401         (WTR::TestController::resetPreferencesToConsistentValues):
3402
3403 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
3404
3405         run-bindings-tests is not Win32-compatible
3406         https://bugs.webkit.org/show_bug.cgi?id=188424
3407
3408         Reviewed by Fujii Hironori.
3409
3410         * Scripts/webkitpy/bindings/main.py:
3411         (BindingsTests.main):
3412         Stop leaking file descriptors.
3413         (See https://www.logilab.org/blogentry/17873 for details, though the solution here is even simpler.)
3414
3415 2018-08-08  Alex Christensen  <achristensen@webkit.org>
3416
3417         Fix possible null dereference in WebBackForwardList::restoreFromState
3418         https://bugs.webkit.org/show_bug.cgi?id=188418
3419         <rdar://problem/42531726>
3420
3421         Reviewed by Chris Dumez.
3422
3423         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
3424         (TestWebKitAPI::TEST):
3425
3426 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
3427
3428         run-builtins-generator-tests does not correctly handle CRLFs from stderr
3429         https://bugs.webkit.org/show_bug.cgi?id=188392
3430
3431         Reviewed by Fujii Hironori.
3432
3433         Background:
3434         file.write converts LF to os.linesep, so if the input string contains CRLF, we end up writing CRCRLF to the file.
3435
3436         * Scripts/webkitpy/common/system/executive.py:
3437         (Executive.run_command):
3438         Normalize CRLF to LF in decoded stdout/stderr data, so that we don't return consumers a platform-specific string.
3439
3440 2018-08-08  Aditya Keerthi  <akeerthi@apple.com>
3441
3442         Unreviewed, add myself to committers list.
3443
3444         * Scripts/webkitpy/common/config/contributors.json:
3445
3446 2018-08-08  Commit Queue  <commit-queue@webkit.org>
3447
3448         Unreviewed, rolling out r234314, r234320, and r234321.
3449         https://bugs.webkit.org/show_bug.cgi?id=188414
3450
3451         Caused email sign in issue (Requested by ryanhaddad on
3452         #webkit).
3453
3454         Reverted changesets:
3455
3456         "Remove unused WKNavigationDelegatePrivate
3457         decidePolicyForNavigationAction SPI"
3458         https://bugs.webkit.org/show_bug.cgi?id=188077
3459         https://trac.webkit.org/changeset/234314
3460
3461         "Fix API tests after r234314"
3462         https://bugs.webkit.org/show_bug.cgi?id=188077
3463         https://trac.webkit.org/changeset/234320
3464
3465         "Fix API tests after r234314"
3466         https://bugs.webkit.org/show_bug.cgi?id=188077
3467         https://trac.webkit.org/changeset/234321
3468
3469 2018-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3470
3471         [iOS] fast/events/ios/contenteditable-autocapitalize.html is a flaky failure
3472         https://bugs.webkit.org/show_bug.cgi?id=188401
3473         <rdar://problem/32542300>
3474
3475         Reviewed by Ryosuke Niwa.
3476
3477         When run individually, fast/events/ios/contenteditable-autocapitalize.html passes consistently; however, when
3478         run right after another layout test that finishes while the keyboard is shown, this test sometimes fails. This
3479         is because each of the three steps of this test ends when UIScriptController's `didHideKeyboardCallback` is
3480         invoked, and if the keyboard only begins to dismiss after the previous test completes, we have a race. When the
3481         keyboard finishes dismissing after the UI script is evaluated, it will trigger UI script completion early and
3482         skip over one of the steps in the layout test, resulting in a text diff failure.
3483
3484         To fix this, add a mechanism in WebKitTestRunner to wait until the keyboard is dismissed (with a short timeout)
3485         as a part of resetting test controller state, before moving on to the next layout test.
3486
3487         * WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
3488         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
3489         (-[TestRunnerWKWebView didStartFormControlInteraction]):
3490         (-[TestRunnerWKWebView didEndFormControlInteraction]):
3491
3492         Use these hooks to keep track of whether the previous test is presenting any form input UI.
3493
3494         (-[TestRunnerWKWebView isInteractingWithFormControl]):
3495         * WebKitTestRunner/ios/TestControllerIOS.mm:
3496         (WTR::handleKeyboardWillHideNotification):
3497         (WTR::handleKeyboardDidHideNotification):
3498         (WTR::TestController::platformInitialize):
3499         (WTR::TestController::platformDestroy):
3500
3501         Register during initialization (and unregister during teardown) for keyboard hiding notifications, to keep track
3502         of when the keyboard dismissal animation ends.
3503
3504         (WTR::TestController::platformResetStateToConsistentValues):
3505
3506         Make a couple of tweaks here: (1) if form input UI is being shown, tell the web view to resign first responder,
3507         which causes the field to lose focus. (2) If necessary, wait for the current keyboard dismissal animation to
3508         finish. This includes any keyboard dismissal animations triggered as a result of step (1).
3509
3510 2018-08-05  Darin Adler  <darin@apple.com>
3511
3512         [Cocoa] More tweaks and refactoring to prepare for ARC
3513         https://bugs.webkit.org/show_bug.cgi?id=188245
3514
3515         Reviewed by Dan Bernstein.
3516
3517         * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Use const void* for a
3518         CFTypeRef instead of void*.
3519
3520         * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
3521         (createCoreAnimationLayer): Use CFBridgingRetain.
3522
3523         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
3524         (AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging casts.
3525         (AccessibilityUIElement::textMarkerRangeForElement): Ditto.
3526         (AccessibilityUIElement::selectedTextMarkerRange): Ditto.
3527         (AccessibilityUIElement::textMarkerRangeLength): Ditto.
3528         (AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto.
3529         (AccessibilityUIElement::indexForTextMarker): Ditto.
3530         (AccessibilityUIElement::textMarkerForIndex): Ditto.
3531         (AccessibilityUIElement::isTextMarkerValid): Ditto.
3532         (AccessibilityUIElement::previousTextMarker): Ditto.
3533         (AccessibilityUIElement::nextTextMarker): Ditto.
3534         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
3535         (createJSStringRef): Ditto.
3536         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
3537         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
3538         (AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
3539         (AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
3540         (AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
3541         (AccessibilityUIElement::endTextMarkerForBounds): Ditto.
3542         (AccessibilityUIElement::startTextMarkerForBounds): Ditto.
3543         (AccessibilityUIElement::textMarkerForPoint): Ditto.
3544         (AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
3545         (AccessibilityUIElement::startTextMarker): Ditto.
3546         (AccessibilityUIElement::endTextMarker): Ditto.
3547         (AccessibilityUIElement::setSelectedVisibleTextRange): Ditto.
3548         (AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
3549         (AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
3550         (AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
3551         (AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
3552         (AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
3553         (AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
3554         (AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
3555         (AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
3556         (AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
3557         (AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
3558
3559         * DumpRenderTree/mac/DumpRenderTree.mm:
3560         (resetWebPreferencesToConsistentValues): Use bridging cast.
3561         (dumpFramesAsText): Ditto.
3562         (dumpBackForwardListForAllWindows): Use a modern for loop instead of
3563         CFArray functions to iterate the array.
3564         (dump): Use bridging cast.
3565         (runTest): Ditto.
3566
3567         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
3568         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
3569         (toUTI): Return a RetainPtr<CFStringRef>.
3570         (-[LocalPasteboard types]): Use the above and bridging casts.
3571         (-[LocalPasteboard availableTypeFromArray:]): Ditto.
3572         (-[LocalPasteboard setData:forType:]): Ditto.
3573         (-[LocalPasteboard dataForType:]): Ditto.
3574         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
3575         instead of CFPropertyList.
3576         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
3577         CFStringCreateExternalRepresentation.
3578
3579         * DumpRenderTree/mac/MockGeolocationProvider.h: Put CFTypeRef in a HashSet
3580         instead of an Objective-C object pointer type.
3581         * DumpRenderTree/mac/MockGeolocationProvider.mm:
3582         (-[MockGeolocationProvider registerWebView:]): Update for above.
3583         (-[MockGeolocationProvider unregisterWebView:]): Ditto.
3584         (-[MockGeolocationProvider timerFired]): Ditto.
3585
3586         * DumpRenderTree/mac/MockWebNotificationProvider.h: Use CFTypeRef in
3587         HashMap and HashSet instead of an Objective-C object pointer type.
3588         * DumpRenderTree/mac/MockWebNotificationProvider.mm:
3589         (-[MockWebNotificationProvider registerWebView:]): Update for above.
3590         (-[MockWebNotificationProvider unregisterWebView:]): Ditto.
3591         (-[MockWebNotificationProvider showNotification:fromWebView:]): Ditto.
3592         (-[MockWebNotificationProvider cancelNotification:]): Ditto.
3593         (-[MockWebNotificationProvider simulateWebNotificationClick:]): Ditto.
3594
3595         * DumpRenderTree/mac/ObjCPlugin.m:
3596         (-[JSObjC retainObject:]): Use CFRetain instead of -[NSObject retain].
3597
3598         * DumpRenderTree/mac/TestRunnerMac.mm:
3599         (TestRunner::addDisallowedURL): Use bridging cast.
3600         (TestRunner::applicationCacheDiskUsageForOrigin): Ditto.
3601         (TestRunner::clearApplicationCacheForOrigin): Ditto.
3602         (originsArrayToJS): Ditto.
3603         (TestRunner::copyDecodedHostName): Ditto.
3604         (TestRunner::copyEncodedHostName): Ditto.
3605         (TestRunner::queueLoad): Ditto.
3606         (TestRunner::setDomainRelaxationForbiddenForURLScheme): Ditto.
3607         (TestRunner::setMockGeolocationPositionUnavailableError): Ditto.
3608         (TestRunner::setUserStyleSheetLocation): Ditto.
3609         (TestRunner::setValueForUser): Ditto.
3610         (TestRunner::overridePreference): Ditto.
3611         (TestRunner::execCommand): Ditto.
3612         (TestRunner::findString): Ditto.
3613         (TestRunner::isCommandEnabled): Ditto.
3614         (TestRunner::addOriginAccessWhitelistEntry): Ditto.
3615         (TestRunner::removeOriginAccessWhitelistEntry): Ditto.
3616         (TestRunner::addUserScript): Ditto.
3617         (TestRunner::addUserStyleSheet): Ditto.
3618         (TestRunner::evaluateInWebInspector): Ditto.
3619         (TestRunner::evaluateScriptInIsolatedWorld): Ditto.
3620         (TestRunner::authenticateSession): Ditto.
3621         (TestRunner::grantWebNotificationPermission): Ditto.
3622         (TestRunner::denyWebNotificationPermission): Ditto.
3623         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
3624         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Ditto.
3625
3626         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
3627         (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging cast.
3628         (WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
3629         (WTR::AccessibilityUIElement::previousTextMarker): Ditto.
3630         (WTR::AccessibilityUIElement::nextTextMarker): Ditto.
3631         (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
3632         (WTR::AccessibilityUIElement::selectedTextMarkerRange): Ditto.
3633         (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
3634         (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
3635         (WTR::AccessibilityUIElement::endTextMarkerForBounds): Ditto.
3636         (WTR::AccessibilityUIElement::startTextMarkerForBounds): Ditto.
3637         (WTR::AccessibilityUIElement::textMarkerForPoint): Ditto.
3638         (WTR::AccessibilityUIElement::textMarkerForIndex): Ditto.
3639         (WTR::AccessibilityUIElement::startTextMarker): Ditto.
3640         (WTR::AccessibilityUIElement::endTextMarker): Ditto.
3641         (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
3642         (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
3643         (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
3644         (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
3645         (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
3646         (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
3647         (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
3648         (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
3649         (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
3650         (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
3651
3652         * WebKitTestRunner/PlatformMac.cmake: Added WebKitTestRunnerWindow.h and .mm files.
3653         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto.
3654
3655         * WebKitTestRunner/mac/EventSenderProxy.mm: Add include of WebKitTestRunnerWindow.h
3656         so we can use the type and know it inherits from NSWindow.
3657
3658         * WebKitTestRunner/mac/PlatformWebViewMac.mm: Add include of WebKitTestRunnerWindow.h
3659         so we can use the type and know it inherits from NSWindow. Moved WebKitTestRunnerWindow
3660         class into a separate file.
3661         (WTR::PlatformWebView::keyWindow): Call +[WebKitTestRunnerWindow _WTR_keyWindow]
3662         instead of have a second copy of the implementation.
3663
3664         * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Add include of WebKitTestRunnerWindow.h
3665         so we can use the type and know it inherits from NSWindow. Also removed "using namespace".
3666         (+[WebKitTestRunnerEvent mouseLocation]): Updated for above.
3667
3668         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
3669         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
3670         (-[LocalPasteboard availableTypeFromArray:]): Use modern for loop.
3671         (-[LocalPasteboard setData:forType:]): Reordered method to be a tiny bit more efficient.
3672         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
3673         instead of CFPropertyList.
3674         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
3675         CFStringCreateExternalRepresentation.
3676
3677         * WebKitTestRunner/mac/WebKitTestRunnerWindow.h: Moved declaration of
3678         WebKitTestRunnerWindow here so it can be included by files that need to know
3679         what the type is and that it inherits from NSWindow.
3680
3681         * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: Added. Moved implementation here.
3682         (+[WebKitTestRunnerWindow _WTR_keyWindow]): Use modern for loop instead of the old,
3683         messier implementation.
3684
3685 2018-08-07  Alex Christensen  <achristensen@webkit.org>
3686
3687         Add a test for using SafeBrowsing
3688         https://bugs.webkit.org/show_bug.cgi?id=188290
3689
3690         Reviewed by Chris Dumez.
3691
3692         Swizzle out SSBLookupContext to write tests for how WebKit responds when it responds in different ways.
3693         We don't do anything with its results in WebKit yet, but when we do I'll add the expected behavior to this test.
3694
3695         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3696         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: Added.
3697         (-[SafeBrowsingDelegate webView:didFinishNavigation:]):
3698         (TestWebKitAPI::TEST):
3699
3700 2018-08-07  Lucas Forschler  <lforschler@apple.com>
3701
3702         If there's a Radar in the ChangeLog, webkit-patch upload/create-bug should put the radar in the bug and set InRadar
3703         https://bugs.webkit.org/show_bug.cgi?id=188235
3704
3705         Reviewed by Daniel Bates, Kocsen Chung, and Aakash Jain.
3706
3707         * Scripts/webkitpy/common/checkout/changelog.py: 
3708         (ChangeLogEntry): Teach the ChangeLog tools how to parse a radar_id
3709         * Scripts/webkitpy/common/checkout/changelog_unittest.py: Test out the new _parse_radar_id functionality
3710         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
3711         (Bugzilla.add_keyword_to_bug): Add logic to add keywords using the changeform
3712         * Scripts/webkitpy/tool/commands/upload.py:
3713         (Upload): Teach the upload step how to add radar information when creating a new bug.
3714         * Scripts/webkitpy/tool/steps/__init__.py:
3715         * Scripts/webkitpy/tool/steps/addradar.py: Added.
3716         (AddRadar):
3717         (AddRadar.run): Contains the logic to add the radar information to bugzilla.
3718         * Scripts/webkitpy/tool/steps/createbug.py:
3719         (CreateBug.run): set a "created_new_bug" state when creating a new bugzilla bug.
3720
3721 2018-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
3722
3723         Post-review feedback after r234614.
3724         https://bugs.webkit.org/show_bug.cgi?id=188322
3725         <rdar://problem/42455270>
3726
3727         Reviewed by Sam Weinig.
3728
3729         Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.
3730
3731         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3732         (rounded):
3733
3734 2018-08-07  Don Olmstead  <don.olmstead@sony.com>
3735
3736         [MiniBrowser][Win] Allow selection of recent user agents
3737         https://bugs.webkit.org/show_bug.cgi?id=188371
3738
3739         Reviewed by Fujii Hironori.
3740
3741         Updates the user agent spoofing strings to the latest released
3742         versions and adds Microsoft Edge's user agent.
3743
3744         Moves the menu item selection to the common base class, BrowserWindow
3745         to support user agent spoofing in a WebKitLegacyBrowserWindow and
3746         WebKitBrowserWindow.
3747
3748         * MiniBrowser/win/BrowserWindow.cpp: Added.
3749         (BrowserWindow::setUserAgent):
3750         * MiniBrowser/win/BrowserWindow.h:
3751         * MiniBrowser/win/CMakeLists.txt:
3752         * MiniBrowser/win/MainWindow.cpp:
3753         (MainWindow::toggleMenuItem):
3754         * MiniBrowser/win/MiniBrowserLib.rc:
3755         * MiniBrowser/win/MiniBrowserLibResource.h:
3756         * MiniBrowser/win/WebKitBrowserWindow.cpp:
3757         * MiniBrowser/win/WebKitBrowserWindow.h:
3758         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
3759         (WebKitLegacyBrowserWindow::setUserAgent):
3760         * MiniBrowser/win/WebKitLegacyBrowserWindow.h:
3761
3762 2018-08-07  Yusuke Suzuki  <utatane.tea@gmail.com>
3763
3764         Unreviewed, add a new address to my configuration
3765
3766         * Scripts/webkitpy/common/config/contributors.json:
3767
3768 2018-08-06  David Quesada  <david_quesada@apple.com>
3769
3770         webkitdirs.pm should default to iPhone SE for 64-bit testing
3771         https://bugs.webkit.org/show_bug.cgi?id=188361
3772
3773         Reviewed by Daniel Bates.
3774
3775         Use iPhone SE as the default iOS Simulator device type. This corresponds to the change to webkitpy in r234467.
3776
3777         * Scripts/webkitdirs.pm:
3778         (findOrCreateSimulatorForIOSDevice):
3779         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
3780         (parse_args):
3781             Update the help text for --device-type to reflect the new default device.
3782
3783 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3784
3785         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
3786         https://bugs.webkit.org/show_bug.cgi?id=188322
3787         <rdar://problem/42455270>
3788
3789         Reviewed by Tim Horton.
3790
3791         Fixes an API test added in r234600, which had incorrect test expectations — namely, the width of the caret rect
3792         was not in content view coordinates, unlike the x, y, and height.
3793
3794         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3795         (rounded):
3796         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
3797         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
3798         (TestWebKitAPI::TEST):
3799
3800 2018-08-06  Ryan Haddad  <ryanhaddad@apple.com>
3801
3802         Unreviewed, rolling out r234569.
3803
3804         Breaks internal builds.
3805
3806         Reverted changeset:
3807
3808         "We should cache the compiled sandbox profile in a data vault"
3809         https://bugs.webkit.org/show_bug.cgi?id=184991
3810         https://trac.webkit.org/changeset/234569
3811
3812 2018-08-06  Fujii Hironori  <Hironori.Fujii@sony.com>
3813
3814         [Win][DLLLauncher] Remove --highDPI switch
3815         https://bugs.webkit.org/show_bug.cgi?id=188255
3816
3817         Reviewed by Yusuke Suzuki.
3818
3819         Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
3820         aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
3821         became useless since the change. Remove the switch.
3822
3823         This change fixes the issue all dump render tree tests are failing
3824         in WinCairo port if high DPI display is connected.
3825
3826         * MiniBrowser/win/Common.cpp:
3827         (parseCommandLine): Removed `--highDPI` switch.
3828         * win/DLLLauncher/DLLLauncherMain.cpp:
3829         (wWinMain): Do not call SetProcessDPIAware.
3830         (shouldUseHighDPI): Deleted.
3831
3832 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3833
3834         [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
3835         https://bugs.webkit.org/show_bug.cgi?id=188335
3836         <rdar://problem/32542437> and <rdar://problem/32542433>
3837
3838         Reviewed by Tim Horton.
3839
3840         Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send
3841         touch events to the buttons. These were only used for the two tests which this patch refactors. See the
3842         LayoutTests ChangeLog for more detail.
3843
3844         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3845         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3846         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3847         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3848         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3849         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
3850         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3851         * TestRunnerShared/spi/UIKitTestSPI.h:
3852
3853         Remove an internal class declaration that is now unnecessary.
3854
3855         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3856         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3857         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
3858
3859 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3860
3861         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
3862         https://bugs.webkit.org/show_bug.cgi?id=188322
3863         <rdar://problem/42455270>
3864
3865         Reviewed by Tim Horton.
3866
3867         Adds plumbing in UIScriptController to grab the start and end selection handle rects for use in the new layout
3868         test. Also adds new API tests to verify that when a web view resigns first responder, both caret and range
3869         selection views are hidden, and when first responder status is restored, both caret and range selection views
3870         are made visible again.
3871
3872         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3873         (WTR::UIScriptController::selectionStartGrabberViewRect const):
3874         (WTR::UIScriptController::selectionEndGrabberViewRect const):
3875         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3876         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3877         (WTR::UIScriptController::selectionStartGrabberViewRect const):
3878         (WTR::UIScriptController::selectionEndGrabberViewRect const):
3879         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3880         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3881         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
3882         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
3883         (webViewWithAutofocusedInput):
3884
3885         Pull out some common logic for creating a web view that allows programmatic focus to present the keyboard, and
3886         immediately loading a web page with an autofocusing text field.
3887
3888         (TestWebKitAPI::TEST):
3889         * TestWebKitAPI/cocoa/TestWKWebView.h:
3890         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3891         (-[TestWKWebView caretViewRectInContentCoordinates]):
3892         (-[TestWKWebView selectionViewRectsInContentCoordinates]):
3893         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3894         (WTR::UIScriptController::selectionStartGrabberViewRect const):
3895         (WTR::UIScriptController::selectionEndGrabberViewRect const):
3896
3897 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3898
3899         [iOS] Layout tests that send HID events cause WebKitTestRunner to crash on recent SDKs
3900         https://bugs.webkit.org/show_bug.cgi?id=188334
3901         <rdar://problem/40630074>
3902
3903         Reviewed by Tim Horton.
3904
3905         To mark the end of previously dispatched IOHID events, HIDEventGenerator currently sends a vendor-defined event
3906         and stores the completion callback ID for the previously dispatched events as vendor-defined data. When this
3907         vendor-defined marker event is handled by the application, we then read the callback ID back from the event, map
3908         it to a completion block, and invoke the completion block to signal that the previous HID event has been
3909         processed.
3910
3911         This callback ID is an unsigned, so we tell IOKit that we need `sizeof(unsigned)` (4 bytes) to store it. On
3912         shipping software, IOKit clamps this to a minimum of 8 bytes, i.e. `sizeof(CFIndex)`. When we later call
3913         IOHIDEventGetIntegerValue to read the value of our vendor-defined data as a CFIndex, we get our expected
3914         callback ID because the buffer was clamped to 8 bytes.
3915
3916         However, on recent iOS SDKs that contain the fix for <rdar://problem/20082284>, IOKit no longer clamps the size
3917         of the vendor-defined data buffer to 8 bytes. This means that when we try to use IOHIDEventGetIntegerValue to
3918         read our callback ID back, we end up getting a CFIndex where the lower 4 bytes are the callback ID we wrote, and
3919         the upper 4 bytes are garbage. In the case where any of these upper 4 bytes are non-zero, we fail to map the
3920         callback ID to a completion handler, and so we never finish dispatching the HID event, causing an exception to
3921         be thrown.
3922
3923         To fix this, we adjust callback ID to be a CFIndex, which matches IOHIDEventGetIntegerValue's return type.
3924
3925         * WebKitTestRunner/ios/HIDEventGenerator.mm:
3926         (+[HIDEventGenerator nextEventCallbackID]):
3927         (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
3928
3929         Also refactor a bit of `-_sendMarkerHIDEventWithCompletionBlock:` by using auto and move semantics.
3930
3931 2018-08-03  Ben Richards  <benton_richards@apple.com>
3932
3933         We should cache the compiled sandbox profile in a data vault
3934         https://bugs.webkit.org/show_bug.cgi?id=184991
3935
3936         Reviewed by Ryosuke Niwa.
3937
3938         Added trace points for sandbox initialization
3939
3940         * Tracing/SystemTracePoints.plist:
3941
3942 2018-08-03  David Fenton  <david_fenton@apple.com>
3943
3944         Unreviewed, rolling out r234517.
3945
3946         Caused API test failures on iOS
3947
3948         Reverted changeset:
3949
3950         "[Cocoa] setCookie API fails to set session cookies for
3951         defaultDataStore if processPool created but not used"
3952         https://bugs.webkit.org/show_bug.cgi?id=188209
3953         https://trac.webkit.org/changeset/234517
3954
3955 2018-08-03  Ben Richards  <benton_richards@apple.com>
3956
3957         Add configuration for automatic process pre-warming
3958         https://bugs.webkit.org/show_bug.cgi?id=187108
3959
3960         Reviewed by Ryosuke Niwa.
3961
3962         Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant.
3963
3964         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3965         * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm:
3966         (TEST):
3967         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3968         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm:
3969         (TEST):
3970
3971 2018-08-03  Aakash Jain  <aakash_jain@apple.com>
3972
3973         [ews-build] Add build step to Check Patch Relevance
3974         https://bugs.webkit.org/show_bug.cgi?id=188295
3975
3976         Reviewed by Lucas Forschler.
3977
3978         * BuildSlaveSupport/ews-build/steps.py:
3979         (CheckPatchRelevance): Added step to check patch relevance.
3980         (CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant.
3981         (CheckPatchRelevance._get_patch): Retrieves the patch from buildbot.
3982         (CheckPatchRelevance._addToLog): Add the log message.
3983         (CheckPatchRelevance.start):
3984         * BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately.
3985
3986 2018-08-03  Jer Noble  <jer.noble@apple.com>
3987
3988         Unreviewed gardening; r234534 changed the policy for what audio session is set when a
3989         media element is paused. Updating the test to reflect the new policy.
3990
3991         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
3992         (TestWebKitAPI::TEST):
3993
3994 2018-08-03  Zalan Bujtas  <zalan@apple.com>
3995
3996         [LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
3997         https://bugs.webkit.org/show_bug.cgi?id=188306
3998
3999         Reviewed by Antti Koivisto.
4000
4001         * LayoutReloaded/misc/LFC-passing-tests.txt:
4002
4003 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4004
4005         [WPE] Use the new key mapper API from WPEBackend
4006         https://bugs.webkit.org/show_bug.cgi?id=188216
4007
4008         Reviewed by Žan Doberšek.
4009
4010         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
4011         (WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key
4012         code.
4013         * wpe/backends/WindowViewBackend.cpp:
4014         (WPEToolingBackends::WindowViewBackend::WindowViewBackend):
4015         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
4016         (WPEToolingBackends::WindowViewBackend::modifiers const):
4017         * wpe/backends/WindowViewBackend.h:
4018
4019 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4020
4021         [WPE] Implement MouseEvent.buttons
4022         https://bugs.webkit.org/show_bug.cgi?id=187998
4023
4024         Reviewed by Žan Doberšek.
4025
4026         Pass modifiers to mouse events.
4027
4028         * WebKitTestRunner/EventSenderProxy.h:
4029         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
4030         (WTR::senderButtonToWPEButton):
4031         (WTR::modifierForButton):
4032         (WTR::EventSenderProxy::mouseDown):
4033         (WTR::EventSenderProxy::mouseUp):
4034         (WTR::EventSenderProxy::mouseMoveTo):
4035         (WTR::EventSenderProxy::mouseScrollBy):
4036         (WTR::wkEventModifiersToWPE):
4037         (WTR::wpeKeySymForKeyRef):
4038         (WTR::EventSenderProxy::keyDown):
4039         (WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
4040         * wpe/backends/WindowViewBackend.cpp:
4041         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
4042         (WPEToolingBackends::WindowViewBackend::modifiers const):
4043         * wpe/backends/WindowViewBackend.h:
4044
4045 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4046
4047         [WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
4048         https://bugs.webkit.org/show_bug.cgi?id=188093
4049
4050         Reviewed by Žan Doberšek.
4051
4052         * MiniBrowser/wpe/main.cpp: Use WPE key symbols.
4053         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
4054         (WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code().
4055         (WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed.
4056         * flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions.
4057         * wpe/backends/WindowViewBackend.cpp:
4058         (WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed.
4059         * wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions.
4060
4061 2018-08-02  Nan Wang  <n_wang@apple.com>
4062
4063         AX: [iOS] add support to return the attributed string under the element
4064         https://bugs.webkit.org/show_bug.cgi?id=188276
4065         <rdar://problem/42872357>
4066
4067         Reviewed by Chris Fleizach.
4068
4069         * DumpRenderTree/AccessibilityUIElement.cpp:
4070         (attributedStringForElementCallback):
4071         (AccessibilityUIElement::getJSClass):
4072         * DumpRenderTree/AccessibilityUIElement.h:
4073         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
4074         (AccessibilityUIElement::attributedStringForElement):
4075         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
4076         (WTR::AccessibilityUIElement::attributedStringForElement):
4077         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
4078         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
4079         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
4080         (WTR::AccessibilityUIElement::attributedStringForElement):
4081
4082 2018-08-02  Ryan Haddad  <ryanhaddad@apple.com>
4083
4084         Skip API test DataInteractionTests.CustomActionSheetPopover on current SDKs.
4085         https://bugs.webkit.org/show_bug.cgi?id=175204
4086
4087         Unreviewed test gardening.
4088
4089         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
4090
4091 2018-08-02  Sihui Liu  <sihui_liu@apple.com>
4092
4093         [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used
4094         https://bugs.webkit.org/show_bug.cgi?id=188209
4095
4096         Reviewed by Geoffrey Garen.
4097
4098         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
4099         (TEST):
4100
4101 2018-08-02  Dan Bernstein  <mitz@apple.com>
4102
4103         Fixed WebKit.AttrStyle timing out on build.webkit.org.
4104
4105         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Changed from a URL that requires network
4106           access to one that doesn’t.
4107         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm:
4108         (TEST): Updated expected value.
4109
4110 2018-08-02  Wenson Hsieh  <wenson_hsieh@apple.com>
4111
4112         [iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents
4113         https://bugs.webkit.org/show_bug.cgi?id=188251
4114         <rdar://problem/37842108>
4115
4116         Reviewed by Tim Horton.
4117
4118         Adds a new API test to verify that clients (in this case, UIKit) is allowed to invoke
4119         -handleKeyWebEvent:withCompletionHandler: within the completion block of a prior invocation.
4120
4121         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4122         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: Added.
4123         (TestWebKitAPI::TEST):
4124         * TestWebKitAPI/Tests/ios/TestInputDelegate.h: Added.
4125
4126         Pull some logic used to force an input session to start out from an existing API test file
4127         (WKWebViewAutofillTests) and into a separate helper class that is used by both the existing API tests and the
4128         new keyboard input test.
4129
4130         * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
4131         (-[AutofillTestView initWithFrame:]):
4132         (TestWebKitAPI::TEST):
4133         (-[TestInputDelegate init]): Deleted.
4134         (-[TestInputDelegate _webView:focusShouldStartInputSession:]): Deleted.
4135         * TestWebKitAPI/ios/UIKitSPI.h:
4136
4137         Add some UIKit SPI utilized by the new API test.
4138
4139 2018-08-01  Dan Bernstein  <mitz@apple.com>
4140
4141         Optionally expose Attr::style to JavaScript
4142         https://bugs.webkit.org/show_bug.cgi?id=188226
4143         <rdar://problem/42818113>
4144
4145         Reviewed by Darin Adler.
4146
4147         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4148         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Added.
4149         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: Added.
4150         (TEST):
4151
4152 2018-08-02  David Fenton  <david_fenton@apple.com>
4153
4154         Unreviewed, rolling out r234489.
4155
4156         Caused 50+ crashes and 60+ API failures on iOS
4157