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