2842d800182ad71f6aa1308e45e47a6cb82481e3
[WebKit-https.git] / Tools / ChangeLog
1 2018-12-27  Alex Christensen  <achristensen@webkit.org>
2
3         Resurrect Mac CMake build
4         https://bugs.webkit.org/show_bug.cgi?id=192658
5
6         Reviewed by Yusuke Suzuki.
7
8         * DumpRenderTree/PlatformMac.cmake:
9         * MiniBrowser/mac/CMakeLists.txt:
10         * TestWebKitAPI/PlatformMac.cmake:
11
12 2018-12-26  Adrian Perez de Castro  <aperez@igalia.com>
13
14         [Tools] Remove references to Bison and Flex
15         https://bugs.webkit.org/show_bug.cgi?id=193033
16
17         Reviewed by Michael Catanzaro.
18
19         The Bison and Flex tools are not needed anymore since r209883.
20
21         * CygwinDownloader/cygwin-downloader.py:
22         * EWSTools/ubuntu-ews-packages:
23         * Scripts/filter-build-webkit:
24         (shouldIgnoreLine):
25         * gtk/install-dependencies:
26         * wpe/install-dependencies:
27
28 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
29
30         WebDriver: warn about non existing tests when parsing expectations
31         https://bugs.webkit.org/show_bug.cgi?id=192979
32
33         Reviewed by Michael Catanzaro.
34
35         It's common to update web driver tests and forget updating the test expectations in case of tests removed or
36         renamed.
37
38         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
39         (WebDriverTestRunner.__init__):
40
41 2018-12-21  Chris Dumez  <cdumez@apple.com>
42
43         navigator.userAgent in service workers does not reflect customUserAgent set by client
44         https://bugs.webkit.org/show_bug.cgi?id=192951
45
46         Reviewed by Youenn Fablet.
47
48         Extend API test coverage.
49
50         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
51         (-[SWCustomUserAgentDelegate initWithUserAgent:]):
52         (-[SWCustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
53         (-[SWUserAgentMessageHandler initWithExpectedMessage:]):
54         (-[SWUserAgentMessageHandler userContentController:didReceiveScriptMessage:]):
55
56 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
57
58         [WebAuthN] userPresence should always be true
59         https://bugs.webkit.org/show_bug.cgi?id=192835
60         <rdar://problem/46538788>
61
62         Reviewed by Brent Fulgham.
63
64         * TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
65         (TestWebKitAPI::TEST):
66
67 2018-12-19  Simon Fraser  <simon.fraser@apple.com>
68
69         Add support to run-benchmark to use non-default copies of the browser apps
70         https://bugs.webkit.org/show_bug.cgi?id=192905
71         rdar://problem/46845840
72
73         Reviewed by Dewei Zhu.
74         
75         Add support for a --browser-path argument to run-benchmark, which allows you to use
76         a custom app bundle for a given browser (only implemented for Safari at present).
77
78         * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
79         (BenchmarkRunner.__init__):
80         * Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
81         (BrowserDriver.__init__):
82         * Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
83         (BrowserDriverFactory.create):
84         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
85         (OSXBrowserDriver._launch_process):
86         (OSXBrowserDriver._launch_process_with_caffeinate): Fix spelling.
87         (OSXBrowserDriver._launch_process_with_caffinate): Deleted.
88         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
89         (OSXChromeCanaryDriver.launch_url):
90         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
91         (OSXFirefoxNightlyDriver.launch_url):
92         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
93         (OSXSafariDriver.__init__):
94         (OSXSafariDriver.launch_url):
95         * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
96         (parse_args):
97         (run_benchmark_plan):
98         * Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
99         (WebServerBenchmarkRunner.__init__):
100         * Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py:
101         (FakeBenchmarkRunner.__init__):
102
103 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
104
105         [WebAuthN] Import an APDU coder from Chromium
106         https://bugs.webkit.org/show_bug.cgi?id=192949
107         <rdar://problem/46879933>
108
109         Reviewed by Brent Fulgham.
110
111         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
112         * TestWebKitAPI/Tests/WebCore/ApduTest.cpp: Added.
113         (TestWebKitAPI::TEST):
114
115 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
116
117         Setting the file wrapper and content type of an attachment to a PDF should update its image
118         https://bugs.webkit.org/show_bug.cgi?id=192984
119         <rdar://problem/46798028>
120
121         Reviewed by Tim Horton.
122
123         Add an API test to verify that setting the file wrapper for a _WKAttachment with an enclosing image element with
124         PDF data correctly updates the image element.
125
126         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
127
128 2018-12-21  Michael Catanzaro  <mcatanzaro@igalia.com>
129
130         Add JSCOnly to bot dashboard
131         https://bugs.webkit.org/show_bug.cgi?id=192964
132
133         Reviewed by Alexey Proskuryakov.
134
135         Apparently we have five JSCOnly test bots and multiple developers working on keeping them in
136         good shape. Sadly, they are hidden bots not exposed in the dashboard. They would be more
137         useful if they were not so secret, so add them.
138
139         There appear to be no build-only bots, so the first column is blank. And of course there are
140         no WebKit1 or WebKit2 bots, because this is JSCOnly, so the second and third columns are
141         blank too. That's OK. This will be the last bot on the dashboard, so it won't look too bad,
142         and there's plenty of room in the final column for all the bots.
143
144         I had a hard time picking a logo to use, because the JavaScript language does not have an
145         official logo. But I believe I've found one that will be satisfactory.
146
147         I will sneak in one bonus change: WPE's EWS queue was missing, and has been added.
148
149         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish.png: Added.
150         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish@2x.png: Added.
151         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
152         (BubbleQueueServer):
153         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
154         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
155         (WebKitBuildbot):
156         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
157         (table.queue-grid tr.platform.linux-jsconly img.logo):
158
159 2018-12-21  Benjamin Poulain  <benjamin@webkit.org>
160
161         <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
162         https://bugs.webkit.org/show_bug.cgi?id=192821
163
164         Reviewed by Chris Dumez.
165
166         * DumpRenderTree/mac/DumpRenderTree.mm:
167         (createWebViewAndOffscreenWindow):
168         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
169
170 2018-12-20  Fujii Hironori  <Hironori.Fujii@sony.com>
171
172         [Win][Clang] Fix compilation warnings of DumpRenderTree
173         https://bugs.webkit.org/show_bug.cgi?id=192924
174
175         Reviewed by Alex Christensen.
176
177         * DumpRenderTree/AccessibilityController.h: Added member variable initializations in the class definition.
178         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
179         (AccessibilityController::AccessibilityController): Moved member variable initializations to the class definition.
180         * DumpRenderTree/win/DumpRenderTree.cpp:
181         (dumpHistoryItem): String literals can't be converted non-const type. Use auto for them.
182         (resetWebPreferencesToConsistentValues): Pass a temporal _bstr_t
183         object to the argument of setDefaultTextEncodingName instead of a
184         const string literal.
185         (createWebViewAndOffscreenWindow): Use %lx for HRESULT (aka 'long').
186         (main): Exit if _dup2 fails. Use %lu for'DWORD'(aka 'unsigned long').
187         (setCacheFolder): Deleted.
188         * DumpRenderTree/win/DumpRenderTreeWin.h: Fix class/struct mismatch of FrameLoadDelegate and PolicyDelegate declarations.
189         * DumpRenderTree/win/EditingDelegate.cpp:
190         (dump): Use %d for int.
191         * DumpRenderTree/win/FrameLoadDelegate.cpp: Removed unused variable g_delegateWaitingOnTimer.
192         * DumpRenderTree/win/ResourceLoadDelegate.cpp:
193         (BSTRFromString): Deleted unused function.
194         * DumpRenderTree/win/TestRunnerWin.cpp:
195         (TestRunner::setDatabaseQuota): Pass a temporal _bstr_t object to
196         the arguemnt of setQuota instead of const string literal.
197         * DumpRenderTree/win/WorkQueueItemWin.cpp:
198         (jsStringRefToWString): Deleted unused function.
199
200 2018-12-20  Chris Dumez  <cdumez@apple.com>
201
202         Add API test coverage for customUserAgent client setting and service workers
203         https://bugs.webkit.org/show_bug.cgi?id=192952
204
205         Reviewed by Alex Christensen.
206
207         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
208         (-[SWMessageHandler userContentController:didReceiveScriptMessage:]):
209         (-[SWSchemes webView:startURLSchemeTask:]):
210         (-[SWCustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
211         (-[SWUserAgentMessageHandler userContentController:didReceiveScriptMessage:]):
212
213 2018-12-20  Chris Dumez  <cdumez@apple.com>
214
215         Use Optional::hasValue() instead of Optional::has_value()
216         https://bugs.webkit.org/show_bug.cgi?id=192948
217
218         Reviewed by Tim Horton.
219
220         * TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp:
221         (TestWebKitAPI::TEST):
222         * TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp:
223         (TestWebKitAPI::TEST):
224         * TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
225         (TestWebKitAPI::TEST_F):
226
227 2018-12-20  Chris Dumez  <cdumez@apple.com>
228
229         Add style script rule to check for uses of std::optional<>
230         https://bugs.webkit.org/show_bug.cgi?id=192931
231
232         Reviewed by Tim Horton.
233
234         * Scripts/webkitpy/style/checkers/cpp.py:
235         (check_wtf_optional):
236         (check_style):
237
238 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
239
240         [WebAuthN] Add a runtime flag for local authenticator
241         https://bugs.webkit.org/show_bug.cgi?id=192792
242         <rdar://problem/46798738>
243
244         Reviewed by Brent Fulgham.
245
246         * DumpRenderTree/TestOptions.cpp:
247         (TestOptions::TestOptions):
248         * DumpRenderTree/TestOptions.h:
249         * DumpRenderTree/mac/DumpRenderTree.mm:
250         (enableExperimentalFeatures):
251         (setWebPreferencesForTestOptions):
252         * WebKitTestRunner/TestController.cpp:
253         (WTR::TestController::resetPreferencesToConsistentValues):
254         (WTR::updateTestOptionsFromTestHeader):
255         * WebKitTestRunner/TestOptions.h:
256         (WTR::TestOptions::hasSameInitializationOptions const):
257
258 2018-12-20  Jonathan Bedard  <jbedard@apple.com>
259
260         webkitpy: Autoinstall package URLs have changed
261         https://bugs.webkit.org/show_bug.cgi?id=192909
262         <rdar://problem/46860359>
263
264         Rubber-stamped by Alexey Proskuryakov.
265
266         PyPi urls have been moved around, we need to update our auto-installed packages.
267
268         We should check for Selenium before asking PyPi for the latest version.
269
270         * Scripts/webkitpy/thirdparty/__init__.py:
271         (AutoinstallImportHook._install_mechanize): Update with new pypi url.
272         (AutoinstallImportHook._install_keyring): Ditto.
273         (AutoinstallImportHook._install_pep8): Ditto.
274         (AutoinstallImportHook._install_mozlog): Ditto.
275         (AutoinstallImportHook._install_mozprocess): Ditto.
276         (AutoinstallImportHook._install_pytest_timeout): Ditto.
277         (AutoinstallImportHook._install_pytest): Ditto.
278         (AutoinstallImportHook._install_pylint): Ditto.
279         (AutoinstallImportHook._install_buildbot): Ditto.
280         (AutoinstallImportHook._install_coverage): Ditto.
281         (AutoinstallImportHook._install_twisted_15_5_0): Ditto.
282         (AutoinstallImportHook._install_selenium): Update with new pypi url, only check
283         for new Selenium if the installed version isn't sufficient.
284         (AutoinstallImportHook.get_latest_pypi_url): Update with new pypi url.
285
286 2018-12-20  Chris Dumez  <cdumez@apple.com>
287
288         Use Optional::valueOr() instead of Optional::value_or()
289         https://bugs.webkit.org/show_bug.cgi?id=192933
290
291         Reviewed by Geoffrey Garen.
292
293         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
294         (TestWebKitAPI::checkURL):
295         (TestWebKitAPI::checkRelativeURL):
296         (TestWebKitAPI::checkURLDifferences):
297         (TestWebKitAPI::checkRelativeURLDifferences):
298         * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
299         (TestWebKitAPI::checkURL):
300
301 2018-12-20  Ryan Haddad  <ryanhaddad@apple.com>
302
303         Unreviewed, rolling out r239417.
304
305         Introduced two API test failures on macOS.
306
307         Reverted changeset:
308
309         "<rdar://problem/46194315> macOS: WebKit1 does not handle
310         occlusion changes"
311         https://bugs.webkit.org/show_bug.cgi?id=192821
312         https://trac.webkit.org/changeset/239417
313
314 2018-12-20  Devin Rousso  <drousso@apple.com>
315
316         Web Inspector: UIString should take an optional key and description to aid localization
317         https://bugs.webkit.org/show_bug.cgi?id=153962
318         <rdar://problem/24542505>
319
320         Reviewed by Brian Burg.
321
322         * Scripts/extract-localizable-js-strings:
323
324 2018-12-20  Tim Horton  <timothy_horton@apple.com>
325
326         Unparented WKWebView can't retrieve main resource data for a main frame plugin
327         https://bugs.webkit.org/show_bug.cgi?id=192923
328         <rdar://problem/46859068>
329
330         Reviewed by Wenson Hsieh.
331
332         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
333         * TestWebKitAPI/WebKitCocoa/GetResourceData.mm:
334         Add a test ensuring that both parented and unparented WKWebViews can
335         retrieve main resource data when loading a PDF.
336
337 2018-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
338
339         [GTK][WPE] Bump webkitgtk-test-fonts to 0.0.8
340         https://bugs.webkit.org/show_bug.cgi?id=192852
341
342         Reviewed by Michael Catanzaro.
343
344         EmojiOne font was replaced by Noto Color Emoji.
345
346         * WebKitTestRunner/gtk/fonts/fonts.conf: Use Noto Color Emoji when Apple Color Emoji font family is used in tests.
347         * gtk/jhbuild.modules:
348         * wpe/jhbuild.modules:
349
350 2018-12-19  Chris Dumez  <cdumez@apple.com>
351
352         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
353         https://bugs.webkit.org/show_bug.cgi?id=192728
354         <rdar://problem/46746779>
355
356         Reviewed by Geoff Garen.
357
358         * DumpRenderTree/*:
359         * MiniBrowser/*:
360         * TestRunnerShared/*:
361         * TestWebKitAPI/*:
362         * WebGPUAPIStructure/*:
363         * WebKitTestRunner/*:
364
365 2018-12-19  Benjamin Poulain  <benjamin@webkit.org>
366
367         <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
368         https://bugs.webkit.org/show_bug.cgi?id=192821
369
370         Reviewed by Chris Dumez.
371
372         * DumpRenderTree/mac/DumpRenderTree.mm:
373         (createWebViewAndOffscreenWindow):
374
375 2018-12-19  Alex Christensen  <achristensen@webkit.org>
376
377         Navigations away from the SafeBrowsing interstitial show a flash of old content
378         https://bugs.webkit.org/show_bug.cgi?id=192676
379
380         Reviewed by Chris Dumez.
381
382         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
383         (safeBrowsingView):
384         (TEST):
385         (-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Deleted.
386
387 2018-12-19  Adrian Perez de Castro  <aperez@igalia.com>
388
389         [GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
390         https://bugs.webkit.org/show_bug.cgi?id=192855
391
392         Reviewed by Michael Catanzaro.
393
394         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
395         (WTR::TestController::notifyDone): Use the WPE implementation.
396         (WTR::TestController::platformRunUntil): Use the WPE implementation.
397         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
398         (WTR::TestController::platformRunUntil): Honor the condition flag.
399
400 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
401
402         Allow clients to set the navigator platform
403         https://bugs.webkit.org/show_bug.cgi?id=192735
404
405         Reviewed by Tim Horton.
406
407         Add a test for setting a custom navigator platform.
408
409         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
410         (-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
411         (-[CustomNavigatorPlatformDelegate webView:didFinishNavigation:]):
412
413 2018-12-19  Truitt Savell  <tsavell@apple.com>
414
415         Unreviewed, rolling out r239358.
416
417         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
418         crash on Debug bots
419
420         Reverted changeset:
421
422         "Clean up IndexedDB files between tests"
423         https://bugs.webkit.org/show_bug.cgi?id=192796
424         https://trac.webkit.org/changeset/239358
425
426 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
427
428         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
429         https://bugs.webkit.org/show_bug.cgi?id=192842
430         <rdar://problem/46823586>
431
432         Reviewed by Tim Horton.
433
434         Adjusts an existing API test to verify that "com.apple.webarchive" is not one of the types registered to the
435         item provider when dragging a rich text selection.
436
437         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
438
439 2018-12-18  David Quesada  <david_quesada@apple.com>
440
441         REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
442         https://bugs.webkit.org/show_bug.cgi?id=192810
443         <rdar://problem/46812536>
444
445         Reviewed by Alex Christensen.
446
447         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
448         (-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
449             After releasing our reference to the web view, wait until the next turn of the runloop
450             before checking that the originatingWebView has been zeroed, since the web view might
451             still be referenced in the autorelease pool. This _WKDownload unit test isn't about
452             testing general memory management of WKWebViews, only that _WKDownload does not retain
453             its web view via the 'originatingWebView' property.
454
455 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
456
457         Clean up IndexedDB files between tests
458         https://bugs.webkit.org/show_bug.cgi?id=192796
459
460         Reviewed by Geoffrey Garen.
461
462         * DumpRenderTree/mac/DumpRenderTree.mm:
463         (runTest):
464         * WebKitTestRunner/TestController.cpp:
465         (WTR::TestController::resetStateToConsistentValues):
466         (WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext):
467         (WTR::RemoveAllIndexedDatabasesCallback):
468         (WTR::TestController::ClearIndexedDatabases):
469         * WebKitTestRunner/TestController.h:
470
471 2018-12-18  Alex Christensen  <achristensen@webkit.org>
472
473         Fix API test introduced in r239339 on iOS.
474         https://bugs.webkit.org/show_bug.cgi?id=192675
475
476         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
477         (TEST):
478         The iOS implementation of the safe browsing warning is a little different.
479         It does some element creation when it is added to the window so it knows how big it is.
480         To test these elements, we need to simulate adding it to the window.
481         A similar technique is done in other iOS API tests, such as SafeBrowsing.ShowWarningSPI.
482
483 2018-12-18  Jonathan Bedard  <jbedard@apple.com>
484
485         webkitpy: Ignore device type for test when using --force
486         https://bugs.webkit.org/show_bug.cgi?id=192786
487         <rdar://problem/46794894>
488
489         Reviewed by Daniel Bates.
490
491         It is sometimes the case that a contributor will wish to run a test on a specific device,
492         despite expectations which indicate a test should not be run on that device.
493
494         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
495         (parse_args):
496         * Scripts/webkitpy/port/device_port.py:
497         (DevicePort.default_child_processes): Strip device type information when using --force.
498         (DevicePort.setup_test_run): Only allow incomplete match when using --force.
499
500 2018-12-18  Alex Christensen  <achristensen@webkit.org>
501
502         WKWebView has old URL while displaying SafeBrowsing interstitial, for link-click navigations
503         https://bugs.webkit.org/show_bug.cgi?id=192675
504
505         Reviewed by Geoffrey Garen.
506
507         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
508         (goBack):
509         (TEST):
510         (visitUnsafeSite):
511         (-[SafeBrowsingHelper observeValueForKeyPath:ofObject:change:context:]):
512         (-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
513
514 2018-12-18  Chris Dumez  <cdumez@apple.com>
515
516         Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
517         https://bugs.webkit.org/show_bug.cgi?id=192772
518
519         Reviewed by Antti Koivisto.
520
521         Add API test coverage.
522
523         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
524
525 2018-12-18  Philippe Normand  <pnormand@igalia.com>
526
527         Unreviewed, JHBuild GTK build fix attempt
528
529         * gtk/jhbuild.modules: There's no libffi in this moduleset anymore.
530         There's no ninja module either, it should be provided by the
531         host system.
532
533 2018-12-17  Chris Dumez  <cdumez@apple.com>
534
535         Allow passing nil as session state to [WKWebView _restoreSessionState:]
536         https://bugs.webkit.org/show_bug.cgi?id=192789
537         <rdar://problem/46755277>
538
539         Reviewed by Alex Christensen.
540
541         Add API test coverage.
542
543         * TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm:
544         (TEST):
545
546 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
547
548         Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled
549         https://bugs.webkit.org/show_bug.cgi?id=192780
550         rdar://problem/43394387
551
552         Reviewed by Tim Horton.
553
554         No need to set "AppleFontSmoothing" defaults for WK2.
555
556         * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
557         (WTR::InjectedBundle::platformInitialize):
558
559 2018-12-17  Jonathan Bedard  <jbedard@apple.com>
560
561         webkitpy: Handle case where stdout and stderr don't accept unicode
562         https://bugs.webkit.org/show_bug.cgi?id=192775
563         <rdar://problem/46497303>
564
565         Reviewed by Stephanie Lewis.
566
567         * Scripts/webkitpy/layout_tests/views/metered_stream.py:
568         (MeteredStream.write): If unicode cannot be written to the stream, replace unicode
569         characters with '?'.
570         * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
571         (RegularTest.test_stream_with_encoding):
572
573 2018-12-17  Daniel Bates  <dabates@apple.com>
574
575         Support concatenating StringView with other string types
576         https://bugs.webkit.org/show_bug.cgi?id=177566
577
578         Reviewed by Darin Adler.
579
580         Add some tests to ensure we do not regress the number of allocations needed when performing
581         string concatenation with string views.
582
583         * TestWebKitAPI/Tests/WTF/StringOperators.cpp:
584         (TestWebKitAPI::TEST):
585
586 2018-12-17  Commit Queue  <commit-queue@webkit.org>
587
588         Unreviewed, rolling out r239265 and r239274.
589         https://bugs.webkit.org/show_bug.cgi?id=192765
590
591         unorm_normalize is deprecated, and broke an internal build
592         (Requested by Truitt on #webkit).
593
594         Reverted changesets:
595
596         "[GTK][WPE] Need a function to convert internal URI to display
597         ("pretty") URI"
598         https://bugs.webkit.org/show_bug.cgi?id=174816
599         https://trac.webkit.org/changeset/239265
600
601         "Fix the Apple Internal Mac build with a newer SDK"
602         https://trac.webkit.org/changeset/239274
603
604 2018-12-17  Daniel Bates  <dabates@apple.com>
605
606         Implement UIScriptController::toggleCapsLock() for iOS
607         https://bugs.webkit.org/show_bug.cgi?id=191815
608
609         Reviewed by Andy Estes.
610
611         Add support for toggling the caps lock state in WebKitTestRunner on iOS.
612
613         * TestRunnerShared/UIScriptContext/UIScriptController.h:
614         * WebKitTestRunner/TestController.cpp:
615         (WTR::TestController::resetStateToConsistentValues): Clear the current modifier state
616         before running a test. This ensures that the caps lock state does not persist between
617         tests should a test enable caps lock and not disable it.
618         * WebKitTestRunner/ios/HIDEventGenerator.mm:
619         (hidUsageCodeForCharacter): Map "capsLock" to the Caps Lock key usage code.
620         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
621         (WTR::createUIPhysicalKeyboardEvent): Modified to take the keyboard input flags to use to
622         create the event. Also substituted NSString* for const String& as the data type for the first
623         two parameters to avoid conversions in the implementation of UIScriptController::toggleCapsLock()
624         below.
625         (WTR::UIScriptController::keyDown): Update as needed due to changes to prototype of createUIPhysicalKeyboardEvent().
626         (WTR::UIScriptController::toggleCapsLock): Dispatch a UIEvent to toggle caps lock.
627
628 2018-12-17  Daniel Bates  <dabates@apple.com>
629
630         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
631         https://bugs.webkit.org/show_bug.cgi?id=192633
632
633         Reviewed by Wenson Hsieh.
634
635         Update code to use the modern initializer.
636
637         * DumpRenderTree/mac/EventSendingController.mm:
638         (-[EventSendingController keyDown:withModifiers:withLocation:]):
639
640 2018-12-17  Matt Lewis  <jlewis3@apple.com>
641
642         Unreviewed, rolling out r239254.
643
644         This broke the Windows 10 Debug build
645
646         Reverted changeset:
647
648         "Replace many uses of String::format with more type-safe
649         alternatives"
650         https://bugs.webkit.org/show_bug.cgi?id=192742
651         https://trac.webkit.org/changeset/239254
652
653 2018-12-17  David Kilzer  <ddkilzer@apple.com>
654
655         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
656         <https://webkit.org/b/192751>
657         <rdar://problem/46771623>
658
659         Reviewed by Daniel Bates.
660
661         Change loop variables to const references to avoid unnecessary
662         copies.
663
664         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
665         (-[LocalPasteboard pasteboardItems]):
666
667 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
668
669         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
670         https://bugs.webkit.org/show_bug.cgi?id=174816
671
672         Reviewed by Michael Catanzaro.
673
674         Add tests for userVisibleString() and (for GTK and WPE) webkit_uri_for_display().
675
676         * TestWebKitAPI/CMakeLists.txt:
677         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
678         * TestWebKitAPI/Tests/WTF/URLHelpers.cpp: Added.
679         (TestWebKitAPI::TEST):
680         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitURIUtilities.cpp: Added.
681         (testURIForDisplayUnaffected):
682         (testURIForDisplayAffected):
683         (beforeAll):
684         (afterAll):
685         * TestWebKitAPI/glib/CMakeLists.txt:
686
687 2018-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
688
689         [WPE] Add API to notify about frame displayed view backend callback
690         https://bugs.webkit.org/show_bug.cgi?id=192224
691
692         Reviewed by Michael Catanzaro.
693
694         Add a test case to check the new API.
695
696         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
697         (testWebViewFrameDisplayed):
698         (beforeAll):
699         * wpe/jhbuild.modules: Bump WPEBackend-fdo to 1.1.0.
700
701 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
702
703         Unreviewed build fix after r239253
704
705         * gtk/jhbuild.modules: Fix typo in libpsl dependency name.
706
707 2018-12-15  Darin Adler  <darin@apple.com>
708
709         Use warning-ignoring macros more consistently and simply
710         https://bugs.webkit.org/show_bug.cgi?id=192743
711
712         Reviewed by Mark Lam.
713
714         * DumpRenderTree/TestNetscapePlugIn/main.cpp:
715         (handleEventCarbon): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
716         * DumpRenderTree/mac/TextInputControllerMac.m:
717         (-[TextInputController interpretKeyEvents:withSender:]): Use
718         IGNORE_WARNINGS_BEGIN/END.
719         * WebKitTestRunner/mac/EventSenderProxy.mm:
720         (WTR::EventSenderProxy::mouseForceClick): Use
721         IGNORE_NULL_CHECK_WARNINGS_BEGIN/END.
722         (WTR::EventSenderProxy::startAndCancelMouseForceClick): Ditto.
723         (WTR::EventSenderProxy::mouseForceDown): Ditto.
724         (WTR::EventSenderProxy::mouseForceUp): Ditto.
725         (WTR::EventSenderProxy::mouseForceChanged): Ditto.
726
727 2018-12-15  Darin Adler  <darin@apple.com>
728
729         Replace many uses of String::format with more type-safe alternatives
730         https://bugs.webkit.org/show_bug.cgi?id=192742
731
732         Reviewed by Mark Lam.
733
734         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
735         (WTR::cacheTestRunnerCallback): Use makeString.
736         * WebKitTestRunner/TestController.cpp:
737         (WTR::TestController::didReceiveAuthenticationChallenge): Use makeString.
738         (WTR::TestController::downloadDidFail): Use an ASCIILiteral via the _s syntax.
739
740 2018-12-15  Adrian Perez de Castro  <aperez@igalia.com>
741
742         [WPE][GTK] Add libpsl to JHBuild module sets
743         https://bugs.webkit.org/show_bug.cgi?id=192740
744
745         Reviewed by Michael Catanzaro.
746
747         * gtk/jhbuild.modules: Add libpsl module.
748         * wpe/jhbuild.modules: Ditto.
749
750 2018-12-14  Alexey Proskuryakov  <ap@apple.com>
751
752         Add a style checker rule for Xcode version macros use
753         https://bugs.webkit.org/show_bug.cgi?id=192703
754
755         Reviewed by Alex Christensen.
756
757         * Scripts/webkitpy/style/checkers/cpp.py:
758         (check_os_version_checks):
759         (process_line):
760         (CppChecker):
761         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
762         (WebKitStyleTest.test_os_version_checks):
763
764 2018-12-14  Chris Dumez  <cdumez@apple.com>
765
766         [PSON] Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls
767         https://bugs.webkit.org/show_bug.cgi?id=192704
768
769         Reviewed by Geoffrey Garen.
770
771         Extend existing API test to reproduce the problem.
772
773         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
774
775 2018-12-14  Chris Dumez  <cdumez@apple.com>
776
777         [PSON] WebsitePolicies are lost on process-swap
778         https://bugs.webkit.org/show_bug.cgi?id=192694
779         <rdar://problem/46715748>
780
781         Reviewed by Brady Eidson.
782
783         Extend existing API test to reproduce the issue.
784
785         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
786
787 2018-12-14  Michael Catanzaro  <mcatanzaro@igalia.com>
788
789         [GTK] Error writing data to TLS socket in some sites when using the jhbuild
790         https://bugs.webkit.org/show_bug.cgi?id=192678
791
792         Reviewed by Carlos Garcia Campos.
793
794         Update our ancient versions of libsoup and glib-networking.
795
796         * gtk/install-dependencies:
797         * gtk/jhbuild.modules:
798         * gtk/patches/libsoup-auth-Fix-async-authentication-when-flag-SOUP_MESSAGE.patch: Removed.
799         * gtk/patches/libsoup-auth-do-not-use-cached-credentials-in-lookup-method-.patch: Removed.
800         * gtk/patches/libsoup-soup-message-io-Do-not-fail-when-there-s-no-empty-li.patch: Removed.
801         * gtk/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
802         * wpe/install-dependencies:
803         * wpe/jhbuild.modules:
804         * wpe/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
805
806 2018-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
807
808         [WPE] Use new view state API from libwpe
809         https://bugs.webkit.org/show_bug.cgi?id=191906
810
811         Reviewed by Žan Doberšek.
812
813         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
814         (beforeAll): Enable /webkit/WebKitWebView/page-visibility in WPE.
815         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
816         (Test::createWebViewBackend): Make the view initially hidden for consistency with GTK+ tests.
817         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
818         * TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp:
819         (WebViewTest::showInWindow): Add wpe_view_activity_state_visible, wpe_view_activity_state_in_window and
820         wpe_view_activity_state_focused state flags.
821         (WebViewTest::hideView): Remove wpe_view_activity_state_visible and wpe_view_activity_state_focused state flags.
822         * wpe/backends/HeadlessViewBackend.cpp:
823         (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Assume view is always visible, focused and in window.
824         * wpe/backends/WindowViewBackend.cpp:
825         (WPEToolingBackends::WindowViewBackend::WindowViewBackend): Update the view state flags depending on state
826         received in configure callback.
827         * wpe/jhbuild.modules: Bump libwpe to 1.1.0
828
829 2018-12-13  Fujii Hironori  <Hironori.Fujii@sony.com>
830
831         [WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
832         https://bugs.webkit.org/show_bug.cgi?id=192688
833
834         Reviewed by Ross Kirsling.
835
836         * win/DLLLauncher/DLLLauncherMain.cpp:
837         (copyEnvironmentVariable): Moved.
838         (getStringValue): Enclosed with #if !defined(WIN_CAIRO).
839         (applePathFromRegistry): Ditto.
840         (appleApplicationSupportDirectory): Ditto.
841         (prependPath): Ditto.
842
843 2018-12-13  Don Olmstead  <don.olmstead@sony.com>
844
845         Unreviewed. Changed my status to a reviewer.
846
847         * Scripts/webkitpy/common/config/contributors.json:
848
849 2018-12-13  Wenson Hsieh  <wenson_hsieh@apple.com>
850
851         [iOS] Support dropping contact card data (public.vcard) in editable content
852         https://bugs.webkit.org/show_bug.cgi?id=192570
853         <rdar://problem/35626913>
854
855         Reviewed by Tim Horton.
856
857         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
858
859         Add API tests to verify that registering `MKMapItem`s and `CNContact`s to item providers and dropping them in
860         attachment-enabled rich text editable areas inserts attachment elements (and in the case of `MKMapItem`,
861         additionally inserts a link).
862
863         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
864         (TestWebKitAPI::createMapItemForTesting):
865         (TestWebKitAPI::createContactItemForTesting):
866
867         Add API tests to verify that dropping map items and contact items into rich and plain editable areas behaves as
868         expected (in the case where a URL is present, e.g. dropping a map item, we insert the URL as an anchor, and when
869         there is no other suitable representation in the item provider, we do nothing at all, which is the case for the
870         dropped `CNContact`). Also, add a test to verify that drag and drop can be used to upload these items as .vcf
871         files.
872
873 2018-12-13  Ross Kirsling  <ross.kirsling@sony.com>
874
875         Unreviewed -- update my status to "reviewer".
876
877         * Scripts/webkitpy/common/config/contributors.json:
878
879 2018-12-13  Youenn Fablet  <youenn@apple.com>
880
881         On page close, WebPage::m_userMediaPermissionRequestManager is nullified too early
882         https://bugs.webkit.org/show_bug.cgi?id=192657
883
884         Reviewed by Eric Carlson.
885
886         Add a test that loads a page registering ondevicechange,
887         load another page in the same process, closes the first page.
888         Ensure that the process does not crash in that case.
889
890         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
891         * TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
892         (TestWebKitAPI::TEST):
893         (TestWebKitAPI::didCrashCallback):
894         * TestWebKitAPI/Tests/WebKit/ondevicechange.html: Added.
895
896 2018-12-13  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
897
898         [GStreamer][JHBuild] update-webkit{gtk,wpe}-libs fails with libfdk-2.0.0
899         https://bugs.webkit.org/show_bug.cgi?id=192643
900
901         Reviewed by Philippe Normand.
902
903         This problem happens with Arch Linux users which have libfdk-2.0.0
904         installed (which is anybody with gst-plugins-bad 1.14.4 installed).
905
906         The problem has already been solved upstream at
907         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/77.
908
909         Adding patches while this problem is not in a release yet.
910
911         * gstreamer/jhbuild.modules: Add patches to fix build of gst-plugins-bad with libfdk-2.0.0.
912         * gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch: Added.
913         * gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch: Added.
914
915 2018-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
916
917         [FreeType] Add initial implementation of variation fonts
918         https://bugs.webkit.org/show_bug.cgi?id=192151
919
920         Reviewed by Michael Catanzaro.
921
922         Add cairo patch to avoid crashes.
923
924         * gtk/jhbuild.modules:
925         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.
926
927 2018-12-12  Fujii Hironori  <Hironori.Fujii@sony.com>
928
929         [Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
930         https://bugs.webkit.org/show_bug.cgi?id=192618
931
932         Reviewed by Alex Christensen.
933
934         * DumpRenderTree/win/DRTDataObject.cpp:
935         * DumpRenderTree/win/DRTDataObject.h:
936         * DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
937         * DumpRenderTree/win/DRTDropSource.h:
938         * DumpRenderTree/win/EditingDelegate.h:
939         * DumpRenderTree/win/PolicyDelegate.h:
940         * DumpRenderTree/win/UIDelegate.h:
941
942 2018-12-12  Ryosuke Niwa  <rniwa@webkit.org>
943
944         Make TextInputController.legacyAttributedString take DOM nodes and offsets
945         https://bugs.webkit.org/show_bug.cgi?id=192653
946
947         Reviewed by Wenson Hsieh.
948
949         Updated TextInputController.legacyAttributedString to take DOM nodes and offsets instead of
950         a DOM Range object in preparation to add layout tests for HTMLConverter which crosses
951         shadow boundaries.
952
953         * DumpRenderTree/mac/TextInputControllerMac.m:
954         (+[TextInputController isSelectorExcludedFromWebScript:]): Updated the selector signature.
955         (+[TextInputController webScriptNameForSelector:]): Ditto.
956         (-[TextInputController legacyAttributedString:offset:to:offset:]): Made this function take
957         start node and offset then end node and offset pairs.
958
959 2018-12-12  Alex Christensen  <achristensen@webkit.org>
960
961         Implement safe browsing in WebKit on WatchOS
962         https://bugs.webkit.org/show_bug.cgi?id=192641
963         <rdar://problem/46376188>
964
965         Reviewed by Geoff Garen.
966
967         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
968         (-[SafeBrowsingNavigationDelegate _webViewDidShowSafeBrowsingWarning:]):
969         (safeBrowsingView):
970         Add a test that the new delegate callback is called.
971
972 2018-12-12  Michael Catanzaro  <mcatanzaro@igalia.com>
973
974         Unreviewed manual rollout of r239100-r239102 and r239116
975         https://bugs.webkit.org/show_bug.cgi?id=192151
976         <rdar://problem/46655586>
977
978         * gtk/jhbuild.modules:
979         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Removed.
980
981 2018-12-12  Commit Queue  <commit-queue@webkit.org>
982
983         Unreviewed, rolling out r239103.
984         https://bugs.webkit.org/show_bug.cgi?id=192627
985
986         It broke the built because it depends on another patch that
987         didn't land yet (Requested by KaL on #webkit).
988
989         Reverted changeset:
990
991         "[WPE] Add API to notify about frame displayed view backend
992         callback"
993         https://bugs.webkit.org/show_bug.cgi?id=192224
994         https://trac.webkit.org/changeset/239103
995
996 2018-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
997
998         [WPE] Add API to notify about frame displayed view backend callback
999         https://bugs.webkit.org/show_bug.cgi?id=192224
1000
1001         Reviewed by Michael Catanzaro.
1002
1003         Add a test case to check the new API.
1004
1005         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
1006         (testWebViewFrameDisplayed):
1007         (beforeAll):
1008
1009 2018-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1010
1011         [FreeType] Add initial implementation of variation fonts
1012         https://bugs.webkit.org/show_bug.cgi?id=192151
1013
1014         Reviewed by Michael Catanzaro.
1015
1016         Add cairo patch to avoid crashes.
1017
1018         * gtk/jhbuild.modules:
1019         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.
1020
1021 2018-12-11  Justin Michaud  <justin_michaud@apple.com>
1022
1023         Implement feature flag for CSS Typed OM
1024         https://bugs.webkit.org/show_bug.cgi?id=192610
1025
1026         Reviewed by Ryosuke Niwa.
1027
1028         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1029
1030 2018-12-11  Chris Dumez  <cdumez@apple.com>
1031
1032         Unreviewed, fix bad check in API test added in r239080.
1033
1034         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1035
1036 2018-12-11  Fujii Hironori  <Hironori.Fujii@sony.com>
1037
1038         [Win][Clang] Fix warning -Wmissing-field-initializers
1039         https://bugs.webkit.org/show_bug.cgi?id=192584
1040
1041         Reviewed by Yusuke Suzuki.
1042
1043         Initialize a struct with '{ }' instead of '= {0}'.
1044
1045         * DumpRenderTree/win/DumpRenderTree.cpp:
1046         (runTest):
1047         * DumpRenderTree/win/EventSender.cpp:
1048         (makeMsg):
1049         (replaySavedEvents):
1050         (beginDragWithFilesCallback):
1051         * DumpRenderTree/win/PixelDumpSupportWin.cpp:
1052         (createBitmapContextFromWebView):
1053         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
1054         (updateMenuItemForHistoryItem):
1055         * MiniBrowser/win/WinMain.cpp:
1056         (wWinMain):
1057         * TestWebKitAPI/win/HostWindow.cpp:
1058         (TestWebKitAPI::HostWindow::clientRect const):
1059         (TestWebKitAPI::HostWindow::registerWindowClass):
1060         * TestWebKitAPI/win/PlatformWebViewWin.cpp:
1061         (TestWebKitAPI::PlatformWebView::registerWindowClass):
1062         * WebKitTestRunner/win/PlatformWebViewWin.cpp:
1063         (WTR::registerWindowClass):
1064         (WTR::PlatformWebView::windowFrame):
1065         (WTR::PlatformWebView::windowSnapshotImage):
1066
1067 2018-12-11  Chris Dumez  <cdumez@apple.com>
1068
1069         PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
1070         https://bugs.webkit.org/show_bug.cgi?id=192482
1071         <rdar://problem/46470145>
1072
1073         Reviewed by Antti Koivisto.
1074
1075         Add API test coverage.
1076
1077         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1078
1079 2018-12-11  Andy Estes  <aestes@apple.com>
1080
1081         Introduce makeBlockPtr for lambdas
1082         https://bugs.webkit.org/show_bug.cgi?id=192594
1083
1084         Reviewed by Alex Christensen.
1085
1086         Adopted makeBlockPtr and added API tests.
1087
1088         * DumpRenderTree/TestRunner.cpp:
1089         (TestRunner::callUIScriptCallback):
1090         * TestWebKitAPI/Tests/WTF/BlockPtr.mm:
1091         (TestWebKitAPI::TEST):
1092         * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
1093         (-[DownloadProgressTestRunner init]):
1094         (-[DownloadProgressTestRunner subscribeAndWaitForProgress]):
1095
1096 2018-12-11  Chris Dumez  <cdumez@apple.com>
1097
1098         REGRESSION (r238764-238783): TestWTF.WTF.StringOperators is failing
1099         https://bugs.webkit.org/show_bug.cgi?id=192361
1100         <rdar://problem/46524903>
1101
1102         Reviewed by Alex Christensen.
1103
1104         Compile StringOperators.cpp with -O1 optimization level instead of -Os. This
1105         fixes the failures for me locally.
1106
1107         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1108
1109 2018-12-11  Philippe Normand  <pnormand@igalia.com>
1110
1111         Unreviewed, WPE build fix after r239028
1112
1113         The FLATPAK_USER_DIR env var is not set early enough, leading to:
1114
1115         Traceback (most recent call last):
1116         File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
1117           sys.exit(WebkitFlatpak.load_from_args().run())
1118         File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
1119           if not self.clean_args():
1120         File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
1121           _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
1122         File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
1123           raise KeyError(key)
1124         KeyError: 'FLATPAK_USER_DIR'
1125
1126         * flatpak/flatpakutils.py:
1127         (WebkitFlatpak.clean_args):
1128
1129 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
1130
1131         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
1132         https://bugs.webkit.org/show_bug.cgi?id=192573
1133
1134         Reviewed by Simon Fraser.
1135
1136         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1137
1138 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
1139
1140         [CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
1141         https://bugs.webkit.org/show_bug.cgi?id=192574
1142
1143         Reviewed by Michael Catanzaro.
1144
1145         * Scripts/webkitperl/FeatureList.pm:
1146
1147 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
1148
1149         Sync FeatureList.pm
1150         https://bugs.webkit.org/show_bug.cgi?id=192565
1151
1152         Reviewed by Michael Catanzaro.
1153
1154         * Scripts/webkitperl/FeatureList.pm:
1155
1156 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1157
1158         [iOS] Unable to upload data that conforms to "public.item" but not "public.content"
1159         https://bugs.webkit.org/show_bug.cgi?id=192555
1160         <rdar://problem/35204990>
1161
1162         Reviewed by Tim Horton.
1163
1164         Add a test to verify that `.p12` files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
1165         example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
1166         only support uploading "public.content", so files such as these would not be accepted when dropping into file
1167         inputs, or be exposed as files on DataTransfer.
1168
1169         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
1170         (TestWebKitAPI::TEST):
1171
1172 2018-12-10  David Kilzer  <ddkilzer@apple.com>
1173
1174         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
1175         <https://webkit.org/b/192481>
1176         <rdar://problem/46539059>
1177
1178         Follow-up to address Darin's feedback.
1179
1180         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1181         (WTR::TestRunner::shouldDumpPixels const):
1182         (WTR::TestRunner::whatToDump const):
1183         (WTR::TestRunner::shouldWaitUntilDone const):
1184         (WTR::TestRunner::shouldDumpFrameLoadCallbacks):
1185         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
1186         (WTR::TestRunner::secureEventInputIsEnabled const):
1187         (WTR::TestRunner::isStatisticsPrevalentResource):
1188         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
1189         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
1190         (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
1191         (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
1192         (WTR::TestRunner::isStatisticsHasHadUserInteraction):
1193         (WTR::TestRunner::isStatisticsGrandfathered):
1194         (WTR::TestRunner::hasDOMCache):
1195         (WTR::TestRunner::keyExistsInKeychain):
1196
1197 2018-12-10  Jonathan Bedard  <jbedard@apple.com>
1198
1199         webkitpy: Ref tests don't respect platform specific expectations
1200         https://bugs.webkit.org/show_bug.cgi?id=192515
1201         <rdar://problem/46564839>
1202
1203         Reviewed by Lucas Forschler.
1204
1205         * Scripts/webkitpy/port/base.py:
1206         (Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
1207         (Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
1208         (Port.expected_filename): Remove irrelevant FIXME, code clean-up.
1209         (Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
1210         search all platform expectations as well.
1211         * Scripts/webkitpy/port/base_unittest.py:
1212         (test_ref_tests_platform_directory):
1213
1214 2018-12-10  Chris Dumez  <cdumez@apple.com>
1215
1216         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
1217         https://bugs.webkit.org/show_bug.cgi?id=192509
1218         <rdar://problem/46500832>
1219
1220         Reviewed by Alex Christensen.
1221
1222         Add API test coverage.
1223
1224         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
1225         (-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
1226         (-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
1227         (-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
1228         (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
1229         (-[CustomUserAgentDelegate webView:didFinishNavigation:]):
1230
1231 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1232
1233         [iOS] Caret is obscured by finger when dragging over an editable element
1234         https://bugs.webkit.org/show_bug.cgi?id=192499
1235         <rdar://problem/46570101>
1236
1237         Reviewed by Tim Horton.
1238
1239         Augment some existing API tests to check that the `precise` flag is either on or off on `UIDropProposal`.
1240
1241         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
1242         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
1243         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
1244         (-[DragAndDropSimulator _resetSimulatedState]):
1245         (-[DragAndDropSimulator lastKnownDropProposal]):
1246
1247         Rename `currentDropProposal` to `lastKnownDropProposal`, and expose it as a readonly property.
1248
1249         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
1250         (-[DragAndDropSimulator _advanceProgress]):
1251         (-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
1252         (-[DragAndDropSimulator showCustomActionSheetBlock]):
1253         (-[DragAndDropSimulator setConvertItemProvidersBlock:]):
1254         (-[DragAndDropSimulator convertItemProvidersBlock]):
1255         (-[DragAndDropSimulator setOverridePerformDropBlock:]):
1256         (-[DragAndDropSimulator overridePerformDropBlock]):
1257         (-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
1258         (-[DragAndDropSimulator overrideDragUpdateBlock]):
1259         (-[DragAndDropSimulator setDropCompletionBlock:]):
1260         (-[DragAndDropSimulator dropCompletionBlock]):
1261
1262         Refactor these properties to return and take normal Objective-C blocks, rather than `BlockPtr`s. However, use
1263         `BlockPtr` instance variables to manage the lifetimes of these blocks.
1264
1265         (-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
1266         (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.
1267
1268         Update this to use the new WebKit delegate hook for overriding the drop proposal.
1269
1270 2018-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1271
1272         [WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
1273         https://bugs.webkit.org/show_bug.cgi?id=190241
1274
1275         Reviewed by Carlos Garcia Campos.
1276
1277         run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
1278         Currently this actually creates the directories needed for the flatpak environment. Fix it.
1279
1280         * flatpak/flatpakutils.py:
1281         (WebkitFlatpak.clean_args):
1282         (WebkitFlatpak.run):
1283
1284 2018-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1285
1286         [GTK] Don't use the slice allocator
1287         https://bugs.webkit.org/show_bug.cgi?id=192360
1288
1289         Reviewed by Carlos Garcia Campos.
1290
1291         * MiniBrowser/gtk/main.c:
1292         (aboutDataRequestFree):
1293         (aboutDataRequestNew):
1294
1295 2018-12-10  Tim Horton  <timothy_horton@apple.com>
1296
1297         WKWebView should support custom tintColor
1298         https://bugs.webkit.org/show_bug.cgi?id=192518
1299         <rdar://problem/37243261>
1300
1301         Reviewed by Wenson Hsieh.
1302
1303         * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
1304         (TestWebKitAPI::TEST):
1305         Add a test that tintColor affects UITextInputTraits' interaction colors.
1306
1307 2018-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>
1308
1309         [iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
1310         https://bugs.webkit.org/show_bug.cgi?id=192524
1311
1312         Reviewed by Ryosuke Niwa.
1313
1314         This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
1315         (see <rdar://problem/28300343>). This API test simulates two drops from external sources, both from the point
1316         (300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
1317         first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
1318         wide selection rect and increases the width of the document; revealing this selection causes the web view to
1319         scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
1320         these window coordinates no longer correspond to the drop destination element in the document.
1321
1322         To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
1323         scroll horizontally after the first drop.
1324
1325         * TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
1326
1327 2018-12-08  Daniel Bates  <dabates@apple.com>
1328
1329         Fix lldb_webkit.py following r238771
1330         (https://bugs.webkit.org/show_bug.cgi?id=190234)
1331
1332         Substitute WTFURLProvider for WebCoreURLProvider in one call site that was inadvertently
1333         missed in r238771.
1334
1335         * lldb/lldb_webkit.py:
1336         (WebCoreDocumentProvider.url):
1337
1338 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
1339
1340         [ews-build] check-patch-relevance failure should not mark the overall build as failure
1341         https://bugs.webkit.org/show_bug.cgi?id=192510
1342
1343         Reviewed by Lucas Forschler.
1344
1345         * BuildSlaveSupport/ews-build/steps.py:
1346         (CheckPatchRelevance.start):
1347
1348 2018-12-07  Chris Dumez  <cdumez@apple.com>
1349
1350         ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
1351         https://bugs.webkit.org/show_bug.cgi?id=192362
1352         <rdar://problem/46460360>
1353
1354         Reviewed by Ryosuke Niwa.
1355
1356         Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
1357         *after* we know for sure we have a network process to communicate the policy to.
1358         This should address the failures on iOS.
1359
1360         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1361
1362 2018-12-07  Jiewen Tan  <jiewen_tan@apple.com>
1363
1364         Add keychain access entitlement to WebKitTestRunnerApp
1365         https://bugs.webkit.org/show_bug.cgi?id=192489
1366         <rdar://problem/45057952>
1367
1368         Reviewed by Alexey Proskuryakov.
1369
1370         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
1371
1372 2018-12-07  Saam Barati  <sbarati@apple.com>
1373
1374         WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
1375         https://bugs.webkit.org/show_bug.cgi?id=192473
1376
1377         Reviewed by Andy Estes.
1378
1379         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1380         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: Added.
1381         (-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
1382         (TEST):
1383         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.
1384         (-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
1385         (-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
1386         (-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):
1387         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.
1388
1389 2018-12-07  Jonathan Bedard  <jbedard@apple.com>
1390
1391         REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
1392         https://bugs.webkit.org/show_bug.cgi?id=192470
1393         <rdar://problem/46532001>
1394
1395         Unreviewed infrastructure fix.
1396
1397         * Scripts/webkitpy/port/device_port.py:
1398         (DevicePort.setup_test_run): Check that the number of initialized devices matches the
1399         number of child processes.
1400
1401 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
1402
1403         [ews-app] Send bug id as a build property
1404         https://bugs.webkit.org/show_bug.cgi?id=192494
1405
1406         Reviewed by Lucas Forschler.
1407
1408         * BuildSlaveSupport/ews-app/ews/fetcher.py:
1409         (BugzillaPatchFetcher.fetch):
1410
1411 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
1412
1413         [ews-build] Builds should have a link to patch and bug
1414         https://bugs.webkit.org/show_bug.cgi?id=192492
1415
1416         Reviewed by Lucas Forschler.
1417
1418         * BuildSlaveSupport/ews-build/steps.py:
1419         (ConfigureBuild.add_patch_id_url): Method to add Patch URL.
1420         (ConfigureBuild.add_bug_id_url): Method to add Bug URL.
1421         (ConfigureBuild.getPatchURL): Method to get Patch URL.
1422         (ConfigureBuild.getBugURL): Method to get Bug URL.
1423
1424 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
1425
1426         [ews-app] Configure logfile for ews-app logs
1427         https://bugs.webkit.org/show_bug.cgi?id=192493
1428
1429         Reviewed by Lucas Forschler.
1430
1431         * BuildSlaveSupport/ews-app/ews/__init__.py:
1432
1433 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
1434
1435         Style queue exception on some security bugs
1436         https://bugs.webkit.org/show_bug.cgi?id=190793
1437
1438         Reviewed by Lucas Forschler.
1439
1440         * Scripts/webkitpy/tool/steps/applywatchlist.py:
1441         (ApplyWatchList.run):
1442
1443 2018-12-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1444
1445         [Attachment Support] Cloned attachment elements lose their unique identifiers
1446         https://bugs.webkit.org/show_bug.cgi?id=192483
1447
1448         Reviewed by Tim Horton.
1449
1450         Introduce a new API test.
1451
1452         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1453         (TestWebKitAPI::TEST):
1454
1455 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
1456
1457         Consecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since r238903
1458         https://bugs.webkit.org/show_bug.cgi?id=192486
1459
1460         Unreviewed infrastructure fix.
1461
1462         WinCairo bots define WEBKIT_TEST_CHILD_PROCESSES to run less processes due to RAM restrictions.
1463
1464         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
1465         (_set_up_derived_options):
1466
1467 2018-12-06  David Kilzer  <ddkilzer@apple.com>
1468
1469         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
1470         <https://webkit.org/b/192481>
1471         <rdar://problem/46539059>
1472
1473         Reviewed by Simon Fraser.
1474
1475         This patch:
1476         - Fixes leaks in various injected bundle methods that return +1
1477           retained WKTypeRef objects via pointer.
1478         - Asserts the returned object is the expected WKTypeRef.
1479         - Replaces 0 with nullptr in many places.
1480
1481         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1482         (WTR::InjectedBundle::didCreatePage):
1483         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1484         (WTR::TestRunner::shouldDumpPixels const):
1485         (WTR::TestRunner::whatToDump const):
1486         (WTR::TestRunner::shouldWaitUntilDone const):
1487         (WTR::TestRunner::shouldDumpFrameLoadCallbacks):
1488         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
1489         (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
1490         (WTR::TestRunner::secureEventInputIsEnabled const):
1491         (WTR::TestRunner::isStatisticsPrevalentResource):
1492         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
1493         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
1494         (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
1495         (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
1496         (WTR::TestRunner::isStatisticsHasHadUserInteraction):
1497         (WTR::TestRunner::isStatisticsGrandfathered):
1498         (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords):
1499         (WTR::TestRunner::statisticsUpdateCookieBlocking):
1500         (WTR::TestRunner::statisticsSubmitTelemetry):
1501         (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
1502         (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
1503         (WTR::TestRunner::statisticsResetToConsistentState):
1504         (WTR::TestRunner::getAllStorageAccessEntries):
1505         (WTR::TestRunner::hasDOMCache):
1506         (WTR::TestRunner::domCacheSize):
1507         (WTR::TestRunner::injectUserScript):
1508         (WTR::TestRunner::keyExistsInKeychain):
1509
1510 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
1511
1512         REGRESSION: run-webkit-tests may fail when using booted simulators
1513         https://bugs.webkit.org/show_bug.cgi?id=192470
1514         <rdar://problem/46532001>
1515
1516         Reviewed by Lucas Forschler.
1517
1518         * Scripts/webkitpy/layout_tests/controllers/manager.py:
1519         (Manager.run): Logging uses the number of child processes to print out information about how efficiently tests
1520         were sharded after the fact. This number is the most meaningful if it is the maximum number of child processes used.
1521         * Scripts/webkitpy/port/base.py:
1522         (Port.max_child_processes): By default, Ports do not support running on any specific kind of device.
1523         * Scripts/webkitpy/port/device_port.py:
1524         (DevicePort.default_child_processes): Rather than using the currently initialized devices as a proxy for how many
1525         child processes are being used, check the device manager every time. Regardless of which devices are attached or
1526         available, iOS cannot boot watchOS devices and vice-versa. dedicated_simulators is not a known argument to
1527         device_count_for_type, use use_booted_simulator instead.
1528         (DevicePort.max_child_processes): Simulators can boot more devices than what is specified by device_count_for_type,
1529         but, if no devices are available, then max_child_processes should return 0 even for simulators.
1530         * Scripts/webkitpy/port/ios_device_unittest.py:
1531         (IOSDeviceTest):
1532         (IOSDeviceTest.test_max_child_processes):
1533         * Scripts/webkitpy/port/ios_simulator_unittest.py:
1534         (IOSSimulatorTest):
1535         (IOSSimulatorTest.test_max_child_processes):
1536         * Scripts/webkitpy/port/port_testcase.py:
1537         (PortTestCase):
1538         (PortTestCase.test_max_child_processes):
1539         * Scripts/webkitpy/port/watch_simulator_unittest.py:
1540         (WatchSimulatorTest):
1541         (WatchSimulatorTest.test_max_child_processes):
1542
1543 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
1544
1545         webkitpy: Ignore case when comparing device types (Follow-up fix)
1546         https://bugs.webkit.org/show_bug.cgi?id=192409
1547         <rdar://problem/46491558>
1548
1549         Unreviewed typo fix.
1550
1551         * Scripts/webkitpy/xcode/device_type_unittest.py:
1552         (DeviceTypeTest.test_comparison_lower_case):
1553         (DeviceTypeTest.test_comparsion_lower_case): Deleted.
1554
1555 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
1556
1557         webkitpy: Create device given lower-case DeviceType
1558         <https://bugs.webkit.org/show_bug.cgi?id=192472>
1559         <rdar://problem/46532650>
1560
1561         Reviewed by Lucas Forschler.
1562
1563         * Scripts/webkitpy/xcode/simulated_device.py:
1564         (SimulatedDeviceManager._get_device_identifier_for_type): Comparing simctl device identifiers with DeviceTypes
1565         should be letter-case agnostic.
1566         * Scripts/webkitpy/xcode/simulated_device_unittest.py:
1567         (test_lower_case_device_type):
1568
1569 2018-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1570
1571         [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
1572         https://bugs.webkit.org/show_bug.cgi?id=187554
1573         <rdar://problem/42075638>
1574
1575         Reviewed by Tim Horton.
1576
1577         Add support for simulating the keyboard input mode in layout tests using UIScriptController, as well as a new
1578         `TestOption` to make the web view editable.
1579
1580         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
1581         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
1582         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
1583         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
1584         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
1585         * TestRunnerShared/UIScriptContext/UIScriptController.h:
1586         * WebKitTestRunner/PlatformWebView.h:
1587         * WebKitTestRunner/TestController.cpp:
1588         (WTR::updateTestOptionsFromTestHeader):
1589         * WebKitTestRunner/TestController.h:
1590         (WTR::TestController::overriddenKeyboardInputMode const):
1591         * WebKitTestRunner/TestOptions.h:
1592         (WTR::TestOptions::hasSameInitializationOptions const):
1593         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1594         (WTR::TestController::platformCreateWebView):
1595         * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
1596         (WTR::PlatformWebView::setEditable):
1597         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
1598         (WTR::PlatformWebView::setEditable):
1599         * WebKitTestRunner/ios/TestControllerIOS.mm:
1600         (WTR::TestController::platformResetStateToConsistentValues):
1601         (WTR::swizzleCurrentInputMode):
1602         (WTR::TestController::setKeyboardInputModeIdentifier):
1603
1604         Swizzle out several `UIKeyboardInputModeController` methods in order to convince UIKit that the user has
1605         selected a `UIKeyboardInputMode` corresponding to the given identifier. The call to
1606         `-prepareKeyboardInputModeFromPreferences:` is also necessary on iOS 12 in order to update cached writing
1607         direction state in UIKit.
1608
1609         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
1610         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
1611         * WebKitTestRunner/mac/PlatformWebViewMac.mm:
1612         (WTR::PlatformWebView::setEditable):
1613         * WebKitTestRunner/win/PlatformWebViewWin.cpp:
1614         (WTR::PlatformWebView::setEditable):
1615         * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
1616         (WTR::PlatformWebView::setEditable):
1617
1618 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
1619
1620         [Cocoa] Share ClassMethodSwizzler and InstanceMethodSwizzler between TestWebKitAPI and WebKitTestRunner
1621         https://bugs.webkit.org/show_bug.cgi?id=192437
1622
1623         Reviewed by Tim Horton.
1624
1625         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
1626         * TestRunnerShared/cocoa/ClassMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.h.
1627         * TestRunnerShared/cocoa/ClassMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.mm.
1628         (ClassMethodSwizzler::ClassMethodSwizzler):
1629         (ClassMethodSwizzler::~ClassMethodSwizzler):
1630         * TestRunnerShared/cocoa/InstanceMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h.
1631         * TestRunnerShared/cocoa/InstanceMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm.
1632         (InstanceMethodSwizzler::InstanceMethodSwizzler):
1633         (InstanceMethodSwizzler::~InstanceMethodSwizzler):
1634
1635         Move these swizzling helper classes into TestRunnerShared.
1636
1637         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1638         * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:
1639         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
1640         (safeBrowsingView):
1641         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm:
1642         * TestWebKitAPI/cocoa/TestWKWebView.mm:
1643         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
1644
1645         Remove namespacing around ClassMethodSwizzler and InstanceMethodSwizzler in a few API tests.
1646
1647         * TestWebKitAPI/mac/TestFontOptions.mm:
1648         * WebKitTestRunner/TestController.h:
1649         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1650         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1651         (WTR::ClassMethodSwizzler::ClassMethodSwizzler): Deleted.
1652         (WTR::ClassMethodSwizzler::~ClassMethodSwizzler): Deleted.
1653
1654         Remove this duplicate implementation of ClassMethodSwizzler in WebKitTestRunner.
1655
1656 2018-12-05  Jonathan Bedard  <jbedard@apple.com>
1657
1658         webkitpy: Clean-up apple_additions
1659         https://bugs.webkit.org/show_bug.cgi?id=192413
1660         <rdar://problem/46493491>
1661
1662         Reviewed by Lucas Forschler.
1663
1664         After the addition of watchOS, some functions which were originally iOS specific were
1665         generalized to include all devices.
1666
1667         * Scripts/webkitpy/port/ios_device.py:
1668         (IOSDevicePort._driver_class): Replace iOS specific call with generalized device call.
1669         (IOSDevicePort.path_to_crash_logs): Ditto.
1670         (IOSDevicePort.clean_up_test_run): Ditto.
1671
1672 2018-12-05  Jonathan Bedard  <jbedard@apple.com>
1673
1674         webkitpy: Ignore case when comparing device types
1675         https://bugs.webkit.org/show_bug.cgi?id=192409
1676         <rdar://problem/46491558>
1677
1678         Reviewed by Lucas Forschler.
1679
1680         This allows DeviceTypes constructed with lowercase strings to correctly compare
1681         against DeviceTypes coming from the simulator runtime.
1682
1683         * Scripts/webkitpy/xcode/device_type.py:
1684         (DeviceType.__eq__):
1685         (DeviceType.__contains__):
1686         * Scripts/webkitpy/xcode/device_type_unittest.py:
1687         (DeviceTypeTest):
1688         (DeviceTypeTest.test_comparsion_lower_case):
1689
1690 2018-12-05  Jonathan Bedard  <jbedard@apple.com>
1691
1692         webkitpy: Sort tests by associated device type
1693         https://bugs.webkit.org/show_bug.cgi?id=192161
1694         <rdar://problem/46345392>
1695
1696         Reviewed by Lucas Forschler.
1697
1698         Sort tests by device type and make an effort to run each specified device type.
1699         Do not run tests if their specified device is not available.
1700
1701         * Scripts/webkitpy/common/system/platforminfo.py:
1702         (PlatformInfo.is_watchos): Add watchos bits to platform info.
1703         (PlatformInfo._determine_os_name): Ditto.
1704         * Scripts/webkitpy/layout_tests/controllers/manager.py:
1705         (Manager.run): Assign each test a device type. Then, generate a list of
1706         device types to sequentially iterate through. Note that a test will run
1707         on the first device which matches.
1708         (Manager._end_test_run): Handle the case where no devices are available and no
1709         tests are run.
1710         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
1711         (_set_up_derived_options): Manage child processes in manager.
1712         * Scripts/webkitpy/port/base.py:
1713         (Port):
1714         (Port.default_child_processes): Accept additional arguments.
1715         (Port.max_child_processes): Add upper limit for number of child processes.
1716         * Scripts/webkitpy/port/device_port.py:
1717         (DevicePort):
1718         (DevicePort._device_type_with_version): Adds version to the DeviceType.
1719         (DevicePort.default_child_processes): Allows default_child_processes to be
1720         attached to a device type.
1721         (DevicePort.max_child_processes): Add upper limit to the maximum number of child processes.
1722         (DevicePort.setup_test_run): Use _device_type_with_version.
1723         * Scripts/webkitpy/port/ios_device.py:
1724         (IOSDevicePort):
1725         (IOSDevicePort.default_child_processes): Deleted.
1726         * Scripts/webkitpy/port/ios_simulator.py:
1727         (IOSSimulatorPort.default_child_processes): Deleted.
1728         (IOSSimulatorPort.check_sys_deps): Deleted.
1729         * Scripts/webkitpy/port/mac.py:
1730         (MacPort.default_child_processes): Accept additional arguments.
1731         * Scripts/webkitpy/port/test.py:
1732         * Scripts/webkitpy/port/watch_device.py:
1733         (WatchDevicePort):
1734         (WatchDevicePort.default_child_processes): Deleted.
1735         * Scripts/webkitpy/port/watch_simulator.py:
1736         (WatchSimulatorPort.default_child_processes): Deleted.
1737         (WatchSimulatorPort.check_sys_deps): Deleted.
1738         * Scripts/webkitpy/xcode/simulated_device.py:
1739         (SimulatedDeviceManager):
1740         (SimulatedDeviceManager.device_count_for_type): Count the number of devices
1741         available for a specific device type.
1742
1743 2018-12-05  Devin Rousso  <drousso@apple.com>
1744
1745         Unreviewed, add myself to some watch lists.
1746
1747         * Scripts/webkitpy/common/config/watchlist:
1748
1749 2018-12-05  Alicia Boya García  <aboya@igalia.com>
1750
1751         [MSE][GStreamer] Remove the AppendPipeline state machine
1752         https://bugs.webkit.org/show_bug.cgi?id=192204
1753
1754         Reviewed by Xabier Rodriguez-Calvar.
1755
1756         Updated AbortableTaskQueue tests:
1757
1758         Added test: AbortedBySyncTaskHandler.
1759
1760         Renamed test: AbortDuringSyncTask -> AbortBeforeSyncTaskRun (in
1761         order to avoid confusion with the new test).
1762
1763         Added checks for the correct destruction of response objects.
1764
1765         * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp:
1766         (TestWebKitAPI::FancyResponse::FancyResponse):
1767         (TestWebKitAPI::FancyResponse::~FancyResponse):
1768         (TestWebKitAPI::TEST):
1769
1770 2018-12-04  Chris Dumez  <cdumez@apple.com>
1771
1772         ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
1773         https://bugs.webkit.org/show_bug.cgi?id=192362
1774
1775         Reviewed by Alex Christensen.
1776
1777         Set the cookie policy to Accept to make sure the cookies are saved.
1778
1779         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1780
1781 2018-12-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1782
1783         [WPE][GTK] Update GLib
1784         https://bugs.webkit.org/show_bug.cgi?id=191222
1785
1786         Reviewed by Žan Doberšek.
1787
1788         When I try running API tests locally, they crash with:
1789
1790         GLib-GIO-WARNING **: unknown schema extension 'd'
1791
1792         We need to update our old glib to support the 'd' value type, otherwise schemas that may
1793         exist on the host using this type will cause instant crashes.
1794
1795         Also, switch the GLib build to use meson. This requires updating meson as well.
1796
1797         * gtk/jhbuild.modules:
1798         * gtk/patches/glib-cast-function-type.patch: Removed.
1799         * gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch: Removed.
1800         * wpe/jhbuild.modules:
1801         * wpe/patches/glib-cast-function-type.patch: Removed.
1802         * wpe/patches/glib-revert-wakeup-changes.patch: Removed.
1803
1804 2018-12-04  Aakash Jain  <aakash_jain@apple.com>
1805
1806         [ews-app] Run BugzillaPatchFetcher periodically
1807         https://bugs.webkit.org/show_bug.cgi?id=192241
1808
1809         Reviewed by Lucas Forschler.
1810
1811         * BuildSlaveSupport/ews-app/ews/__init__.py:
1812         * BuildSlaveSupport/ews-app/ews/apps.py:
1813         (EwsConfig.ready): This method is called by Django on startup.
1814         * BuildSlaveSupport/ews-app/ews/fetcher.py:
1815         (FetchLoop): Class which invokes BugzillaPatchFetcher every 60s.
1816
1817 2018-12-04  Jonathan Bedard  <jbedard@apple.com>
1818
1819         webkitpy: Support unicode in MeteredStream
1820         https://bugs.webkit.org/show_bug.cgi?id=192260
1821
1822         Reviewed by Aakash Jain.
1823
1824         It's possible that the test runner returns unicode characters to be logged when
1825         running layout tests.
1826
1827         * Scripts/webkitpy/layout_tests/views/metered_stream.py:
1828         (MeteredStream.write): Print message without attempting to encode/decode it.
1829         * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
1830         (RegularTest.test_unicode):
1831
1832 2018-12-04  Keith Rollin  <krollin@apple.com>
1833
1834         Update scripts for generating .xcfilelist files
1835         https://bugs.webkit.org/show_bug.cgi?id=192081
1836         <rdar://problem/46312290>
1837
1838         Reviewed by Brent Fulgham.
1839
1840         The initial pass at generate-xcfilelists (a script for
1841         creating/updating the .xcfilelist files needed for various Generate
1842         Foo Source build phases in Xcode) only generated the .xcfilelist files
1843         that held the output files; it did not generate the list of input
1844         files. As well, for the sources generated by DerivedSources.make
1845         makefiles, the script accomplished this via the implementation of a
1846         convention in the makefile that allowed the printing of these output
1847         files when invoked with the 'print_all_generated_files' target. Use of
1848         this convention is inconvenient and error-prone.
1849
1850         The script is now updated to address both of these issues. First, it
1851         generates for the input and output sets of files. Second, it does away
1852         with the convention in the DerivedSources.make makefiles and instead
1853         works from the dependency output information printed when `make` is
1854         invoked with --debug. This second part is implemented in the new
1855         script extract-dependencies-from-makefile.
1856
1857         * Scripts/extract-dependencies-from-makefile: Added.
1858         (Parser):
1859         (Parser.__init__):
1860         (Parser.nextLine):
1861         (Parser.addTarget):
1862         (Parser.addPrereq):
1863         (Parser.doParse):
1864         (Parser.printInputs):
1865         (Parser.printOutputs):
1866         (parseArgs):
1867         (main):
1868         * Scripts/generate-xcfilelists:
1869
1870 2018-12-04  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1871
1872         [WPE] Add gtk-doc
1873         https://bugs.webkit.org/show_bug.cgi?id=178900
1874
1875         Reviewed by Michael Catanzaro.
1876
1877         Add gtk-doc to WPE port. This patch tries to reuse as much code from
1878         WebKitGTK+ as possible.
1879
1880         * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc.
1881         (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK.
1882         (prepare_environment_for_gtkdoc_generation):
1883         (build_gtkdoc_for_wpe): Code to generate doc for WPE.
1884         (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main.
1885         * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py.
1886         (GTKDoc.__init__): Initialized required variables according to pylint.
1887         (GTKDoc.api_missing_documentation):
1888         * wpe/install-dependencies: Add gtkdoc dependency.
1889
1890 2018-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1891
1892         [SOUP] Move URLSoup back to WebCore after r238771
1893         https://bugs.webkit.org/show_bug.cgi?id=192306
1894
1895         Reviewed by Michael Catanzaro.
1896
1897         Include GUniquePtrSoup from WebCore again.
1898
1899         * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
1900
1901 2018-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1902
1903         [GTK] Bump freetype, fontconfig, harfbuzz, cairo and icu in jhbuild
1904         https://bugs.webkit.org/show_bug.cgi?id=192310
1905
1906         Reviewed by Michael Catanzaro.
1907
1908         Update those dependencies to their latest stable versions.
1909
1910         * gtk/jhbuild.modules:
1911
1912 2018-12-03  Tomas Popela  <tpopela@redhat.com>
1913
1914         [GTK] Can't run MiniBrowser due to missing python2-yaml
1915         https://bugs.webkit.org/show_bug.cgi?id=192308
1916
1917         Reviewed by Michael Catanzaro.
1918
1919         * gtk/install-dependencies:
1920
1921 2018-12-03  Chris Dumez  <cdumez@apple.com>
1922
1923         Regression(PSON) Google OAuth is broken in private sessions
1924         https://bugs.webkit.org/show_bug.cgi?id=192337
1925         <rdar://problem/46353558>
1926
1927         Reviewed by Alex Christensen.
1928
1929         Add API test coverage.
1930
1931         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1932         * TestWebKitAPI/Tests/WebKitCocoa/GetSessionCookie.html: Added.
1933         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1934         * TestWebKitAPI/Tests/WebKitCocoa/SetSessionCookie.html: Added.
1935
1936 2018-12-03  Chris Dumez  <cdumez@apple.com>
1937
1938         [PSON] Request by the client to process-swap is ignored if the window has an opener
1939         https://bugs.webkit.org/show_bug.cgi?id=192267
1940         <rdar://problem/46386886>
1941
1942         Reviewed by Brady Eidson.
1943
1944         Add API test coverage.
1945
1946         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1947
1948 2018-12-03  Keith Rollin  <krollin@apple.com>
1949
1950         Add .xcfilelist files
1951         https://bugs.webkit.org/show_bug.cgi?id=192082
1952         <rdar://problem/46312533>
1953
1954         Reviewed by Brent Fulgham.
1955
1956         Add .xcfilelist files for Generate Derived Sources and Generate
1957         Unified Sources build phases in Xcode. These are just being staged for
1958         now; they'll be added to the Xcode projects later.
1959
1960         * DumpRenderTree/DerivedSources-input.xcfilelist: Added.
1961         * DumpRenderTree/DerivedSources-output.xcfilelist: Added.
1962         * WebKitTestRunner/DerivedSources-input.xcfilelist: Added.
1963         * WebKitTestRunner/DerivedSources-output.xcfilelist: Added.
1964
1965 2018-12-03  Alex Christensen  <achristensen@webkit.org>
1966
1967         Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a completion handler
1968         https://bugs.webkit.org/show_bug.cgi?id=192272
1969
1970         Reviewed by Brady Eidson.
1971
1972         * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm:
1973         (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:willStartProvisionalLoadForFrame:completionHandler:]):
1974         (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):
1975
1976 2018-12-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1977
1978         [iOSMac] Unable to upload non-image files using drag and drop in WKWebView
1979         https://bugs.webkit.org/show_bug.cgi?id=192283
1980         <rdar://problem/46399461>
1981
1982         Reviewed by Ryosuke Niwa.
1983
1984         Add a new API test to check that an item provider which contains plain text data and a file URL (but is not
1985         marked as an attachment) is still treated as an attachment upon drop. Furthermore, verify that "text/uri-list"
1986         does not expose the actual file URL written to the item provider.
1987
1988         Additionally, rebaseline an existing API test to remove an extraneous "text/uri-list" type that appears in
1989         `DataTransfer.types`, but whose data is inaccessible via `getData` anyways.
1990
1991         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
1992
1993 2018-12-01  Don Olmstead  <don.olmstead@sony.com>
1994
1995         Cleanup WebKit Features
1996         https://bugs.webkit.org/show_bug.cgi?id=192262
1997
1998         Reviewed by Michael Catanzaro.
1999
2000         Removes obsolete ENABLE options and variable names. Syncs the option's
2001         descriptions with what is present in WebKitFeatures.cmake. Sorts the
2002         options based on the associated define.
2003
2004         * Scripts/webkitperl/FeatureList.pm:
2005
2006 2018-12-01  Chris Dumez  <cdumez@apple.com>
2007
2008         [PSON] process-swapping may occur even though opener has handle to openee
2009         https://bugs.webkit.org/show_bug.cgi?id=192277
2010
2011         Reviewed by Antti Koivisto.
2012
2013         Add API test coverage.
2014
2015         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2016
2017 2018-12-01  Jonathan Bedard  <jbedard@apple.com>
2018
2019         Unreviewed, rolling out r238764.
2020
2021         Breaks existing layout tests
2022
2023         Reverted changeset:
2024
2025         "webkitpy: Support unicode in MeteredStream"
2026         https://bugs.webkit.org/show_bug.cgi?id=192260
2027         https://trac.webkit.org/changeset/238764
2028
2029 2018-12-01  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
2030
2031         Move URL tests from TestWebKitAPI to TestWTF
2032         https://bugs.webkit.org/show_bug.cgi?id=192275
2033
2034         Reviewed by Keith Miller.
2035
2036         Since URL is moved from WebCore to WTF, we also move tests for them from TestWebKitAPI (TestWebCore) to TestWTF.
2037         But we still have some tests in TestWebCore since only WebCore implements TextEncoding. That part is now decoupled
2038         from URLParser tests and new URLParserTextEncoding.cpp is created.
2039
2040         * TestWebKitAPI/CMakeLists.txt:
2041         * TestWebKitAPI/PlatformGTK.cmake:
2042         * TestWebKitAPI/PlatformWPE.cmake:
2043         * TestWebKitAPI/PlatformWin.cmake:
2044         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2045         * TestWebKitAPI/Tests/WTF/URL.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/URL.cpp.
2046         (TestWebKitAPI::TEST_F):
2047         * TestWebKitAPI/Tests/WTF/URLParser.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp.
2048         (TestWebKitAPI::TEST_F):
2049         * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm.
2050         (TestWebKitAPI::TEST):
2051         * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp: Added.
2052         (TestWebKitAPI::ExpectedParts::isInvalid const):
2053         (TestWebKitAPI::eq):
2054         (TestWebKitAPI::insertTabAtLocation):
2055         (TestWebKitAPI::invalidParts):
2056         (TestWebKitAPI::checkURL):
2057         (TestWebKitAPI::TEST_F):
2058
2059 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2060
2061         Unreviewed LFC passing test list update.
2062
2063         * LayoutReloaded/misc/LFC-passing-tests.txt:
2064
2065 2018-11-30  Alex Christensen  <achristensen@webkit.org>
2066
2067         Move URL from WebCore to WTF
2068         https://bugs.webkit.org/show_bug.cgi?id=190234
2069
2070         Reviewed by Keith Miller.
2071
2072         * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
2073         * TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
2074         * TestWebKitAPI/Tests/WebCore/URL.cpp:
2075         (TestWebKitAPI::createURL):
2076         (TestWebKitAPI::TEST_F):
2077         * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
2078         (TestWebKitAPI::checkURL):
2079         (TestWebKitAPI::checkRelativeURL):
2080         (TestWebKitAPI::checkURLDifferences):
2081         (TestWebKitAPI::checkRelativeURLDifferences):
2082         * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
2083         * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:
2084         * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
2085         (TestWebKitAPI::originalDataAsString):
2086         (TestWebKitAPI::userVisibleString):
2087         (TestWebKitAPI::literalURL):
2088         (TestWebKitAPI::TEST):
2089         * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
2090         (TEST):
2091         * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
2092         (literalURL):
2093         * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
2094         * TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
2095         (-[LoadInvalidURLWebFrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
2096         * TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm:
2097         * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
2098         (TestWebKitAPI::Util::createURLForResource):
2099         * lldb/lldb_webkit.py:
2100         (__lldb_init_module):
2101         (WTFURL_SummaryProvider):
2102         (WTFURLProvider):
2103         (WebCoreURL_SummaryProvider): Deleted.
2104         (WebCoreURLProvider): Deleted.
2105         (WebCoreURLProvider.__init__): Deleted.
2106         (WebCoreURLProvider.to_string): Deleted.
2107
2108 2018-11-30  Jonathan Bedard  <jbedard@apple.com>
2109
2110         webkitpy: Support unicode in MeteredStream
2111         https://bugs.webkit.org/show_bug.cgi?id=192260
2112
2113         Reviewed by Stephanie Lewis.
2114
2115         It's possible that the test runner returns unicode characters to be logged when
2116         running layout tests.
2117
2118         * Scripts/webkitpy/layout_tests/views/metered_stream.py:
2119         (MeteredStream.write): Message written to metered stream should be unicode.
2120         * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
2121         (RegularTest.test_unicode):
2122
2123 2018-11-30  Jonathan Bedard  <jbedard@apple.com>
2124
2125         REGRESSION (r238749): run-api-tests dies with AttributeError: 'IOSSimulatorPort' object has no attribute 'DEFAULT_DEVICE_CLASS'
2126         https://bugs.webkit.org/show_bug.cgi?id=192257
2127         <rdar://problem/46384671>
2128
2129         Reviewed by Stephanie Lewis.
2130
2131         Follow-up fix for r238749.
2132
2133         * Scripts/webkitpy/api_tests/manager.py:
2134         (Manager._initialize_devices): Use DEFAULT_DEVICE_TYPE instead of DEFAULT_DEVICE_CLASS.
2135
2136 2018-11-30  Chris Dumez  <cdumez@apple.com>
2137
2138         [PSON] We are sometimes swapping processes even though there is an opened window with an opener link to us
2139         https://bugs.webkit.org/show_bug.cgi?id=192242
2140
2141         Reviewed by Geoffrey Garen.
2142
2143         Add API test coverage.
2144
2145         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2146
2147 2018-11-30  Don Olmstead  <don.olmstead@sony.com>
2148
2149         Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
2150         https://bugs.webkit.org/show_bug.cgi?id=192197
2151
2152         Reviewed by Jiewen Tan.
2153
2154         * Scripts/webkitperl/FeatureList.pm:
2155         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2156
2157 2018-11-30  Dean Jackson  <dino@apple.com>
2158
2159         Add first-class support for .mjs files in jsc binary
2160         https://bugs.webkit.org/show_bug.cgi?id=192190
2161         <rdar://problem/46375715>
2162
2163         Reviewed by Keith Miller.
2164
2165         Add .mjs files to the regexp looking for all JS files.
2166
2167         * Scripts/run-jsc-stress-tests:
2168
2169 2018-11-30  Jonathan Bedard  <jbedard@apple.com>
2170
2171         webkitpy: Use DeviceType instead of str to represent device class
2172         https://bugs.webkit.org/show_bug.cgi?id=192160
2173         <rdar://problem/46344845>
2174
2175         Rubber-stamped by Aakash Jain.
2176
2177         * Scripts/webkitpy/layout_tests/controllers/manager.py:
2178         (Manager._custom_device_for_test): Use DeviceTypes instead of strings to represent device type.
2179         (Manager._set_up_run): Do not set _options.device_class, use device_type instead of device_class.
2180         (Manager.run): Use device_type instead of device_class.
2181         (Manager._print_expectations_for_subset): Ditto.
2182         (Manager.print_expectations): Ditto.
2183         * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
2184         (ManagerTest.test_uses_custom_device): Use DeviceType and actual device definition.
2185         * Scripts/webkitpy/layout_tests/views/printing.py:
2186         (Printer.print_workers_and_shards): Outputting the device suffix doesn't really help, and means
2187         device type needs to be passed around.
2188         * Scripts/webkitpy/port/apple.py:
2189         (ApplePort.setup_test_run): Use device_type instead of device_class.
2190         * Scripts/webkitpy/port/base.py:
2191         (Port):
2192         (Port.setup_test_run): Use device_type instead of device_class.
2193         * Scripts/webkitpy/port/device_port.py:
2194         (DevicePort):
2195         (DevicePort.setup_test_run): Receive device_type as DeviceType object.
2196         (DevicePort._create_devices): Deleted.
2197         * Scripts/webkitpy/port/gtk.py:
2198         (GtkPort.setup_test_run): Use device_type instead of device_class.
2199         * Scripts/webkitpy/port/ios.py:
2200         (IOSPort):
2201         * Scripts/webkitpy/port/ios_simulator.py:
2202         (IOSSimulatorPort):
2203         (IOSSimulatorPort.__init__): Deleted.
2204         (IOSSimulatorPort._set_device_class): Deleted.
2205         * Scripts/webkitpy/port/test.py:
2206         * Scripts/webkitpy/port/watch.py:
2207         (WatchPort):
2208         * Scripts/webkitpy/port/watch_simulator.py:
2209         (WatchSimulatorPort):
2210         (WatchSimulatorPort.__init__): Deleted.
2211         (WatchSimulatorPort._set_device_class): Deleted.
2212         * Scripts/webkitpy/port/win.py:
2213         (WinPort.setup_test_run): Use device_type instead of device_class.
2214         * Scripts/webkitpy/xcode/simulated_device.py:
2215         (SimulatedDeviceManager._disambiguate_device_type): Using the existing devices for this is
2216         a problem if no such device exists yet. Use the _device_identifier_to_name dictionary instead
2217         since this should have hardware types in the device names.
2218
2219 2018-11-30  David Quesada  <david_quesada@apple.com>
2220
2221         -[WKProcessPool _downloadURLRequest:] should allow specifying the initiating web view
2222         https://bugs.webkit.org/show_bug.cgi?id=192212
2223         rdar://problem/46363706
2224
2225         Reviewed by Alex Christensen.
2226
2227         * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
2228         (-[DownloadProgressTestRunner startDownload:expectedLength:]):
2229
2230 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2231
2232         [LFC][BFC] Compute min/maxHeight margins only when they are needed.
2233         https://bugs.webkit.org/show_bug.cgi?id=192223
2234
2235         Reviewed by Antti Koivisto.
2236
2237         * LayoutReloaded/misc/LFC-passing-tests.txt:
2238
2239 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2240
2241         [LFC][BFC][MarginCollapsing] Do not use computed display box values for border and padding
2242         https://bugs.webkit.org/show_bug.cgi?id=192214
2243
2244         Reviewed by Antti Koivisto.
2245
2246         * LayoutReloaded/misc/LFC-passing-tests.txt:
2247
2248 2018-11-30  Thibault Saunier  <tsaunier@igalia.com>
2249
2250         [GTK][MiniBrowser] Handle Device Info permission requests
2251         https://bugs.webkit.org/show_bug.cgi?id=191585
2252
2253         Reviewed by Carlos Garcia Campos.
2254
2255         * MiniBrowser/gtk/BrowserTab.c:
2256         (permissionRequestDataNew):
2257         (permissionRequestDataFree):
2258         (permissionRequestDialogResponse):
2259         (decidePermissionRequest):
2260         (browserTabConstructed):
2261
2262 2018-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2263
2264         Unreviewed GTK+ gardening. Stop running tests without complex text enforced
2265
2266         We have enforced complex text in GTK+ for one release cycle without noticing any major issue nor performance
2267         regression.
2268
2269         * WebKitTestRunner/gtk/main.cpp:
2270         (main):
2271
2272 2018-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2273
2274         REGRESSION (r238635): Dragging a text selection within WKWebView causes the selection highlight to get into a bad state
2275         https://bugs.webkit.org/show_bug.cgi?id=192165
2276         <rdar://problem/46346682>
2277
2278         Reviewed by Daniel Bates.
2279
2280         Fixes 11 API tests that started failing or timing out after r238635. See below for more details.
2281
2282         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
2283         (TestWebKitAPI::webViewForEditActionTesting):
2284         (TestWebKitAPI::webViewForEditActionTestingWithPageNamed):
2285
2286         Ensure that the web view becomes first responder before executing edit actions.
2287
2288         * TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
2289         * TestWebKitAPI/Tests/WebKitCocoa/contenteditable-and-textarea.html:
2290
2291         Tweak these tests to allow selected content to overflow the width of the web view. Without this change,
2292         ContentEditableToContentEditable and ContentEditableToTextarea will sometimes fail because the content causes
2293         the body to scroll horizontally, so we miss the drop destination.
2294
2295         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
2296         (loadTestPageAndEnsureInputSession):
2297
2298         Add a new helper to load a test page with a given name, become first responder, and wait until an input session
2299         starts. Use this in various drag and drop tests to reduce code duplication.
2300
2301         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2302         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2303         (-[DragAndDropSimulator initWithWebView:]):
2304         (-[DragAndDropSimulator _resetSimulatedState]):
2305         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
2306         (-[DragAndDropSimulator _advanceProgress]):
2307
2308         To more accurately emulate UIKit behavior, begin focus preservation when starting a drag, and attempt to clear
2309         the focus preservation token when the drag session ends. This allows us to simulate and test the scenario that
2310         regressed with r238635.
2311
2312         (-[DragAndDropSimulator ensureInputSession]):
2313         (-[DragAndDropSimulator _webView:didStartInputSession:]):
2314         (-[DragAndDropSimulator waitForInputSession]): Deleted.
2315
2316         Refactored into -ensureInputSession. Instead of assuming that an input session has not yet been started, simply
2317         wait for an input session to start if needed.
2318
2319         * TestWebKitAPI/ios/UIKitSPI.h:
2320
2321         Add a new SPI declaration.
2322
2323 2018-11-29  Tim Horton  <timothy_horton@apple.com>
2324
2325         Inform clients when editable image attachment backing data changes
2326         https://bugs.webkit.org/show_bug.cgi?id=192206
2327         <rdar://problem/46350277>
2328
2329         Reviewed by Wenson Hsieh.
2330
2331         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2332         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2333         (-[AttachmentUpdateObserver init]):
2334         (-[AttachmentUpdateObserver dataInvalidated]):
2335         (-[AttachmentUpdateObserver _webView:didInvalidateDataForAttachment:]):
2336         (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentInvalidation):
2337         (webViewForTestingAttachments):
2338         (TestWebKitAPI::forEachViewInHierarchy):
2339         (TestWebKitAPI::findEditableImageCanvas):
2340         (TestWebKitAPI::drawSquareInEditableImage):
2341         (TestWebKitAPI::TEST):
2342         * TestWebKitAPI/ios/PencilKitTestSPI.h: Added.
2343         Add a test ensuring that we get an invalidation callback when an editable image is changed.
2344
2345 2018-11-29  Fujii Hironori  <Hironori.Fujii@sony.com>
2346
2347         REGRESSION(r238445)[Buildbot] Unknown builder 'GTK Linux 32-bit Release' in scheduler 'trunk'
2348         https://bugs.webkit.org/show_bug.cgi?id=192143
2349
2350         Reviewed by Philippe Normand.
2351
2352         Buildbot can't start since r238445.
2353
2354         > Configuration Errors:
2355         >   Unknown builder 'GTK Linux 32-bit Release' in scheduler 'trunk'
2356         >   Unknown builder 'GTK Linux ARM Release' in scheduler 'trunk'
2357
2358         * BuildSlaveSupport/build.webkit.org-config/config.json: Removed deprecated builders.
2359
2360 2018-11-29  David Quesada  <david_quesada@apple.com>
2361
2362         Add SPI to publish NSProgress on active downloads
2363         https://bugs.webkit.org/show_bug.cgi?id=192021
2364         rdar://problem/44405661
2365
2366         Reviewed by Alex Christensen.
2367
2368         Add API tests to exercise the progress-publishing functionality in a variety of scenarios.
2369
2370         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2371         * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm: Added.
2372         (+[DownloadProgressTestProtocol registerProtocolForTestRunner:]):
2373         (+[DownloadProgressTestProtocol unregisterProtocol]):
2374         (+[DownloadProgressTestProtocol canInitWithRequest:]):
2375         (+[DownloadProgressTestProtocol canonicalRequestForRequest:]):
2376         (+[DownloadProgressTestProtocol requestIsCacheEquivalent:toRequest:]):
2377         (-[DownloadProgressTestProtocol startLoading]):
2378         (-[DownloadProgressTestProtocol stopLoading]):
2379         (-[DownloadProgressTestRunner init]):
2380         (-[DownloadProgressTestRunner startLoadingWithProtocol:]):
2381         (-[DownloadProgressTestRunner tearDown]):
2382         (-[DownloadProgressTestRunner _didGetProgress:]):
2383         (-[DownloadProgressTestRunner _didLoseProgress]):
2384         (-[DownloadProgressTestRunner subscribeAndWaitForProgress]):
2385         (-[DownloadProgressTestRunner waitToLoseProgress]):
2386         (-[DownloadProgressTestRunner startDownload:expectedLength:]):
2387         (-[DownloadProgressTestRunner publishProgress]):
2388         (-[DownloadProgressTestRunner receiveData:]):
2389         (-[DownloadProgressTestRunner finishDownloadTask]):
2390         (-[DownloadProgressTestRunner failDownloadTask]):
2391         (-[DownloadProgressTestRunner waitForDownloadDidCreateDestination]):
2392         (-[DownloadProgressTestRunner waitForDownloadFinished]):
2393         (-[DownloadProgressTestRunner waitForDownloadCanceled]):
2394         (-[DownloadProgressTestRunner waitForDownloadFailed]):
2395         (-[DownloadProgressTestRunner waitForUpdatedCompletedUnitCount]):
2396         (-[DownloadProgressTestRunner observeValueForKeyPath:ofObject:change:context:]):
2397         (-[DownloadProgressTestRunner webView:decidePolicyForNavigationResponse:decisionHandler:]):
2398         (-[DownloadProgressTestRunner webView:decidePolicyForNavigationAction:decisionHandler:]):
2399         (-[DownloadProgressTestRunner _downloadDidStart:]):
2400         (-[DownloadProgressTestRunner _download:didCreateDestination:]):
2401         (-[DownloadProgressTestRunner _downloadDidFinish:]):
2402         (-[DownloadProgressTestRunner _downloadDidCancel:]):
2403         (-[DownloadProgressTestRunner _download:didFailWithError:]):
2404         (-[DownloadProgressTestRunner _download:decideDestinationWithSuggestedFilename:completionHandler:]):
2405         (TEST):
2406
2407 2018-11-29  Alexey Proskuryakov  <ap@apple.com>
2408
2409         Exception in bot watcher's dashboard if a hidden platform in no longer configured for display
2410         https://bugs.webkit.org/show_bug.cgi?id=185527
2411
2412         Reviewed by Aakash Jain.
2413
2414         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
2415         (updateHiddenPlatforms):
2416
2417 2018-11-29  Zalan Bujtas  <zalan@apple.com>
2418
2419         [LFC][BFC][Quirk] Body and html height stretching.
2420         https://bugs.webkit.org/show_bug.cgi?id=192154
2421
2422         Reviewed by Antti Koivisto.
2423
2424         * LayoutReloaded/misc/LFC-passing-tests.txt:
2425
2426 2018-11-29  Jonathan Bedard  <jbedard@apple.com>
2427
2428         webkitpy: Unify device creation
2429         https://bugs.webkit.org/show_bug.cgi?id=192158
2430         <rdar://problem/46344757>
2431
2432         Reviewed by Lucas Forschler.
2433
2434         * Scripts/webkitpy/port/device_port.py:
2435         (DevicePort):
2436         (DevicePort.setup_test_run): Use DEVICE_MANAGER to create devices based on the specified device class.
2437         * Scripts/webkitpy/port/ios.py:
2438         (IOSPort): Add DEFAULT_DEVICE_CLASS.
2439         * Scripts/webkitpy/port/ios_device.py:
2440         (IOSDevicePort):
2441         (IOSDevicePort._create_devices): Deleted.
2442         * Scripts/webkitpy/port/ios_simulator.py:
2443         (IOSSimulatorPort._create_devices): Deleted.
2444         * Scripts/webkitpy/port/watch.py:
2445         (WatchPort): Add DEFAULT_DEVICE_CLASS.
2446         * Scripts/webkitpy/port/watch_device.py:
2447         (WatchDevicePort):
2448         (WatchDevicePort._create_devices): Deleted.
2449         * Scripts/webkitpy/port/watch_simulator.py:
2450         (WatchSimulatorPort._create_devices): Deleted.
2451         * Scripts/webkitpy/xcode/device_type_unittest.py:
2452         (DeviceTypeTest.test_from_string): Test that DeviceTypes without hardware types can be constructed
2453         from strings.
2454
2455 2018-11-29  Jonathan Bedard  <jbedard@apple.com>
2456
2457         EWS iOS-sim bots sometimes fails to shutdown simulator
2458         https://bugs.webkit.org/show_bug.cgi?id=191864
2459
2460         Reviewed by Aakash Jain.
2461
2462         * Scripts/webkitpy/xcode/simulated_device.py:
2463         (SimulatedDevice._shut_down): Increase time to wait for simulated device to
2464         shut down, ignore exit code indicating a device is already shut down.
2465
2466 2018-11-29  Jonathan Bedard  <jbedard@apple.com>
2467
2468         webkitpy: Unify ios_version/watchos_version code
2469         https://bugs.webkit.org/show_bug.cgi?id=192153
2470         <rdar://problem/46343642>
2471
2472         Reviewed by Lucas Forschler.
2473
2474         Treating watchOS and iOS versions differently makes it harder to share code between the similar ports.
2475
2476         * Scripts/webkitpy/port/device_port.py:
2477         (DevicePort):
2478         (DevicePort.device_version): Added.
2479         * Scripts/webkitpy/port/ios.py:
2480         (IOSPort.default_baseline_search_path): Use device_version() instead of ios_version().
2481         (IOSPort.ios_version): Deleted.
2482         * Scripts/webkitpy/port/ios_device.py:
2483         (IOSDevicePort.device_version): Renamed from ios_version().
2484         (IOSDevicePort.ios_version): Deleted.
2485         * Scripts/webkitpy/port/ios_simulator.py:
2486         (IOSSimulatorPort.device_version): Renamed from ios_version().
2487         (IOSSimulatorPort.default_child_processes.booted_ios_devices_filter): Use device_version() instead of ios_version().
2488         (IOSSimulatorPort._create_devices): Ditto.
2489         (IOSSimulatorPort.check_sys_deps): Ditto.
2490         (IOSSimulatorPort.ios_version): Deleted.
2491         * Scripts/webkitpy/port/watch.py:
2492         (WatchPort.default_baseline_search_path): Use device_version() instead of watchos_version().
2493         (WatchPort.watchos_version): Deleted.
2494         * Scripts/webkitpy/port/watch_device.py:
2495         (WatchDevicePort.device_version): Renamed from watchos_version().
2496         (WatchDevicePort.watchos_version): Deleted.
2497         * Scripts/webkitpy/port/watch_simulator.py:
2498         (WatchSimulatorPort.device_version): Renamed from watchos_version().
2499         (WatchSimulatorPort.default_child_processes.filter_booted_watchos_devices): Use device_version() instead of watchos_version().
2500         (WatchSimulatorPort._create_devices): Ditto.
2501         (WatchSimulatorPort.check_sys_deps): Ditto.
2502         (WatchSimulatorPort.watchos_version): Deleted.
2503
2504 2018-11-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2505
2506         [iOSMac] Dropping text selections from web content into editable elements crashes the web process
2507         https://bugs.webkit.org/show_bug.cgi?id=192113
2508         <rdar://problem/46323701>
2509
2510         Reviewed by Ryosuke Niwa.
2511
2512         Add a test to verify that, when dropping an item with both "com.apple.webarchive" and "public.utf8-plain-text"
2513         representations, the higher fidelity web archive data is used when handling the drop.
2514
2515         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
2516
2517 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2518
2519         [ews-app] Fetch bugs from Bugzilla and submit to Buildbot
2520         https://bugs.webkit.org/show_bug.cgi?id=191947
2521
2522         Reviewed by Lucas Forschler.
2523
2524         * BuildSlaveSupport/ews-app/ews/fetcher.py: Added.
2525
2526 2018-11-28  Alex Christensen  <achristensen@webkit.org>
2527
2528         Fix iOS API test after r238585
2529         https://bugs.webkit.org/show_bug.cgi?id=192022
2530
2531         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
2532         (TEST):
2533         On iOS, a safe browsing warning over a WKWebView with frame of {0, 0, 0, 0} has a size of {0, 0}, which is fine.
2534         The test was added to catch a bug on Mac platforms, so testing it only on Mac will catch any regression.
2535
2536 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2537
2538         [ews-app] Configure python logging
2539         https://bugs.webkit.org/show_bug.cgi?id=192005
2540
2541         Reviewed by Lucas Forschler.
2542
2543         * BuildSlaveSupport/ews-app/ews/__init__.py: Configured logging.
2544
2545 2018-11-28  Keith Rollin  <krollin@apple.com>
2546
2547         Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files
2548         https://bugs.webkit.org/show_bug.cgi?id=192031
2549         <rdar://problem/46286816>
2550
2551         Reviewed by Alex Christensen.
2552
2553         The Generate Derived Sources and Generate Unified Sources build phases
2554         in Xcode need to have their inputs and outputs specified. This
2555         specification will come in the form of .xcfilelist files that will be
2556         attached to these build phases. There is one .xcfilelist file that
2557         lists the input file and one that lists the output files. As part of
2558         this work, the various generate-{derived,unified}-sources scripts that
2559         are executed in these Generate build phases are modified to help in
2560         the creation of these .xcfilelist files. In particular, they can now
2561         be invoked with command-line parameters. These parameters are then
2562         used to alter the normal execution of these scripts, causing them to
2563         produce the .xcfilelist files as opposed to actually generating the
2564         files that are listed in those files.
2565
2566         * DumpRenderTree/Scripts/generate-derived-sources.sh:
2567         * WebKitTestRunner/Scripts/generate-derived-sources.sh:
2568
2569 2018-11-28  Keith Rollin  <krollin@apple.com>
2570
2571         Revert print_all_generated_files work in r238008; tighten up target specifications
2572         https://bugs.webkit.org/show_bug.cgi?id=192025
2573         <rdar://problem/46284301>
2574
2575         Reviewed by Alex Christensen.
2576
2577         In r238008, I added a facility for DerivedSources.make makefiles to
2578         print out the list of files that they generate. This output was used
2579         in the generation of .xcfilelist files used to specify the output of
2580         the associated Generate Derived Sources build phases in Xcode. This
2581         approach worked, but it meant that people would need to follow a
2582         specific convention to keep this mechanism working.
2583
2584         Instead of continuing this approach, I'm going to implement a new
2585         facility based on the output of `make` when passed the -d flag (which
2586         prints dependency information). This new mechanism is completely
2587         automatic and doesn't need maintainers to follow a convention. To that
2588         end, remove most of the work performed in r238008 that supports the
2589         print_all_generated_files target.
2590
2591         At the same time, it's important for the sets of targets and their
2592         dependencies to be complete and correct. Therefore, also include
2593         changes to bring those up-to-date. As part of that, you'll see
2594         prevalent use of a particular technique. Here's an example:
2595
2596             BYTECODE_FILES = \
2597                 Bytecodes.h \
2598                 BytecodeIndices.h \
2599                 BytecodeStructs.h \
2600                 InitBytecodes.asm \
2601             #
2602             BYTECODE_FILES_PATTERNS = $(subst .,%,$(BYTECODE_FILES))
2603
2604             all : $(BYTECODE_FILES)
2605
2606             $(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaScriptCore)/bytecode/BytecodeList.rb
2607                 ...
2608
2609         These lines indicate a set of generated files (those specified in
2610         BYTECODE_FILES). These files are generated by the BytecodeList.rb
2611         tool. But, as opposed to the normal rule where a single foo.output is
2612         generated by foo.input plus some additional dependencies, this rule
2613         produces multiple output files from a tool whose connection to the
2614         output files is not immediately clear. A special approach is needed
2615         where a single rule produces multiple output files. The normal way to
2616         implement this is to use an .INTERMEDIATE target. However, we used
2617         this approach in the past and ran into a problem with it, addressing
2618         it with an alternate approach in r210507. The above example shows this
2619         approach. The .'s in the list of target files are replaced with %'s,
2620         and the result is used as the left side of the dependency rule.
2621
2622         * DumpRenderTree/DerivedSources.make:
2623         * WebKitTestRunner/DerivedSources.make:
2624
2625 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2626
2627         [ews-app] Add support to get list of Bugzilla patches needing review
2628         https://bugs.webkit.org/show_bug.cgi?id=191942
2629
2630         Reviewed by Lucas Forschler.
2631
2632         * BuildSlaveSupport/ews-app/ews/common/bugzilla.py:
2633         (Bugzilla.get_list_of_patches_needing_reviews): Get list of patches needing review.
2634         (BugzillaBeautifulSoup.fetch_attachment_ids_from_review_queue): Copied from Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
2635         (BugzillaBeautifulSoup._load_query): Ditto.
2636         (BugzillaBeautifulSoup._parse_attachment_ids_request_query): Ditto.
2637
2638 2018-11-28  Daniel Bates  <dabates@apple.com>
2639
2640         [iOS] Page not defocused when Find-in-page becomes first responder
2641         https://bugs.webkit.org/show_bug.cgi?id=192084
2642         <rdar://problem/46146777>
2643
2644         Reviewed by Tim Horton.
2645
2646         Add tests for both Mac and iOS to ensure that when finding a string on the page
2647         that we do not start an input session if a match is found in an <input> and the
2648         WKWebView is not the first responder.
2649
2650         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2651         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm: Added.
2652         (-[WKWebViewFindStringInputDelegate _webView:didStartInputSession:]):
2653         (-[WKWebViewFindStringFindDelegate findString]):
2654         (-[WKWebViewFindStringFindDelegate _webView:didCountMatches:forString:]):
2655         (-[WKWebViewFindStringFindDelegate _webView:didFindMatches:forString:withMatchIndex:]):
2656         (-[WKWebViewFindStringFindDelegate _webView:didFailToFindString:]):
2657         (returnNo):
2658         (returnYes):
2659         (viewIsFirstResponder):
2660         (TestWebKitAPI::TEST):
2661         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
2662         (WTR::PlatformWebView::PlatformWebView): Make the view the first responder before the
2663         window key. This matches the ordering used in PlatformWebView::focus(). No behavior change.
2664
2665 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2666
2667         [ews-app] Add BeautifulSoup
2668         https://bugs.webkit.org/show_bug.cgi?id=191994
2669
2670         Reviewed by Lucas Forschler.
2671
2672         * BuildSlaveSupport/ews-app/ews/thirdparty: Added.
2673         * BuildSlaveSupport/ews-app/ews/thirdparty/BeautifulSoup.py: Added.
2674         * BuildSlaveSupport/ews-app/ews/thirdparty/__init__.py: Added.
2675
2676 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2677
2678         [ews-app] Add support to download Patch from Bugzilla
2679         https://bugs.webkit.org/show_bug.cgi?id=191943
2680
2681         Reviewed by Lucas Forschler.
2682
2683         * BuildSlaveSupport/ews-app/ews/common/bugzilla.py: Added.
2684         (Bugzilla.retrieve_attachment): Retreives the attachment from Bugzilla and saves to disk.
2685         (Bugzilla._fetch_attachment_json):
2686         (Bugzilla.file_path_for_patch):
2687         * BuildSlaveSupport/ews-app/ews/common/util.py: Added.
2688         (fetch_data_from_url): Method to fetch data from given url.
2689         * BuildSlaveSupport/ews-app/ews/config.py:
2690
2691 2018-11-28  Aakash Jain  <aakash_jain@apple.com>
2692
2693         [ews-app] Add methods to update Patch fields
2694         https://bugs.webkit.org/show_bug.cgi?id=191931
2695
2696         Reviewed by Lucas Forschler.
2697
2698         * BuildSlaveSupport/ews-app/ews/models/patch.py:
2699         (Patch.set_sent_to_buildbot):
2700         (Patch.set_bug_id):
2701         (Patch.set_obsolete):
2702
2703 2018-11-28  Yongjun Zhang  <yongjun_zhang@apple.com>
2704
2705         Allow WebKit clients to specify a minimum effective width for layout.
2706         https://bugs.webkit.org/show_bug.cgi?id=191499
2707         <rdar://problem/45362678>
2708
2709         Reviewed by Wenson Hsieh.
2710
2711         Allow UIScriptController to set WKWebView's minimum effective width with a new `setMinimumEffectiveWidth` method.
2712
2713         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
2714         (WTR::UIScriptController::setMinimumEffectiveWidth):
2715         * DumpRenderTree/mac/UIScriptControllerMac.mm:
2716         (WTR::UIScriptController::setViewScale):
2717         (WTR::UIScriptController::setMinimumEffectiveWidth):
2718         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
2719         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
2720         (WTR::UIScriptController::setMinimumEffectiveWidth):
2721         * TestRunnerShared/UIScriptContext/UIScriptController.h:
2722         * WebKitTestRunner/UIScriptControllerCocoa.mm:
2723         (WTR::UIScriptController::setMinimumEffectiveWidth):
2724         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2725         (WTR::TestController::cocoaResetStateToConsistentValues):
2726
2727 2018-11-28  Lucas Forschler  <lforschler@apple.com>
2728
2729         Fix webkitbot hi command.
2730         https://bugs.webkit.org/show_bug.cgi?id=192080
2731
2732         Reviewed by Alexey Proskuryakov.
2733
2734         * Scripts/webkitpy/tool/bot/irc_command.py:
2735         (Hi.execute):
2736
2737 2018-11-28  Zalan Bujtas  <zalan@apple.com>
2738
2739         [LFC][Quirk] Use non-collapsed vertical margin values when the container is stretched to the size of the ICB.
2740         https://bugs.webkit.org/show_bug.cgi?id=192078
2741
2742         Reviewed by Antti Koivisto.
2743
2744         * LayoutReloaded/misc/LFC-passing-tests.txt:
2745
2746 2018-11-28  Zalan Bujtas  <zalan@apple.com>
2747
2748         [LFC] Add support for quirk container's collapsing top margin in quirks mode.
2749         https://bugs.webkit.org/show_bug.cgi?id=192070
2750
2751         Reviewed by Antti Koivisto.
2752
2753         * LayoutReloaded/misc/LFC-passing-tests.txt:
2754
2755 2018-11-28  Thibault Saunier  <tsaunier@igalia.com>
2756
2757         [WebRTC][GStreamer] Make sure to have the default microphone on the top of the list
2758         https://bugs.webkit.org/show_bug.cgi?id=192026
2759
2760         Reviewed by Philippe Normand.
2761
2762         Otherwise we might end up picking a useless one in some applications
2763         (not sure what those application do though).
2764
2765         GStreamer patch proposed as https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/34/diffs
2766
2767         * flatpak/org.webkit.CommonModules.yaml:
2768         * gstreamer/jhbuild.modules:
2769         * gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch: Added.
2770
2771 2018-11-28  Tomas Popela  <tpopela@redhat.com>
2772
2773         [GTK] Silence compilation warnings in glib unittests
2774         https://bugs.webkit.org/show_bug.cgi?id=192009
2775
2776         Reviewed by Michael Catanzaro.
2777
2778         Mark the destructor as virtual.
2779
2780         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
2781         (Test::~Test):
2782
2783 2018-11-27  Mark Lam  <mark.lam@apple.com>
2784
2785         ENABLE_FAST_JIT_PERMISSIONS should be false for iosmac.
2786         https://bugs.webkit.org/show_bug.cgi?id=192055
2787         <rdar://problem/46288783>
2788
2789         Reviewed by Saam Barati.
2790
2791         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2792
2793 2018-11-27  Alex Christensen  <achristensen@webkit.org>
2794
2795         Make synchronous IPC introduced in r237267 asynchronous
2796         https://bugs.webkit.org/show_bug.cgi?id=190757
2797
2798         Reviewed by Chris Dumez.
2799
2800         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2801
2802 2018-11-27  Jonathan Bedard  <jbedard@apple.com>
2803
2804         webkitpy: Add watchOS ports
2805         https://bugs.webkit.org/show_bug.cgi?id=191974
2806         <rdar://problem/46251051>
2807
2808         Reviewed by Aakash Jain.
2809
2810         * Scripts/webkitpy/port/factory.py:
2811         (PortFactory): Add WatchDevice and WatchSimulator ports.
2812         * Scripts/webkitpy/port/watch.py: Added.
2813         (WatchPort): Base class for watchOS ports.
2814         * Scripts/webkitpy/port/watch_device.py: Added.
2815         (WatchDevicePort): Class for running layout tests on a watchOS device.
2816         * Scripts/webkitpy/port/watch_simulator.py: Added.
2817         (WatchSimulatorPort): Class for running layout tests on a watchOS simulator.
2818         * Scripts/webkitpy/port/watch_simulator_unittest.py: Added.
2819         (WatchSimulatorTest):
2820         * Scripts/webkitpy/port/watch_testcase.py: Added.
2821         (WatchTest):
2822
2823 2018-11-27  Alex Christensen  <achristensen@webkit.org>
2824
2825         Safe browsing warning text needs to be visible on High Sierra
2826         https://bugs.webkit.org/show_bug.cgi?id=192022
2827
2828         Reviewed by Tim Horton.
2829
2830         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
2831         (TEST):
2832
2833 2018-11-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2834
2835         Unreviewed, fix the watchOS engineering build
2836
2837         Disable a newly added API test, since DDScannerResult is unavailable on watchOS.
2838
2839         * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
2840
2841 2018-11-27  Chris Dumez  <cdumez@apple.com>
2842
2843         Regression(PSON) crash under WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame()
2844         https://bugs.webkit.org/show_bug.cgi?id=191983
2845         <rdar://problem/46246863>
2846
2847         Reviewed by Geoffrey Garen.
2848
2849         Add API test coverage.
2850
2851         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2852
2853 2018-11-27  Aakash Jain  <aakash_jain@apple.com>
2854
2855         [ews-app] Add support to communicate with Buildbot (Follow-up fix)
2856         https://bugs.webkit.org/show_bug.cgi?id=191935
2857         <rdar://problem/46262314>
2858
2859         Unreviewed infrastructure fix.
2860
2861         * BuildSlaveSupport/ews-app/ews/common/buildbot.py:
2862         (Buildbot.send_patch_to_buildbot):
2863
2864 2018-11-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2865
2866         [Cocoa] No way for clients to tell whether the content view is in the responder chain when the web view is
2867         https://bugs.webkit.org/show_bug.cgi?id=169212
2868         <rdar://problem/30899656>
2869
2870         Reviewed by Tim Horton.
2871
2872         Add an API test to exercise the behavior of `-_contentViewIsFirstResponder` when an embedded text input becomes
2873         and resigns first responder.
2874
2875         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2876         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm: Added.
2877         (-[FirstResponderTestingView initWithFrame:]):
2878         (-[FirstResponderTestingView inputField]):
2879         (TestWebKitAPI::TEST):
2880
2881 2018-11-26  Fujii Hironori  <Hironori.Fujii@sony.com>
2882
2883         [CMake] Remove ENABLE_ACCESSIBILITY CMake variable
2884         https://bugs.webkit.org/show_bug.cgi?id=191831
2885
2886         Reviewed by Michael Catanzaro.
2887
2888         * WebKitTestRunner/CMakeLists.txt:
2889
2890 2018-11-26  Tim Horton  <timothy_horton@apple.com>
2891
2892         Insert <attachment> elements under editable images to make their backing data accessible
2893         https://bugs.webkit.org/show_bug.cgi?id=191844
2894         <rdar://problem/30900149>
2895
2896         Reviewed by Simon Fraser.
2897
2898         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
2899         (WTR::UIScriptController::attachmentInfo):
2900         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
2901         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
2902         (WTR::UIScriptController::attachmentInfo):
2903         * TestRunnerShared/UIScriptContext/UIScriptController.h:
2904         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
2905         (WTR::UIScriptController::attachmentInfo):
2906         Add a UIScriptController mechanism to retrieve information about
2907         a given attachment.
2908
2909 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
2910
2911         [ews-app] Add support to communicate with Buildbot
2912         https://bugs.webkit.org/show_bug.cgi?id=191935
2913
2914         Reviewed by Lucas Forschler.
2915
2916         * BuildSlaveSupport/ews-app/ews/common/__init__.py: Added.
2917         * BuildSlaveSupport/ews-app/ews/common/buildbot.py: Added.
2918
2919 2018-11-26  Jonathan Bedard  <jbedard@apple.com>
2920
2921         webkitpy: Race condition in ServerProcess tests
2922         https://bugs.webkit.org/show_bug.cgi?id=191989
2923         <rdar://problem/45536844>
2924
2925         Reviewed by Lucas Forschler.
2926
2927         Serializing these tests to prevent the race conditions.
2928
2929         * Scripts/webkitpy/port/server_process_unittest.py:
2930         (TestServerProcess.serial_test_basic):
2931         (TestServerProcess.serial_test_read_after_process_exits):
2932         (TestServerProcess.serial_test_process_crashing):
2933         (TestServerProcess.serial_test_process_crashing_no_data):
2934         (TestServerProcess.test_basic): Deleted.
2935         (TestServerProcess.test_read_after_process_exits): Deleted.
2936         (TestServerProcess.test_process_crashing): Deleted.
2937         (TestServerProcess.test_process_crashing_no_data): Deleted.
2938
2939 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
2940
2941         [ews-app] Add field in Patch object to indicate if it has been sent to Buildbot
2942         https://bugs.webkit.org/show_bug.cgi?id=191929
2943
2944         Reviewed by Lucas Forschler.
2945
2946         * BuildSlaveSupport/ews-app/ews/models/patch.py:
2947         (Patch): Added sent_to_buildbot field.
2948         (Patch.is_patch_sent_to_buildbot): Checks if the patch has been sent to Buildbot.
2949
2950 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
2951
2952         [ews-app] Add a config file
2953         https://bugs.webkit.org/show_bug.cgi?id=191933
2954
2955         Reviewed by Lucas Forschler.
2956
2957         * BuildSlaveSupport/ews-app/ews/config.py: Added.
2958
2959 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
2960
2961         [ews-app] Add methods to save patch to database
2962         https://bugs.webkit.org/show_bug.cgi?id=191928
2963
2964         Reviewed by Lucas Forschler.
2965
2966         * BuildSlaveSupport/ews-app/ews/models/patch.py:
2967         (Patch.save_patch): Method to save the patch to database.
2968         (Patch.save_patches): Method to save multiple patches to database.
2969         (Patch.is_valid_patch_id): Checks if the patch id is valid.
2970         (Patch.is_existing_patch_id): Checks if the patch id already exists in database.
2971
2972 2018-11-26  Alex Christensen  <achristensen@webkit.org>
2973
2974         Rename WKWebView._safeBrowsingWarningForTesting to _safeBrowsingWarning to use it for more than testing
2975         https://bugs.webkit.org/show_bug.cgi?id=191981
2976
2977         Reviewed by Tim Horton.
2978
2979         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
2980         (TEST):
2981         (safeBrowsingView):
2982
2983 2018-11-26  Daniel Bates  <dabates@apple.com>
2984
2985         REGRESSION (r237738): Command Down Arrow doesn't scroll to the end of a page anymore
2986         https://bugs.webkit.org/show_bug.cgi?id=191967
2987         <rdar://problem/45976390>
2988
2989         Reviewed by Tim Horton.
2990
2991         Add more test infrastructure to dispatch key up events.
2992
2993         * WebKitTestRunner/ios/HIDEventGenerator.h:
2994         * WebKitTestRunner/ios/HIDEventGenerator.mm:
2995         (createHIDKeyEvent): Renamed from createHIDKeyDownEvent() and modified to take a boolean as
2996         to whether to create an event for a key down or key up.
2997         (createHIDKeyDownEvent): Deleted; renamed to createHIDKeyEvent().
2998         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
2999         (WTR::createUIPhysicalKeyboardEvent): Added. Convenience function to create a UIPhysicalKeyboardEvent.
3000         (WTR::UIScriptController::keyDown): Modified to dispatch a key up event in addition to dispatching
3001         a key down event.
3002
3003 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
3004
3005         [ews-app] Set Foreign Keys in EWS Django app models
3006         https://bugs.webkit.org/show_bug.cgi?id=191790
3007
3008         Reviewed by Lucas Forschler.
3009
3010         * BuildSlaveSupport/ews-app/ews/models/builds.py: Set Foreign Key.
3011         * BuildSlaveSupport/ews-app/ews/models/steps.py: Ditto.
3012
3013 2018-11-26  Aakash Jain  <aakash_jain@apple.com>
3014
3015         [ews-app] Do not store patch content in database
3016         https://bugs.webkit.org/show_bug.cgi?id=191788
3017
3018         Reviewed by Lucas Forschler.
3019
3020         * BuildSlaveSupport/ews-app/ews/models/patch.py: Removed content field.
3021
3022 2018-11-26  Jonathan Bedard  <jbedard@apple.com>
3023
3024         webkitpy: Retry app installation on watchOS simulators (Follow-up fix)
3025         https://bugs.webkit.org/show_bug.cgi?id=191769
3026         <rdar://problem/46139850>
3027
3028         Unreviewed infrastructure fix.
3029
3030         * Scripts/webkitpy/xcode/simulated_device.py:
3031         (SimulatedDevice): Increase retry attempts.
3032
3033 2018-11-26  Daniel Bates  <dabates@apple.com>
3034
3035         Move testRunner.toggleCapsLock() to uiController
3036         https://bugs.webkit.org/show_bug.cgi?id=191972
3037
3038         Reviewed by Tim Horton.
3039
3040         Move testRunner.toggleCapsLock() to uiController as uiController is the preferred JavaScript
3041         object for UI test functions. Having this functionality be on uiController makes it an
3042         asynchronous function naturally and complements use of onkeydown, onkeyup listeners to know
3043         when the Caps Lock key event is dispatched. It also facilitates its use directly as part of
3044         scripts with other uiController functions invocations that are passed in a single invocation
3045         of testRunner.runUIScript().
3046
3047         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3048         (WTR::UIScriptController::toggleCapsLock):
3049         * DumpRenderTree/mac/UIScriptControllerMac.mm:
3050         (WTR::UIScriptController::toggleCapsLock):
3051         Added stub functions that invoke the callback. We do not support toggling caps lock in Legacy
3052         WebKit at the moment. Legacy WebKit reads the caps lock key state directly from the OS. Modern
3053         WebKit caches the caps lock state in the WebProcess as a natural side effect of the fact that
3054         the UIProcess is the only process capable of querying the caps lock key state from the OS and
3055         hence the UIProcess must send over this state to the WebProcess.
3056
3057         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Add IDL for new function.
3058         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3059         (WTR::UIScriptController::toggleCapsLock): Added empty implementation for ports non-Cocoa ports.
3060         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3061
3062         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3063         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3064         (WTR::TestRunner::toggleCapsLock): Deleted.
3065         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3066         * WebKitTestRunner/TestController.h:
3067         * WebKitTestRunner/TestInvocation.cpp:
3068         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3069         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
3070         (WTR::TestController::toggleCapsLock): Deleted; moved to UIScriptController::toggleCapsLock().
3071         Removed logic to handle testRunner.toggleCapsLock().
3072
3073         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3074         (WTR::UIScriptController::toggleCapsLock): Add stub function that invokes the callback
3075         and a FIXME comment that explains that we will implement this function in <https://bugs.webkit.org/show_bug.cgi?id=191815>.
3076         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
3077         (WTR::UIScriptController::toggleCapsLock): Moved the implementation from TestController::toggleCapsLock().
3078
3079 2018-11-26  Brent Fulgham  <bfulgham@apple.com>
3080
3081         [Win] Reduce the use of WKSI library calls: CoreAnimation
3082         https://bugs.webkit.org/show_bug.cgi?id=191777
3083         <rdar://problem/46140542>
3084
3085         Reviewed by Zalan Bujtas.
3086
3087         Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
3088         Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
3089         directives for WebKitSystemInterface.lib.
3090
3091         * TestWebKitAPI/PlatformWin.cmake:
3092
3093 2018-11-25  Zalan Bujtas  <zalan@apple.com>
3094
3095         [LFC][IFC] Use float box's margin box to adjust the line constraints.
3096         https://bugs.webkit.org/show_bug.cgi?id=191961
3097
3098         Reviewed by Antti Koivisto.
3099
3100         * LayoutReloaded/misc/LFC-passing-tests.txt:
3101
3102 2018-11-25  Zalan Bujtas  <zalan@apple.com>
3103
3104         Unreviewed test fix after r238467.
3105
3106         * TestWebKitAPI/Tests/WTF/ListHashSet.cpp:
3107         (TestWebKitAPI::TEST):
3108
3109 2018-11-25  Wenson Hsieh  <wenson_hsieh@apple.com>
3110
3111         Unreviewed, fix the internal iOS 12 build after r238471
3112
3113         * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
3114         (TEST):
3115
3116 2018-11-25  Tim Horton  <timothy_horton@apple.com>
3117
3118         Make it possible to insert editable images with a gesture
3119         https://bugs.webkit.org/show_bug.cgi?id=191937
3120
3121         Reviewed by Wenson Hsieh.
3122
3123         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3124         (WTR::UIScriptController::drawSquareInEditableImage):
3125         If the canvas already has a drawing, draw a new stroke on top of it
3126         instead of removing the existing stroke.
3127
3128 2018-11-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3129
3130         [Cocoa] Add WKWebView SPI to trigger and remove data detection
3131         https://bugs.webkit.org/show_bug.cgi?id=191918
3132         <rdar://problem/36185051>
3133
3134         Reviewed by Tim Horton.
3135
3136         Add an API test to exercise the new WebKit SPI.
3137
3138         * TestWebKitAPI/DataDetectorsCoreSPI.h: Added.
3139         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3140         * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
3141         (-[WKWebView synchronouslyDetectDataWithTypes:]):
3142         (-[WKWebView synchronouslyRemoveDataDetectedLinks]):
3143         (TEST):
3144         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3145         (TestWebKitAPI::TEST):
3146         (-[TestWKWebView tagsInBody]): Deleted.
3147         (-[TestWKWebView expectElementTagsInOrder:]): Deleted.
3148         (-[TestWKWebView expectElementCount:tagName:]): Deleted.
3149         (-[TestWKWebView expectElementTag:toComeBefore:]): Deleted.
3150
3151         Rename this from `-expectElementCount:tagName:` to `-expectElementCount:querySelector:`.
3152
3153         * TestWebKitAPI/Tests/WebKitCocoa/data-detectors.html: Added.
3154
3155         Add a new test page containing some content that can be data detected.
3156
3157         * TestWebKitAPI/cocoa/TestWKWebView.h:
3158         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3159         (-[WKWebView tagsInBody]):
3160         (-[WKWebView expectElementTagsInOrder:]):
3161         (-[WKWebView expectElementCount:querySelector:]):
3162         (-[WKWebView expectElementTag:toComeBefore:]):
3163
3164         Move some testing helper functions from WKAttachmentTests to a testing category on WKWebView. This allows us to
3165         use `-expectElementCount:querySelector:` in tests outside of WKAttachmentTests.
3166
3167         (-[WKWebView objectByEvaluatingJavaScript:]):
3168         (-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
3169         (-[WKWebView stringByEvaluatingJavaScript:]):
3170
3171         Move some common helper functions from TestWKWebView to a testing category on WKWebView.
3172
3173         (-[TestWKWebView objectByEvaluatingJavaScript:]): Deleted.
3174         (-[TestWKWebView objectByEvaluatingJavaScriptWithUserGesture:]): Deleted.
3175         (-[TestWKWebView stringByEvaluatingJavaScript:]): Deleted.
3176
3177 2018-11-23  Sam Weinig  <sam@webkit.org>
3178
3179         Add raw pointer overloads to ListHashSet via SmartPtr specialized functions
3180         https://bugs.webkit.org/show_bug.cgi?id=191936
3181
3182         Reviewed by Zalan Bujtas.
3183
3184         Adds tests for raw pointer overloads in ListHashSet.
3185
3186         * TestWebKitAPI/Tests/WTF/HashSet.cpp:
3187         * TestWebKitAPI/Tests/WTF/ListHashSet.cpp:
3188
3189 2018-11-23  Wenson Hsieh  <wenson_hsieh@apple.com>
3190
3191         Enable drag and drop support for iOSMac
3192         https://bugs.webkit.org/show_bug.cgi?id=191818
3193         <rdar://problem/43907454>
3194
3195         Reviewed by Dean Jackson.
3196
3197         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3198
3199 2018-11-23  Zalan Bujtas  <zalan@apple.com>
3200
3201         [LFC][IFC] Add support for variable height runs.
3202         https://bugs.webkit.org/show_bug.cgi?id=191925
3203
3204         Reviewed by Antti Koivisto.
3205
3206         * LayoutReloaded/misc/LFC-passing-tests.txt:
3207
3208 2018-11-23  Alberto Garcia  <berto@igalia.com>
3209
3210         [GTK] [WPE] Tools/Platform{GTK,WPE}.cmake files missing from the tarballs
3211         https://bugs.webkit.org/show_bug.cgi?id=191923
3212
3213         Add Tools/PlatformGTK.cmake and Tools/PlatformWPE.cmake to their
3214         respective tarballs.
3215
3216         Reviewed by Carlos Garcia Campos.
3217
3218         * gtk/manifest.txt.in:
3219         * wpe/manifest.txt.in:
3220
3221 2018-11-22  Chris Dumez  <cdumez@apple.com>
3222
3223         Regression(r238353) Load sometimes hangs when navigating back after a cross-site navigation
3224         https://bugs.webkit.org/show_bug.cgi?id=191914
3225
3226         Reviewed by Ryosuke Niwa.
3227
3228         Add API test coverage.
3229
3230         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3231
3232 2018-11-22  Zalan Bujtas  <zalan@apple.com>
3233
3234         [LFC][IFC] Offset formatting context root runs with horizontal margins.
3235         https://bugs.webkit.org/show_bug.cgi?id=191900
3236
3237         Reviewed by Antti Koivisto.
3238
3239         * LayoutReloaded/misc/LFC-passing-tests.txt:
3240
3241 2018-11-22  Philippe Normand  <pnormand@igalia.com>
3242
3243         [GTK] Remove unmaintained bots
3244         https://bugs.webkit.org/show_bug.cgi?id=191467
3245
3246         Reviewed by Alex Christensen.
3247
3248         The Linux 32-bits and ARM build-slaves are no longer maintained
3249         and have been failing for months, so get rid of them.
3250
3251         * BuildSlaveSupport/build.webkit.org-config/config.json:
3252         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
3253         (WebKitBuildbot):
3254         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
3255
3256 2018-11-22  Thibault Saunier  <tsaunier@igalia.com>
3257
3258         [Flatpak] Do not disable signals when running "usual" commands
3259         https://bugs.webkit.org/show_bug.cgi?id=190679
3260
3261         Reviewed by Philippe Normand.
3262
3263         Otherwise <ctr>c doesn't work while compiling. It is not the best fix
3264         as there are cases we want to let only children receive signals, but
3265         it is not clear how to determine when (when running gdb, we still
3266         disable those).
3267
3268         * flatpak/flatpakutils.py:
3269         (WebkitFlatpak.run_in_sandbox):
3270
3271 2018-11-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3272
3273         [Cocoa] [WebKit2] Add support for replacing find-in-page text matches
3274         https://bugs.webkit.org/show_bug.cgi?id=191786
3275         <rdar://problem/45813871>
3276
3277         Reviewed by Ryosuke Niwa.
3278
3279         * MiniBrowser/mac/WK2BrowserWindowController.m:
3280         (-[WK2BrowserWindowController setFindBarView:]):
3281
3282         Fix a bug in MiniBrowser that prevents AppKit from displaying the "All" button in the find bar after checking
3283         the "Replace" option.
3284
3285         * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
3286
3287         Add an API test to exercise find-and-replace API using WKWebView.
3288
3289         (replaceMatches):
3290         (TEST):
3291         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3292         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3293         (WTR::findOptionsFromArray):
3294         (WTR::TestRunner::findString):
3295         (WTR::TestRunner::findStringMatchesInPage):
3296         (WTR::TestRunner::replaceFindMatchesAtIndices):
3297
3298         Add TestRunner hooks to simulate find-in-page and replace.
3299
3300         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3301
3302 2018-11-21  Zalan Bujtas  <zalan@apple.com>
3303
3304         [LFC][IFC] Horizontal margins should be considered as non-breakable space
3305         https://bugs.webkit.org/show_bug.cgi?id=191894
3306
3307         Reviewed by Antti Koivisto.
3308
3309         * LayoutReloaded/misc/LFC-passing-tests.txt:
3310
3311 2018-11-21  Zalan Bujtas  <zalan@apple.com>
3312
3313         [LFC][IFC] Border should be considered as non-breakable space
3314         https://bugs.webkit.org/show_bug.cgi?id=191891
3315
3316         Reviewed by Antti Koivisto.
3317
3318         * LayoutReloaded/misc/LFC-passing-tests.txt:
3319
3320 2018-11-21  Zalan Bujtas  <zalan@apple.com>
3321
3322         [LFC][IFC] Take nonBreakableStart/End into use.
3323         https://bugs.webkit.org/show_bug.cgi?id=191873
3324
3325         Reviewed by Antti Koivisto.
3326
3327         * LayoutReloaded/misc/LFC-passing-tests.txt:
3328
3329 2018-11-20  Jeff Miller  <jeffm@apple.com>
3330
3331         Return nullptr immediately if the key doesn't exist in the HashMap.
3332         https://bugs.webkit.org/show_bug.cgi?id=191841
3333
3334         Reviewed by Chris Dumez.
3335         
3336         Add a test that would crash prior to the fix for this bug.
3337
3338         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3339         * TestWebKitAPI/Tests/WebKitCocoa/WKNSDictionaryEmptyDictionaryCrash.mm: Added.
3340         (TestWebKitAPI::TEST):
3341
3342 2018-11-19  Alex Christensen  <achristensen@webkit.org>
3343
3344         Add SPI to disable JIT in a WKWebView
3345         https://bugs.webkit.org/show_bug.cgi?id=191822
3346         <rdar://problem/28119360>
3347
3348         Reviewed by Geoffrey Garen.
3349
3350         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3351         * TestWebKitAPI/Tests/WebKitCocoa/DisableJIT.mm: Added.
3352         (TEST):
3353
3354 2018-11-19  Basuke Suzuki  <basuke.suzuki@sony.com>
3355
3356         [Curl] Add API for CertificateInfo.
3357         https://bugs.webkit.org/show_bug.cgi?id=191647
3358
3359         Reviewed by Alex Christensen.
3360
3361         Added test for new WKCertificateInfo API.
3362
3363         * TestWebKitAPI/PlatformWin.cmake:
3364         * TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp: Added.
3365         (TestWebKitAPI::Curl::makeCertificateInfo):
3366         (TestWebKitAPI::Curl::isSamePEM):
3367         (TestWebKitAPI::Curl::TEST):
3368
3369 2018-11-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3370
3371         Unreviewed, fix the internal iOS debug build after r238380
3372
3373         UICalloutBar should only be declared when the public (non-internal) SDK is used to build WebKit; otherwise, we
3374         end up with duplicate declarations of UICalloutBar.
3375
3376         * TestWebKitAPI/ios/UIKitSPI.h:
3377
3378 2018-11-19  David Quesada  <david_quesada@apple.com>
3379
3380         EXC_BAD_ACCESS when invoking a DownloadProxy's destination decision handler after the download has been canceled
3381         https://bugs.webkit.org/show_bug.cgi?id=191762
3382         rdar://problem/46151509
3383
3384         Reviewed by Dean Jackson.
3385
3386         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
3387             Enable the Download API test on iOS, since the platform supports downloads. All the
3388             tests pass already, except for one which was written using AppKit-specific code:
3389         TEST(_WKDownload, RedirectedDownload):
3390             Use a more platform-agnostic approach to starting the download in this API test.
3391             Instead of manually triggering an NSMenu item to download a file from a link, the
3392             test will simulate a user-initiated click on the link, and the navigation delegate
3393             will direct the web view to start a download based on the link's navigation action.
3394             Additionally, remove the manual creation of a new NSWindow. TestWKWebView makes its
3395             own UI/NSWindow.
3396         TEST(_WKDownload, DownloadCanceledWhileDecidingDestination):
3397             Add an API test _WKDownload.DownloadCanceledWhileDecidingDestination to simulate the
3398             conditions that would trigger this crash - handling a download's -decideDestination…
3399             delegate call by canceling the download, waiting for the UI process to be notified
3400             that the download has been canceled, and calling the decision handler. This should
3401             not crash.
3402         (-[CancelDownloadWhileDecidingDestinationDelegate _downloadDidFinish:]):
3403         (-[CancelDownloadWhileDecidingDestinationDelegate _download:didFailWithError:]):
3404         (-[CancelDownloadWhileDecidingDestinationDelegate _downloadDidCancel:]):
3405         (-[CancelDownloadWhileDecidingDestinationDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
3406         (-[UIDownloadAsFileTestDelegate _webView:contextMenu:forElement:]): Deleted.
3407         * TestWebKitAPI/cocoa/TestWKWebView.h:
3408         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3409         (-[TestWKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
3410             Add a user-initated version of -objectByEvaluatingJavaScript:. This is needed in
3411             order to maintain the behavior of the RedirectedDownload test, which verifies the
3412             state of the _WKDownload.wasUserInitiated property.
3413
3414 2018-11-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3415
3416         [iOS Debug] Assertion failure in NSComparisonResult UIContentSizeCategoryCompareToCategory()
3417         https://bugs.webkit.org/show_bug.cgi?id=190401
3418         <rdar://problem/45195285>
3419
3420         Reviewed by Dean Jackson.
3421
3422         Work around sporadic UIKit assertions when running API tests that may present a UICalloutBar. Currently, UIKit
3423         asks for the `UIApp`’s `-preferredContentSizeCategory` when showing or laying out the callout bar. However,
3424         TestWebKitAPI lacks a UIApp altogether, and forcing one to be initialized via `UIApplicationInstantiateSingleton`
3425         causes numerous other UIKit and WebKit assertions to be hit.
3426
3427         In lieu of TestWebKitAPI becoming a real UI application (see https://webkit.org/b/175204), simply don't allow
3428         the callout bar to be initialized in TestWKWebView-based API tests. This encompasses all API tests which
3429         have some chance of causing the callout bar to be shown by making a ranged text selections during the test.
3430
3431         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3432         (suppressUICalloutBar):
3433         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
3434         * TestWebKitAPI/ios/UIKitSPI.h:
3435
3436 2018-11-19  Fujii Hironori  <Hironori.Fujii@sony.com>
3437
3438         REGRESSION(r238016)[GTK][TestWebKitAPI][Ninja] TestJSC can't compile "Bytecodes.h: No such file or directory"
3439         https://bugs.webkit.org/show_bug.cgi?id=191692
3440
3441         Reviewed by Michael Catanzaro.
3442
3443         r238016 added a new #include, and requires JSC's derived headers
3444         to be copied into the forwarding header directory.
3445
3446         WEBKIT_MAKE_FORWARDING_HEADERS is using POST_BUILD event to copy
3447         derived headers to the forwarding header directory. This is done
3448         after linking JSC library.
3449
3450         GTK port has TestJSC which has a dependency to JSC static library.
3451         And, this dependency is a link time dependency which means
3452         compiling source files of TestJSC starts before the POST_BUILD
3453         event of JSC. Thus, required header can't be found.
3454
3455         Add an intermediate target between TestJSC and JavaScriptCore to
3456         ensure derived headers are copied into the forwarding header
3457         directory.
3458
3459         * TestWebKitAPI/PlatformGTK.cmake: Added a new custom target pre-TestJSC.
3460         * TestWebKitAPI/PlatformWPE.cmake: Ditto.
3461
3462 2018-11-19  Alejandro G. Castro  <alex@igalia.com>
3463
3464         [GTK][WPE] Solve some issues in the enumerateDevices code
3465         https://bugs.webkit.org/show_bug.cgi?id=191832
3466
3467         Reviewed by Carlos Garcia Campos.
3468
3469         * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
3470         (serverCallback): Make all the Strings with HTML code static.
3471         (testWebsiteDataDeviceIdHashSalt): Change the webView settings in
3472         the test.
3473         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
3474         (WebViewTest::initializeWebView): Remove the initialization of the
3475         webView settings, we now do it in the specific test.
3476
3477 2018-11-18  Chris Dumez  <cdumez@apple.com>
3478
3479         [PSON] Received an invalid message "WebPageProxy.DidPerformClientRedirect" from the web process
3480         https://bugs.webkit.org/show_bug.cgi?id=191828
3481
3482         Reviewed by Antti Koivisto.
3483
3484         Add API test coverage.
3485
3486         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3487         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3488         * TestWebKitAPI/Tests/WebKitCocoa/client-side-redirect.html: Added.
3489
3490 2018-11-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3491
3492         [iOS] Remove all usages of UIItemProvider, UIItemProviderReading, and related classes
3493         https://bugs.webkit.org/show_bug.cgi?id=191819
3494
3495         Reviewed by Dan Bernstein.
3496
3497         Replace UIItemProvider (and related classes) with NSItemProvider.
3498
3499         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3500         (platformCopyPNG):
3501         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3502         (-[NSItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
3503
3504         Replace usages of this deprecated method with `-registerDataRepresentationForTypeIdentifier:visibility:loadHandler:`.
3505
3506         (checkEstimatedSize):
3507         (checkSuggestedNameAndEstimatedSize):
3508         (TestWebKitAPI::TEST):
3509         (-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]): Deleted.
3510         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
3511         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
3512         (-[MockDragDropSession canLoadObjectsOfClass:]):
3513         (-[MockDragDropSession canLoadObjectsOfClasses:]):
3514         (-[MockDropSession initWithProviders:location:window:allowMove:]):
3515         (-[MockDropSession canCreateItemsOfClass:]):
3516         (-[DragAndDropSimulator _advanceProgress]):
3517         (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
3518         (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
3519         * TestWebKitAPI/ios/UIKitSPI.h:
3520
3521 2018-11-17  Chris Dumez  <cdumez@apple.com>
3522
3523         ASSERTION FAILED: m_messageReceivers.contains(...) under ViewGestureController removeMessageReceiver
3524         https://bugs.webkit.org/show_bug.cgi?id=191734
3525         <rdar://problem/46151497>
3526
3527         Reviewed by Ryosuke Niwa.
3528
3529         Add API test coverage.
3530
3531         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3532
3533 2018-11-17  Zalan Bujtas  <zalan@apple.com>
3534
3535         [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
3536         https://bugs.webkit.org/show_bug.cgi?id=191801
3537
3538         Reviewed by Antti Koivisto.
3539
3540         * LayoutReloaded/misc/LFC-passing-tests.txt:
3541
3542 2018-11-17  Jer Noble  <jer.noble@apple.com>
3543
3544         Regression(r233865): Causes synchronous IPC in the middle of layout
3545         https://bugs.webkit.org/show_bug.cgi?id=188307
3546         <rdar://problem/42807306>
3547
3548         Reviewed by Eric Carlson.
3549
3550         Follow-up test fix for r238322:
3551
3552         In ExitFullscreenOnEnterPiP.ElementFullScreen, explicitly make the video
3553         element in element fullscreen the "main content" by playing the video during
3554         a user gesture; only "main content" videos will cause fullscreen mode to exit
3555         when that element is taken into PiP.
3556
3557         In FullscreenZoomInitialFrame.WebKit, the WebView is not visible, so the Page
3558         is considered hidden, and fullscreen is not allowed when the WebView is hidden.
3559         Make the WebView visible by ordering the test window on-screen.
3560
3561         * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html:
3562         * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
3563         (TestWebKitAPI::TEST):
3564         * TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:
3565         (TestWebKitAPI::FullscreenZoomInitialFrame::runTest):
3566
3567 2018-11-16  Alex Christensen  <achristensen@webkit.org>
3568
3569         Tweak _showSafeBrowsingWarningWithTitle SPI
3570         https://bugs.webkit.org/show_bug.cgi?id=191799
3571
3572         Reviewed by Wenson Hsieh.
3573
3574         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3575         (TEST):
3576
3577 2018-11-16  Ryosuke Niwa  <rniwa@webkit.org>
3578
3579         REGRESSION (r238294): TestWebKitAPI.WKNavigation.ProcessCrashDuringCallback failing on iOS
3580         https://bugs.webkit.org/show_bug.cgi?id=191783
3581
3582         Reviewed by Chris Dumez.
3583
3584         Allow either WKErrorWebContentProcessTerminated or WKErrorWebViewInvalidated since the test
3585         is closing WebView, thereby invalidating the view, which is racing with the process termination.
3586
3587         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
3588         (TEST):
3589
3590 2018-11-16  Chris Dumez  <cdumez@apple.com>
3591
3592         ProcessSwap.DisableForInspector API test is failing
3593         https://bugs.webkit.org/show_bug.cgi?id=191798
3594
3595         Reviewed by Joseph Pecoraro.
3596
3597         We support process swapping when Web Inspector is shown now so update the
3598         API test accordingly.
3599
3600         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3601
3602 2018-11-16  Ryan Haddad  <ryanhaddad@apple.com>
3603
3604         Update buildbot dashboard after Windows 7/10 updates
3605         https://bugs.webkit.org/show_bug.cgi?id=191219
3606
3607         Reviewed by Alexey Proskuryakov.
3608
3609         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
3610         (BubbleQueueServer):
3611         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
3612         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
3613         (WebKitBuildbot):
3614         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
3615         (table.queue-grid tr.platform td.logo::before):
3616         (table.queue-grid tr.platform.windows-10 td.logo::before):
3617         (table.queue-grid tr.platform.wincairo-windows-10 td.logo::before):
3618         (table.queue-grid tr.platform.windows-7 td.logo::before):
3619         (table.queue-grid tr.platform.wincairo-windows-10 img.logo):
3620
3621 2018-11-16  Chris Dumez  <cdumez@apple.com>
3622
3623         Regression(PSON) WebKit.GeolocationTransitionToHighAccuracy API test is timing out
3624         https://bugs.webkit.org/show_bug.cgi?id=191789
3625
3626         Reviewed by Alex Christensen.
3627
3628         Relate the 2 test pages so they use the same process since WKContextSetMaximumNumberOfProcesses()
3629         SPI no longer works with PSON / Process prewarming.
3630
3631         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
3632         (TestWebKitAPI::TEST):
3633
3634 2018-11-16  Jonathan Bedard  <jbedard@apple.com>
3635
3636         webkitpy: Retry app installation on watchOS simulators
3637         https://bugs.webkit.org/show_bug.cgi?id=191769
3638         <rdar://problem/46139850>
3639
3640         Reviewed by Aakash Jain.
3641
3642         * Scripts/webkitpy/xcode/simulated_device.py:
3643         (SimulatedDevice.install_app): Retry app installations.
3644
3645 2018-11-16  Zalan Bujtas  <zalan@apple.com>
3646
3647         Add DidFirstMeaningfulPaint milestone.
3648         https://bugs.webkit.org/show_bug.cgi?id=191754
3649
3650         Reviewed by Simon Fraser.
3651
3652         * TestWebKitAPI/CMakeLists.txt:
3653         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3654         * TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp: Added.
3655         (TestWebKitAPI::didReachMilestone):
3656         (TestWebKitAPI::setPageLoaderClient):
3657         (TestWebKitAPI::TEST):
3658         * TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp: Copied from Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h.
3659         (TestWebKitAPI::FirstMeaningfulPaintMilestoneTest::FirstMeaningfulPaintMilestoneTest):
3660         (TestWebKitAPI::FirstMeaningfulPaintMilestoneTest::didCreatePage):
3661
3662 2018-11-16  Takashi Komori  <Takashi.Komori@sony.com>
3663
3664         [WinCairo][WebKitTestRunner] Test contents window is displayed while testing.
3665         https://bugs.webkit.org/show_bug.cgi?id=191593
3666
3667         Reviewed by Alex Christensen.
3668
3669         Hide TestRunner window and taskbar button.
3670
3671         * WebKitTestRunner/win/PlatformWebViewWin.cpp:
3672         (WTR::PlatformWebView::PlatformWebView):
3673         (WTR::PlatformWebView::windowSnapshotImage):
3674
3675 2018-11-16  Alex Christensen  <achristensen@webkit.org>
3676
3677         Add API to disable safe browsing checks
3678         https://bugs.webkit.org/show_bug.cgi?id=191610
3679
3680         Reviewed by Dean Jackson.
3681
3682         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3683         (resourceURL):
3684         (TEST):
3685         (safeBrowsingView):
3686         (simpleURL): Deleted.
3687
3688 2018-11-16  Zalan Bujtas  <zalan@apple.com>
3689
3690         [LFC][IFC] Add support for out-of-flow positioned boxes
3691         https://bugs.webkit.org/show_bug.cgi?id=191726
3692
3693         Reviewed by Antti Koivisto.
3694
3695         * LayoutReloaded/misc/LFC-passing-tests.txt:
3696
3697 2018-11-15  Myles C. Maxfield  <mmaxfield@apple.com>
3698
3699         WKPreferencesSetFontSmoothingLevel doesn't actually do anything
3700         https://bugs.webkit.org/show_bug.cgi?id=191708
3701
3702         Reviewed by Simon Fraser.
3703
3704         Delete the symbol because no one calls it and it doesn't do anything
3705
3706         * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
3707         (TestWebKitAPI::TEST):
3708         * WebKitTestRunner/TestController.cpp:
3709         (WTR::TestController::resetPreferencesToConsistentValues):
3710
3711 2018-11-15  Truitt Savell  <tsavell@apple.com>
3712
3713         Unreviewed, rolling out r238244.
3714
3715         Caused High Sierra test runs to fail early with 50 crashes and
3716         casued 25 API failures.
3717
3718         Reverted changeset:
3719
3720         "[css-logical] Implement flow-relative margin, padding and
3721         border shorthands"
3722         https://bugs.webkit.org/show_bug.cgi?id=188697
3723         https://trac.webkit.org/changeset/238244
3724
3725 2018-11-15  Aakash Jain  <aakash_jain@apple.com>
3726
3727         Increase EWS lock timeout to 3 hours
3728         https://bugs.webkit.org/show_bug.cgi?id=191705
3729
3730         Reviewed by Alexey Proskuryakov.
3731
3732         * QueueStatusServer/config/queues.py: Increased EWS lock timeout to 3 hours.
3733
3734 2018-11-15  Chris Dumez  <cdumez@apple.com>
3735
3736         IndexedDB.IndexedDBTempFileSize API test times out with process prewarming enabled
3737         https://bugs.webkit.org/show_bug.cgi?id=191671
3738         <rdar://problem/46086062>
3739
3740         Reviewed by Alex Christensen.
3741
3742         Add API test coverage.
3743
3744         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3745         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
3746         (TEST):
3747
3748 2018-11-15  Oriol Brufau  <obrufau@igalia.com>
3749
3750         [css-logical] Implement flow-relative margin, padding and border shorthands
3751         https://bugs.webkit.org/show_bug.cgi?id=188697
3752
3753         Reviewed by Simon Fraser and Antti Koivisto.
3754
3755         * DumpRenderTree/TestOptions.cpp:
3756         (TestOptions::TestOptions):
3757         * DumpRenderTree/TestOptions.h:
3758         * DumpRenderTree/mac/DumpRenderTree.mm:
3759         (setWebPreferencesForTestOptions):
3760         Allow tests to enable the CSSLogicalEnabled flag in WK1.
3761
3762         * Scripts/webkitpy/style/checkers/jsonchecker.py:
3763         (JSONCSSPropertiesChecker.check_codegen_properties):
3764         Allow CSS property definitions to have a 'runtime-flag' parameter which
3765         disables the property when the specified runtime flag is disabled.
3766
3767 2018-11-15  Timothy Hatcher  <timothy@apple.com>
3768
3769         REGRESSION (r238212): WebKit.BackgroundColor* API test failures.
3770         https://bugs.webkit.org/show_bug.cgi?id=191697
3771         rdar://problem/46098570
3772
3773         Reviewed by Dean Jackson.
3774
3775         * TestWebKitAPI/Tests/mac/BackgroundColor.mm:
3776         (TestWebKitAPI::TEST): Updated for new default background color.
3777
3778 2018-11-15  Jonathan Bedard  <jbedard@apple.com>
3779
3780         webkitpy: Check for specific process instead of using data migrator (Follow-up fix)
3781         https://bugs.webkit.org/show_bug.cgi?id=191551
3782         <rdar://problem/45993156>
3783
3784         Reviewed by Aakash Jain.
3785
3786         * Scripts/webkitpy/xcode/simulated_device.py:
3787         (SimulatedDevice.is_usable): Use software_variant instead of software_version for watchOS.
3788
3789 2018-11-15  Daniel Bates  <dabates@apple.com>
3790
3791         [iOS] Shift + Tab does not focus previous field
3792         https://bugs.webkit.org/show_bug.cgi?id=191596
3793         <rdar://problem/45892053>
3794
3795         Reviewed by Wenson Hsieh.
3796
3797         Add infrastructure to support testing a key down event with modifiers by creating
3798         and dispatching a UIEvent. This infrastructure replaces the previous mechanism in
3799         Tools/WebKitTestRunner/ios/HIDEventGenerator.mm to generate a IOHIDEvent for a
3800         keydown as it did not support creating an event with modifier key state that would
3801         be recognized by UIKit.
3802
3803         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3804         (WTR::UIScriptController::keyDown):
3805         (WTR::UIScriptController::keyDownUsingHardwareKeyboard): Deleted.
3806         (WTR::UIScriptController::keyUpUsingHardwareKeyboard): Deleted.
3807         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3808         Add function uiController.keyDown() that takes a character that represents a keyboard key
3809         and an array of modifier keys. The behavior of this function is analogous to eventSender.keyDown().
3810         Remove functions uiController.keyDownUsingHardwareKeyboard() and uiController.keyUpUsingHardwareKeyboard()
3811         as the former is replaced by uiController.keyDown() and the latter was never used.
3812
3813         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3814         (WTR::UIScriptController::keyDown): Added.
3815         (WTR::UIScriptController::keyUpUsingHardwareKeyboard): Deleted.
3816         (WTR::UIScriptController::keyDownUsingHardwareKeyboard): Deleted.
3817         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3818         * WebKitTestRunner/ios/HIDEventGenerator.h:
3819         * WebKitTestRunner/ios/HIDEventGenerator.mm:
3820         (createHIDKeyDownEvent): Added.
3821         (-[HIDEventGenerator keyDown:completionBlock:]): Deleted.
3822         (-[HIDEventGenerator keyUp:completionBlock:]): Deleted.
3823         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3824         (WTR::arrayLength): Added.
3825         (WTR::parseModifier): Added.
3826         (WTR::parseModifierArray): Added.
3827         (WTR::UIScriptController::keyDown):
3828         (WTR::UIScriptController::keyDownUsingHardwareKeyboard): Deleted.
3829         (WTR::UIScriptController::keyUpUsingHardwareKeyboard): Deleted.
3830
3831 2018-11-15  Keith Rollin  <krollin@apple.com>
3832
3833         Delete old .xcfilelist files
3834         https://bugs.webkit.org/show_bug.cgi?id=191669
3835         <rdar://problem/46081994>
3836
3837         Reviewed by Chris Dumez.
3838
3839         .xcfilelist files were created and added to the Xcode project files in
3840         https://trac.webkit.org/changeset/238008/webkit. However, they caused
3841         build issues and they were removed from the Xcode projects in
3842         https://trac.webkit.org/changeset/238055/webkit. This check-in removes
3843         the files from the repository altogether. They'll ultimately be
3844         replaced with new files with names that indicate whether the
3845         associated files are inputs to the Run Script phase or are files
3846         created by the Run Script phase.
3847
3848         * DumpRenderTree/DerivedSources.xcfilelist: Removed.
3849         * WebKitTestRunner/DerivedSources.xcfilelist: Removed.
3850
3851 2018-11-14  Zalan Butjas  <zalan@apple.com>
3852
3853         [LFC][IFC] Add support for in-flow positioned inline boxes.
3854         https://bugs.webkit.org/show_bug.cgi?id=191672
3855
3856         Reviewed by Antti Koivisto.
3857
3858         * LayoutReloaded/misc/LFC-passing-tests.txt:
3859
3860 2018-11-14  Keith Rollin  <krollin@apple.com>
3861
3862         Move scripts for Derived and Unified Sources to external files
3863         https://bugs.webkit.org/show_bug.cgi?id=191670
3864         <rdar://problem/46082278>
3865
3866         Reviewed by Keith Miller.
3867
3868         Move the scripts in the Generate Derived Sources and Generate Unified
3869         Sources Run Script phases from the Xcode projects to external shell
3870         script files. Then invoke those scripts from the Run Script phases.
3871         This refactoring is being performed to support later work that will
3872         invoke these scripts in other contexts.
3873
3874         The scripts were maintained as-is when making the move. I did a little
3875         reformatting and added 'set -e' to the top of each file, but that's
3876         it.
3877
3878         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
3879         * DumpRenderTree/Scripts/generate-derived-sources.sh: Added.
3880         * WebKitTestRunner/Scripts/generate-derived-sources.sh: Added.
3881         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3882
3883 2018-11-14  Chris Dumez  <cdumez@apple.com>
3884
3885         WebKit.DecidePolicyForNavigationActionForHyperlinkThatRedirects API fails when PSON is enabled
3886         https://bugs.webkit.org/show_bug.cgi?id=191640
3887
3888         Reviewed by Alex Christensen.
3889
3890         Add API test coverage.
3891
3892         * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
3893         (runDecidePolicyForNavigationActionForHyperlinkThatRedirects):
3894         (TEST):
3895
3896 2018-11-14  Chris Dumez  <cdumez@apple.com>
3897
3898         REGRESSION (r238115): [iOS] TestWebKitAPI.ProcessSwap.NavigateToInvalidURL is failing
3899         https://bugs.webkit.org/show_bug.cgi?id=191660
3900
3901         Reviewed by Ryosuke Niwa.
3902
3903         The test tries to navigate to an invalid URL and makes sure that we do not process swap
3904         for such load. The test was inherently racing because it was doing:
3905         <body onload="setTimeout(() => alert('DONE'), 0); location.href = 'http://A=a%B=b'">
3906
3907         Its load event handler tries to navigate to 'http://A=a%B=b' and sets a 0 timer to
3908         log an alert, which causes the API test to keep going and check that we did not swap
3909         process. The issue is that a 0 timer may not be sufficient to trigger the load, as
3910         the policy decision is asynchronous and relies on the UIProcess responding to it.
3911
3912         To address the issue, the test now waits for the next policy decision, spins the
3913         run loop and then makes sure we did not swap process. It no longer relies on a message
3914         from the page.
3915
3916         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3917         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3918
3919 2018-11-14  Chris Dumez  <cdumez@apple.com>
3920
3921         WebKit.WebsiteDataStoreCustomPaths API test is failing when enabling process prewarming
3922         https://bugs.webkit.org/show_bug.cgi?id=191638
3923
3924         Reviewed by Alex Christensen.
3925
3926         Add API test coverage.
3927
3928         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
3929         (runWebsiteDataStoreCustomPaths):
3930         (TEST):
3931
3932 2018-11-14  Alex Christensen  <achristensen@webkit.org>
3933
3934         Add SPI to show a safe browsing warning
3935         https://bugs.webkit.org/show_bug.cgi?id=191604
3936
3937         Reviewed by Andy Estes.
3938
3939         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3940         (TEST):
3941
3942 2018-11-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3943
3944         [iOS] A few drag and drop tests are crashing after r238146
3945         https://bugs.webkit.org/show_bug.cgi?id=191617
3946
3947         Reviewed by Dean Jackson.
3948
3949         Augment these crashing tests to verify that selection commands are suppressed during drop over editable elements
3950         via more robust means. These tests currently hit an assertion when revealing the callout bar too early, because
3951         TestWebKitAPI is not a UI application (see <https://webkit.org/b/190401>).
3952
3953         Instead of relying on this other bug, directly ask the text input whether it is suppressing selection commands
3954         during a drop, and remember the answer via DragAndDropSimulator.
3955
3956         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3957         (TestWebKitAPI::TEST):
3958
3959         Add to the existing tests that started failing after r238146.
3960
3961         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
3962         * TestWebKitAPI/cocoa/TestWKWebView.h:
3963         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3964         (-[TestWKWebView textInputContentView]):
3965         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
3966         (-[DragAndDropSimulator _resetSimulatedState]):
3967         (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
3968         * TestWebKitAPI/ios/UIKitSPI.h:
3969
3970 2018-11-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3971
3972         [Cocoa] [WebKit2] Hook up some more editing actions (-pasteAndMatchStyle:, -makeTextWritingDirectionNatural:)
3973         https://bugs.webkit.org/show_bug.cgi?id=191605
3974         <rdar://problem/45813991>
3975
3976         Reviewed by Dean Jackson.
3977
3978         Adds two new API tests to exercise -_pasteAndMatchStyle: and -makeTextWritingDirectionNatural:.
3979
3980         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3981         (-[TestWKWebView _synchronouslyExecuteEditCommand:argument:]): Deleted.
3982         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
3983         (TestWebKitAPI::TEST):
3984         * TestWebKitAPI/cocoa/TestWKWebView.h:
3985         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3986
3987         Pull `-_synchronouslyExecuteEditCommand:argument:` out of WKAttachmentTests and into shared code, in a new
3988         category on WKWebView declared in TestWKWebView. Also, fix an unrelated typo in a nearby category.
3989
3990         (-[WKWebView _synchronouslyExecuteEditCommand:argument:]):
3991         * TestWebKitAPI/ios/UIKitSPI.h:
3992
3993 2018-11-14  Chris Dumez  <cdumez@apple.com>
3994
3995         WebKit.ApplicationManifestBasic API test is failing when enabling PSON
3996         https://bugs.webkit.org/show_bug.cgi?id=191602
3997
3998         Reviewed by Alex Christensen.
3999
4000         Add API test coverage.
4001
4002         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
4003
4004 2018-11-14  Jonathan Bedard  <jbedard@apple.com>
4005
4006         webkitpy: Refactor port code for devices
4007         https://bugs.webkit.org/show_bug.cgi?id=191568
4008         <rdar://problem/46005821>
4009
4010         Reviewed by Alex Christensen.
4011
4012         watchOS and iOS device ports share many characteristics in testing, mostly due
4013         to the fact that both are devices.
4014
4015         * Scripts/webkitpy/port/device_port.py: Added.
4016         (DevicePort): Add base class that all simulated/physical device ports share.
4017         (DevicePort.__init__):
4018         (DevicePort.driver_cmd_line_for_logging): Moved from iOS port.
4019         (DevicePort._generate_all_test_configurations): Ditto.
4020         (DevicePort.child_processes): Ditto.
4021         (DevicePort.driver_name): Ditto.
4022         (DevicePort.target_host): Generalize worker access to attached devices and
4023         simulated devices based on the device manager.
4024         (DevicePort.devices): Return a list of all devices associated with this port.
4025         (DevicePort._create_devices):
4026         (DevicePort._build_driver_flags): Moved from iOSSimulatorPort/iOSDevicePort.
4027         (DevicePort._install): Moved from iOS port.
4028         (DevicePort.setup_test_run): Ditto.
4029         (DevicePort.clean_up_test_run): Ditto.
4030         (DevicePort.did_spawn_worker): Ditto.
4031         (DevicePort.setup_environ_for_server): Ditto.
4032         * Scripts/webkitpy/port/ios.py:
4033         (IOSPort):
4034         (IOSPort._device_for_worker_number_map): Replaced by DevicePort.devices().
4035         (IOSPort.driver_cmd_line_for_logging): Moved to DevicePort.
4036         (IOSPort.driver_name): Ditto.
4037         (IOSPort._generate_all_test_configurations): Ditto.
4038         (IOSPort.child_processes): Ditto.
4039         (IOSPort._testing_device): Ditto.
4040         (IOSPort.target_host): Ditto.
4041         (IOSPort._create_devices): Ditto.
4042         (IOSPort.setup_test_run): Ditto.
4043         (IOSPort.clean_up_test_run): Ditto.
4044         (IOSPort.did_spawn_worker): Ditto.
4045         * Scripts/webkitpy/port/ios_device.py:
4046         (IOSDevicePort): IOSDevicePort uses a device manager from apple_additions.
4047         (IOSDevicePort._look_for_all_crash_logs_in_log_dir): Use DevicePort.devices().
4048         (IOSDevicePort._get_crash_log): Ditto.
4049         (IOSDevicePort.ios_version): Ditto.
4050         (IOSDevicePort._create_devices): Ditto.
4051         (IOSDevicePort._device_for_worker_number_map): Replaced by DevicePort.devices().
4052         (IOSSimulatorPort._build_driver_flags): Moved to DevicePort.
4053         * Scripts/webkitpy/port/ios_device_unittest.py:
4054         (IOSDeviceTest.test_get_crash_log):
4055         * Scripts/webkitpy/port/ios_simulator.py:
4056         (IOSSimulatorPort): IOSSimulatorPort uses the SimulatedDeviceManager.
4057         (IOSSimulatorPort._create_devices): Clean up logging statement.
4058         (IOSSimulatorPort.setup_environ_for_server): Some of environment set-up is shared
4059         across all devices.
4060         (IOSSimulatorPort._device_for_worker_number_map): Replaced by DevicePort.devices().
4061         (IOSSimulatorPort._build_driver_flags): Moved to DevicePort.
4062         * Scripts/webkitpy/port/ios_simulator_unittest.py:
4063         (IOSSimulatorTest.test_32bit):
4064         (IOSSimulatorTest.test_64bit):
4065
4066 2018-11-14  Chris Dumez  <cdumez@apple.com>
4067
4068         WebKit.WKHTTPCookieStoreWithoutProcessPool API test is failing with process prewarming is enabled
4069         https://bugs.webkit.org/show_bug.cgi?id=191624
4070
4071         Reviewed by Alex Christensen.
4072
4073         Add API test coverage.
4074
4075         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
4076         (runWKHTTPCookieStoreWithoutProcessPool):
4077         (TEST):
4078
4079 2018-11-13  Jiewen Tan  <jiewen_tan@apple.com>
4080
4081         [WebAuthN] Support CTAP HID authenticators on macOS
4082         https://bugs.webkit.org/show_bug.cgi?id=188623
4083         <rdar://problem/43353777>
4084
4085         Reviewed by Brent Fulgham and Chris Dumez.
4086
4087         This patch adds support for the mock testing and entitlements to allow minibrowser to talk
4088         to hid devices.
4089
4090         * MiniBrowser/MiniBrowser.entitlements:
4091         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
4092         (WTR::TestRunner::setWebAuthenticationMockConfiguration):
4093
4094 2018-11-13  Ryosuke Niwa  <rniwa@webkit.org>
4095
4096         WebKit.GeolocationTransitionToLowAccuracy API crashes when enabling PSON
4097         https://bugs.webkit.org/show_bug.cgi?id=191616
4098
4099         Reviewed by Chris Dumez.
4100
4101         The crash was caused by WKView in autorelease pool invoking stopUpdatingCallback after
4102         GeolocationTransitionToLowAccuracyStateTracker in the stack had been destroyed,
4103         resulting in the use-after-free.
4104
4105         Made the tests more robust by clearing geolocation provider before exiting each test
4106         since we can't really prevent WKView from entering an autorelease pool.
4107
4108         Also made WebKit.GeolocationTransitionToLowAccuracy wait for the success callback
4109         instead of simply the end of the navigation so that the test would continue to work
4110         even if a web content process was created for the second web view (lowAccuracyWebView)
4111
4112         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
4113         (TestWebKitAPI::setupGeolocationProvider): Moved "*" to match the WebKit coding style guideline.
4114         (TestWebKitAPI::clearGeolocationProvider): Added.
4115         (TestWebKitAPI::runJavaScriptAlert): Added.
4116         (TestWebKitAPI::didFinishNavigation): Deleted.
4117         * TestWebKitAPI/Tests/WebKit/geolocationWatchPosition.html:
4118
4119 2018-11-13  Chris Dumez  <cdumez@apple.com>
4120
4121         WKProcessPool.InitialWarmedProcessUsed API is failing with PSON enabled
4122         https://bugs.webkit.org/show_bug.cgi?id=191618
4123
4124         Reviewed by Ryosuke Niwa.
4125
4126         Update API test to explicitly disable automatic process prewarning since it is testing
4127         manual prewarming.
4128
4129         * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm:
4130         (TEST):
4131
4132 2018-11-13  Chris Dumez  <cdumez@apple.com>
4133
4134         Several Service Worker API tests are failing when enabling PSON
4135         https://bugs.webkit.org/show_bug.cgi?id=191619
4136
4137         Reviewed by Youenn Fablet.
4138
4139         Update tests to use _webProcessCountIgnoringPrewarmed instead of _webProcessCount so that they are
4140         not impacted by process prewarming.
4141
4142         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4143
4144 2018-11-13  Wenson Hsieh  <wenson_hsieh@apple.com>
4145
4146         [iOS] Do not show selection UI for editable elements with opacity near zero
4147         https://bugs.webkit.org/show_bug.cgi?id=191442
4148         <rdar://problem/45958625>
4149
4150         Reviewed by Simon Fraser.
4151
4152         Add a couple of new testing helpers to UIScriptController.
4153
4154         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
4155         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
4156         (WTR::UIScriptController::textSelectionRangeRects const):
4157         (WTR::UIScriptController::selectionCaretViewRect const):
4158         (WTR::UIScriptController::selectionRangeViewRects const):
4159         * TestRunnerShared/UIScriptContext/UIScriptController.h:
4160         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
4161         (WTR::UIScriptController::textSelectionRangeRects const):
4162
4163         Rename `selectionRangeViewRects` to `textSelectionRangeRects`. This allows us to draw a distinction between
4164         `textSelectionRangeRects`/`textSelectionCaretRect`, which retrieve information about selection rects known
4165         to the text interaction assistant, and `selectionCaretViewRect`/`selectionRangeViewRects`, which retrieve the
4166         actual frames of the selection views used to draw overlaid selection UI. This difference is important in the
4167         new layout tests added in this patch, which only suppress caret rendering (i.e. selection views remain hidden).
4168
4169         Also, drive-by fix a leaked `NSMutableArray`.
4170
4171         (WTR::UIScriptController::selectionStartGrabberViewRect const):
4172         (WTR::UIScriptController::selectionEndGrabberViewRect const):
4173         (WTR::UIScriptController::selectionCaretViewRect const):
4174         (WTR::UIScriptController::selectionRangeViewRects const):
4175
4176         Testing helpers to grab the frames of caret and selection views, in WKContentView's coordinate space. These
4177         rects are also clamped to WKContentView bounds.
4178
4179 2018-11-13  Daniel Bates  <dabates@apple.com>
4180
4181         Consolidate WebKit UIKitSPI.h and UIKitTestSPI.h
4182         https://bugs.webkit.org/show_bug.cgi?id=173341
4183         <rdar://problem/32752890>
4184
4185         Reviewed by Simon Fraser.
4186
4187         There is little value to making a distinction between forward declarations
4188         of UIKit SPI needed in the WebKit layer and just for testing. Moreover,
4189         the contents of these two headers can conflict with each other following
4190         r218275 as DumpRenderTree includes both headers. Instead we should remove
4191         UIKitTestSPI.h and have WebKitTestRunner include the WebKit variant, UIKitSPI.h.
4192
4193         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
4194         * DumpRenderTree/mac/DumpRenderTree.mm:
4195         * TestRunnerShared/spi/UIKitTestSPI.h: Removed.
4196         * WebKitTestRunner/Configurations/Base.xcconfig:
4197         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
4198         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
4199         * WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm:
4200         * WebKitTestRunner/ios/HIDEventGenerator.h:
4201         * WebKitTestRunner/ios/HIDEventGenerator.mm:
4202         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
4203         * WebKitTestRunner/ios/TestControllerIOS.mm:
4204         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
4205         * WebKitTestRunner/ios/mainIOS.mm:
4206
4207 2018-11-13  Takashi Komori  <Takashi.Komori@sony.com>
4208
4209         Remove WebKitTestRunnerLib's build warnings.
4210         https://bugs.webkit.org/show_bug.cgi?id=191580
4211
4212         Reviewed by Fujii Hironori.
4213
4214         Include cmakeconfig.h in precompiled header.
4215
4216         * WebKitTestRunner/WebKitTestRunnerPrefix.h:
4217
4218 2018-11-12  Darshan Kadu  <darsh7807@gmail.com>
4219
4220         Implement Cache API support for WPE/GTK
4221         https://bugs.webkit.org/show_bug.cgi?id=178316
4222
4223         Reviewed by Michael Catanzaro.
4224
4225         Called WKWebsiteDataStoreSetCacheStoragePerOriginQuota function to set the cache limit to 400 * 1200
4226         on all the platforms in TestController.cpp. Also, removed the setCacheStoragePerOriginQuota call from TestControllerCocoa.mm
4227
4228         * WebKitTestRunner/TestController.cpp:
4229         (WTR::TestController::generatePageConfiguration):
4230         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
4231         (WTR::initializeWebViewConfiguration):
4232
4233 2018-11-12  Christopher Reid  <chris.reid@sony.com>
4234
4235         [Curl] Reject entire cookie if the domain fails a tailmatch.
4236         https://bugs.webkit.org/show_bug.cgi?id=191406
4237
4238         Reviewed by Youenn Fablet.
4239
4240         Added unittests for Curl cookie implementation.
4241
4242         * TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp:
4243         (TestWebKitAPI::Curl::CurlCookies::RejectTailmatchFailureDomain):
4244
4245 2018-11-12  Alex Christensen  <achristensen@webkit.org>
4246
4247         [iOS] Implement safe browsing in WebKit
4248         https://bugs.webkit.org/show_bug.cgi?id=191441
4249
4250         Reviewed by Tim Horton.
4251
4252         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
4253         (checkTitleAndClick):
4254         (TEST):
4255
4256 2018-11-12  Basuke Suzuki  <basuke.suzuki@sony.com>
4257
4258         [Curl] Add API Test for Curl cookie backend.
4259         https://bugs.webkit.org/show_bug.cgi?id=191493
4260
4261         Reviewed by Youenn Fablet.
4262
4263         Add unit test to TestWebCore.
4264
4265         * TestWebKitAPI/PlatformWin.cmake:
4266         * TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp: Added.
4267
4268 2018-11-12  Tim Horton  <timothy_horton@apple.com>
4269
4270         Make it possible to edit images inline
4271         https://bugs.webkit.org/show_bug.cgi?id=191352
4272         <rdar://problem/30107985>
4273
4274         Reviewed by Dean Jackson.
4275
4276         * WebKitTestRunner/TestController.cpp:
4277         (WTR::updateTestOptionsFromTestHeader):
4278         * WebKitTestRunner/TestOptions.h:
4279         (WTR::TestOptions::hasSameInitializationOptions const):
4280         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
4281         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
4282         (WTR::TestController::platformCreateWebView):
4283         Add a test option to enable editable images.
4284
4285         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
4286         (WTR::UIScriptController::drawSquareInEditableImage):
4287         (WTR::UIScriptController::numberOfStrokesInEditableImage):
4288         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
4289         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
4290         (WTR::UIScriptController::drawSquareInEditableImage):
4291         (WTR::UIScriptController::numberOfStrokesInEditableImage):
4292         * TestRunnerShared/UIScriptContext/UIScriptController.h:
4293         * TestRunnerShared/spi/PencilKitTestSPI.h: Added.
4294         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
4295         (WTR::findEditableImageCanvas):
4296         (WTR::UIScriptController::drawSquareInEditableImage):
4297         (WTR::UIScriptController::numberOfStrokesInEditableImage):
4298         Add the ability to draw on a PKCanvasView that is a subview of the WKWebView,