[iOS] Paste is missing from callout bar when pasteboard only contains custom data
[WebKit-https.git] / Tools / ChangeLog
1 2018-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
4         https://bugs.webkit.org/show_bug.cgi?id=184271
5         <rdar://problem/39256708>
6
7         Reviewed by Ryosuke Niwa.
8
9         Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
10         matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
11
12         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
13         (TestWebKitAPI::TEST):
14         (imagePath): Deleted.
15         (writeTypesAndDataToPasteboard): Deleted.
16         (setUpWebView): Deleted.
17         (markupString): Deleted.
18
19         Make this test file no longer exclusive to macOS.
20
21         * TestWebKitAPI/cocoa/TestWKWebView.h:
22         * TestWebKitAPI/cocoa/TestWKWebView.mm:
23         (-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
24
25         Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL.
26
27         (-[TestWKWebView synchronouslyLoadHTMLString:]):
28
29 2018-08-17  Jonathan Bedard  <jbedard@apple.com>
30
31         Add back --wtf-only to run-api-tests
32         https://bugs.webkit.org/show_bug.cgi?id=187893
33         <rdar://problem/42483983>
34
35         Reviewed by Aakash Jain.
36
37         When doing WTF development, it is not necessary to build or run all of the API
38         tests. Generally, if a user has specified a specific binary (or binaries) that
39         they are interested in testing, it is not necessary to check all API test binaries.
40
41         * Scripts/webkitpy/api_tests/manager.py:
42         (Manager._collect_tests): Only use the binaries matching the program arguments
43         when collecting tests.
44         (Manager._binaries_for_arguments): Generate a list of binaries which match the
45         program arguments.
46         (Manager.run): Pass a list binaries to check.
47         * Scripts/webkitpy/api_tests/run_api_tests.py:
48         (parse_args):
49         * Scripts/webkitpy/port/base.py:
50         (Port.check_api_test_build): If the caller specifies which API test binaries it
51         requires, only check the ones specified.
52         (Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests.
53         (Port._build_api_tests): Allow the caller to only build the WTF API tests.
54         * Scripts/webkitpy/port/win.py:
55         (WinPort.path_to_api_test_binaries):
56
57 2018-08-17  Jer Noble  <jer.noble@apple.com>
58
59         REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
60         https://bugs.webkit.org/show_bug.cgi?id=188470
61         <rdar://problem/43144969>
62
63         Reviewed by Alex Christensen.
64
65         On a loaded server, the WebContent process may send the "playing" message before the
66         UIProcess has a chance to register a listener for that message. Restructure the tests
67         so that the listener is registered before the page is loaded.
68
69         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
70         (PreferredAudioBufferSize::runPlayingTestWithPageNamed):
71         (TEST_F):
72
73 2018-08-16  Wenson Hsieh  <wenson_hsieh@apple.com>
74
75         [macOS] [WK2] Add infrastructure to test receiving file promises on drop
76         https://bugs.webkit.org/show_bug.cgi?id=188583
77
78         Reviewed by Andy Estes.
79
80         Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of
81         NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the
82         concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also
83         introduces 3 new macOS tests. See below for more details.
84
85         A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a
86         future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and
87         DumpRenderTree, and make this code shared among all three testing harnesses.
88
89         Tests:  DragAndDropTests.DragImageElementIntoFileUpload
90                 DragAndDropTests.DragPromisedImageFileIntoFileUpload
91                 DragAndDropTests.DragImageFileIntoFileUpload
92
93         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
94         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
95         (TEST):
96
97         Drive-by fix: Replace NSMakePoint with CGPointMake.
98
99         * TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html:
100
101         Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to
102         load the dropped image.
103
104         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
105         (waitForConditionWithLogging):
106
107         Add a helper function to wait for a condition to evaluate to true. To make failures more informative,
108         additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met.
109
110         (TEST):
111
112         Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element,
113         (2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs.
114
115         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
116
117         Surface the new functionality provided by the file promise receiver mock via two new methods on
118         DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths
119         directly to the pasteboard.
120
121         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
122         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
123         (-[DragAndDropSimulator externalPromisedFiles]):
124         (getFilePathsAndTypeIdentifiers):
125         (-[DragAndDropSimulator writePromisedFiles:]):
126         (-[DragAndDropSimulator writeFiles:]):
127         * TestWebKitAPI/mac/TestDraggingInfo.h:
128         * TestWebKitAPI/mac/TestDraggingInfo.mm:
129         (-[TestDraggingInfo initWithDragAndDropSimulator:]):
130         (-[TestDraggingInfo filePromiseReceivers]):
131         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
132
133         Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are
134         unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is
135         currently sufficient for testing purposes.
136
137         * TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h.
138         * TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added.
139         (-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]):
140         (-[TestFilePromiseReceiver fileTypes]):
141         (-[TestFilePromiseReceiver fileNames]):
142         (-[TestFilePromiseReceiver dealloc]):
143         (-[TestFilePromiseReceiver draggingSource]):
144         (-[TestFilePromiseReceiver setDraggingSource:]):
145         (fileNameWithNumericSuffix):
146         (copyFile):
147
148         Add a helper to copy a file into a destination directory. Used to implement the main functionality of our
149         NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by
150         WebKit.
151
152         (-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
153
154 2018-08-16  Alex Christensen  <achristensen@webkit.org>
155
156         Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service
157         https://bugs.webkit.org/show_bug.cgi?id=188677
158
159         Reviewed by Tim Horton.
160
161         * MiniBrowser/MiniBrowser.entitlements:
162         SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement
163         on released operating systems.  See <rdar://problem/42749777>
164
165 2018-08-16  Jer Noble  <jer.noble@apple.com>
166
167         Add option to run-api-tests to force running of DISABLED tests.
168         https://bugs.webkit.org/show_bug.cgi?id=188674
169
170         Reviewed by Joseph Pecoraro.
171
172         * Scripts/webkitpy/api_tests/run_api_tests.py:
173         (parse_args):
174         * Scripts/webkitpy/api_tests/runner.py:
175         (Runner.command_for_port):
176         (_Worker._run_single_test):
177
178 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
179
180         [ews-build] Separate queues for Builders and Testers - macOS High Sierra
181         https://bugs.webkit.org/show_bug.cgi?id=188540
182
183         Reviewed by Lucas Forschler.
184
185         * BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers. 
186
187 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
188
189         [ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults
190         https://bugs.webkit.org/show_bug.cgi?id=188666
191
192         Reviewed by Lucas Forschler.
193
194         * BuildSlaveSupport/ews-build/steps.py:
195         (ArchiveTestResults): Build step to Archive the test results.
196         (UploadTestResults): Build step to upload the archive.
197         (ExtractTestResults): Build step to unzip the archive on server and generate a link.
198         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
199         (ExpectMasterShellCommand): Copied from other similar internal code.
200
201 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
202
203         [ews-build] Separate queues for Builders and Testers - macOS Sierra
204         https://bugs.webkit.org/show_bug.cgi?id=188516
205
206         Reviewed by Lucas Forschler.
207
208         * BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers.
209         * BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers.
210
211 2018-08-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
212
213         [Win][DumpRenderTree] Remove error message for duplicated tests.
214         https://bugs.webkit.org/show_bug.cgi?id=188662
215
216         Reviewed by Per Arne Vollan.
217
218         This was added to track down an issue where the same tests appeared
219         to be run multiple times. This turned out to not be the case.
220         See https://bugs.webkit.org/show_bug.cgi?id=166760 .
221
222         * DumpRenderTree/win/DumpRenderTree.cpp:
223         (runTest):
224
225 2018-08-16  Alex Christensen  <achristensen@webkit.org>
226
227         Re-introduce assertion removed in r234890
228         https://bugs.webkit.org/show_bug.cgi?id=188611
229
230         Reviewed by Geoffrey Garen.
231
232         * TestWebKitAPI/Tests/WTF/Vector.cpp:
233         (TestWebKitAPI::TEST):
234
235 2018-08-16  Jer Noble  <jer.noble@apple.com>
236
237         Add Experimental Feature support for SourceBuffer.changeType()
238         https://bugs.webkit.org/show_bug.cgi?id=188626
239         <rdar://problem/43356021>
240
241         Reviewed by Eric Carlson.
242
243         * DumpRenderTree/mac/DumpRenderTree.mm:
244         (enableExperimentalFeatures):
245         (resetWebPreferencesToConsistentValues):
246         * WebKitTestRunner/TestController.cpp:
247         (WTR::TestController::resetPreferencesToConsistentValues):
248
249 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
250
251         Support drag-and-drop for input[type=color]
252         https://bugs.webkit.org/show_bug.cgi?id=188464
253
254         Reviewed by Wenson Hsieh.
255
256         Added five cross-platform API tests, to verify that dragging and dropping with
257         color inputs changes the value of the drop target if and only if both inputs are
258         enabled. Also tests that the change and input events are fired when changing the
259         value of a color input through drag and drop. 
260
261         Additionally, added a macOS-specific test to verify that dropping an item with
262         NSColorPboardType changes the value of the color input.
263
264         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
265         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
266         (TestWebKitAPI::TEST):
267         * TestWebKitAPI/Tests/WebKitCocoa/color-drop.html: Added.
268         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
269         (TestWebKitAPI::TEST):
270
271 2018-08-16  Antti Koivisto  <antti@apple.com>
272
273         Use OptionSet for ActivityState::Flags
274         https://bugs.webkit.org/show_bug.cgi?id=188554
275
276         Reviewed by Brent Fulgham.
277
278         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
279         (TestWebKitAPI::TEST):
280
281 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
282
283         [GTK] MiniBrowser: web view doesn't get the focus when new window is created
284         https://bugs.webkit.org/show_bug.cgi?id=188546
285
286         Reviewed by Michael Catanzaro.
287
288         When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We
289         always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused
290         instead. This was causing failures in WebDriver tests that create a popup window with an input element that is
291         filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget
292         is the toolbar, so key events are sent to the toolbar instead of the web view.
293
294         * MiniBrowser/gtk/BrowserWindow.c:
295         (webViewCreate):
296         (newTabCallback):
297         (openPrivateWindow):
298         (browser_window_get_or_create_web_view_for_automation):
299
300 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
301
302         Unreviewed. Fix WebDriver tests after r234839.
303
304         New pytest requires to autoinstall attrs too.
305
306         * Scripts/webkitpy/thirdparty/__init__.py:
307         (AutoinstallImportHook._install_pytest):
308
309 2018-08-15  Ansh Shukla  <ansh_shukla@apple.com>
310
311         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
312         https://bugs.webkit.org/show_bug.cgi?id=186870
313         <rdar://problem/41314410>
314
315         Reviewed by Alex Christensen.
316
317         * WebKitTestRunner/TestController.cpp:
318         (WTR::toString):
319         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
320         (WTR::TestController::didReceiveAuthenticationChallenge):
321
322 2018-08-15  Ben Richards  <benton_richards@apple.com>
323
324         We should cache the compiled sandbox profile in a data vault
325         https://bugs.webkit.org/show_bug.cgi?id=184991
326
327         Reviewed by Ryosuke Niwa.
328
329         Added trace points for sandbox initialization
330
331         * Tracing/SystemTracePoints.plist:
332
333 2018-08-15  Ryan Haddad  <ryanhaddad@apple.com>
334
335         Unreviewed, rolling out r234870.
336
337         The test introduced with this change is a flaky failure.
338
339         Reverted changeset:
340
341         "NSURLAuthenticationMethodOAuth challenges are surfaced to
342         clients in -didReceiveAuthenticationChallenge as
343         NSURLAuthenticationMethodDefault"
344         https://bugs.webkit.org/show_bug.cgi?id=186870
345         https://trac.webkit.org/changeset/234870
346
347 2018-08-15  Jonathan Bedard  <jbedard@apple.com>
348
349         WebKitTestRunner should support watch devices
350         https://bugs.webkit.org/show_bug.cgi?id=188570
351
352         Reviewed by Alex Christensen.
353
354         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
355
356 2018-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
357
358         [Attachment SPI] Remove attachment display mode options
359         https://bugs.webkit.org/show_bug.cgi?id=188596
360
361         Reviewed by Dan Bernstein.
362
363         Remove API tests and API test helpers for verifying the behavior of in-place media attachment elements.
364
365         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
366         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
367         (TestWebKitAPI::TEST):
368         (testVideoData): Deleted.
369         (displayOptionsWithMode): Deleted.
370         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:options:]): Deleted.
371
372 2018-08-14  Devin Rousso  <drousso@apple.com>
373
374         Unreviewed, change my emails.
375
376         * Scripts/webkitpy/common/config/contributors.json:
377         * Scripts/webkitpy/common/config/watchlist:
378
379 2018-08-14  Saam barati  <sbarati@apple.com>
380
381         HashMap<Ref<P>, V> asserts when V is not zero for its empty value
382         https://bugs.webkit.org/show_bug.cgi?id=188582
383
384         Reviewed by Sam Weinig.
385
386         * TestWebKitAPI/Tests/WTF/HashMap.cpp:
387         (TestWebKitAPI::TEST):
388
389 2018-08-14  Zalan Bujtas  <zalan@apple.com>
390
391         [LFC][Floating] Add support for negative clearance.
392         https://bugs.webkit.org/show_bug.cgi?id=188555
393
394         Reviewed by Simon Fraser.
395
396         * LayoutReloaded/misc/LFC-passing-tests.txt:
397
398 2018-08-14 Sihui Liu <sihui_liu@apple.com>
399
400         Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache
401         https://bugs.webkit.org/show_bug.cgi?id=188576
402         <rdar://problem/43148977>
403
404         Reviewed by Alex Christensen.
405
406         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
407         * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added.
408         (TEST):
409
410 2018-08-14  Alex Christensen  <achristensen@webkit.org>
411
412         isValidCSSSelector is unsafe to be called from a non-main thread
413         https://bugs.webkit.org/show_bug.cgi?id=188581
414         <rdar://problem/40517358>
415
416         Reviewed by Sam Weinig.
417
418         * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
419         (TestWebKitAPI::InMemoryCompiledContentExtension::create):
420         (TestWebKitAPI::checkCompilerError):
421
422 2018-08-14  Ansh Shukla  <ansh_shukla@apple.com>
423
424         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
425         https://bugs.webkit.org/show_bug.cgi?id=186870
426         <rdar://problem/41314410>
427
428         Reviewed by Alex Christensen.
429
430         * WebKitTestRunner/TestController.cpp:
431         (WTR::toString):
432         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
433         (WTR::TestController::didReceiveAuthenticationChallenge):
434
435 2018-08-14  Fujii Hironori  <Hironori.Fujii@sony.com>
436
437         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
438         https://bugs.webkit.org/show_bug.cgi?id=187973
439
440         Reviewed by Alex Christensen.
441
442         In LayoutTests, test names have been canonicalized in Unix style
443         since Bug 63597, for example 'fast/css/001.html'. But Bug 179219,
444         Bug 179572, Bug 180660, and Bug 181814 have changed to use
445         os.path.seq instead of slash if Windows Python is used.
446
447         Revert parts of those changes. Change relative_test_filename to
448         return a slash-separated test name as chromium_win.py used to do.
449
450         This change fixes all 41 test-webkitpy failures in WinCairo port.
451
452         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
453         (TestExpectationParser._parse_line): Do not convert test names with normpath.
454         * Scripts/webkitpy/port/base.py:
455         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
456         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
457         (Port.abspath_for_test): Replace self.TEST_PATH_SEPARATOR with self.host.filesystem.sep.
458         * Scripts/webkitpy/port/driver.py:
459         (Driver): Use '/' instead of os.sep.
460         * Scripts/webkitpy/port/win.py:
461         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
462
463 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
464
465         [ews-build] Add build step to run WK1 layout-test
466         https://bugs.webkit.org/show_bug.cgi?id=188498
467
468         Reviewed by Lucas Forschler.
469
470         * BuildSlaveSupport/ews-build/steps.py:
471         (RunWebKit1Tests): Class to run WebKit1Tests.
472         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
473
474 2018-08-14  Patrick Griffis  <pgriffis@igalia.com>
475
476         [Flatpak] Fix --cmakeargs
477         https://bugs.webkit.org/show_bug.cgi?id=188567
478
479         Reviewed by Michael Catanzaro.
480
481         * flatpak/flatpakutils.py:
482         (WebkitFlatpak.setup_dev_env):
483
484 2018-08-14  Darshan Kadu  <dkadu@igalia.com>
485
486         Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
487         https://bugs.webkit.org/show_bug.cgi?id=186140
488
489         Reviewed by Youenn Fablet.
490
491         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"
492         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
493         (Bugzilla.post_comment_to_bug):
494         Modified mock for see_also parameter
495         * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
496         (MockBugzilla.post_comment_to_bug):
497         Made following unit tests to have see_also in bug comment
498         * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
499         * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
500         (SheriffTest.test_post_blame_comment_on_bug):
501         * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
502         * Scripts/webkitpy/tool/commands/queues_unittest.py:
503         * Scripts/webkitpy/tool/commands/upload_unittest.py:
504         * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
505         * Scripts/webkitpy/w3c/test_exporter.py:
506         (WebPlatformTestExporter.make_pull_request):
507         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
508         (TestExporterTest.MockBugzilla.post_comment_to_bug):
509         (TestExporterTest.test_export):
510
511 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
512
513         [ews-build] Add support for max_builds parameter for workers
514         https://bugs.webkit.org/show_bug.cgi?id=188531
515
516         Reviewed by Lucas Forschler.
517
518         * BuildSlaveSupport/ews-build/loadConfig.py:
519         (loadBuilderConfig): Added support for max_builds.
520
521 2018-08-14  Zalan Bujtas  <zalan@apple.com>
522
523         [LFC][Floating] Adjust vertical position with non-collapsing previous sibling margin.
524         https://bugs.webkit.org/show_bug.cgi?id=188543
525
526         Reviewed by Antti Koivisto.
527
528         * LayoutReloaded/misc/LFC-passing-tests.txt:
529
530 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
531
532         Unreviewed. Fix WebDriver tests after r234839.
533
534         New pytest requires to autoinstall more_itertools and six too.
535
536         * Scripts/webkitpy/thirdparty/__init__.py:
537         (AutoinstallImportHook._install_pytest):
538
539 2018-08-14  Tomas Popela  <tpopela@redhat.com>
540
541         [GTK] Minibrowser: Add labels for buttons
542         https://bugs.webkit.org/show_bug.cgi?id=188549
543
544         Reviewed by Carlos Garcia Campos.
545
546         So they are accessible easier (i.e. while testing WebKitGTK+ through Minibrowser in Dogtail).
547
548         * MiniBrowser/gtk/BrowserWindow.c:
549         (webViewIsLoadingChanged):
550         (browserWindowSetupEditorToolbar):
551         (browser_window_init):
552
553 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
554
555         Unreviewed. Fix WebDriver tests after r234839.
556
557         New pytest requires to autoinstall atomicwrites too.
558
559         * Scripts/webkitpy/thirdparty/__init__.py:
560         (AutoinstallImportHook._install_pytest):
561
562 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
563
564         Unreviewed. Fix WebDriver tests after r234839.
565
566         New pytest requires to autoinstall pluggy and funcsigs too.
567
568         * Scripts/webkitpy/thirdparty/__init__.py:
569         (AutoinstallImportHook._install_pytest):
570
571 2018-08-13  Carlos Garcia Campos  <cgarcia@igalia.com>
572
573         Unreviewed. Update W3C WebDriver imported tests.
574
575         Bump pytest version to 3.6.2.
576
577         * Scripts/webkitpy/thirdparty/__init__.py:
578         (AutoinstallImportHook._install_pytest):
579
580 2018-08-13  Thomas Denney  <tdenney@apple.com>
581
582         Allow the substring 'me' in contributor names and email addresses
583         https://bugs.webkit.org/show_bug.cgi?id=188538
584
585         Reviewed by Tim Horton.
586
587         A test didn't permit the string "me" in email addresses or names of contributors.
588
589         * Scripts/webkitpy/common/config/committers_unittest.py:
590         (CommittersTest.test_contributors_by_fuzzy_match):
591
592 2018-08-13  Commit Queue  <commit-queue@webkit.org>
593
594         Unreviewed, rolling out r234812.
595         https://bugs.webkit.org/show_bug.cgi?id=188536
596
597         broke the build (Requested by ThomasDenney on #webkit).
598
599         Reverted changeset:
600
601         "Added Thomas Denney to contributors.json."
602         https://bugs.webkit.org/show_bug.cgi?id=188525
603         https://trac.webkit.org/changeset/234812
604
605 2018-08-13  Sihui Liu  <sihui_liu@apple.com>
606
607         Avoid timeout resulted from calling waitUntilDone when test is not running
608         https://bugs.webkit.org/show_bug.cgi?id=188389
609
610         Reviewed by Chris Dumez.
611
612         If test is not running, we should not set the waitUntilDone flag, or it may cause subsequent tests timeout.
613
614         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
615         (WTR::TestRunner::waitUntilDone):
616
617 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
618
619         [WK2] [macOS] Implement a mechanism to test drag and drop
620         https://bugs.webkit.org/show_bug.cgi?id=181898
621         <rdar://problem/39181698>
622
623         Reviewed by Simon Fraser.
624
625         Implements the currently stubbed DragAndDropSimulator on macOS, and introduces a new API test for r227266. See
626         comments below for more detail.
627
628         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
629         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
630
631         Introduce a file for cross-platform drag and drop tests, currently for iOS and macOS. Additionally add a test
632         for r227266, which was fixed earlier this year but could not be tested due to a lack of testing mechanism on
633         macOS in WebKit2.
634
635         (TEST):
636         * TestWebKitAPI/Tests/WebKitCocoa/full-page-dropzone.html: Added.
637
638         Minor tweaks to this test page to add "dragover" and "drop" event handlers.
639
640         * TestWebKitAPI/Tests/WebKitCocoa/image-in-link-and-input.html:
641         * TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html: Added.
642
643         Add a new test page that includes a link embedded within an iframe below a plain text input.
644
645         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: Added.
646         (TEST):
647         * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: Renamed from Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm.
648
649         Move only existing WebKit2 macOS drag and drop test (DragAndDropPasteboardTests.NumberOfValidItemsForDrop) out
650         of DragAndDropPasteboardTests.mm and into a new file, DragAndDropTestsMac.mm. Additionally, rename
651         DragAndDropPasteboardTests to LegacyDragAndDropTests, since it now only contains two legacy WebView tests for
652         drag and drop.
653
654         (+[FrameLoadCompletionListener listenerWithCompletionBlock:]):
655         (-[FrameLoadCompletionListener initWithCompletionBlock:]):
656         (-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]):
657         (-[DragSource draggingSourceOperationMaskForLocal:]):
658         (-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]):
659         (-[DragInfo lastMousePosition]):
660         (-[DragInfo setLastMousePosition:]):
661         (-[DragInfo draggingDestinationWindow]):
662         (-[DragInfo draggingSourceOperationMask]):
663         (-[DragInfo draggingLocation]):
664         (-[DragInfo draggedImageLocation]):
665         (-[DragInfo draggedImage]):
666         (-[DragInfo draggingPasteboard]):
667         (-[DragInfo draggingSource]):
668         (-[DragInfo draggingSequenceNumber]):
669         (-[DragInfo slideDraggedImageTo:]):
670         (-[DragInfo namesOfPromisedFilesDroppedAtDestination:]):
671         (-[DragInfo draggingFormation]):
672         (-[DragInfo setDraggingFormation:]):
673         (-[DragInfo animatesToDestination]):
674         (-[DragInfo setAnimatesToDestination:]):
675         (-[DragInfo numberOfValidItemsForDrop]):
676         (-[DragInfo setNumberOfValidItemsForDrop:]):
677         (-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
678         (-[DragInfo springLoadingHighlight]):
679         (-[DragInfo resetSpringLoading]):
680         (TestWebKitAPI::getTestImage):
681         (TestWebKitAPI::webViewAfterPerformingDragOperation):
682         (TestWebKitAPI::TEST):
683         * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Removed.
684         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
685
686         Flesh out some of the DragAndDropSimulator API for macOS, exposing (among other things) the drag pasteboard,
687         the current NSDraggingInfo, the initial location of the drag image, and the drag image itself.
688
689         * TestWebKitAPI/cocoa/TestWKWebView.h:
690         * TestWebKitAPI/cocoa/TestWKWebView.mm:
691         (-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
692         (-[TestWKWebView mouseUpAtPoint:]):
693         (-[TestWKWebView mouseMoveToPoint:withFlags:]):
694         (-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
695         (-[TestWKWebView mouseEnterAtPoint:]):
696         (-[TestWKWebView mouseExitAtPoint:]):
697         (-[TestWKWebView mouseDragToPoint:]):
698         (-[TestWKWebView _mouseEventWithType:atLocation:]):
699         (-[TestWKWebView _mouseEventWithType:atLocation:flags:timestamp:clickCount:]):
700
701         Add TestWKWebView helpers to send MouseMove, MouseEnter and MouseDrag NSEvents to the web view. Additionally,
702         rename parameter names to these helpers to make it more obvious that these locations are all in NSWindow
703         coordinates.
704
705         (-[TestWKWebView typeCharacter:]):
706
707         Drive-by style fix: put this opening brace on the beginning of the next line.
708
709         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
710         (-[DragAndDropSimulator initWithWebViewFrame:]):
711         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
712         (-[DragAndDropSimulator webView]):
713
714         Small iOS DragAndDropSimulator adjustments for new DragAndDropSimulator interfaces.
715
716         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
717         (-[DragAndDropTestWKWebView initWithFrame:configuration:simulator:]):
718
719         Introduce a WKWebView subclass for testing drag and drop that overrides `-dragImage:at:offset:…`, and instead
720         allows DragAndDropSimulator to take over the drag.
721
722         (-[DragAndDropTestWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]):
723
724         Override this entry point into drag and drop code, and instead call out to the DragAndDropSimulator to
725         coordinate the drag.
726
727         (-[DragAndDropTestWKWebView waitForPendingMouseEvents]):
728
729         Helper method to wait for the web process to finish handling all in-flight mouse events.
730
731         (defaultExternalDragImage):
732
733         Set this image as the default drag image when simulating an incoming drag session from outside of the web view.
734
735         (-[DragAndDropSimulator initWithWebViewFrame:]):
736         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
737         (-[DragAndDropSimulator flipAboutXAxisInHostWindow:]):
738
739         Helper method to flip a given point about the X axis of the window.
740
741         (-[DragAndDropSimulator locationInViewForCurrentProgress]):
742
743         Map a progress value (between 0 and 1) to a drag location.
744
745         (-[DragAndDropSimulator initialProgressForMouseDrag]):
746
747         Determines the initial progress value when initiation a drag in web content. This is the initial progress
748         required to ensure that the first mouse drag event exceeds the drag distance hysteresis and causes any drag
749         (if applicable) to begin.
750
751         (-[DragAndDropSimulator runFrom:to:]):
752         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
753
754         Helper to coordinate drag updates in both the cases where we're simulating a drag session entering from outside
755         of the web view, and in the case where we've initiated a drag from the web view itself.
756
757         (-[DragAndDropSimulator webView]):
758         (-[DragAndDropSimulator setExternalDragPasteboard:]):
759         (-[DragAndDropSimulator externalDragPasteboard]):
760
761         Just like its iOS counterpart (setExternalItemProviders:), setting an external drag pasteboard on macOS puts the
762         DragAndDropSimulator in a mode that simulates a drag coming in from outside the web view, using the given
763         pasteboard.
764
765         (-[DragAndDropSimulator setExternalDragImage:]):
766         (-[DragAndDropSimulator externalDragImage]):
767
768         May be optionally set when specifying an external drag pasteboard to specify the drag image used. If no external
769         drag image is specified, falls back to the default image returned by `defaultExternalDragImage()`.
770
771         (-[DragAndDropSimulator draggingInfo]):
772         (-[DragAndDropSimulator willEndDraggingHandler]):
773         (-[DragAndDropSimulator setWillEndDraggingHandler:]):
774
775         Hook to allow tests to run logic right before performing the drop (if the current drag operation is not none) or
776         ending the drag session without performing a drag operation.
777
778         (-[DragAndDropSimulator initWithWebView:]): Deleted.
779         (-[DragAndDropSimulator dealloc]): Deleted.
780         (-[DragAndDropSimulator phase]): Deleted.
781         * TestWebKitAPI/mac/TestDraggingInfo.h: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
782         * TestWebKitAPI/mac/TestDraggingInfo.mm: Added.
783
784         Mock object conforming to NSDraggingInfo that is passed to WKWebView when invoking -draggingUpdated:,
785         -draggingEntered: and -draggingExited:.
786
787         (-[TestDraggingInfo draggingPasteboard]):
788         (-[TestDraggingInfo setDraggingPasteboard:]):
789         (-[TestDraggingInfo draggingSource]):
790         (-[TestDraggingInfo setDraggingSource:]):
791         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
792         (-[TestDraggingInfo draggingDestinationWindow]):
793         (-[TestDraggingInfo draggedImage]):
794         (-[TestDraggingInfo setDraggedImage:]):
795         (-[TestDraggingInfo slideDraggedImageTo:]):
796         (-[TestDraggingInfo namesOfPromisedFilesDroppedAtDestination:]):
797         (-[TestDraggingInfo resetSpringLoading]):
798
799         Empty method stubs, to be implemented in the future as needed.
800
801 2018-08-13  Thomas Denney  <tdenney@apple.com>
802
803         Added Thomas Denney to contributors.json.
804         https://bugs.webkit.org/show_bug.cgi?id=188525
805
806         Reviewed by Myles C. Maxfield.
807
808         * Scripts/webkitpy/common/config/contributors.json:
809
810 2018-08-13  Antti Koivisto  <antti@apple.com>
811
812         Meaning of OptionSet::contains is unclear when used with OptionSet argument
813         https://bugs.webkit.org/show_bug.cgi?id=188501
814
815         Reviewed by Anders Carlsson.
816
817         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
818         (TestWebKitAPI::TEST):
819
820 2018-08-13  Commit Queue  <commit-queue@webkit.org>
821
822         Unreviewed, rolling out r234747.
823         https://bugs.webkit.org/show_bug.cgi?id=188524
824
825         plugin processes crash on launch (Requested by smfr on
826         #webkit).
827
828         Reverted changeset:
829
830         "We should cache the compiled sandbox profile in a data vault"
831         https://bugs.webkit.org/show_bug.cgi?id=184991
832         https://trac.webkit.org/changeset/234747
833
834 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
835
836         [iOS] Dragging a non-editable text selection into a plain text input inserts HTML markup
837         https://bugs.webkit.org/show_bug.cgi?id=188485
838         <rdar://problem/43168784>
839
840         Reviewed by Tim Horton.
841
842         Add a new API test to verify that dropping selected non-editable rich text into a textarea inserts text as
843         expected, rather than markup.
844
845         It's somewhat interesting to note that this particular use case isn't exercised by any existing tests; the
846         closest test is DragAndDropTests.ContentEditableToTextarea, which drags a rich text selection from a
847         contenteditable element to a text area. However, due to logic in `DragController::concludeEditDrag` that handles
848         drag and drop across editable content differently than drag and drop from non-editable to editable content, the
849         bug that is fixed here doesn't surface in that existing test.
850
851         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
852         * TestWebKitAPI/Tests/WebKitCocoa/selected-text-and-textarea.html: Added.
853         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
854         (TestWebKitAPI::TEST):
855
856 2018-08-13  Alex Christensen  <achristensen@webkit.org>
857
858         Use a 1-byte enum class for TextDirection
859         https://bugs.webkit.org/show_bug.cgi?id=188350
860
861         Reviewed by Simon Fraser.
862
863         * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
864         (TestWebKitAPI::TEST_F):
865         * TestWebKitAPI/Tests/WebCore/StringWithDirection.cpp:
866         (WebCore::operator<<):
867         (TestWebKitAPI::TEST):
868         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
869         (TEST_F):
870
871 2018-08-13  Zalan Bujtas  <zalan@apple.com>
872
873         [LFC][Floating] Add basic clearance support
874         https://bugs.webkit.org/show_bug.cgi?id=188492
875
876         Reviewed by Antti Koivisto.
877
878         * LayoutReloaded/misc/LFC-passing-tests.txt:
879
880 2018-08-12  Zalan Bujtas  <zalan@apple.com>
881
882         [LFC] Float prev/next sibling should prevent top/bottom margin collapsing with parent.
883         https://bugs.webkit.org/show_bug.cgi?id=188487
884
885         Reviewed by Antti Koivisto.
886
887         * LayoutReloaded/misc/LFC-passing-tests.txt:
888
889 2018-08-11  Aakash Jain  <aakash_jain@apple.com>
890
891         [ews-build] Separate queues for Builders and Testers - iOS
892         https://bugs.webkit.org/show_bug.cgi?id=188396
893
894         Reviewed by Lucas Forschler.
895
896         * BuildSlaveSupport/ews-build/config.json: Splitted iOS queues into builders and testers.
897         Also added ews121 and ews122 to match with current EWS configuration.
898         * BuildSlaveSupport/ews-build/factories.py:
899         (TestsFactory): Base classes for various Test factories.
900         (TestsFactory.getProduct): Download and extract the archive.
901
902 2018-08-10  Daniel Bates  <dabates@apple.com>
903
904         webkit-patch setup-git-clone should set Git core editor to commit-log-editor
905         https://bugs.webkit.org/show_bug.cgi?id=188473
906
907         Reviewed by Ryosuke Niwa.
908
909         Have "webkit-patch setup-git-clone" set the Git core editor to "perl Tools/Scripts/commit-log-editor --regenerate-log"
910         so that the Git commit message is generated from the ChangeLog for developers that manually
911         generate their ChangeLog using prepare-ChangeLog.
912
913         * Scripts/webkitpy/tool/commands/setupgitclone.py:
914         (SetupGitClone.execute):
915
916 2018-08-10  Truitt Savell  <tsavell@apple.com>
917
918         Unreviewed, rolling out r234749.
919
920         Caused all perf tests to fail in Sierra
921
922         Reverted changeset:
923
924         "[webkitpy][Win] LayoutTests: test names should be Unix style,
925         separated by slash not backslash"
926         https://bugs.webkit.org/show_bug.cgi?id=187973
927         https://trac.webkit.org/changeset/234749
928
929 2018-08-10  David Fenton  <david_fenton@apple.com>
930
931         Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio.
932         https://bugs.webkit.org/show_bug.cgi?id=188470.
933
934         Unreviewed test gardening, disabling the tests.
935
936         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
937         (TEST_F):
938
939 2018-08-10  Joseph Pecoraro  <pecoraro@apple.com>
940
941         Eliminate remaining instances of "ElCapitan" from LayoutTests / Tools
942         https://bugs.webkit.org/show_bug.cgi?id=188458
943
944         Reviewed by Alex Christensen.
945
946         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
947         (TestExpectationParser):
948         * TestResultServer/static-dashboards/flakiness_dashboard.js:
949
950 2018-08-09  Fujii Hironori  <Hironori.Fujii@sony.com>
951
952         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
953         https://bugs.webkit.org/show_bug.cgi?id=187973
954
955         Reviewed by Alex Christensen.
956
957         In LayoutTests, test names have been canonicalized in Unix style
958         since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219,
959         Bug 179572, Bug 180660 and Bug 181814 have changed to use
960         os.path.seq instead of slash if Windows Python is used.
961
962         Revert parts of those changes. Change relative_test_filename to
963         return a slash sperated test name as well as chromium_win.py used
964         to do.
965
966         This change fixes all 41 test-webkitpy failures in WinCairo port.
967
968         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
969         (TestExpectationParser._parse_line): Do not convert a test name by using normpath.
970         * Scripts/webkitpy/port/base.py:
971         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
972         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
973         (Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR.
974         * Scripts/webkitpy/port/driver.py:
975         (Driver): Use '/' instead of os.sep.
976         * Scripts/webkitpy/port/win.py:
977         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
978
979 2018-08-09  Thomas Denney  <tdenney@apple.com>
980
981         [WHLSL] Add individual test durations to output
982         https://bugs.webkit.org/show_bug.cgi?id=188448
983
984         Reviewed by Myles C. Maxfield.
985
986         * WebGPUShadingLanguageRI/Test.js: Add timing output.
987
988 2018-08-09  Ben Richards  <benton_richards@apple.com>
989
990         We should cache the compiled sandbox profile in a data vault
991         https://bugs.webkit.org/show_bug.cgi?id=184991
992
993         Reviewed by Ryosuke Niwa.
994
995         Added trace points for sandbox initialization
996
997         * Tracing/SystemTracePoints.plist:
998
999 2018-08-09  Jer Noble  <jer.noble@apple.com>
1000
1001         Video playback is using more power
1002         https://bugs.webkit.org/show_bug.cgi?id=188452
1003         <rdar://problem/42298937>
1004
1005         Reviewed by Eric Carlson.
1006
1007         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
1008         (PreferredAudioBufferSize::createView):
1009         (PreferredAudioBufferSize::preferredAudioBufferSize const):
1010         (TEST_F):
1011
1012 2018-08-09  Alex Christensen  <achristensen@webkit.org>
1013
1014         REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
1015         https://bugs.webkit.org/show_bug.cgi?id=188453
1016         <rdar://problem/43102553>
1017
1018         Reviewed by Chris Dumez
1019
1020         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
1021         (TEST):
1022         (+[NullLookupContext sharedLookupContext]):
1023         (TestWebKitAPI::TEST): Deleted.
1024
1025 2018-08-09  Alex Christensen  <achristensen@webkit.org>
1026
1027         WKURLSchemeHandler crashes when sent errors with sync XHR
1028         https://bugs.webkit.org/show_bug.cgi?id=188358
1029
1030         Reviewed by Chris Dumez.
1031
1032         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
1033         (-[SyncErrorScheme webView:startURLSchemeTask:]):
1034         (-[SyncErrorScheme webView:stopURLSchemeTask:]):
1035         (-[SyncErrorScheme webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
1036
1037 2018-08-09  Per Arne Vollan  <pvollan@apple.com>
1038
1039         REGRESSION(r234652): fast/scrolling/rtl-scrollbars-animation-property.html is failing
1040         https://bugs.webkit.org/show_bug.cgi?id=188397
1041
1042         Reviewed by Tim Horton.
1043
1044         After r234652, [NSScroller preferredScrollerStyle] is called in the UI process, and we need to set the same
1045         user defaults related to scrollbars in the UI process as we do in the WebProcess.
1046
1047         * WebKitTestRunner/mac/main.mm:
1048         (setDefaultsToConsistentValuesForTesting):
1049
1050 2018-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
1051
1052         [iOS WK2] Rename and refactor DataInteractionTests and DataInteractionSimulator
1053         https://bugs.webkit.org/show_bug.cgi?id=188439
1054
1055         Reviewed by Andy Estes and Megan Gardner.
1056
1057         Refactor DataInteractionSimulator (currently used for drag and drop testing on iOS) so that it exists across
1058         macOS and iOS, and rename it to DragAndDropSimulator. Additionally, rename DataInteractionTests to
1059         DragAndDropTests.
1060
1061         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1062         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1063         (TestWebKitAPI::TEST):
1064         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm.
1065         (testIconImage):
1066         (testZIPArchive):
1067         (-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
1068         (-[TestWKWebView editorContainsImageElement]):
1069         (-[TestWKWebView editorValue]):
1070         (makeCGRectValue):
1071         (checkCGRectIsEqualToCGRectWithLogging):
1072         (checkSelectionRectsWithLogging):
1073         (checkRichTextTypePrecedesPlainTextType):
1074         (checkFirstTypeIsPresentAndSecondTypeIsMissing):
1075         (checkTypeIdentifierIsRegisteredAtIndex):
1076         (checkEstimatedSize):
1077         (checkSuggestedNameAndEstimatedSize):
1078         (checkStringArraysAreEqual):
1079         (checkDragCaretRectIsContainedInRect):
1080         (checkJSONWithLogging):
1081         (testIconImageData):
1082         (runTestWithTemporaryTextFile):
1083         (runTestWithTemporaryFolder):
1084         (TestWebKitAPI::TEST):
1085         (TestWebKitAPI::setUpTestWebViewForDataTransferItems):
1086         (TestWebKitAPI::testDragAndDropOntoTargetElements):
1087         (TestWebKitAPI::testIconImageData):
1088         * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.h.
1089         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm.
1090         (-[WKWebView dropInteractionDelegate]):
1091         (-[WKWebView dragInteractionDelegate]):
1092         (-[WKWebView dropInteraction]):
1093         (-[WKWebView dragInteraction]):
1094         (-[MockDragDropSession initWithItems:location:window:allowMove:]):
1095         (-[MockDragDropSession allowsMoveOperation]):
1096         (-[MockDragDropSession isRestrictedToDraggingApplication]):
1097         (-[MockDragDropSession hasItemsConformingToTypeIdentifiers:]):
1098         (-[MockDragDropSession canLoadObjectsOfClass:]):
1099         (-[MockDragDropSession canLoadObjectsOfClasses:]):
1100         (-[MockDragDropSession items]):
1101         (-[MockDragDropSession setItems:]):
1102         (-[MockDragDropSession addItems:]):
1103         (-[MockDragDropSession locationInView:]):
1104         (-[MockDropSession initWithProviders:location:window:allowMove:]):
1105         (-[MockDropSession isLocal]):
1106         (-[MockDropSession progress]):
1107         (-[MockDropSession setProgressIndicatorStyle:]):
1108         (-[MockDropSession progressIndicatorStyle]):
1109         (-[MockDropSession operationMask]):
1110         (-[MockDropSession localDragSession]):
1111         (-[MockDropSession hasItemsConformingToTypeIdentifier:]):
1112         (-[MockDropSession canCreateItemsOfClass:]):
1113         (-[MockDropSession loadObjectsOfClass:completion:]):
1114         (-[MockDragSession initWithWindow:allowMove:]):
1115         (-[MockDragSession localOperationMask]):
1116         (-[MockDragSession externalOperationMask]):
1117         (-[MockDragSession session]):
1118         (-[MockDragSession localContext]):
1119         (-[MockDragSession setLocalContext:]):
1120         (dragAndDropEventNames):
1121         (-[DragAndDropSimulatorApplication _cancelAllTouches]):
1122         (-[DragAndDropSimulator initWithWebView:]):
1123         (-[DragAndDropSimulator dealloc]):
1124         (-[DragAndDropSimulator _resetSimulatedState]):
1125         (-[DragAndDropSimulator observedEventNames]):
1126         (-[DragAndDropSimulator simulateAllTouchesCanceled:]):
1127         (-[DragAndDropSimulator runFrom:to:]):
1128         (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
1129         (-[DragAndDropSimulator finalSelectionRects]):
1130         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
1131         (-[DragAndDropSimulator _enqueuePendingAdditionalItemRequestLocations]):
1132         (-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]):
1133         (-[DragAndDropSimulator _advanceProgress]):
1134         (-[DragAndDropSimulator _currentLocation]):
1135         (-[DragAndDropSimulator _scheduleAdvanceProgress]):
1136         (-[DragAndDropSimulator sourceItemProviders]):
1137         (-[DragAndDropSimulator externalItemProviders]):
1138         (-[DragAndDropSimulator setExternalItemProviders:]):
1139         (-[DragAndDropSimulator phase]):
1140         (-[DragAndDropSimulator liftPreviews]):
1141         (-[DragAndDropSimulator lastKnownDragCaretRect]):
1142         (-[DragAndDropSimulator waitForInputSession]):
1143         (-[DragAndDropSimulator insertedAttachments]):
1144         (-[DragAndDropSimulator removedAttachments]):
1145         (-[DragAndDropSimulator endDataTransfer]):
1146         (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
1147         (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]):
1148         (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
1149         (-[DragAndDropSimulator _webView:showCustomSheetForElement:]):
1150         (-[DragAndDropSimulator _webView:willPerformDropWithSession:]):
1151         (-[DragAndDropSimulator _webView:didInsertAttachment:]):
1152         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
1153         (-[DragAndDropSimulator _webView:focusShouldStartInputSession:]):
1154         (-[DragAndDropSimulator _webView:didStartInputSession:]):
1155         * TestWebKitAPI/ios/UIKitSPI.h:
1156         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: Added.
1157         (-[DragAndDropSimulator initWithWebView:]):
1158         (-[DragAndDropSimulator dealloc]):
1159         (-[DragAndDropSimulator runFrom:to:]):
1160         (-[DragAndDropSimulator insertedAttachments]):
1161         (-[DragAndDropSimulator removedAttachments]):
1162
1163 2018-08-09  Sihui Liu  <sihui_liu@apple.com>
1164
1165         REGRESSION (r232083): WKWebView loses first-party cookies on iOS
1166         https://bugs.webkit.org/show_bug.cgi?id=188443
1167         <rdar://problem/42991584>
1168
1169         Reviewed by Chris Dumez.
1170
1171         Skip WebKit.WKHTTPCookieStoreWithoutProcessPool on iOS.
1172
1173         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
1174
1175 2018-08-09  Ross Kirsling  <ross.kirsling@sony.com>
1176
1177         Unreviewed follow-up fix for r234720.
1178
1179         * Scripts/webkitpy/bindings/main.py:
1180         (BindingsTests.close_and_remove):
1181         (BindingsTests.main):
1182         Return to the original approach, since this seems to be the simplest cross-platform solution.
1183
1184 2018-08-09  Ali Juma  <ajuma@chromium.org>
1185
1186         Import WPTs for IntersectionObserver
1187         https://bugs.webkit.org/show_bug.cgi?id=188416
1188
1189         Reviewed by Simon Fraser.
1190
1191         Enable IntersectionObserver in DumpRenderTree. 
1192
1193         * DumpRenderTree/mac/DumpRenderTree.mm:
1194         (enableExperimentalFeatures):
1195         (setWebPreferencesForTestOptions):
1196         * WebKitTestRunner/TestController.cpp:
1197         (WTR::TestController::resetPreferencesToConsistentValues):
1198
1199 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
1200
1201         run-bindings-tests is not Win32-compatible
1202         https://bugs.webkit.org/show_bug.cgi?id=188424
1203
1204         Reviewed by Fujii Hironori.
1205
1206         * Scripts/webkitpy/bindings/main.py:
1207         (BindingsTests.main):
1208         Stop leaking file descriptors.
1209         (See https://www.logilab.org/blogentry/17873 for details, though the solution here is even simpler.)
1210
1211 2018-08-08  Alex Christensen  <achristensen@webkit.org>
1212
1213         Fix possible null dereference in WebBackForwardList::restoreFromState
1214         https://bugs.webkit.org/show_bug.cgi?id=188418
1215         <rdar://problem/42531726>
1216
1217         Reviewed by Chris Dumez.
1218
1219         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
1220         (TestWebKitAPI::TEST):
1221
1222 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
1223
1224         run-builtins-generator-tests does not correctly handle CRLFs from stderr
1225         https://bugs.webkit.org/show_bug.cgi?id=188392
1226
1227         Reviewed by Fujii Hironori.
1228
1229         Background:
1230         file.write converts LF to os.linesep, so if the input string contains CRLF, we end up writing CRCRLF to the file.
1231
1232         * Scripts/webkitpy/common/system/executive.py:
1233         (Executive.run_command):
1234         Normalize CRLF to LF in decoded stdout/stderr data, so that we don't return consumers a platform-specific string.
1235
1236 2018-08-08  Aditya Keerthi  <akeerthi@apple.com>
1237
1238         Unreviewed, add myself to committers list.
1239
1240         * Scripts/webkitpy/common/config/contributors.json:
1241
1242 2018-08-08  Commit Queue  <commit-queue@webkit.org>
1243
1244         Unreviewed, rolling out r234314, r234320, and r234321.
1245         https://bugs.webkit.org/show_bug.cgi?id=188414
1246
1247         Caused email sign in issue (Requested by ryanhaddad on
1248         #webkit).
1249
1250         Reverted changesets:
1251
1252         "Remove unused WKNavigationDelegatePrivate
1253         decidePolicyForNavigationAction SPI"
1254         https://bugs.webkit.org/show_bug.cgi?id=188077
1255         https://trac.webkit.org/changeset/234314
1256
1257         "Fix API tests after r234314"
1258         https://bugs.webkit.org/show_bug.cgi?id=188077
1259         https://trac.webkit.org/changeset/234320
1260
1261         "Fix API tests after r234314"
1262         https://bugs.webkit.org/show_bug.cgi?id=188077
1263         https://trac.webkit.org/changeset/234321
1264
1265 2018-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1266
1267         [iOS] fast/events/ios/contenteditable-autocapitalize.html is a flaky failure
1268         https://bugs.webkit.org/show_bug.cgi?id=188401
1269         <rdar://problem/32542300>
1270
1271         Reviewed by Ryosuke Niwa.
1272
1273         When run individually, fast/events/ios/contenteditable-autocapitalize.html passes consistently; however, when
1274         run right after another layout test that finishes while the keyboard is shown, this test sometimes fails. This
1275         is because each of the three steps of this test ends when UIScriptController's `didHideKeyboardCallback` is
1276         invoked, and if the keyboard only begins to dismiss after the previous test completes, we have a race. When the
1277         keyboard finishes dismissing after the UI script is evaluated, it will trigger UI script completion early and
1278         skip over one of the steps in the layout test, resulting in a text diff failure.
1279
1280         To fix this, add a mechanism in WebKitTestRunner to wait until the keyboard is dismissed (with a short timeout)
1281         as a part of resetting test controller state, before moving on to the next layout test.
1282
1283         * WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
1284         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
1285         (-[TestRunnerWKWebView didStartFormControlInteraction]):
1286         (-[TestRunnerWKWebView didEndFormControlInteraction]):
1287
1288         Use these hooks to keep track of whether the previous test is presenting any form input UI.
1289
1290         (-[TestRunnerWKWebView isInteractingWithFormControl]):
1291         * WebKitTestRunner/ios/TestControllerIOS.mm:
1292         (WTR::handleKeyboardWillHideNotification):
1293         (WTR::handleKeyboardDidHideNotification):
1294         (WTR::TestController::platformInitialize):
1295         (WTR::TestController::platformDestroy):
1296
1297         Register during initialization (and unregister during teardown) for keyboard hiding notifications, to keep track
1298         of when the keyboard dismissal animation ends.
1299
1300         (WTR::TestController::platformResetStateToConsistentValues):
1301
1302         Make a couple of tweaks here: (1) if form input UI is being shown, tell the web view to resign first responder,
1303         which causes the field to lose focus. (2) If necessary, wait for the current keyboard dismissal animation to
1304         finish. This includes any keyboard dismissal animations triggered as a result of step (1).
1305
1306 2018-08-05  Darin Adler  <darin@apple.com>
1307
1308         [Cocoa] More tweaks and refactoring to prepare for ARC
1309         https://bugs.webkit.org/show_bug.cgi?id=188245
1310
1311         Reviewed by Dan Bernstein.
1312
1313         * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Use const void* for a
1314         CFTypeRef instead of void*.
1315
1316         * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
1317         (createCoreAnimationLayer): Use CFBridgingRetain.
1318
1319         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
1320         (AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging casts.
1321         (AccessibilityUIElement::textMarkerRangeForElement): Ditto.
1322         (AccessibilityUIElement::selectedTextMarkerRange): Ditto.
1323         (AccessibilityUIElement::textMarkerRangeLength): Ditto.
1324         (AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto.
1325         (AccessibilityUIElement::indexForTextMarker): Ditto.
1326         (AccessibilityUIElement::textMarkerForIndex): Ditto.
1327         (AccessibilityUIElement::isTextMarkerValid): Ditto.
1328         (AccessibilityUIElement::previousTextMarker): Ditto.
1329         (AccessibilityUIElement::nextTextMarker): Ditto.
1330         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
1331         (createJSStringRef): Ditto.
1332         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
1333         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
1334         (AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
1335         (AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
1336         (AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
1337         (AccessibilityUIElement::endTextMarkerForBounds): Ditto.
1338         (AccessibilityUIElement::startTextMarkerForBounds): Ditto.
1339         (AccessibilityUIElement::textMarkerForPoint): Ditto.
1340         (AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
1341         (AccessibilityUIElement::startTextMarker): Ditto.
1342         (AccessibilityUIElement::endTextMarker): Ditto.
1343         (AccessibilityUIElement::setSelectedVisibleTextRange): Ditto.
1344         (AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
1345         (AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
1346         (AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
1347         (AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
1348         (AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
1349         (AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
1350         (AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
1351         (AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
1352         (AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
1353         (AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
1354
1355         * DumpRenderTree/mac/DumpRenderTree.mm:
1356         (resetWebPreferencesToConsistentValues): Use bridging cast.
1357         (dumpFramesAsText): Ditto.
1358         (dumpBackForwardListForAllWindows): Use a modern for loop instead of
1359         CFArray functions to iterate the array.
1360         (dump): Use bridging cast.
1361         (runTest): Ditto.
1362
1363         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
1364         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
1365         (toUTI): Return a RetainPtr<CFStringRef>.
1366         (-[LocalPasteboard types]): Use the above and bridging casts.
1367         (-[LocalPasteboard availableTypeFromArray:]): Ditto.
1368         (-[LocalPasteboard setData:forType:]): Ditto.
1369         (-[LocalPasteboard dataForType:]): Ditto.
1370         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
1371         instead of CFPropertyList.
1372         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
1373         CFStringCreateExternalRepresentation.
1374
1375         * DumpRenderTree/mac/MockGeolocationProvider.h: Put CFTypeRef in a HashSet
1376         instead of an Objective-C object pointer type.
1377         * DumpRenderTree/mac/MockGeolocationProvider.mm:
1378         (-[MockGeolocationProvider registerWebView:]): Update for above.
1379         (-[MockGeolocationProvider unregisterWebView:]): Ditto.
1380         (-[MockGeolocationProvider timerFired]): Ditto.
1381
1382         * DumpRenderTree/mac/MockWebNotificationProvider.h: Use CFTypeRef in
1383         HashMap and HashSet instead of an Objective-C object pointer type.
1384         * DumpRenderTree/mac/MockWebNotificationProvider.mm:
1385         (-[MockWebNotificationProvider registerWebView:]): Update for above.
1386         (-[MockWebNotificationProvider unregisterWebView:]): Ditto.
1387         (-[MockWebNotificationProvider showNotification:fromWebView:]): Ditto.
1388         (-[MockWebNotificationProvider cancelNotification:]): Ditto.
1389         (-[MockWebNotificationProvider simulateWebNotificationClick:]): Ditto.
1390
1391         * DumpRenderTree/mac/ObjCPlugin.m:
1392         (-[JSObjC retainObject:]): Use CFRetain instead of -[NSObject retain].
1393
1394         * DumpRenderTree/mac/TestRunnerMac.mm:
1395         (TestRunner::addDisallowedURL): Use bridging cast.
1396         (TestRunner::applicationCacheDiskUsageForOrigin): Ditto.
1397         (TestRunner::clearApplicationCacheForOrigin): Ditto.
1398         (originsArrayToJS): Ditto.
1399         (TestRunner::copyDecodedHostName): Ditto.
1400         (TestRunner::copyEncodedHostName): Ditto.
1401         (TestRunner::queueLoad): Ditto.
1402         (TestRunner::setDomainRelaxationForbiddenForURLScheme): Ditto.
1403         (TestRunner::setMockGeolocationPositionUnavailableError): Ditto.
1404         (TestRunner::setUserStyleSheetLocation): Ditto.
1405         (TestRunner::setValueForUser): Ditto.
1406         (TestRunner::overridePreference): Ditto.
1407         (TestRunner::execCommand): Ditto.
1408         (TestRunner::findString): Ditto.
1409         (TestRunner::isCommandEnabled): Ditto.
1410         (TestRunner::addOriginAccessWhitelistEntry): Ditto.
1411         (TestRunner::removeOriginAccessWhitelistEntry): Ditto.
1412         (TestRunner::addUserScript): Ditto.
1413         (TestRunner::addUserStyleSheet): Ditto.
1414         (TestRunner::evaluateInWebInspector): Ditto.
1415         (TestRunner::evaluateScriptInIsolatedWorld): Ditto.
1416         (TestRunner::authenticateSession): Ditto.
1417         (TestRunner::grantWebNotificationPermission): Ditto.
1418         (TestRunner::denyWebNotificationPermission): Ditto.
1419         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
1420         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Ditto.
1421
1422         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
1423         (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging cast.
1424         (WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
1425         (WTR::AccessibilityUIElement::previousTextMarker): Ditto.
1426         (WTR::AccessibilityUIElement::nextTextMarker): Ditto.
1427         (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
1428         (WTR::AccessibilityUIElement::selectedTextMarkerRange): Ditto.
1429         (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
1430         (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
1431         (WTR::AccessibilityUIElement::endTextMarkerForBounds): Ditto.
1432         (WTR::AccessibilityUIElement::startTextMarkerForBounds): Ditto.
1433         (WTR::AccessibilityUIElement::textMarkerForPoint): Ditto.
1434         (WTR::AccessibilityUIElement::textMarkerForIndex): Ditto.
1435         (WTR::AccessibilityUIElement::startTextMarker): Ditto.
1436         (WTR::AccessibilityUIElement::endTextMarker): Ditto.
1437         (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
1438         (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
1439         (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
1440         (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
1441         (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
1442         (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
1443         (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
1444         (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
1445         (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
1446         (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
1447
1448         * WebKitTestRunner/PlatformMac.cmake: Added WebKitTestRunnerWindow.h and .mm files.
1449         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto.
1450
1451         * WebKitTestRunner/mac/EventSenderProxy.mm: Add include of WebKitTestRunnerWindow.h
1452         so we can use the type and know it inherits from NSWindow.
1453
1454         * WebKitTestRunner/mac/PlatformWebViewMac.mm: Add include of WebKitTestRunnerWindow.h
1455         so we can use the type and know it inherits from NSWindow. Moved WebKitTestRunnerWindow
1456         class into a separate file.
1457         (WTR::PlatformWebView::keyWindow): Call +[WebKitTestRunnerWindow _WTR_keyWindow]
1458         instead of have a second copy of the implementation.
1459
1460         * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Add include of WebKitTestRunnerWindow.h
1461         so we can use the type and know it inherits from NSWindow. Also removed "using namespace".
1462         (+[WebKitTestRunnerEvent mouseLocation]): Updated for above.
1463
1464         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
1465         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
1466         (-[LocalPasteboard availableTypeFromArray:]): Use modern for loop.
1467         (-[LocalPasteboard setData:forType:]): Reordered method to be a tiny bit more efficient.
1468         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
1469         instead of CFPropertyList.
1470         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
1471         CFStringCreateExternalRepresentation.
1472
1473         * WebKitTestRunner/mac/WebKitTestRunnerWindow.h: Moved declaration of
1474         WebKitTestRunnerWindow here so it can be included by files that need to know
1475         what the type is and that it inherits from NSWindow.
1476
1477         * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: Added. Moved implementation here.
1478         (+[WebKitTestRunnerWindow _WTR_keyWindow]): Use modern for loop instead of the old,
1479         messier implementation.
1480
1481 2018-08-07  Alex Christensen  <achristensen@webkit.org>
1482
1483         Add a test for using SafeBrowsing
1484         https://bugs.webkit.org/show_bug.cgi?id=188290
1485
1486         Reviewed by Chris Dumez.
1487
1488         Swizzle out SSBLookupContext to write tests for how WebKit responds when it responds in different ways.
1489         We don't do anything with its results in WebKit yet, but when we do I'll add the expected behavior to this test.
1490
1491         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1492         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: Added.
1493         (-[SafeBrowsingDelegate webView:didFinishNavigation:]):
1494         (TestWebKitAPI::TEST):
1495
1496 2018-08-07  Lucas Forschler  <lforschler@apple.com>
1497
1498         If there's a Radar in the ChangeLog, webkit-patch upload/create-bug should put the radar in the bug and set InRadar
1499         https://bugs.webkit.org/show_bug.cgi?id=188235
1500
1501         Reviewed by Daniel Bates, Kocsen Chung, and Aakash Jain.
1502
1503         * Scripts/webkitpy/common/checkout/changelog.py: 
1504         (ChangeLogEntry): Teach the ChangeLog tools how to parse a radar_id
1505         * Scripts/webkitpy/common/checkout/changelog_unittest.py: Test out the new _parse_radar_id functionality
1506         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
1507         (Bugzilla.add_keyword_to_bug): Add logic to add keywords using the changeform
1508         * Scripts/webkitpy/tool/commands/upload.py:
1509         (Upload): Teach the upload step how to add radar information when creating a new bug.
1510         * Scripts/webkitpy/tool/steps/__init__.py:
1511         * Scripts/webkitpy/tool/steps/addradar.py: Added.
1512         (AddRadar):
1513         (AddRadar.run): Contains the logic to add the radar information to bugzilla.
1514         * Scripts/webkitpy/tool/steps/createbug.py:
1515         (CreateBug.run): set a "created_new_bug" state when creating a new bugzilla bug.
1516
1517 2018-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1518
1519         Post-review feedback after r234614.
1520         https://bugs.webkit.org/show_bug.cgi?id=188322
1521         <rdar://problem/42455270>
1522
1523         Reviewed by Sam Weinig.
1524
1525         Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.
1526
1527         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
1528         (rounded):
1529
1530 2018-08-07  Don Olmstead  <don.olmstead@sony.com>
1531
1532         [MiniBrowser][Win] Allow selection of recent user agents
1533         https://bugs.webkit.org/show_bug.cgi?id=188371
1534
1535         Reviewed by Fujii Hironori.
1536
1537         Updates the user agent spoofing strings to the latest released
1538         versions and adds Microsoft Edge's user agent.
1539
1540         Moves the menu item selection to the common base class, BrowserWindow
1541         to support user agent spoofing in a WebKitLegacyBrowserWindow and
1542         WebKitBrowserWindow.
1543
1544         * MiniBrowser/win/BrowserWindow.cpp: Added.
1545         (BrowserWindow::setUserAgent):
1546         * MiniBrowser/win/BrowserWindow.h:
1547         * MiniBrowser/win/CMakeLists.txt:
1548         * MiniBrowser/win/MainWindow.cpp:
1549         (MainWindow::toggleMenuItem):
1550         * MiniBrowser/win/MiniBrowserLib.rc:
1551         * MiniBrowser/win/MiniBrowserLibResource.h:
1552         * MiniBrowser/win/WebKitBrowserWindow.cpp:
1553         * MiniBrowser/win/WebKitBrowserWindow.h:
1554         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
1555         (WebKitLegacyBrowserWindow::setUserAgent):
1556         * MiniBrowser/win/WebKitLegacyBrowserWindow.h:
1557
1558 2018-08-07  Yusuke Suzuki  <utatane.tea@gmail.com>
1559
1560         Unreviewed, add a new address to my configuration
1561
1562         * Scripts/webkitpy/common/config/contributors.json:
1563
1564 2018-08-06  David Quesada  <david_quesada@apple.com>
1565
1566         webkitdirs.pm should default to iPhone SE for 64-bit testing
1567         https://bugs.webkit.org/show_bug.cgi?id=188361
1568
1569         Reviewed by Daniel Bates.
1570
1571         Use iPhone SE as the default iOS Simulator device type. This corresponds to the change to webkitpy in r234467.
1572
1573         * Scripts/webkitdirs.pm:
1574         (findOrCreateSimulatorForIOSDevice):
1575         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
1576         (parse_args):
1577             Update the help text for --device-type to reflect the new default device.
1578
1579 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1580
1581         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
1582         https://bugs.webkit.org/show_bug.cgi?id=188322
1583         <rdar://problem/42455270>
1584
1585         Reviewed by Tim Horton.
1586
1587         Fixes an API test added in r234600, which had incorrect test expectations — namely, the width of the caret rect
1588         was not in content view coordinates, unlike the x, y, and height.
1589
1590         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
1591         (rounded):
1592         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
1593         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
1594         (TestWebKitAPI::TEST):
1595
1596 2018-08-06  Ryan Haddad  <ryanhaddad@apple.com>
1597
1598         Unreviewed, rolling out r234569.
1599
1600         Breaks internal builds.
1601
1602         Reverted changeset:
1603
1604         "We should cache the compiled sandbox profile in a data vault"
1605         https://bugs.webkit.org/show_bug.cgi?id=184991
1606         https://trac.webkit.org/changeset/234569
1607
1608 2018-08-06  Fujii Hironori  <Hironori.Fujii@sony.com>
1609
1610         [Win][DLLLauncher] Remove --highDPI switch
1611         https://bugs.webkit.org/show_bug.cgi?id=188255
1612
1613         Reviewed by Yusuke Suzuki.
1614
1615         Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
1616         aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
1617         became useless since the change. Remove the switch.
1618
1619         This change fixes the issue all dump render tree tests are failing
1620         in WinCairo port if high DPI display is connected.
1621
1622         * MiniBrowser/win/Common.cpp:
1623         (parseCommandLine): Removed `--highDPI` switch.
1624         * win/DLLLauncher/DLLLauncherMain.cpp:
1625         (wWinMain): Do not call SetProcessDPIAware.
1626         (shouldUseHighDPI): Deleted.
1627
1628 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1629
1630         [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
1631         https://bugs.webkit.org/show_bug.cgi?id=188335
1632         <rdar://problem/32542437> and <rdar://problem/32542433>
1633
1634         Reviewed by Tim Horton.
1635
1636         Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send
1637         touch events to the buttons. These were only used for the two tests which this patch refactors. See the
1638         LayoutTests ChangeLog for more detail.
1639
1640         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
1641         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
1642         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
1643         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
1644         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
1645         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
1646         * TestRunnerShared/UIScriptContext/UIScriptController.h:
1647         * TestRunnerShared/spi/UIKitTestSPI.h:
1648
1649         Remove an internal class declaration that is now unnecessary.
1650
1651         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
1652         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
1653         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
1654
1655 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1656
1657         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
1658         https://bugs.webkit.org/show_bug.cgi?id=188322
1659         <rdar://problem/42455270>
1660
1661         Reviewed by Tim Horton.
1662
1663         Adds plumbing in UIScriptController to grab the start and end selection handle rects for use in the new layout
1664         test. Also adds new API tests to verify that when a web view resigns first responder, both caret and range
1665         selection views are hidden, and when first responder status is restored, both caret and range selection views
1666         are made visible again.
1667
1668         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
1669         (WTR::UIScriptController::selectionStartGrabberViewRect const):
1670         (WTR::UIScriptController::selectionEndGrabberViewRect const):
1671         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
1672         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
1673         (WTR::UIScriptController::selectionStartGrabberViewRect const):
1674         (WTR::UIScriptController::selectionEndGrabberViewRect const):
1675         * TestRunnerShared/UIScriptContext/UIScriptController.h:
1676         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
1677         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
1678         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
1679         (webViewWithAutofocusedInput):
1680
1681         Pull out some common logic for creating a web view that allows programmatic focus to present the keyboard, and
1682         immediately loading a web page with an autofocusing text field.
1683
1684         (TestWebKitAPI::TEST):
1685         * TestWebKitAPI/cocoa/TestWKWebView.h:
1686         * TestWebKitAPI/cocoa/TestWKWebView.mm:
1687         (-[TestWKWebView caretViewRectInContentCoordinates]):
1688         (-[TestWKWebView selectionViewRectsInContentCoordinates]):
1689         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
1690         (WTR::UIScriptController::selectionStartGrabberViewRect const):
1691         (WTR::UIScriptController::selectionEndGrabberViewRect const):
1692
1693 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1694
1695         [iOS] Layout tests that send HID events cause WebKitTestRunner to crash on recent SDKs
1696         https://bugs.webkit.org/show_bug.cgi?id=188334
1697         <rdar://problem/40630074>
1698
1699         Reviewed by Tim Horton.
1700
1701         To mark the end of previously dispatched IOHID events, HIDEventGenerator currently sends a vendor-defined event
1702         and stores the completion callback ID for the previously dispatched events as vendor-defined data. When this
1703         vendor-defined marker event is handled by the application, we then read the callback ID back from the event, map
1704         it to a completion block, and invoke the completion block to signal that the previous HID event has been
1705         processed.
1706
1707         This callback ID is an unsigned, so we tell IOKit that we need `sizeof(unsigned)` (4 bytes) to store it. On
1708         shipping software, IOKit clamps this to a minimum of 8 bytes, i.e. `sizeof(CFIndex)`. When we later call
1709         IOHIDEventGetIntegerValue to read the value of our vendor-defined data as a CFIndex, we get our expected
1710         callback ID because the buffer was clamped to 8 bytes.
1711
1712         However, on recent iOS SDKs that contain the fix for <rdar://problem/20082284>, IOKit no longer clamps the size
1713         of the vendor-defined data buffer to 8 bytes. This means that when we try to use IOHIDEventGetIntegerValue to
1714         read our callback ID back, we end up getting a CFIndex where the lower 4 bytes are the callback ID we wrote, and
1715         the upper 4 bytes are garbage. In the case where any of these upper 4 bytes are non-zero, we fail to map the
1716         callback ID to a completion handler, and so we never finish dispatching the HID event, causing an exception to
1717         be thrown.
1718
1719         To fix this, we adjust callback ID to be a CFIndex, which matches IOHIDEventGetIntegerValue's return type.
1720
1721         * WebKitTestRunner/ios/HIDEventGenerator.mm:
1722         (+[HIDEventGenerator nextEventCallbackID]):
1723         (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
1724
1725         Also refactor a bit of `-_sendMarkerHIDEventWithCompletionBlock:` by using auto and move semantics.
1726
1727 2018-08-03  Ben Richards  <benton_richards@apple.com>
1728
1729         We should cache the compiled sandbox profile in a data vault
1730         https://bugs.webkit.org/show_bug.cgi?id=184991
1731
1732         Reviewed by Ryosuke Niwa.
1733
1734         Added trace points for sandbox initialization
1735
1736         * Tracing/SystemTracePoints.plist:
1737
1738 2018-08-03  David Fenton  <david_fenton@apple.com>
1739
1740         Unreviewed, rolling out r234517.
1741
1742         Caused API test failures on iOS
1743
1744         Reverted changeset:
1745
1746         "[Cocoa] setCookie API fails to set session cookies for
1747         defaultDataStore if processPool created but not used"
1748         https://bugs.webkit.org/show_bug.cgi?id=188209
1749         https://trac.webkit.org/changeset/234517
1750
1751 2018-08-03  Ben Richards  <benton_richards@apple.com>
1752
1753         Add configuration for automatic process pre-warming
1754         https://bugs.webkit.org/show_bug.cgi?id=187108
1755
1756         Reviewed by Ryosuke Niwa.
1757
1758         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.
1759
1760         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1761         * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm:
1762         (TEST):
1763         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1764         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm:
1765         (TEST):
1766
1767 2018-08-03  Aakash Jain  <aakash_jain@apple.com>
1768
1769         [ews-build] Add build step to Check Patch Relevance
1770         https://bugs.webkit.org/show_bug.cgi?id=188295
1771
1772         Reviewed by Lucas Forschler.
1773
1774         * BuildSlaveSupport/ews-build/steps.py:
1775         (CheckPatchRelevance): Added step to check patch relevance.
1776         (CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant.
1777         (CheckPatchRelevance._get_patch): Retrieves the patch from buildbot.
1778         (CheckPatchRelevance._addToLog): Add the log message.
1779         (CheckPatchRelevance.start):
1780         * BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately.
1781
1782 2018-08-03  Jer Noble  <jer.noble@apple.com>
1783
1784         Unreviewed gardening; r234534 changed the policy for what audio session is set when a
1785         media element is paused. Updating the test to reflect the new policy.
1786
1787         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
1788         (TestWebKitAPI::TEST):
1789
1790 2018-08-03  Zalan Bujtas  <zalan@apple.com>
1791
1792         [LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
1793         https://bugs.webkit.org/show_bug.cgi?id=188306
1794
1795         Reviewed by Antti Koivisto.
1796
1797         * LayoutReloaded/misc/LFC-passing-tests.txt:
1798
1799 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1800
1801         [WPE] Use the new key mapper API from WPEBackend
1802         https://bugs.webkit.org/show_bug.cgi?id=188216
1803
1804         Reviewed by Žan Doberšek.
1805
1806         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
1807         (WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key
1808         code.
1809         * wpe/backends/WindowViewBackend.cpp:
1810         (WPEToolingBackends::WindowViewBackend::WindowViewBackend):
1811         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
1812         (WPEToolingBackends::WindowViewBackend::modifiers const):
1813         * wpe/backends/WindowViewBackend.h:
1814
1815 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1816
1817         [WPE] Implement MouseEvent.buttons
1818         https://bugs.webkit.org/show_bug.cgi?id=187998
1819
1820         Reviewed by Žan Doberšek.
1821
1822         Pass modifiers to mouse events.
1823
1824         * WebKitTestRunner/EventSenderProxy.h:
1825         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
1826         (WTR::senderButtonToWPEButton):
1827         (WTR::modifierForButton):
1828         (WTR::EventSenderProxy::mouseDown):
1829         (WTR::EventSenderProxy::mouseUp):
1830         (WTR::EventSenderProxy::mouseMoveTo):
1831         (WTR::EventSenderProxy::mouseScrollBy):
1832         (WTR::wkEventModifiersToWPE):
1833         (WTR::wpeKeySymForKeyRef):
1834         (WTR::EventSenderProxy::keyDown):
1835         (WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
1836         * wpe/backends/WindowViewBackend.cpp:
1837         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
1838         (WPEToolingBackends::WindowViewBackend::modifiers const):
1839         * wpe/backends/WindowViewBackend.h:
1840
1841 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1842
1843         [WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
1844         https://bugs.webkit.org/show_bug.cgi?id=188093
1845
1846         Reviewed by Žan Doberšek.
1847
1848         * MiniBrowser/wpe/main.cpp: Use WPE key symbols.
1849         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
1850         (WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code().
1851         (WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed.
1852         * flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions.
1853         * wpe/backends/WindowViewBackend.cpp:
1854         (WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed.
1855         * wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions.
1856
1857 2018-08-02  Nan Wang  <n_wang@apple.com>
1858
1859         AX: [iOS] add support to return the attributed string under the element
1860         https://bugs.webkit.org/show_bug.cgi?id=188276
1861         <rdar://problem/42872357>
1862
1863         Reviewed by Chris Fleizach.
1864
1865         * DumpRenderTree/AccessibilityUIElement.cpp:
1866         (attributedStringForElementCallback):
1867         (AccessibilityUIElement::getJSClass):
1868         * DumpRenderTree/AccessibilityUIElement.h:
1869         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
1870         (AccessibilityUIElement::attributedStringForElement):
1871         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
1872         (WTR::AccessibilityUIElement::attributedStringForElement):
1873         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
1874         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
1875         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
1876         (WTR::AccessibilityUIElement::attributedStringForElement):
1877
1878 2018-08-02  Ryan Haddad  <ryanhaddad@apple.com>
1879
1880         Skip API test DataInteractionTests.CustomActionSheetPopover on current SDKs.
1881         https://bugs.webkit.org/show_bug.cgi?id=175204
1882
1883         Unreviewed test gardening.
1884
1885         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
1886
1887 2018-08-02  Sihui Liu  <sihui_liu@apple.com>
1888
1889         [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used
1890         https://bugs.webkit.org/show_bug.cgi?id=188209
1891
1892         Reviewed by Geoffrey Garen.
1893
1894         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
1895         (TEST):
1896
1897 2018-08-02  Dan Bernstein  <mitz@apple.com>
1898
1899         Fixed WebKit.AttrStyle timing out on build.webkit.org.
1900
1901         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Changed from a URL that requires network
1902           access to one that doesn’t.
1903         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm:
1904         (TEST): Updated expected value.
1905
1906 2018-08-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1907
1908         [iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents
1909         https://bugs.webkit.org/show_bug.cgi?id=188251
1910         <rdar://problem/37842108>
1911
1912         Reviewed by Tim Horton.
1913
1914         Adds a new API test to verify that clients (in this case, UIKit) is allowed to invoke
1915         -handleKeyWebEvent:withCompletionHandler: within the completion block of a prior invocation.
1916
1917         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1918         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: Added.
1919         (TestWebKitAPI::TEST):
1920         * TestWebKitAPI/Tests/ios/TestInputDelegate.h: Added.
1921
1922         Pull some logic used to force an input session to start out from an existing API test file
1923         (WKWebViewAutofillTests) and into a separate helper class that is used by both the existing API tests and the
1924         new keyboard input test.
1925
1926         * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
1927         (-[AutofillTestView initWithFrame:]):
1928         (TestWebKitAPI::TEST):
1929         (-[TestInputDelegate init]): Deleted.
1930         (-[TestInputDelegate _webView:focusShouldStartInputSession:]): Deleted.
1931         * TestWebKitAPI/ios/UIKitSPI.h:
1932
1933         Add some UIKit SPI utilized by the new API test.
1934
1935 2018-08-01  Dan Bernstein  <mitz@apple.com>
1936
1937         Optionally expose Attr::style to JavaScript
1938         https://bugs.webkit.org/show_bug.cgi?id=188226
1939         <rdar://problem/42818113>
1940
1941         Reviewed by Darin Adler.
1942
1943         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1944         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Added.
1945         * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: Added.
1946         (TEST):
1947
1948 2018-08-02  David Fenton  <david_fenton@apple.com>
1949
1950         Unreviewed, rolling out r234489.
1951
1952         Caused 50+ crashes and 60+ API failures on iOS
1953
1954         Reverted changeset:
1955
1956         "[WTF] Rename String::format to String::deprecatedFormat"
1957         https://bugs.webkit.org/show_bug.cgi?id=188191
1958         https://trac.webkit.org/changeset/234489
1959
1960 2018-08-01  Ross Kirsling  <ross.kirsling@sony.com>
1961
1962         TestWTF.WTF_NeverDestroyed.Construct output differs for MSVC in Debug mode
1963         https://bugs.webkit.org/show_bug.cgi?id=188244
1964
1965         Reviewed by Daniel Bates.
1966
1967         Follow-up to r234179. MSVC chooses not to inline the lambda in Debug mode. 
1968
1969         * TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:
1970
1971 2018-08-01  Tomas Popela  <tpopela@redhat.com>
1972
1973         [WTF] Rename String::format to String::deprecatedFormat
1974         https://bugs.webkit.org/show_bug.cgi?id=188191
1975
1976         Reviewed by Darin Adler.
1977
1978         It should be replaced with string concatenation.
1979
1980         * DumpRenderTree/win/DumpRenderTree.cpp:
1981         (applicationId):
1982         (main):
1983         * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
1984         (TestWebKitAPI::Util::createURLForResource):
1985         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1986         (WTR::cacheTestRunnerCallback):
1987         * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
1988         (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
1989         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
1990         (WTR::AccessibilityUIElement::attributedStringForRange):
1991         (WTR::AccessibilityUIElement::url):
1992         (WTR::stringAtOffset):
1993         * WebKitTestRunner/TestController.cpp:
1994         (WTR::TestController::didReceiveAuthenticationChallenge):
1995         (WTR::TestController::downloadDidFail):
1996         (WTR::originUserVisibleName):
1997         (WTR::userMediaOriginHash):
1998         (WTR::TestController::didNavigateWithNavigationData):
1999         (WTR::TestController::didPerformClientRedirect):
2000         (WTR::TestController::didPerformServerRedirect):
2001         (WTR::TestController::didUpdateHistoryTitle):
2002
2003 2018-08-01  Nan Wang  <n_wang@apple.com>
2004
2005         AX: AOM: Add ARIA IDL Attribute Reflection
2006         https://bugs.webkit.org/show_bug.cgi?id=184676
2007         <rdar://problem/39476882>
2008
2009         Reviewed by Chris Fleizach.
2010
2011         * DumpRenderTree/mac/DumpRenderTree.mm:
2012         (enableExperimentalFeatures):
2013         * WebKitTestRunner/TestController.cpp:
2014         (WTR::TestController::resetPreferencesToConsistentValues):
2015
2016 2018-08-01  Jonathan Bedard  <jbedard@apple.com>
2017
2018         Use iPhone SE as the default simulated device
2019         https://bugs.webkit.org/show_bug.cgi?id=188227
2020
2021         Reviewed by Aakash Jain.
2022
2023         * Scripts/webkitpy/port/ios_simulator.py:
2024         (IOSSimulatorPort):
2025
2026 2018-08-01  Commit Queue  <commit-queue@webkit.org>
2027
2028         Unreviewed, rolling out r234443 and r234445.
2029         https://bugs.webkit.org/show_bug.cgi?id=188224
2030
2031         Revision caused 3 api failures across all platforms.
2032         (Requested by Truitt on #webkit).
2033
2034         Reverted changesets:
2035
2036         "Add configuration for automatic process pre-warming"
2037         https://bugs.webkit.org/show_bug.cgi?id=187108
2038         https://trac.webkit.org/changeset/234443
2039
2040         "Add configuration for automatic process pre-warming"
2041         https://bugs.webkit.org/show_bug.cgi?id=187108
2042         https://trac.webkit.org/changeset/234445
2043
2044 2018-07-31  Ben Richards  <benton_richards@apple.com>
2045
2046         Add configuration for automatic process pre-warming
2047         https://bugs.webkit.org/show_bug.cgi?id=187108
2048
2049         Reviewed by Ryosuke Niwa.
2050
2051         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.
2052
2053         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2054         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2055         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Added.
2056         (TEST):
2057
2058 2018-07-31  John Wilander  <wilander@apple.com>
2059
2060         Resource Load Statistics: Remove partitioned cookies for reduced complexity, lower memory footprint, and ability to support more platforms
2061         https://bugs.webkit.org/show_bug.cgi?id=188109
2062         <rdar://problem/42664391>
2063
2064         Reviewed by Brent Fulgham, Chris Dumez, and Alex Christensen.
2065
2066         This patch removes cookie partitioning which reduces the model to just
2067         blocked cookies (in third-party contexts) and first-party cookie access.
2068
2069         Several of the changes are renaming to reflect that there are no more
2070         cookie partitions.
2071
2072         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2073            Removed or renamed functions to reflect that there are no more
2074            partitioned cookies.
2075         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2076         (WTR::InjectedBundle::didReceiveMessageToPage):
2077         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2078         (WTR::TestRunner::statisticsUpdateCookieBlocking):
2079         (WTR::TestRunner::statisticsCallDidSetBlockCookiesForHostCallback):
2080         (WTR::TestRunner::setCookieStoragePartitioningEnabled): Deleted.
2081         (WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction): Deleted.
2082         (WTR::TestRunner::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
2083         (WTR::TestRunner::statisticsUpdateCookiePartitioning): Deleted.
2084         (WTR::TestRunner::statisticsSetShouldPartitionCookiesForHost): Deleted.
2085         (WTR::TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback): Deleted.
2086         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2087         * WebKitTestRunner/TestController.cpp:
2088         (WTR::TestController::statisticsUpdateCookieBlocking):
2089         (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
2090         (WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
2091         (WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
2092         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
2093         * WebKitTestRunner/TestController.h:
2094         * WebKitTestRunner/TestInvocation.cpp:
2095         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2096         (WTR::TestInvocation::didSetBlockCookiesForHost):
2097         (WTR::TestInvocation::didSetHasHadUserInteraction):
2098         (WTR::TestInvocation::didSetPartitionOrBlockCookiesForHost): Deleted.
2099         (WTR::TestInvocation::didSetHasHadNonRecentUserInteraction): Deleted.
2100         * WebKitTestRunner/TestInvocation.h:
2101         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2102         (WTR::initializeWebViewConfiguration):
2103
2104 2018-07-31  Alex Christensen  <achristensen@webkit.org>
2105
2106         Build fix.  Remove unused variable.
2107
2108         * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
2109         (TestWebKitAPI::TEST):
2110         transform was never used. It was introduced in r205871
2111         Apparently I'm the first one to build in a certain configuration that found it.
2112
2113 2018-07-31  Fujii Hironori  <Hironori.Fujii@sony.com>
2114
2115         server_process.py should print returncode in debug log if the process crashed
2116         https://bugs.webkit.org/show_bug.cgi?id=188160
2117
2118         Reviewed by Konstantin Tokarev.
2119
2120         * Scripts/webkitpy/port/server_process.py:
2121         (ServerProcess.has_crashed): Put self._proc.returncode into the debug log message.
2122
2123 2018-07-31  Tomas Popela  <tpopela@redhat.com>
2124
2125         [WTF] String::formatWithArguments() is unused
2126         https://bugs.webkit.org/show_bug.cgi?id=187955
2127
2128         Reviewed by Darin Adler.
2129
2130         Remove tests for WTF::String::formatWithArguments() as it's unused and
2131         we are removing it.
2132
2133         * TestWebKitAPI/Tests/WTF/WTFString.cpp:
2134
2135 2018-07-30  Aakash Jain  <aakash_jain@apple.com>
2136
2137         [ews-build] Fix typo in builder name for Bindings-tests-EWS.
2138
2139         * BuildSlaveSupport/ews-build/config.json: Changed 'tests' to 'Tests' to make it consistent with
2140         other builders.
2141
2142 2018-07-30 Aakash Jain  <aakash_jain@apple.com>
2143
2144         [ews-build] Add support for API tests in OpenSource EWS
2145         https://bugs.webkit.org/show_bug.cgi?id=188156
2146
2147         Reviewed by Lucas Forschler.
2148
2149         * BuildSlaveSupport/ews-build/config.json:
2150         * BuildSlaveSupport/ews-build/factories.py:
2151         (BuildFactory.__init__): Added triggers parameter.
2152         (BuildFactory): If trigger is defined, create and upload archive and trigger appropriate queues.
2153         (BuildFactory.propertiesToPassToTriggers): Pass all the required properties to triggered queue.
2154         (APITestsFactory): Factory for running API tests.
2155         * BuildSlaveSupport/ews-build/steps.py:
2156         (ConfigureBuild.start): Set the property only if property is defined in config.json. Also set the 
2157         source of the property.
2158
2159 2018-07-30  Aakash Jain  <aakash_jain@apple.com>
2160
2161         [ews-build] loadConfig should ensure that the triggers are valid
2162         https://bugs.webkit.org/show_bug.cgi?id=188134
2163
2164         Reviewed by Lucas Forschler.
2165
2166         * BuildSlaveSupport/ews-build/loadConfig.py:
2167         (checkValidBuilder): Added a check to ensure that the builder doesn't refernce non-existing scheduler.
2168         (checkValidSchedulers): Ensures that the scheduler is not un-used.
2169         * BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-tests.
2170
2171 2018-07-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2172
2173         Unreviewed, fix typo in test expectations and mark another test as timing out
2174
2175         * TestWebKitAPI/glib/TestExpectations.json:
2176
2177 2018-07-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2178
2179         More unreviewed GTK test gardening
2180
2181         * TestWebKitAPI/glib/TestExpectations.json:
2182
2183 2018-07-27  Simon Fraser  <simon.fraser@apple.com>
2184
2185         Be more conservative with compositing layer creation when memory is low
2186         https://bugs.webkit.org/show_bug.cgi?id=187866
2187         rdar://problem/42366345
2188
2189         Reviewed by Zalan Bujtas.
2190         
2191         When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
2192         compositing layers. We avoid compositing for these situations:
2193         1. Layers with 3D transforms which are affine (like translateZ(0)).
2194         2. Layers with will-change
2195         3. Layers for canvases (other than WebGL/WebGPU)
2196         
2197         We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
2198         falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
2199         Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.
2200         
2201         Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
2202         flakily falling into a different mode, and so that we can impose the conservative
2203         mode for testing.
2204
2205         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2206         (WTR::InjectedBundlePage::prepare):
2207
2208 2018-07-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2209
2210         Unreviewed GTK test gardening
2211
2212         * TestWebKitAPI/glib/TestExpectations.json:
2213
2214 2018-07-27  Alex Christensen  <achristensen@webkit.org>
2215
2216         Fix API tests after r234314
2217         https://bugs.webkit.org/show_bug.cgi?id=188077
2218
2219         Make API tests use new delegate method.
2220
2221         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2222         (-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2223         (-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2224
2225 2018-07-27  Alex Christensen  <achristensen@webkit.org>
2226
2227         Fix API tests after r234314
2228         https://bugs.webkit.org/show_bug.cgi?id=188077
2229
2230         Make API tests use new delegate method.
2231
2232         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2233         (-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2234         (-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2235         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2236         (-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2237         (-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2238         (-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2239         (-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2240         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2241         (-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2242         (-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2243
2244 2018-07-26  Andy VanWagoner  <andy@vanwagoner.family>
2245
2246         [INTL] Remove INTL sub-feature compile flags
2247         https://bugs.webkit.org/show_bug.cgi?id=188081
2248
2249         Reviewed by Michael Catanzaro.
2250
2251         * Scripts/webkitperl/FeatureList.pm:
2252         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2253
2254 2018-07-26  Chris Dumez  <cdumez@apple.com>
2255
2256         Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing
2257         https://bugs.webkit.org/show_bug.cgi?id=188078
2258         <rdar://problem/42562493>
2259
2260         Reviewed by Geoff Garen.
2261
2262         Add API test coverage. It exercises the right code path but unfortunately is not yet a regression
2263         test because TestWebKitAPI does not appear to be sandboxed (rdar://problem/42638129).
2264
2265         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2266         * TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: Added.
2267         (-[LoadFileThenReloadDelegate webView:didFinishNavigation:]):
2268         (-[LoadFileThenReloadDelegate webView:didFailProvisionalNavigation:withError:]):
2269         (-[LoadFileThenReloadDelegate webView:didFailNavigation:withError:]):
2270         (TEST):
2271
2272 2018-07-26  Aaron Chu  <aaron_chu@apple.com>
2273
2274         Add Aaron Chu as a committer to contributors.json
2275         https://bugs.webkit.org/show_bug.cgi?id=188066
2276
2277         Unreviwed. Added myself as committer.
2278
2279         * Scripts/webkitpy/common/config/contributors.json:
2280
2281 2018-07-26  Aakash Jain  <aakash_jain@apple.com>
2282
2283         [ews-build] Add build step to run API Tests
2284         https://bugs.webkit.org/show_bug.cgi?id=188079
2285
2286         Reviewed by Lucas Forschler.
2287
2288         * BuildSlaveSupport/ews-build/steps.py:
2289         (TestWithFailureCount): Common class for various tests with failure count.
2290         (TestWithFailureCount.start): Configure Buildbot's logobserver.
2291         (TestWithFailureCount.commandComplete): Updates the failure count.
2292         (TestWithFailureCount.evaluateCommand): Set the step status appropriately.
2293         (TestWithFailureCount.getResultSummary): Set the step summary appropriately.
2294         (RunAPITests): Build step to run API tests.
2295         (RunAPITests.countFailures): Count the failures by parsing the output.
2296         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2297
2298 2018-07-26  Ross Kirsling  <ross.kirsling@sony.com>
2299
2300         String(View) should have a splitAllowingEmptyEntries function instead of a flag parameter
2301         https://bugs.webkit.org/show_bug.cgi?id=187963
2302
2303         Reviewed by Alex Christensen.
2304
2305         * TestWebKitAPI/Tests/WTF/WTFString.cpp:
2306         Add tests for String::split and String::splitAllowingEmptyEntries.
2307
2308         * TestWebKitAPI/Tests/WTF/StringView.cpp:
2309         * WebKitTestRunner/TestController.cpp:
2310         (WTR::updateTestOptionsFromTestHeader):
2311         Update split/splitAllowingEmptyEntries usage.
2312
2313 2018-07-26  Commit Queue  <commit-queue@webkit.org>
2314
2315         Unreviewed, rolling out r234181 and r234189.
2316         https://bugs.webkit.org/show_bug.cgi?id=188075
2317
2318         These are not needed right now (Requested by thorton on
2319         #webkit).
2320
2321         Reverted changesets:
2322
2323         "Enable Web Content Filtering on watchOS"
2324         https://bugs.webkit.org/show_bug.cgi?id=187979
2325         https://trac.webkit.org/changeset/234181
2326
2327         "HAVE(PARENTAL_CONTROLS) should be true on watchOS"
2328         https://bugs.webkit.org/show_bug.cgi?id=187985
2329         https://trac.webkit.org/changeset/234189
2330
2331 2018-07-04  Darin Adler  <darin@apple.com>
2332
2333         Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly
2334         https://bugs.webkit.org/show_bug.cgi?id=187333
2335
2336         Reviewed by Sam Weinig.
2337
2338         * TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Updated.
2339         * TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: Updated.
2340         * TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Updated.
2341         * TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Updated.
2342         * TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Updated.
2343
2344 2018-07-25  Aakash Jain  <aakash_jain@apple.com>
2345
2346         [ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct
2347         https://bugs.webkit.org/show_bug.cgi?id=188031
2348
2349         Reviewed by Lucas Forschler.
2350
2351         * BuildSlaveSupport/ews-build/steps.py:
2352         (DownloadBuiltProduct): Added build step DownloadBuiltProduct.
2353         (ExtractBuiltProduct): Added build step ExtractBuiltProduct.
2354         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2355
2356 2018-07-25  Aakash Jain  <aakash_jain@apple.com>
2357
2358         [ews-build] Add build step UploadBuiltProduct
2359         https://bugs.webkit.org/show_bug.cgi?id=188016
2360
2361         Reviewed by Lucas Forschler.
2362
2363         * BuildSlaveSupport/ews-build/steps.py:
2364         (UploadBuiltProduct): Added build step UploadBuiltProduct.
2365         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
2366
2367 2018-07-25  Aakash Jain  <aakash_jain@apple.com>
2368
2369         [ews-build] Add build step ArchiveBuiltProduct
2370         https://bugs.webkit.org/show_bug.cgi?id=188014
2371
2372         Reviewed by Lucas Forschler.
2373
2374         * BuildSlaveSupport/ews-build/steps.py:
2375         (ArchiveBuiltProduct): Added build step ArchiveBuiltProduct.
2376         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2377
2378 2018-07-25  Chris Dumez  <cdumez@apple.com>
2379
2380         navigator.userAgent may return outdated value after webView.customUserAgent is set
2381         https://bugs.webkit.org/show_bug.cgi?id=188009
2382         <rdar://problem/42566456>
2383
2384         Reviewed by Alex Christensen.
2385
2386         Add API test coverage.
2387
2388         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2389         * TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: Added.
2390         (TEST):
2391
2392 2018-07-25  Charlie Turner  <cturner@igalia.com>
2393
2394         [Flatpak] Pass more environment variables to sandbox
2395         https://bugs.webkit.org/show_bug.cgi?id=188002
2396
2397         Reviewed by Michael Catanzaro.
2398
2399         * flatpak/flatpakutils.py:
2400         (WebkitFlatpak.run_in_sandbox):
2401
2402 2018-07-25  Zan Dobersek  <zdobersek@igalia.com>
2403
2404         [WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs
2405         https://bugs.webkit.org/show_bug.cgi?id=187997
2406
2407         Reviewed by Carlos Garcia Campos.
2408
2409         Instead of the raw wpe_view_backend_exportable_fdo API, switch to using
2410         the EGL-oriented API that simply serves EGLImageKHR objects instead of
2411         raw buffer resources. This allows us not to wrangle with creating and
2412         managing lifetime of the same EGLImageKHR by ourselves.
2413
2414         ViewBackend now defines a wpe_view_backend_exportable_fdo_egl_client
2415         struct and uses wpe_view_backend_exportable_fdo_egl_create() to create
2416         the exportable object. This means that for each frame we're served an
2417         EGLImageKHR object that is passed on to the displayBuffer()
2418         implementation.
2419
2420         HeadlessViewBackend now just manages the pending and committed image
2421         objects. Width and height values used during pixel data retrieval are
2422         gathered from the ViewBackend's size that was specified when
2423         constructed.
2424
2425         WindowViewBackend similarly only manages the committed image object,
2426         not having to create an equivalent EGLImageKHR object from the raw
2427         buffer resource anymore.
2428
2429         Unused EGL entrypoints in both HeadlessViewBackend and WindowViewBackend
2430         classes are removed, and destructors for both classes are made virtual.
2431
2432         The WPEBackend-fdo version is bumped in order to have the EGL-specific
2433         export API available.
2434
2435         * flatpak/org.webkit.WPE.yaml:
2436         * wpe/backends/HeadlessViewBackend.cpp:
2437         (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
2438         (WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
2439         (WPEToolingBackends::HeadlessViewBackend::createSnapshot):
2440         (WPEToolingBackends::HeadlessViewBackend::performUpdate):
2441         (WPEToolingBackends::HeadlessViewBackend::displayBuffer):
2442         * wpe/backends/HeadlessViewBackend.h:
2443         * wpe/backends/ViewBackend.cpp:
2444         (WPEToolingBackends::ViewBackend::initialize):
2445         * wpe/backends/ViewBackend.h:
2446         * wpe/backends/WindowViewBackend.cpp:
2447         (WPEToolingBackends::WindowViewBackend::WindowViewBackend):
2448         (WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
2449         (WPEToolingBackends::WindowViewBackend::displayBuffer):
2450         * wpe/backends/WindowViewBackend.h:
2451         * wpe/jhbuild.modules:
2452
2453 2018-07-24  Thomas Denney  <tdenney@apple.com>
2454
2455         Remove support for the double type from WHLSL
2456         https://bugs.webkit.org/show_bug.cgi?id=187977
2457
2458         Reviewed by Myles C. Maxfield.
2459
2460         * WebGPUShadingLanguageRI/All.js: Removed DoubleLiteral.js and DoubleLiteralType.js include.
2461         * WebGPUShadingLanguageRI/DoubleLiteral.js: Removed.
2462         * WebGPUShadingLanguageRI/DoubleLiteralType.js: Removed.
2463         * WebGPUShadingLanguageRI/Intrinsics.js: Removed double arithmetic functions.
2464         * WebGPUShadingLanguageRI/Parse.js:
2465         (parseTerm): Removed parsing of double literals.
2466         * WebGPUShadingLanguageRI/SPIRV.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
2467         * WebGPUShadingLanguageRI/SPIRVCodegen.js: Removed double type logic.
2468         * WebGPUShadingLanguageRI/StandardLibrary.js: Removed double type declarations.
2469         * WebGPUShadingLanguageRI/Test.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
2470         * WebGPUShadingLanguageRI/Test.js: Removed tests that test doubles or ported them to use floats.
2471         * WebGPUShadingLanguageRI/index.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
2472
2473 2018-07-24  Tim Horton  <timothy_horton@apple.com>
2474
2475         Enable Web Content Filtering on watchOS
2476         https://bugs.webkit.org/show_bug.cgi?id=187979
2477         <rdar://problem/42559346>
2478
2479         Reviewed by Wenson Hsieh.
2480
2481         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2482
2483 2018-07-24  Daniel Bates  <dabates@apple.com>
2484
2485         Move-constructing NeverDestroyed should move construct underlying object instead of copy constructing it
2486         https://bugs.webkit.org/show_bug.cgi?id=187971
2487
2488         Reviewed by Saam Barati.
2489
2490         Add unit tests to cover move constructing a NeverDestroyed with a non-const and const data type
2491         as well as invoking makeNeverDestroyed() with the result of a function that returns a move-only
2492         data type.
2493
2494         * TestWebKitAPI/CMakeLists.txt:
2495         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2496         * TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.cpp: Added.
2497         (TestWebKitAPI::MoveOnlyLifecycleLogger::MoveOnlyLifecycleLogger):
2498         (TestWebKitAPI::MoveOnlyLifecycleLogger::~MoveOnlyLifecycleLogger):
2499         (TestWebKitAPI::MoveOnlyLifecycleLogger::operator=):
2500         (TestWebKitAPI::MoveOnlyLifecycleLogger::setName):
2501         (TestWebKitAPI::TEST):
2502         * TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.h: Added.
2503         * TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:
2504         (TestWebKitAPI::TEST):
2505
2506 2018-07-24  Thomas Denney  <tdenney@apple.com>
2507         Minor changes to the WHLSL interpreter to support the new compiler
2508         https://bugs.webkit.org/show_bug.cgi?id=187728
2509
2510         Reviewed by Myles C. Maxfield.
2511
2512         This bug contains small changes that are make minor changes to the
2513         behaviour of the existing interpreter (the tests are unaffected and all
2514         still pass).
2515
2516         * WebGPUShadingLanguageRI/EnumType.js:
2517         (EnumType.prototype.get isEnum): Property added to EnumType and Type
2518         * WebGPUShadingLanguageRI/Evaluator.js: Correct typo
2519         * WebGPUShadingLanguageRI/Func.js:
2520         (Func.prototype.get isEntryPoint): Add boolean property
2521         * WebGPUShadingLanguageRI/FuncInstantiator.js:
2522         (FuncInstantiator.prototype.get instances): Public accessor for existing
2523         private field
2524         * WebGPUShadingLanguageRI/FunctionLikeBlock.js: Refactored the class so
2525         that it directly wraps a Func instance (therefore the only interface
2526         change is to the constructor and the addition of the func accessor).
2527         This change allows the de-inlining of functions.
2528         (FunctionLikeBlock):
2529         (FunctionLikeBlock.prototype.get func):
2530         (FunctionLikeBlock.prototype.get returnType):
2531         (FunctionLikeBlock.prototype.get parameters):
2532         (FunctionLikeBlock.prototype.get body):
2533         * WebGPUShadingLanguageRI/Inliner.js: Use the new FunctionLikeBlock
2534         constructor
2535         (Inliner.prototype.visitCallExpression):
2536         (Inliner):
2537         * WebGPUShadingLanguageRI/Intrinsics.js: Migrate the swizzle operators
2538         to native functions (with additional support in StandardLibrary.js).
2539         This reduces first-time compile-time from around 4s to around 0.1s.
2540         (Intrinsics):
2541         * WebGPUShadingLanguageRI/Lexer.js: Ensure that the parsing of multiline
2542         comments completes correctly
2543         (Lexer.prototype.next):
2544         (Lexer):
2545         * WebGPUShadingLanguageRI/MakeArrayRefExpression.js: Addition of type
2546         property, which is based on the type of the lValue and the semantics of
2547         the language (the @ operator yields an array reference with the thread
2548         scope).
2549         (MakeArrayRefExpression):
2550         (MakeArrayRefExpression.prototype.get type):
2551         * WebGPUShadingLanguageRI/NativeFunc.js: Add setter/getter for
2552         implementationData to support swizzle operator change
2553         (NativeFunc.prototype.get implementationData):
2554         (NativeFunc.prototype.set implementationData):
2555         * WebGPUShadingLanguageRI/Rewriter.js: Use new FunctionLikeBlock
2556         constructor
2557         (Rewriter.prototype.visitFunctionLikeBlock):
2558         * WebGPUShadingLanguageRI/StandardLibrary.js:
2559         (_generateSwizzle): Deleted.
2560         * WebGPUShadingLanguageRI/SwizzleOp.js: Introduces a new class for
2561         carrying metadata about swizzle operators so that they are implemented
2562         as native functions rather than generated at compile time.
2563         (SwizzleOp):
2564         (SwizzleOp.prototype.get outSize):
2565         (SwizzleOp.prototype.get components):
2566         (SwizzleOp.prototype.get inSize):
2567         (SwizzleOp.prototype.toString):
2568         (SwizzleOp.allSwizzleOperators.):
2569         (SwizzleOp.allSwizzleOperators):
2570         * WebGPUShadingLanguageRI/StandardLibrary.js: +        (SwizzleOp):
2571         (SwizzleOp.prototype.get outSize):
2572         (SwizzleOp.prototype.get components):
2573         (SwizzleOp.prototype.get inSize):
2574         (SwizzleOp.prototype.toString):
2575         (generateSwizzles):
2576         (_generateSwizzle): Deleted.
2577         * WebGPUShadingLanguageRI/Type.js: Addition of isEnum property, as
2578         above.
2579         (Type.prototype.get isEnum):
2580
2581 2018-07-24  Ryan Haddad  <ryanhaddad@apple.com>
2582
2583         Unreviewed, rolling out r234121.
2584
2585         Caused perf test failures.
2586
2587         Reverted changeset:
2588
2589         "We should cache the compiled sandbox profile in a data vault"
2590         https://bugs.webkit.org/show_bug.cgi?id=184991
2591         https://trac.webkit.org/changeset/234121
2592
2593 2018-07-24  Thibault Saunier  <tsaunier@igalia.com>
2594
2595         [Flatpak] Add openh264 as needed by WebRTC
2596         https://bugs.webkit.org/show_bug.cgi?id=187956
2597
2598         Reviewed by Philippe Normand.
2599
2600         * flatpak/org.webkit.WebKit.yaml:
2601
2602 2018-07-24  Ross Kirsling  <ross.kirsling@sony.com>
2603
2604         WebCore::URL::hostIsIPAddress needs a Windows implementation
2605         https://bugs.webkit.org/show_bug.cgi?id=187859
2606
2607         Reviewed by Fujii Hironori.
2608
2609         * TestWebKitAPI/Tests/WebCore/URL.cpp:
2610         Check for a few other ways an IP address could be invalid.
2611
2612 2018-07-24  Charlie Turner  <cturner@igalia.com>
2613
2614         [Flatpak] Avoid consuming unknown arguments in flatpak wrapper
2615         https://bugs.webkit.org/show_bug.cgi?id=187951
2616
2617         When running run-webkit-tests --wpe --debug, it was observed that
2618         both self.platform != 'wpe' and self.debug != True. This turned
2619         out to be because of the "args" argument consuming the remainder
2620         of future arguments that came after it. Since the first argument
2621         to load_from_args was the test script to run, it would end up
2622         never processing the other arguments supplied to the wrapper
2623         script.
2624
2625         Tested this by rebuilding GTK in debug mode, running the
2626         minibrowser with various extra options, and running some tests
2627         with various extra options.
2628
2629         Reviewed by Michael Catanzaro.
2630
2631         * flatpak/flatpakutils.py:
2632         (WebkitFlatpak.load_from_args):
2633
2634 2018-07-24  Thibault Saunier  <tsaunier@igalia.com>
2635
2636         [Flatpak] Remove now unnecessary 'hacks' for running tests
2637         https://bugs.webkit.org/show_bug.cgi?id=187608
2638
2639         Reviewed by Philippe Normand.
2640
2641         We used to need to not share X11 with the sandbox when running tests
2642         but it is not needed anymore as we do not mount `/tmp` on `/tmp` in the
2643         sandbox (we mount it on `/run/host/tmp` now).
2644
2645         This has the advantage of making running the MiniBrowser to display test
2646         results working again.
2647
2648         * flatpak/flatpakutils.py:
2649         (WebkitFlatpak.clean_args):
2650         (WebkitFlatpak.run_in_sandbox):
2651         (WebkitFlatpak._cleanup_faltpak_args_for_tests_if_needed): Deleted.
2652
2653 2018-07-23  Fujii Hironori  <Hironori.Fujii@sony.com>
2654
2655         webkitpy.port.server_process_unittest.TestServerProcess.test_basic failed on Windows Python
2656         https://bugs.webkit.org/show_bug.cgi?id=187581
2657
2658         Reviewed by Daniel Bates.
2659
2660         There are two failures in this test case:
2661         1. proc.poll() doesn't return 0.
2662         2. stderr is not output.
2663
2664         For failure #1, this is expected. the process should not exit at
2665         the time. proc.poll() should return None because the process is
2666         still alive.
2667
2668         This change added a new test to check proc.poll() becomes 0 after
2669         the process successfully exits.
2670
2671         For failure #2, stderr is not flushed even though stdout is
2672         flushed. This change uses '-u' command switch to force stdin,
2673         stdout and stderr to be totally unbuffered.
2674
2675         * Scripts/webkitpy/port/server_process_unittest.py:
2676         (TestServerProcess.test_basic): Added -u command switch. Do not
2677         flush stdout. Removed the special condition for Windows. Add a new
2678         test to check proc.poll() returns 0.
2679         (TestServerProcess.test_process_crashing): Added -u command
2680         switch. Do not flush stdout.
2681
2682 2018-07-23  Ross Kirsling  <ross.kirsling@sony.com>
2683
2684         WTF::StringView::split should have an allowEmptyEntries flag
2685         https://bugs.webkit.org/show_bug.cgi?id=187864
2686
2687         Reviewed by Konstantin Tokarev.
2688
2689         * TestWebKitAPI/Tests/WTF/StringView.cpp: Add test.
2690
2691 2018-07-23  Ben Richards  <benton_richards@apple.com>
2692
2693         We should cache the compiled sandbox profile in a data vault
2694         https://bugs.webkit.org/show_bug.cgi?id=184991
2695
2696         Reviewed by Ryosuke Niwa.
2697
2698         Added trace points for sandbox initialization
2699
2700         * Tracing/SystemTracePoints.plist:
2701
2702 2018-07-23  Zalan Bujtas  <zalan@apple.com>
2703
2704         DRT relies on [webView display] to call -viewWillDraw on the WebHTMLView
2705         https://bugs.webkit.org/show_bug.cgi?id=187924
2706         <rdar://problem/41745884>
2707
2708         Reviewed by Simon Fraser.
2709
2710         WebKit relies on -viewWillDraw getting called on WebHTMLView, even though that view has not been marked as needing display.
2711
2712         * DumpRenderTree/mac/PixelDumpSupportMac.mm:
2713         (createBitmapContextFromWebView):
2714
2715 2018-07-23  Chris Dumez  <cdumez@apple.com>
2716
2717         WebResourceLoadStatisticsStore fails to unregister itself as a MessageReceiver in its destructor
2718         https://bugs.webkit.org/show_bug.cgi?id=187910
2719         <rdar://problem/42356526>
2720
2721         Reviewed by Brent Fulgham.
2722
2723         Add API test coverage.
2724
2725         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2726         * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
2727         (-[DisableITPDuringNavigationDelegate webView:didCommitNavigation:]):
2728         (-[DisableITPDuringNavigationDelegate webView:didFinishNavigation:]):
2729         (TEST):
2730         * TestWebKitAPI/Tests/WebKitCocoa/notify-resourceLoadObserver.html: Added.
2731
2732 2018-07-23  Daniel Bates  <dabates@apple.com>
2733
2734         test-webkitpy should take configuration command line options
2735         https://bugs.webkit.org/show_bug.cgi?id=187872
2736
2737         Reviewed by David Kilzer.
2738
2739         Add --debug and --release optional command line options and teach the test bots to invoke test-webkitpy
2740         with the appropriate configuration. At the moment these options are only meaningful on Mac since they
2741         effect the configuration lldbWebKitTester is built with and we only build lldbWebKitTester on Mac.
2742
2743         * BuildSlaveSupport/build.webkit.org-config/steps.py:
2744         (RunPythonTests): Pass the configuration to test-webkitpy. On Mac this will effect
2745         how lldbWebKitTester is built. All other ports do not make use of the specified configuration.
2746         * Scripts/webkitpy/test/main.py:
2747         (_build_lldb_webkit_tester): Modified to take the configuration to build lldbWebKitTester. If
2748         the specified configuration is None then we fall back to using the default configuration (as set
2749         by script set-webkit-configuration).
2750         (Tester._parse_args): Add command line options --debug and --release to build lldbWebKitTester
2751         with a Debug configuration and a Release configuration, respectively
2752         (Tester._run_tests): Pass the configuration to build lldbWebKitTester that we parsed from
2753         the command line options. It may be None if neither --debug nor --release were passed.
2754
2755 2018-07-23  Commit Queue  <commit-queue@webkit.org>
2756
2757         Unreviewed, rolling out r233030.
2758         https://bugs.webkit.org/show_bug.cgi?id=187904
2759
2760         Broke tarball builds (Requested by mcatanzaro on #webkit).
2761
2762         Reverted changeset:
2763
2764         "run-gtk-tests (glib/common.py) cannot determine build
2765         directory when webKitBranchBuild=true"
2766         https://bugs.webkit.org/show_bug.cgi?id=185643
2767         https://trac.webkit.org/changeset/233030
2768
2769 2018-07-21  Simon Fraser  <simon.fraser@apple.com>
2770
2771         Fix lldb summarizers for HashMaps and HashSets
2772         https://bugs.webkit.org/show_bug.cgi?id=187883
2773
2774         Reviewed by Dan Bates.
2775         
2776         HashMap and HashSet summarizers were broken in various ways.
2777         
2778         The 'type summary add -x' regexp needs to match at the start and end of the string
2779         to avoid finding types nested inside other templates.
2780         
2781         The HashTable synthetic child code incorrectly used the type of the key, rather than
2782         the value when synthesizing children.
2783         
2784         Add HashMap and HashSet summarizers.
2785
2786         I tried to get synthetic children working directly for HashMap and HashSet, but was unable.
2787
2788         * lldb/lldbWebKitTester/main.cpp:
2789         (testSummaryProviders):
2790         * lldb/lldb_webkit.py:
2791         (__lldb_init_module):
2792         (__lldb_init_module.lldb_webkit):
2793         (WTFHashMap_SummaryProvider):
2794         (WTFHashSet_SummaryProvider):
2795         (WebCoreColorProvider._to_string_extended):
2796         (WebCoreURLProvider.to_string):
2797         (WTFHashMapProvider):
2798         (WTFHashMapProvider.__init__):
2799         (WTFHashMapProvider.tableSize):
2800         (WTFHashMapProvider.keyCount):
2801         (WTFHashSetProvider):
2802         (WTFHashSetProvider.__init__):
2803         (WTFHashSetProvider.tableSize):
2804         (WTFHashSetProvider.keyCount):
2805         (WTFHashTableProvider.tableSize):
2806         (WTFHashTableProvider):
2807         (WTFHashTableProvider.keyCount):
2808         (WTFHashTableProvider.get_child_at_index):
2809         (WTFHashTableProvider.update):
2810         * lldb/lldb_webkit_unittest.py:
2811         (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
2812         (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
2813         (TestSummaryProviders):
2814         (TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
2815         (TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
2816         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
2817
2818 2018-07-21  Simon Fraser  <simon.fraser@apple.com>
2819
2820         Add lldb formatters for WebCore geometry types
2821         https://bugs.webkit.org/show_bug.cgi?id=187884
2822
2823         Reviewed by Daniel Bates.
2824         
2825         Add lldb formatters for IntPoint, IntSize, IntRect, FloatPoint, FloatSize, FloatRect
2826         and LayoutRect.
2827         
2828         Testing is blocked by webkit.org/b/187872.
2829
2830         * lldb/lldbWebKitTester/main.cpp:
2831         (testSummaryProviders):
2832         * lldb/lldb_webkit.py:
2833         (__lldb_init_module.lldb_webkit):
2834         (__lldb_init_module):
2835         (WebCoreLayoutRect_SummaryProvider):
2836         (WebCoreIntSize_SummaryProvider):
2837         (WebCoreIntPoint_SummaryProvider):
2838         (WebCoreFloatSize_SummaryProvider):
2839         (WebCoreFloatPoint_SummaryProvider):
2840         (WebCoreIntRect_SummaryProvider):
2841         (WebCoreFloatRect_SummaryProvider):
2842         (WebCoreLayoutRectProvider):
2843         (WebCoreLayoutRectProvider.__init__):
2844         (WebCoreLayoutRectProvider.get_x):
2845         (WebCoreLayoutRectProvider.get_y):
2846         (WebCoreLayoutRectProvider.get_width):
2847         (WebCoreLayoutRectProvider.get_height):
2848         (WebCoreIntPointProvider):
2849         (WebCoreIntPointProvider.__init__):
2850         (WebCoreIntPointProvider.get_x):
2851         (WebCoreIntPointProvider.get_y):
2852         (WebCoreIntSizeProvider):
2853         (WebCoreIntSizeProvider.__init__):
2854         (WebCoreIntSizeProvider.get_width):
2855         (WebCoreIntSizeProvider.get_height):
2856         (WebCoreIntRectProvider):
2857         (WebCoreIntRectProvider.__init__):
2858         (WebCoreIntRectProvider.get_x):
2859         (WebCoreIntRectProvider.get_y):
2860         (WebCoreIntRectProvider.get_width):
2861         (WebCoreIntRectProvider.get_height):
2862         (WebCoreFloatPointProvider):
2863         (WebCoreFloatPointProvider.__init__):
2864         (WebCoreFloatPointProvider.get_x):
2865         (WebCoreFloatPointProvider.get_y):
2866         (WebCoreFloatSizeProvider):
2867         (WebCoreFloatSizeProvider.__init__):
2868         (WebCoreFloatSizeProvider.get_width):
2869         (WebCoreFloatSizeProvider.get_height):
2870         (WebCoreFloatRectProvider):
2871         (WebCoreFloatRectProvider.__init__):
2872         (WebCoreFloatRectProvider.get_x):
2873         (WebCoreFloatRectProvider.get_y):
2874         (WebCoreFloatRectProvider.get_width):
2875         (WebCoreFloatRectProvider.get_height):
2876
2877 2018-07-20  John Wilander  <wilander@apple.com>
2878
2879         Resource Load Statistics: Enable basic functionality in experimental debug mode
2880         https://bugs.webkit.org/show_bug.cgi?id=187835
2881         <rdar://problem/42408590>
2882
2883         Reviewed by Chris Dumez.
2884
2885         This patch makes the experimental ITP Debug Mode feature work, at least
2886         to a basic level. All of the changes to TestRunner are to support the
2887         layout tests for the functionality.
2888
2889         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2890         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2891         (WTR::InjectedBundle::didReceiveMessageToPage):
2892         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2893         (WTR::TestRunner::setStatisticsDebugMode):
2894         (WTR::TestRunner::statisticsCallDidSetDebugModeCallback):
2895         (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode):
2896         (WTR::TestRunner::statisticsCallDidSetPrevalentResourceForDebugModeCallback):
2897         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2898         * WebKitTestRunner/TestController.cpp:
2899         (WTR::TestController::setStatisticsDebugMode):
2900         (WTR::TestController::setStatisticsPrevalentResourceForDebugMode):
2901         * WebKitTestRunner/TestController.h:
2902         * WebKitTestRunner/TestInvocation.cpp:
2903         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2904         (WTR::TestInvocation::didSetStatisticsDebugMode):
2905         (WTR::TestInvocation::didSetPrevalentResourceForDebugMode):
2906         * WebKitTestRunner/TestInvocation.h:
2907
2908 2018-07-20  Ryosuke Niwa  <rniwa@apple.com>
2909
2910         Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
2911         https://bugs.webkit.org/show_bug.cgi?id=187846
2912
2913         Reviewed by Simon Fraser.
2914
2915         Fixed the bug that testRunner.execCommand was using the second argument as the value.
2916
2917         The second argument, aShowDefaultUI, should always be ignored in testRunner.execCommand,
2918         and the third argument should be used as the value. DumpRenderTree's implementation does this already.
2919
2920         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2921         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2922         (WTR::TestRunner::execCommand):
2923         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2924
2925 2018-07-20  Dean Jackson  <dino@apple.com>
2926
2927         Accidentally checked in the wrong version of these files.
2928
2929         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
2930         * lldb/lldbWebKitTester/main.cpp:
2931         (testSummaryProviders):
2932         * lldb/lldb_webkit_unittest.py:
2933         (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
2934         (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): Deleted.
2935         (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): Deleted.
2936         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): Deleted.
2937         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): Deleted.
2938         (TestSummaryProviders.serial_test_WebCoreColorProvider_semantic_color): Deleted.
2939
2940 2018-07-20  Dean Jackson  <dino@apple.com>
2941
2942         Provide an lldb type summary for WebCore::Color
2943         https://bugs.webkit.org/show_bug.cgi?id=187776
2944
2945         Reviewed by Dan Bates.
2946
2947         This time without the tests because we don't want to build
2948         all of WebKit just for python tests.
2949
2950         * lldb/lldb_webkit.py: Add a Color summary provider.
2951         (__lldb_init_module):
2952         (WebCoreColor_SummaryProvider):
2953         (WebCoreColorProvider):
2954         (WebCoreColorProvider.__init__):
2955         (WebCoreColorProvider._is_extended):
2956         (WebCoreColorProvider._is_valid):
2957         (WebCoreColorProvider._is_semantic):
2958         (WebCoreColorProvider._to_string_extended):
2959         (WebCoreColorProvider.to_string):
2960
2961 2018-07-20  Brady Eidson  <beidson@apple.com>
2962
2963         Add WKNavigation/WKNavigationAction related SPI.
2964         https://bugs.webkit.org/show_bug.cgi?id=187826
2965
2966         Reviewed by Chris Dumez.
2967
2968         * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
2969         (-[NavigationActionHasNavigationDelegate webView:didFinishNavigation:]):
2970         (-[NavigationActionHasNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
2971         (TEST):
2972
2973 2018-07-20  Commit Queue  <commit-queue@webkit.org>
2974
2975         Unreviewed, rolling out r233943, r233988, r234004, and
2976         r234012.
2977         https://bugs.webkit.org/show_bug.cgi?id=187856
2978
2979         webkitpy tests are failing to build lldbWebKitTester
2980         (Requested by ryanhaddad on #webkit).
2981
2982         Reverted changesets:
2983
2984         "Provide an lldb type summary for WebCore::Color"
2985         https://bugs.webkit.org/show_bug.cgi?id=187776
2986         https://trac.webkit.org/changeset/233943
2987
2988         "Provide an lldb type summary for WebCore::Color"
2989         https://bugs.webkit.org/show_bug.cgi?id=187776
2990         https://trac.webkit.org/changeset/233988
2991
2992         "Provide an lldb type summary for WebCore::Color"
2993         https://bugs.webkit.org/show_bug.cgi?id=187776
2994         https://trac.webkit.org/changeset/234004
2995
2996         "Provide an lldb type summary for WebCore::Color"
2997         https://bugs.webkit.org/show_bug.cgi?id=187776
2998         https://trac.webkit.org/changeset/234012
2999
3000 2018-07-20  Philippe Normand  <pnormand@igalia.com>
3001
3002         [GTK][WPE] enable-media-capabilities websetting
3003         https://bugs.webkit.org/show_bug.cgi?id=187847
3004
3005         Reviewed by Carlos Garcia Campos.
3006
3007         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
3008         (testWebKitSettings): Unit test for the new enable-media-capabilities setting.
3009
3010 2018-07-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3011
3012         [GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass is given
3013         https://bugs.webkit.org/show_bug.cgi?id=187798
3014
3015         Reviewed by Michael Catanzaro.
3016
3017         Update test cases to the new API and use a destroy function and vtable in the test case of calling
3018         jsc_context_evaluate_in_object() with a JSCClass.
3019
3020         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3021         (testJSCEvaluateInObject):
3022
3023 2018-07-19  Ross Kirsling  <ross.kirsling@sony.com>
3024
3025         TestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows
3026         https://bugs.webkit.org/show_bug.cgi?id=187712
3027
3028         Reviewed by Fujii Hironori.
3029
3030         * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:
3031         Mark result of unsigned short test case as platform-specific,
3032         since Windows' behavior is actually *less* surprising here.
3033
3034 2018-07-19  Lucas Forschler  <lforschler@apple.com>
3035
3036         Teach the AWS Lambda to use the [minified]-platforms database
3037         https://bugs.webkit.org/show_bug.cgi?id=187817
3038         
3039         Reviewed by David Kilzer.
3040
3041         * WebKitArchiveSupport/lambda/register-archive-in-dynamodb.py:
3042         (lambda_handler): Add support for the platforms.webkit.org database
3043         * WebKitArchiveSupport/lambda/register-minified-s3-archive-in-dynamodb.py:
3044         (lambda_handler): Add support for the minified-platforms.webkit.org database
3045
3046 2018-07-19  Dean Jackson  <dino@apple.com>
3047
3048         Provide an lldb type summary for WebCore::Color
3049         https://bugs.webkit.org/show_bug.cgi?id=187776
3050
3051         Dan Bates helped me with this attempted fix. Fingers crossed!
3052
3053         * Scripts/build-lldbwebkittester:
3054
3055 2018-07-19  Stephan Szabo  <stephan.szabo@sony.com>
3056
3057         [WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector
3058         https://bugs.webkit.org/show_bug.cgi?id=187786
3059
3060         Reviewed by Fujii Hironori.
3061
3062         * Scripts/webkitdirs.pm:
3063         (generateBuildSystemFromCMakeProject): Turn on DEVELOPER_MODE
3064         for WinCairo builds.
3065
3066 2018-07-19  Dean Jackson  <dino@apple.com>
3067
3068         Provide an lldb type summary for WebCore::Color
3069         https://bugs.webkit.org/show_bug.cgi?id=187776
3070
3071         Another attempted build fix for Debug.
3072
3073         * lldb/lldbWebKitTester/Configurations/Base.xcconfig:
3074         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
3075
3076 2018-07-19  Thomas Denney  <tdenney@apple.com>
3077
3078         [WHLSL] The interpreter doesn't support boolean short-circuiting
3079         https://bugs.webkit.org/show_bug.cgi?id=187779
3080
3081         Reviewed by Alex Christensen.
3082
3083         * WebGPUShadingLanguageRI/Evaluator.js:
3084         (Evaluator.prototype.visitLogicalExpression): RHS is only evaluated when necessary
3085         * WebGPUShadingLanguageRI/Test.js:
3086         (tests.booleanShortcircuiting): Adds 4 tests for the evaluation of logical expresions
3087
3088 2018-07-19  Dean Jackson  <dino@apple.com>
3089
3090         Provide an lldb type summary for WebCore::Color
3091         https://bugs.webkit.org/show_bug.cgi?id=187776
3092
3093         Attempted build fix.
3094
3095         * lldb/lldbWebKitTester/Configurations/Base.xcconfig:
3096
3097 2018-07-19  Brady Eidson  <beidson@apple.com>
3098
3099         Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation.
3100         https://bugs.webkit.org/show_bug.cgi?id=187789
3101
3102         Reviewed by Andy Estes.
3103
3104         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3105         (-[PSONNavigationDelegate init]):
3106         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3107
3108 2018-07-19  Thibault Saunier  <tsaunier@igalia.com>
3109
3110         [Flatpak] Let flatpak process handle SIGINT
3111         https://bugs.webkit.org/show_bug.cgi?id=187521
3112
3113         Reviewed by Philippe Normand.
3114
3115         Ensuring that flatpak process ends properly and that the sandbox is teard down.
3116         It also avoids showing usless backtrace to the end user and makes gdb
3117         much more usable.
3118
3119         Also make flatpakutils not verbose by default
3120
3121         * flatpak/flatpakutils.py:
3122         (disable_signals):
3123         (WebkitFlatpak.run_in_sandbox):
3124         (WebkitFlatpak.run_gdb):
3125
3126 2018-07-18  Stephan Szabo  <stephan.szabo@sony.com>
3127
3128         Unreviewed. Fix contributors entry.
3129
3130         * Scripts/webkitpy/common/config/contributors.json:
3131
3132 2018-07-18  Dean Jackson  <dino@apple.com>
3133
3134         Provide an lldb type summary for WebCore::Color
3135         https://bugs.webkit.org/show_bug.cgi?id=187776
3136
3137         Reviewed by Dan Bates.
3138
3139         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
3140             to get to WebCore.
3141         * lldb/lldbWebKitTester/main.cpp:
3142         (testSummaryProviders): Create some Color objects for testing.
3143
3144         * lldb/lldb_webkit.py: Add a Color summary provider.
3145         (__lldb_init_module):
3146         (WebCoreColor_SummaryProvider):
3147         (WebCoreColorProvider):
3148         (WebCoreColorProvider.__init__):
3149         (WebCoreColorProvider._is_extended):
3150         (WebCoreColorProvider._is_valid):
3151         (WebCoreColorProvider._is_semantic):
3152         (WebCoreColorProvider._to_string_extended):
3153         (WebCoreColorProvider.to_string):
3154
3155         * lldb/lldb_webkit_unittest.py: Tests.
3156         (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
3157         (TestSummaryProviders):
3158         (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
3159         (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
3160         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
3161         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):
3162
3163 2018-07-18  Truitt Savell  <tsavell@apple.com>
3164
3165         Unreviewed, rolling out r233934.
3166
3167         Revision caused 5 webkitpy failures on Mac and broke webkitpy
3168         testing on iOS simulator
3169
3170         Reverted changeset:
3171
3172         "Provide an lldb type summary for WebCore::Color"
3173         https://bugs.webkit.org/show_bug.cgi?id=187776
3174         https://trac.webkit.org/changeset/233934
3175
3176 2018-07-18  Chris Dumez  <cdumez@apple.com>
3177
3178         REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9
3179         https://bugs.webkit.org/show_bug.cgi?id=187784
3180         <rdar://problem/42329230>
3181
3182         Reviewed by Brady Eidson.
3183
3184         When process swapping on navigation, WebPageProxy::reattachToWebProcess() unregisters the page as a MessageReceiver
3185         from the old WebProcessProxy and registers itself as a MessageReceiver for the new WebProcessProxy instead. This
3186         means that after this point, IPC sent by the previous WebProcess to its WebPageProxy will fail.
3187
3188         When we process swap, we also navigate the page in the old WebProcess to about:blank, when the navigation to
3189         about:blank would complete, the WebKitTestRunner's injected bundle would try and send IPC to the WebPageProxy
3190         which would fail and would cause WKBundlePagePostSynchronousMessageForTesting() to return a null result. WKTR
3191         would crash when dereferencing this null result. This patch addresses this by dealing with the potential null
3192         result.
3193
3194         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
3195         (WTR::InjectedBundle::shouldProcessWorkQueue const):
3196
3197 2018-07-18  Dean Jackson  <dino@apple.com>
3198
3199         Provide an lldb type summary for WebCore::Color
3200         https://bugs.webkit.org/show_bug.cgi?id=187776
3201
3202         Reviewed by Dan Bates.
3203
3204         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
3205             to get to WebCore.
3206         * lldb/lldbWebKitTester/main.cpp:
3207         (testSummaryProviders): Create some Color objects for testing.
3208
3209         * lldb/lldb_webkit.py: Add a Color summary provider.
3210         (__lldb_init_module):
3211         (WebCoreColor_SummaryProvider):
3212         (WebCoreColorProvider):
3213         (WebCoreColorProvider.__init__):
3214         (WebCoreColorProvider._is_extended):
3215         (WebCoreColorProvider._is_valid):
3216         (WebCoreColorProvider._is_semantic):
3217         (WebCoreColorProvider._to_string_extended):
3218         (WebCoreColorProvider.to_string):
3219
3220         * lldb/lldb_webkit_unittest.py: Tests.
3221         (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
3222         (TestSummaryProviders):
3223         (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
3224         (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
3225         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
3226         (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):
3227
3228 2018-07-18  Stephan Szabo  <stephan.szabo@sony.com>
3229
3230         Adding myself to contributors.json
3231
3232         Unreviewed contributors.json change.
3233
3234         * Scripts/webkitpy/common/config/contributors.json:
3235
3236 2018-07-18  Jer Noble  <jer.noble@apple.com>
3237
3238         -_beginAnimatedResizeWithUpdates: can leave view in bad state if called during an existing animation
3239         https://bugs.webkit.org/show_bug.cgi?id=187739
3240         <rdar://problem/42304518>
3241
3242         Reviewed by Tim Horton.
3243
3244         * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
3245         (TEST):
3246
3247 2018-07-18  Jer Noble  <jer.noble@apple.com>
3248
3249         PiP from Element Fullscreen should match AVKit's behavior
3250         https://bugs.webkit.org/show_bug.cgi?id=187623
3251         <rdar://problem/41212379>
3252
3253         Reviewed by Jon Lee.
3254
3255         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3256         * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added.
3257         * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added.
3258         (-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]):
3259         (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]):
3260         (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]):
3261         (TestWebKitAPI::TEST):
3262
3263 2018-07-18  Aakash Jain  <aakash_jain@apple.com>
3264
3265         [ews-build] Add build step to run layout-test
3266         https://bugs.webkit.org/show_bug.cgi?id=187674
3267
3268         Reviewed by Lucas Forschler.
3269
3270         * BuildSlaveSupport/ews-build/steps.py:
3271         (RunWebKitTests): Added build step to run layout-tests. This is similar to current EWS.
3272         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
3273         * BuildSlaveSupport/ews-build/factories.py: Added build-step to run layout-test in iOSSimulatorFactory.
3274
3275 2018-07-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3276
3277         Add SPI to defer running async script until after document load
3278         https://bugs.webkit.org/show_bug.cgi?id=187748
3279         <rdar://problem/42317378>
3280
3281         Reviewed by Ryosuke Niwa and Tim Horton.
3282
3283         Add an API test to verify that when the deferred async script configuration is set, async scripts will be
3284         executed after the DOMContentLoaded event.
3285
3286         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3287         * TestWebKitAPI/Tests/WebKitCocoa/RunScriptAfterDocumentLoad.mm: Added.
3288         (TEST):
3289
3290 2018-07-18  Charlie Turner  <cturner@igalia.com>
3291
3292         [WPE] Update WPEBackend in flatpak
3293         https://bugs.webkit.org/show_bug.cgi?id=187753
3294
3295         r233763 updated WPEBackend for the jhbuild, but not the flatpak. This
3296         caused WPE_BACKEND_CHECK_VERSION to not be defined, triggering a bug
3297         in the version guard,
3298
3299         #if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)
3300
3301         This doesn't work as intended, since the C preprocessor first expands
3302         all macro arguments in the #if expression before evaluating the
3303         expression. When WPE_BACKEND_CHECK_VERSION is not defined, this will
3304         lead to a syntax error and some head scratching.
3305
3306         A future patch should address the buggy macro check, when it is
3307         decided whether the assume the macro is always defined and bump
3308         the API requirements on WPEBackend, or to move the check into two
3309         conditionals to avoid the expansion problem.
3310
3311         Unreviewed build fix.
3312         
3313         * flatpak/org.webkit.WPE.yaml:
3314
3315 2018-07-18  Simon Fraser  <simon.fraser@apple.com>
3316
3317         Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
3318         https://bugs.webkit.org/show_bug.cgi?id=187747
3319
3320         Reviewed by Ryosuke Niwa.
3321         
3322         Add textInputController.attributedStringForTyping(), which returns a one-character
3323         attributed string whose attributes are the typing attributes, making it possible to
3324         test -[WebView typingAttributes].
3325         
3326         Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
3327         so we can't return -typingAttributes directly.
3328
3329         * DumpRenderTree/mac/TextInputControllerMac.m:
3330         (+[TextInputController isSelectorExcludedFromWebScript:]):
3331         (-[TextInputController attributedStringForTyping]):
3332
3333 2018-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3334
3335         [GLIB] Add jsc_context_check_syntax() to GLib API
3336         https://bugs.webkit.org/show_bug.cgi?id=187694
3337
3338         Reviewed by Yusuke Suzuki.
3339
3340         Add a new test case.
3341
3342         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3343         (testJSCCheckSyntax):
3344         (main):
3345
3346 2018-07-17  Sihui Liu  <sihui_liu@apple.com>
3347
3348         REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
3349         https://bugs.webkit.org/show_bug.cgi?id=187066
3350         <rdar://problem/41609065>
3351
3352         Reviewed by Chris Dumez.
3353
3354         In r232668 we started to do reload if web process crashes by default. As we killed the web 
3355         process explicitly in this test, if web page got reloaded, messages would be sent again, 
3356         and flag set in message handler could keep the test continue to evaluate the expectation 
3357         without waiting for removeDataOfTypes to finish.
3358
3359         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
3360         (-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]):
3361         (TEST):
3362
3363 2018-07-17  Chris Dumez  <cdumez@apple.com>
3364
3365         Turn on PSON in WebKitTestRunner
3366         https://bugs.webkit.org/show_bug.cgi?id=186542
3367
3368         Reviewed by Brady Eidson.
3369
3370         Turn on PSON by default in WebKitTestRunner.
3371
3372         * WebKitTestRunner/TestOptions.h:
3373
3374 2018-07-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3375
3376         Add an SPI hook to allow clients to yield document parsing and script execution
3377         https://bugs.webkit.org/show_bug.cgi?id=187682
3378         <rdar://problem/42207453>
3379
3380         Reviewed by Ryosuke Niwa.
3381
3382         Add a few tests to exercise the new document yield token SPI, verifying that clients can use the SPI to defer
3383         document load, and that doing so doesn't cause deferred `script` to execute in the wrong order (i.e. before
3384         synchronous script, or after "DOMContentLoaded").
3385
3386         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3387         * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: Added.
3388         (-[ParserYieldTokenPlugIn takeDocumentParserTokenAfterCommittingLoad]):
3389         (-[ParserYieldTokenPlugIn releaseDocumentParserToken]):
3390         (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):
3391         (-[ParserYieldTokenPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
3392         (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]):
3393         (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
3394
3395         Add an injected bundle object that knows how to take and release multiple document parser yield tokens.
3396
3397         * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.h: Added.
3398         * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: Added.
3399         (+[ParserYieldTokenTestWebView webView]):
3400         (-[ParserYieldTokenTestWebView bundle]):
3401         (-[ParserYieldTokenTestWebView schemeHandler]):
3402         (-[ParserYieldTokenTestWebView didFinishDocumentLoad]):
3403         (-[ParserYieldTokenTestWebView didFinishLoad]):
3404         (waitForDelay):
3405         (TEST):
3406         * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: Added.
3407         * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: Added.
3408         (-[TestURLSchemeHandler webView:startURLSchemeTask:]):
3409         (-[TestURLSchemeHandler webView:stopURLSchemeTask:]):
3410         (-[TestURLSchemeHandler setStartURLSchemeTaskHandler:]):
3411         (-[TestURLSchemeHandler startURLSchemeTaskHandler]):
3412         (-[TestURLSchemeHandler setStopURLSchemeTaskHandler:]):
3413         (-[TestURLSchemeHandler stopURLSchemeTaskHandler]):
3414
3415         Add a new test helper class to handle custom schemes via a block-based API.
3416
3417         * TestWebKitAPI/Tests/WebKitCocoa/text-with-async-script.html: Added.
3418
3419         New test HTML page that contains a deferred script element, a synchronous script element, another deferred
3420         script element, and then some text, images, and links.
3421
3422         * TestWebKitAPI/Tests/WebKitCocoa/text-with-deferred-script.html: Added.
3423
3424 2018-07-17  Truitt Savell  <tsavell@apple.com>
3425
3426         Adding myself to Contributors.json
3427
3428         Unreviewed
3429
3430         * Scripts/webkitpy/common/config/contributors.json:
3431
3432 2018-07-17  Aditya Keerthi  <akeerthi@apple.com>
3433
3434         [macOS] TestWebKitAPI.PictureInPicture.WKUIDelegate is timing out
3435         https://bugs.webkit.org/show_bug.cgi?id=187730
3436
3437         Reviewed by Jer Noble.
3438
3439         This regression was introduced by r233865. PIP can now only be initiated from a
3440         window that is on screen.
3441
3442         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3443         (TestWebKitAPI::TEST):
3444
3445 2018-07-17  John Wilander  <wilander@apple.com>
3446
3447         Add completion handlers to TestRunner functions setStatisticsLastSeen(), setStatisticsPrevalentResource(), setStatisticsVeryPrevalentResource(), setStatisticsHasHadUserInteraction(), and setStatisticsHasHadNonRecentUserInteraction()
3448         https://bugs.webkit.org/show_bug.cgi?id=187710
3449         <rdar://problem/42252757>
3450
3451         Reviewed by Chris Dumez.
3452
3453         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3454         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
3455         (WTR::InjectedBundle::didReceiveMessageToPage):
3456         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3457         (WTR::TestRunner::setStatisticsLastSeen):
3458         (WTR::TestRunner::statisticsCallDidSetLastSeenCallback):
3459         (WTR::TestRunner::setStatisticsPrevalentResource):
3460         (WTR::TestRunner::statisticsCallDidSetPrevalentResourceCallback):
3461         (WTR::TestRunner::setStatisticsVeryPrevalentResource):
3462         (WTR::TestRunner::statisticsCallDidSetVeryPrevalentResourceCallback):
3463         (WTR::TestRunner::setStatisticsHasHadUserInteraction):
3464         (WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction):
3465         (WTR::TestRunner::statisticsCallDidSetHasHadUserInteractionCallback):
3466         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3467         * WebKitTestRunner/TestController.cpp:
3468         (WTR::TestController::setStatisticsLastSeen):
3469         (WTR::TestController::setStatisticsPrevalentResource):
3470         (WTR::TestController::setStatisticsVeryPrevalentResource):
3471         (WTR::TestController::setStatisticsHasHadUserInteraction):
3472         (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction):
3473         * WebKitTestRunner/TestInvocation.cpp:
3474         (WTR::TestInvocation::didSetLastSeen):
3475         (WTR::TestInvocation::didSetPrevalentResource):
3476         (WTR::TestInvocation::didSetVeryPrevalentResource):
3477         (WTR::TestInvocation::didSetHasHadUserInteraction):
3478         (WTR::TestInvocation::didSetHasHadNonRecentUserInteraction):
3479         * WebKitTestRunner/TestInvocation.h:
3480
3481 2018-07-16  Jeremy Jones  <jeremyj@apple.com>
3482
3483         Fix API Test failures introduced by r233865
3484         https://bugs.webkit.org/show_bug.cgi?id=187720
3485
3486         Unreviewed APITest fix after r233865.
3487
3488         Fullscreen can now only be initiated from a window that is on screen.
3489
3490         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
3491         (TestWebKitAPI::TEST):
3492         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm:
3493         (TestWebKitAPI::TEST):
3494
3495 2018-07-11  Dean Jackson  <dino@apple.com>
3496
3497         Allow removal of white backgrounds
3498         https://bugs.webkit.org/show_bug.cgi?id=187574
3499         <rdar://problem/41146792>
3500
3501         Reviewed by Simon Fraser.
3502
3503         Add a new menu item for punching out white backgrounds in MiniBrowser.
3504         In WebKitTestRunner, expose the new setting and hook that up to
3505         drawing a background in the WebView.
3506
3507         * MiniBrowser/mac/AppDelegate.m:
3508         (defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode.
3509
3510         * MiniBrowser/mac/SettingsController.h: Ditto.
3511         * MiniBrowser/mac/SettingsController.m:
3512         (-[SettingsController _populateMenu]):
3513         (-[SettingsController validateMenuItem:]):
3514         (-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]):
3515         (-[SettingsController punchOutWhiteBackgroundsInDarkMode]):
3516
3517         * MiniBrowser/mac/WK1BrowserWindowController.m:
3518         (-[WK1BrowserWindowController didChangeSettings]): Set the new preference.
3519
3520         * WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property.
3521         * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation.
3522         (WTR::PlatformWebView::drawsBackground const):
3523         (WTR::PlatformWebView::setDrawsBackground):
3524         * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto.
3525         (WTR::PlatformWebView::drawsBackground const):
3526         (WTR::PlatformWebView::setDrawsBackground):
3527         * WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and
3528         set its SPI.
3529         (WTR::PlatformWebView::drawsBackground const):
3530         (WTR::PlatformWebView::setDrawsBackground):
3531         * WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto.
3532         (WTR::PlatformWebView::drawsBackground const):
3533         (WTR::PlatformWebView::setDrawsBackground):
3534
3535         * WebKitTestRunner/TestController.cpp: Reset and copy the new preference.
3536         (WTR::TestController::resetPreferencesToConsistentValues):
3537         (WTR::updateTestOptionsFromTestHeader):
3538         * WebKitTestRunner/TestOptions.h:
3539         (WTR::TestOptions::hasSameInitializationOptions const):
3540
3541         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
3542         (WTR::TestController::platformCreateWebView): If the option for punching
3543         out the background was set, tell the WebView to not draw its background.
3544
3545 2018-07-16  Aditya Keerthi  <akeerthi@apple.com>
3546
3547         [Datalist][macOS] Add suggestions UI for TextFieldInputTypes
3548         https://bugs.webkit.org/show_bug.cgi?id=186531
3549
3550         Reviewed by Tim Horton.
3551
3552         Added isShowingDatalistSuggestions testing hook in order to enable testing of the
3553         visibility of the suggestions view.
3554
3555         * DumpRenderTree/mac/UIScriptControllerMac.mm:
3556         (WTR::UIScriptController::isShowingDataListSuggestions const):
3557         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3558         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3559         (WTR::UIScriptController::isShowingDataListSuggestions const):
3560         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3561         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
3562         (WTR::UIScriptController::isShowingDataListSuggestions const):
3563
3564 2018-07-16  Yusuke Suzuki  <utatane.tea@gmail.com>
3565
3566         Add --target-path option to dump-class-layout
3567         https://bugs.webkit.org/show_bug.cgi?id=187687
3568
3569         Reviewed by Simon Fraser.
3570
3571         We add an escape hatch to dump-class-layout for specifying target path directly.
3572         This `--target-path` allows us to use dump-class-layout in the other ports
3573         like JSCOnly.
3574
3575         We can dump class layout if we build the target with clang by using the following command.
3576
3577         Tools/Scripts/dump-class-layout \
3578             --architecture=x86_64 \
3579             --target-path=path/to/libJavaScriptCore.so \
3580             JavaScriptCore \
3581             ScopeNode
3582
3583         * Scripts/dump-class-layout:
3584         (main):
3585
3586 2018-07-16  Sihui Liu  <sihui_liu@apple.com>
3587
3588         IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
3589         https://bugs.webkit.org/show_bug.cgi?id=187631
3590         <rdar://problem/42164227>
3591
3592         Reviewed by Brady Eidson.
3593
3594         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
3595         (TEST):