Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
[WebKit-https.git] / Tools / ChangeLog
1 2019-01-18  Chris Dumez  <cdumez@apple.com>
2
3         Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
4         https://bugs.webkit.org/show_bug.cgi?id=193588
5         <rdar://problem/47131566>
6
7         Reviewed by Alex Christensen.
8
9         Add layout test coverage.
10
11         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
12
13 2019-01-18  Jer Noble  <jer.noble@apple.com>
14
15         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
16         https://bugs.webkit.org/show_bug.cgi?id=189553
17
18         Reviewed by Tim Horton.
19
20         Add a check-webkit-style check that ensures all SDKVariant.xcconfig files match.
21
22         * ContentExtensionTester/Configurations/Base.xcconfig:
23         * ContentExtensionTester/Configurations/SDKVariant.xcconfig: Added.
24         * DumpRenderTree/mac/Configurations/Base.xcconfig:
25         * DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: Added.
26         * ImageDiff/cg/Configurations/Base.xcconfig:
27         * ImageDiff/cg/Configurations/SDKVariant.xcconfig: Added.
28         * MiniBrowser/Configurations/Base.xcconfig:
29         * MiniBrowser/Configurations/SDKVariant.xcconfig: Added.
30         * MobileMiniBrowser/Configurations/Base.xcconfig:
31         * MobileMiniBrowser/Configurations/SDKVariant.xcconfig: Added.
32         * Scripts/webkitpy/style/checker.py:
33         (_all_categories):
34         (FileType):
35         (CheckerDispatcher._file_type):
36         (CheckerDispatcher._create_checker):
37         * Scripts/webkitpy/style/checkers/sdkvariant.py: Added.
38         (SDKVariantChecker):
39         (SDKVariantChecker.__init__):
40         (SDKVariantChecker.check):
41         * TestWebKitAPI/Configurations/Base.xcconfig:
42         * TestWebKitAPI/Configurations/SDKVariant.xcconfig: Added.
43         * WebEditingTester/Configurations/Base.xcconfig:
44         * WebEditingTester/Configurations/SDKVariant.xcconfig: Added.
45         * WebKitLauncher/Configurations/SDKVariant.xcconfig: Added.
46         * WebKitTestRunner/Configurations/Base.xcconfig:
47         * WebKitTestRunner/Configurations/SDKVariant.xcconfig: Added.
48         * lldb/lldbWebKitTester/Configurations/Base.xcconfig:
49         * lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: Added.
50
51 2019-01-18  David Kilzer  <ddkilzer@apple.com>
52
53         Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
54         <https://webkit.org/b/193568>
55         <rdar://problem/47381130>
56
57         Reviewed by Alex Christensen.
58
59         Make sure no one re-introduces UIKit soft-linking by adding a
60         style rule.
61
62         * Scripts/webkitpy/style/checkers/cpp.py:
63         (check_language): Add softlink/uikit check.
64         (CppChecker): Enable softlink/uikit check.
65         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
66         (CppStyleTest): Add test for softlink/uikit.
67
68 2019-01-18  Joanmarie Diggs  <jdiggs@igalia.com>
69
70         [GTK] install-dependencies tool looks for libunistring-dev for dnf
71         https://bugs.webkit.org/show_bug.cgi?id=193584
72
73         Change "-dev" to "-devel".
74
75         Reviewed by Michael Catanzaro.
76
77         * gtk/install-dependencies:
78
79 2019-01-18  Jonathan Bedard  <jbedard@apple.com>
80
81         webkitpy: Add iPhone and iPad ports
82         https://bugs.webkit.org/show_bug.cgi?id=193537
83         <rdar://problem/47353390>
84
85         Reviewed by Lucas Forschler.
86
87         Add --iphone-simulator and --ipad-simulator commands to run-webkit-tests which separate iPhone and iPad into separate
88         ports. Note that this separation is optional, the --ios-simulator command remains.
89
90         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
91         (RunTest.test_device_type_test_division): Drive-by fix.
92         (RunTest.test_device_type_specific_listing): Ditto.
93         (RunTest.test_ipad_test_division):
94         (RunTest):
95         (RunTest.test_ipad_listing):
96         * Scripts/webkitpy/port/factory.py:
97         (platform_options): Add --iphone-simulator and --ipad-simulator flags.
98         (PortFactory):
99         * Scripts/webkitpy/port/ios_simulator.py:
100         (IPhoneSimulatorPort):
101         (IPadSimulatorPort):
102
103 2019-01-18  Chris Dumez  <cdumez@apple.com>
104
105         Regression(PSON) Scroll position is not always restored properly when navigating back
106         https://bugs.webkit.org/show_bug.cgi?id=193578
107         <rdar://problem/47386331>
108
109         Reviewed by Tim Horton.
110
111         Add API test coverage.
112
113         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
114
115 2019-01-18  Youenn Fablet  <youenn@apple.com>
116
117         Add a new SPI to request for cache storage quota increase
118         https://bugs.webkit.org/show_bug.cgi?id=193323
119
120         Reviewed by Alex Christensen.
121
122         Implement WebsiteDataStore quota delegate to handle quota requests.
123         By default, do not update quota.
124         Update quota if test calls the new testRunner.allowCacheStorageQuotaIncrease method.
125
126         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
127         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
128         (WTR::TestRunner::allowCacheStorageQuotaIncrease):
129         * WebKitTestRunner/InjectedBundle/TestRunner.h:
130         * WebKitTestRunner/TestController.cpp:
131         (WTR::TestController::allowCacheStorageQuotaIncrease):
132         * WebKitTestRunner/TestController.h:
133         * WebKitTestRunner/TestInvocation.cpp:
134         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
135         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
136         (-[CacheStorageQuotaManager init]):
137         (-[CacheStorageQuotaManager _requestCacheStorageSpace:frameOrigin:quota:currentSize:spaceRequired:decisionHandler:]):
138         (WTR::initializeWebViewConfiguration):
139         (WTR::TestController::cocoaResetStateToConsistentValues):
140         (WTR::TestController::allowCacheStorageQuotaIncrease):
141
142 2019-01-18  Aakash Jain  <aakash_jain@apple.com>
143
144         [ews-build] Pass owner to the triggered builds
145         https://bugs.webkit.org/show_bug.cgi?id=193574
146
147         Reviewed by Lucas Forschler.
148
149         * BuildSlaveSupport/ews-build/factories.py:
150         (BuildFactory.propertiesToPassToTriggers):
151
152 2019-01-18  Aakash Jain  <aakash_jain@apple.com>
153
154         [ews-app] Send patch author as a build property
155         https://bugs.webkit.org/show_bug.cgi?id=193560
156
157         Reviewed by Lucas Forschler.
158
159         * BuildSlaveSupport/ews-app/ews/fetcher.py:
160         (BugzillaPatchFetcher.fetch):
161
162 2019-01-18  Jonathan Bedard  <jbedard@apple.com>
163
164         webkitpy: Implement device type specific expected results (Follow-up fix)
165         https://bugs.webkit.org/show_bug.cgi?id=192162
166         <rdar://problem/46345449>
167
168         Unreviewed infrastructure fix.
169
170         * Scripts/webkitpy/layout_tests/controllers/manager.py:
171         (Manager.run): Don't boot a device if no tests are available to run on it.
172
173 2019-01-18  Jonathan Bedard  <jbedard@apple.com>
174
175         webkitpy: Implement device type specific expected results (Follow-up fix)
176         https://bugs.webkit.org/show_bug.cgi?id=192162
177         <rdar://problem/46345449>
178
179         Unreviewed infrastructure fix.
180
181         * Scripts/webkitpy/api_tests/manager.py:
182         (Manager._initialize_devices): Use DEVICE_TYPE when running API tests.
183
184 2019-01-18  Jonathan Bedard  <jbedard@apple.com>
185
186         webkitpy: Implement device type specific expected results (Part 2)
187         https://bugs.webkit.org/show_bug.cgi?id=192162
188         <rdar://problem/46345449>
189
190         Rubber-stamped by Aakash Jain.
191
192         This change uses device_type to select a different set of TestExpectation files based on the type of device running
193         tests. This requires multiple baseline search paths to be used in a single instantiation of run-webkit-tests. Note
194         that while multiple baseline search paths are used, any single test will only ever be run on a single device type.
195
196         * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
197         (LayoutTestFinder.find_tests): Pass device_type through.
198         * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py:
199         (LayoutTestFinderTests.test_touched_but_skipped_test): Allow device_type to be passed in.
200         * Scripts/webkitpy/layout_tests/controllers/manager.py:
201         (Manager.__init__): Make _expectations an OrderedDict indexed by device_type, add current_device_type.
202         (Manager._collect_tests): Pass device type to test finder.
203         (Manager._needs_web_platform_test):
204         (Manager._prepare_lists): Index _expectations by device type.
205         (Manager._test_input_for_file):
206         (Manager._test_is_slow): Ditto.
207         (Manager._test_should_dump_jsconsolelog_in_stderr):
208         (Manager._test_should_dump_jsconsolelog_in_stderr): Ditto.
209         (Manager._get_test_inputs):
210         (Manager._update_worker_count):
211         (Manager._set_up_run): Use current_device_type instead of passing device_type in.
212         (Manager.run): Re-write function to gather and parse expectations from multiple baseline search paths. In the event
213         that a test can be run on multiple device types, the first device in the device type list which is eligible will be
214         the one which runs the test.
215         (Manager._run_test_subset):
216         (Manager._run_tests): Index _expectations by current_device_type.
217         (Manager._print_expectation_line_for_test): Ditto.
218         (Manager._print_expectations_for_subset): Ditto.
219         (Manager.print_expectations): Re-write function to gather and parse expectations from multiple baseline search paths.
220         Unlike run, this function will behave the same regardless of what devices are available.
221         (Manager._custom_device_for_test): Deleted.
222         * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
223         (ManagerTest.test_uses_custom_device): Deleted.
224         (ManagerTest.test_uses_custom_device.get_manager): Deleted.
225         * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
226         (JSONLayoutResultsGenerator.__init__): Pass expectations as a dictionary indexed by device type.
227         (JSONLayoutResultsGenerator._insert_failure_summaries): The number of fixable tests must take into consideration
228         all of the expectations.
229         * Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py:
230         (FakePort.skipped_layout_tests): Allow device_type to be passed in.
231         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
232         (TestExpectations.__init__): Allow device_type to be passed through.
233         (TestExpectations.parse_all_expectations): Pick expectations_dict by device type.
234         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: Allow device_type to be passed in.
235         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
236         (summarize_results):
237         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
238         (summarized_results): Expectations are stored in a dictionary indexed by device_type. When determining the expectation
239         a test ran with, one must check all expectations to find the first non-skip expectation.
240         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
241         (RunTest.test_device_type_test_division):
242         (RunTest):
243         (RunTest.test_device_type_specific_listing):
244         * Scripts/webkitpy/port/base.py:
245         (Port): Add default values for DEVICE_TYPE and DEFAULT_DEVICE_TYPES.
246         (Port.supported_device_types): The result of this function will change based on what devices are available.
247         * Scripts/webkitpy/port/device_port.py:
248         (DevicePort._device_type_with_version): Replace DEFAULT_DEVICE_TYPE with DEVICE_TYPE.
249         (DevicePort.default_child_processes): DEVICE_TYPE is a general type, so the built-in comparison of the DeviceType object
250         can be used.
251         (DevicePort.supported_device_types): Generates a list of device types determined by the available devices, if there are
252         any, or the DEFAULT_DEVICE_TYPES of the port.
253         * Scripts/webkitpy/port/ios.py:
254         (IOSPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.
255         * Scripts/webkitpy/port/ios_simulator.py:
256         (IOSSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the devices currently used to run layout tests.
257         * Scripts/webkitpy/port/watch.py:
258         (WatchPort): Change DEFAULT_DEVICE_TYPE to DEVICE_TYPE.
259         * Scripts/webkitpy/port/watch_simulator.py:
260         (WatchSimulatorPort): Set the DEFAULT_DEVICE_TYPES to the device currently used to run layout tests.
261         * Scripts/webkitpy/xcode/device_type.py:
262         (DeviceType):
263         (DeviceType.__hash__): Allow DeviceType to be used as a dictionary index.
264
265 2019-01-18  Philippe Normand  <pnormand@igalia.com>
266
267         [WPE] run-qt-wpe-minibrowser needlessly expects a --wpe argument
268         https://bugs.webkit.org/show_bug.cgi?id=193575
269
270         Reviewed by Michael Catanzaro.
271
272         Allow the script to run without explicit port argument because
273         it's specific to the WPE port anyway.
274
275         * Scripts/run-qt-wpe-minibrowser: Manually insert --wpe in argv
276         and simplify the rest of the code accordingly.
277
278 2019-01-18  Charlie Turner  <cturner@igalia.com>
279
280         [GStreamer][EME][ClearKey] Request keys from CDMInstance rather than passing via bus messages
281         https://bugs.webkit.org/show_bug.cgi?id=192229
282
283         Reviewed by Xabier Rodriguez-Calvar.
284
285         * MiniBrowser/wpe/main.cpp:
286         (main): Enable encrypted-media by default.
287
288 2019-01-18  Philippe Normand  <pnormand@igalia.com>
289
290         [Flatpak] Missing KeyboardInterrupt exception handler
291         https://bugs.webkit.org/show_bug.cgi?id=193570
292
293         Reviewed by Michael Catanzaro.
294
295         * flatpak/flatpakutils.py:
296         (WebkitFlatpak.run_in_sandbox): Basic KeyboardInterrupt handling.
297
298 2019-01-18  Zalan Bujtas  <zalan@apple.com>
299
300         [LFC][BFC][MarginCollapsing] Collapsing through should not ignore floats.
301         https://bugs.webkit.org/show_bug.cgi?id=193564
302
303         Reviewed by Antti Koivisto.
304
305         * LayoutReloaded/misc/LFC-passing-tests.txt:
306
307 2019-01-18  Zalan Bujtas  <zalan@apple.com>
308
309         [LFC] Do not skip float boxes that are not part of the current formatting context when computing bottom.
310         https://bugs.webkit.org/show_bug.cgi?id=193562
311
312         Reviewed by Antti Koivisto.
313
314         * LayoutReloaded/misc/LFC-passing-tests.txt:
315
316 2019-01-18  Zalan Bujtas  <zalan@apple.com>
317
318         [LFC][BFC] Check for inflow children while computing height for block formatting context roots.
319         https://bugs.webkit.org/show_bug.cgi?id=193555
320
321         Reviewed by Antti Koivisto.
322
323         * LayoutReloaded/misc/LFC-passing-tests.txt:
324
325 2019-01-18  Philippe Normand  <pnormand@igalia.com>
326
327         [WPE] Add Qt extension
328         https://bugs.webkit.org/show_bug.cgi?id=191464
329
330         Reviewed by Carlos Garcia Campos.
331
332         MiniBrowser and API tests for the WPE Qt API. To run the
333         MiniBrowser a new script is introduced. Example invocation:
334
335         $ run-qt-wpe-minibrowser -platform wayland https://webkit.org
336
337         Also note-worthy is the introduction of the python2-subprocess32
338         dependency to run the GLib API tests.
339
340         * MiniBrowser/wpe/CMakeLists.txt:
341         * MiniBrowser/wpe/qt/CMakeLists.txt: Added.
342         * MiniBrowser/wpe/qt/main.cpp: Added.
343         (main):
344         * MiniBrowser/wpe/qt/main.qml: Added.
345         * MiniBrowser/wpe/qt/qml.qrc: Added.
346         * Scripts/run-gtk-tests:
347         (GtkTestRunner.is_google_test):
348         (GtkTestRunner):
349         (GtkTestRunner.is_qt_test):
350         * Scripts/run-qt-wpe-minibrowser: Added.
351         * Scripts/run-wpe-tests:
352         (WPETestRunner):
353         (WPETestRunner.is_google_test):
354         (WPETestRunner.is_qt_test):
355         * TestWebKitAPI/Tests/WPEQt/TestLoad.cpp: Added.
356         (TestLoad::main):
357         * TestWebKitAPI/Tests/WPEQt/TestLoadHtml.cpp: Added.
358         (TestLoadHtml::main):
359         * TestWebKitAPI/Tests/WPEQt/TestLoadRequest.cpp: Added.
360         (TestLoadRequest::main):
361         * TestWebKitAPI/Tests/WPEQt/TestRunJavaScript.cpp: Added.
362         (TestRunJavaScript::main):
363         * TestWebKitAPI/Tests/WPEQt/WPEQtTest.cpp: Added.
364         (waitForSignal):
365         * TestWebKitAPI/Tests/WPEQt/WPEQtTest.h: Added.
366         (LoadSpy::LoadSpy):
367         (LoadSpy::~LoadSpy):
368         (LoadSpy::onLoadingChanged):
369         (LoadStartedCatcher::LoadStartedCatcher):
370         (LoadStartedCatcher::~LoadStartedCatcher):
371         (LoadStartedCatcher::onLoadingChanged):
372         (waitForLoadSucceeded):
373         (waitForLoadFailed):
374         * TestWebKitAPI/glib/CMakeLists.txt:
375         * flatpak/flatpakutils.py:
376         (WebkitFlatpak.load_from_args):
377         (WebkitFlatpak.__init__):
378         (WebkitFlatpak.clean_args):
379         (WebkitFlatpak.run_in_sandbox):
380         * flatpak/org.webkit.CommonModules.yaml:
381         * flatpak/org.webkit.WPE.yaml:
382         * flatpak/org.webkit.WPEModules.yaml:
383         * flatpak/org.webkit.WPEQT.yaml: Copied from Tools/flatpak/org.webkit.WebKit.yaml.
384         * flatpak/org.webkit.WebKit.yaml:
385         * glib/api_test_runner.py:
386         (TestRunner._run_test_qt):
387         (TestRunner.is_qt_test):
388         (TestRunner._run_test):
389
390 2019-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
391
392         [iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas
393         https://bugs.webkit.org/show_bug.cgi?id=193494
394         <rdar://problem/46859627>
395
396         Reviewed by Simon Fraser and Tim Horton.
397
398         Add a new test option to add a top content inset to the test runner's WKWebView's scroll view, and automatically
399         scroll to reveal this top content inset area when beginning the test (i.e., scroll to (0, -topContentInset)).
400
401         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
402         (WTR::UIScriptController::contentOffsetX const):
403         (WTR::UIScriptController::contentOffsetY const):
404         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
405         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
406         (WTR::UIScriptController::contentOffsetX const):
407         (WTR::UIScriptController::contentOffsetY const):
408         * TestRunnerShared/UIScriptContext/UIScriptController.h:
409
410         Also add new UIScriptController methods to ask for the content offset of the platform scroll view.
411
412         * WebKitTestRunner/TestController.cpp:
413         (WTR::updateTestOptionsFromTestHeader):
414         * WebKitTestRunner/TestOptions.h:
415         (WTR::TestOptions::hasSameInitializationOptions const):
416         * WebKitTestRunner/ios/TestControllerIOS.mm:
417         (WTR::TestController::platformResetStateToConsistentValues):
418         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
419         (WTR::UIScriptController::contentOffsetX const):
420         (WTR::UIScriptController::contentOffsetY const):
421
422 2019-01-17  Truitt Savell  <tsavell@apple.com>
423
424         Unreviewed, rolling out r240124.
425
426         This commit broke an internal build.
427
428         Reverted changeset:
429
430         "SDK_VARIANT build destinations should be separate from non-
431         SDK_VARIANT builds"
432         https://bugs.webkit.org/show_bug.cgi?id=189553
433         https://trac.webkit.org/changeset/240124
434
435 2019-01-17  Alex Christensen  <achristensen@webkit.org>
436
437         Fix string concatenation API test after r239920
438         https://bugs.webkit.org/show_bug.cgi?id=193551
439         <rdar://problem/47359304>
440
441         Reviewed by Youenn Fablet.
442
443         * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:
444         (TestWebKitAPI::TEST):
445         Cocoa platforms' interpretation of UChar/unsigned short equality is not affected by ICU's recent change of UChar's type
446         in WebKit's build configuration like it apparently is on Linux.
447
448 2019-01-17  Aakash Jain  <aakash_jain@apple.com>
449
450         [ews-build] validate-patch should handle the case when bug_id is None
451         https://bugs.webkit.org/show_bug.cgi?id=193547
452
453         Reviewed by Lucas Forschler.
454
455         * BuildSlaveSupport/ews-build/steps.py:
456         (ValidatePatch._is_bug_closed): Gracefully handle the case when bug_id is None.
457         (ValidatePatch.start): If bug_id is set as None in build properties, fetch it from the patch.
458
459 2019-01-17  Aakash Jain  <aakash_jain@apple.com>
460
461         [ews-build] Add patch author information in build
462         https://bugs.webkit.org/show_bug.cgi?id=193465
463
464         Reviewed by Lucas Forschler.
465
466         * BuildSlaveSupport/ews-build/steps.py:
467         (ValidatePatch._is_patch_obsolete):
468
469 2019-01-17  Aakash Jain  <aakash_jain@apple.com>
470
471         [ews-build] Pass bug_id to the triggered builds
472         https://bugs.webkit.org/show_bug.cgi?id=193548
473
474         Reviewed by Lucas Forschler.
475
476         * BuildSlaveSupport/ews-build/factories.py:
477         (BuildFactory.propertiesToPassToTriggers):
478
479 2019-01-17  Jer Noble  <jer.noble@apple.com>
480
481         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
482         https://bugs.webkit.org/show_bug.cgi?id=189553
483
484         Reviewed by Tim Horton.
485
486         Add a check-webkit-style check that ensures all SDKVariant.xcconfig files match.
487
488         * ContentExtensionTester/Configurations/Base.xcconfig:
489         * ContentExtensionTester/Configurations/SDKVariant.xcconfig: Added.
490         * DumpRenderTree/mac/Configurations/Base.xcconfig:
491         * DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: Added.
492         * ImageDiff/cg/Configurations/Base.xcconfig:
493         * ImageDiff/cg/Configurations/SDKVariant.xcconfig: Added.
494         * MiniBrowser/Configurations/Base.xcconfig:
495         * MiniBrowser/Configurations/SDKVariant.xcconfig: Added.
496         * MobileMiniBrowser/Configurations/Base.xcconfig:
497         * MobileMiniBrowser/Configurations/SDKVariant.xcconfig: Added.
498         * Scripts/webkitpy/style/checker.py:
499         (_all_categories):
500         (FileType):
501         (CheckerDispatcher._file_type):
502         (CheckerDispatcher._create_checker):
503         * Scripts/webkitpy/style/checkers/sdkvariant.py: Added.
504         (SDKVariantChecker):
505         (SDKVariantChecker.__init__):
506         (SDKVariantChecker.check):
507         * TestWebKitAPI/Configurations/Base.xcconfig:
508         * TestWebKitAPI/Configurations/SDKVariant.xcconfig: Added.
509         * WebEditingTester/Configurations/Base.xcconfig:
510         * WebEditingTester/Configurations/SDKVariant.xcconfig: Added.
511         * WebKitLauncher/Configurations/SDKVariant.xcconfig: Added.
512         * WebKitTestRunner/Configurations/Base.xcconfig:
513         * WebKitTestRunner/Configurations/SDKVariant.xcconfig: Added.
514         * lldb/lldbWebKitTester/Configurations/Base.xcconfig:
515         * lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: Added.
516
517 2019-01-17  Zalan Bujtas  <zalan@apple.com>
518
519         [LFC][BFC] An element with transform is a containing block for positioned descendants.
520         https://bugs.webkit.org/show_bug.cgi?id=193534
521
522         Reviewed by Antti Koivisto.
523
524         * LayoutReloaded/misc/LFC-passing-tests.txt:
525
526 2019-01-17  Zalan Bujtas  <zalan@apple.com>
527
528         [LFC][BFC][Quirk] Take body padding and border into account when stretching height.
529         https://bugs.webkit.org/show_bug.cgi?id=193528
530
531         Reviewed by Antti Koivisto.
532
533         * LayoutReloaded/misc/LFC-passing-tests.txt:
534
535 2019-01-17  Zalan Bujtas  <zalan@apple.com>
536
537         [LFC][BFC] For height computation, the bottom edge of the last line box value should include top border/padding
538         https://bugs.webkit.org/show_bug.cgi?id=193520
539
540         Reviewed by Antti Koivisto.
541
542         * LayoutReloaded/misc/LFC-passing-tests.txt:
543
544 2019-01-17  Aakash Jain  <aakash_jain@apple.com>
545
546         [ews-build] unapply-patch step should not update source
547         https://bugs.webkit.org/show_bug.cgi?id=193234
548
549         Reviewed by Lucas Forschler.
550
551         * BuildSlaveSupport/ews-build/steps.py:
552         (CleanWorkingDirectory): Use clean-webkit script to clean the working directory.
553         (UnApplyPatchIfRequired): Use CleanWorkingDirectory as base class.
554
555 2019-01-16  Youenn Fablet  <youenn@apple.com>
556
557         Add a new SPI for controlling getUserMedia
558         https://bugs.webkit.org/show_bug.cgi?id=192793
559
560         Reviewed by Eric Carlson.
561
562         * MiniBrowser/mac/WK2BrowserWindowController.m:
563         (-[WK2BrowserWindowController _webView:requestUserMediaAuthorizationForFrame:devices:decisionHandler:]):
564         (-[WK2BrowserWindowController _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):
565         * TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:
566         (-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
567         * TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
568         (-[GetUserMediaRepromptUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
569         * TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:
570         (-[MediaStreamTrackDetachedUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
571         * TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:
572         (-[UserMediaUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
573         (-[UserMediaUIDelegate _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):
574         * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
575         (-[SimulateFailedSandboxUIDelegate _webView:requestMediaCaptureAuthorizationForFrame:devices:decisionHandler:]):
576         (-[SimulateFailedSandboxUIDelegate _webView:isMediaCaptureAuthorizedForFrame:decisionHandler:]):
577
578 2019-01-16  Zalan Bujtas  <zalan@apple.com>
579
580         [LFC][BFC] Inflow non-replaced used width should not be negative.
581         https://bugs.webkit.org/show_bug.cgi?id=193495
582
583         Reviewed by Antti Koivisto.
584
585         * LayoutReloaded/misc/LFC-passing-tests.txt:
586
587 2019-01-16  Chris Dumez  <cdumez@apple.com>
588
589         Regression(PSON) View becomes blank after click a cross-site download link
590         https://bugs.webkit.org/show_bug.cgi?id=193361
591         <rdar://problem/47099573>
592
593         Reviewed by Geoffrey Garen.
594
595         Add API test coverage.
596
597         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
598         (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
599
600 2019-01-16  Zalan Bujtas  <zalan@apple.com>
601
602         [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto.
603         https://bugs.webkit.org/show_bug.cgi?id=193470
604
605         Reviewed by Antti Koivisto.
606
607         * LayoutReloaded/misc/LFC-passing-tests.txt:
608
609 2019-01-16  Zalan Bujtas  <zalan@apple.com>
610
611         [LFC] Adjust margin box verification.
612         https://bugs.webkit.org/show_bug.cgi?id=193482
613
614         Reviewed by Antti Koivisto.
615
616         * LayoutReloaded/misc/LFC-passing-tests.txt:
617
618 2019-01-15  Sihui Liu  <sihui_liu@apple.com>
619
620         Fix API test WebKit.WebsiteDataStoreCustomPathsWithoutPrewarming after 193354
621         https://bugs.webkit.org/show_bug.cgi?id=193451
622
623         Reviewed by Geoffrey Garen.
624
625         * TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:
626         (TEST):
627         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
628         (runWebsiteDataStoreCustomPaths):
629
630 2019-01-15  Jonathan Bedard  <jbedard@apple.com>
631
632         webkitpy: Support boolean simctl isAvailable
633         https://bugs.webkit.org/show_bug.cgi?id=193472
634         <rdar://problem/47296150>
635
636         Reviewed by Ryosuke Niwa.
637
638         * Scripts/webkitpy/xcode/simulated_device.py:
639         (SimulatedDeviceManager._create_runtimes):
640         (SimulatedDeviceManager._create_device_with_runtime):
641
642 2019-01-15  Chris Dumez  <cdumez@apple.com>
643
644         Unreviewed, rolling out r239993, r239995, r239997, and
645         r239999.
646
647         Caused assertions under
648         ViewGestureController::disconnectFromProcess()
649
650         Reverted changesets:
651
652         "Regression(PSON) View becomes blank after click a cross-site
653         download link"
654         https://bugs.webkit.org/show_bug.cgi?id=193361
655         https://trac.webkit.org/changeset/239993
656
657         "Unreviewed iOS build fix after r239993."
658         https://trac.webkit.org/changeset/239995
659
660         "Fix iOS build after r239993"
661         https://bugs.webkit.org/show_bug.cgi?id=193361
662         https://trac.webkit.org/changeset/239997
663
664         "Unreviewed, revert part of r239997 as it is not needed to fix
665         the build."
666         https://trac.webkit.org/changeset/239999
667
668 2019-01-15  Tim Horton  <timothy_horton@apple.com>
669
670         Cannot tab out of WKWebView on macOS
671         https://bugs.webkit.org/show_bug.cgi?id=161448
672         <rdar://problem/28100085>
673
674         Reviewed by Dean Jackson.
675
676         Add a test that tabbing into and out of WKWebView works correctly.
677
678         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
679         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
680         (WebKit2_CommandBackForwardTest::SetUp):
681         (-[CommandBackForwardOffscreenWindow isKeyWindow]): Deleted.
682         (-[CommandBackForwardOffscreenWindow isVisible]): Deleted.
683         * TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm: Added.
684         (-[FocusableView canBecomeKeyView]):
685         (TEST):
686         * TestWebKitAPI/mac/OffscreenWindow.h: Added.
687         * TestWebKitAPI/mac/OffscreenWindow.mm: Added.
688         (-[OffscreenWindow initWithSize:]):
689         (-[OffscreenWindow isKeyWindow]):
690         (-[OffscreenWindow isVisible]):
691         * TestWebKitAPI/mac/PlatformWebViewMac.mm:
692         (TestWebKitAPI::PlatformWebView::initialize):
693         (-[ActiveOffscreenWindow isKeyWindow]): Deleted.
694         (-[ActiveOffscreenWindow isVisible]): Deleted.
695         Factor ActiveOffscreenWindow out into OffscreenWindow and share it.
696
697 2019-01-15  Ryan Haddad  <ryanhaddad@apple.com>
698
699         Adjust the arguments passed to run-javascriptcore-tests for the 32-bit JSC bot
700         https://bugs.webkit.org/show_bug.cgi?id=193459
701
702         Reviewed by Mark Lam.
703
704         * BuildSlaveSupport/build.webkit.org-config/steps.py:
705         (Run32bitJSCTests): This queue should not run JIT, testair, testb3, or testmasm.
706
707 2019-01-15  Chris Dumez  <cdumez@apple.com>
708
709         Regression(PSON) View becomes blank after click a cross-site download link
710         https://bugs.webkit.org/show_bug.cgi?id=193361
711         <rdar://problem/47099573>
712
713         Reviewed by Geoff Garen.
714
715         Add API test coverage.
716
717         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
718         (-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
719
720 2019-01-15  Zalan Bujtas  <zalan@apple.com>
721
722         [LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained
723         https://bugs.webkit.org/show_bug.cgi?id=193448
724
725         Reviewed by Antti Koivisto.
726
727         * LayoutReloaded/misc/LFC-passing-tests.txt:
728
729 2019-01-15  Jonathan Bedard  <jbedard@apple.com>
730
731         webkitpy: Implement device type specific expected results (Part 1)
732         https://bugs.webkit.org/show_bug.cgi?id=192162
733
734         Reviewed by Lucas Forschler.
735
736         Device type specific expected results covers two related ideas. The first (covered by this change)
737         is where to search for -expected.* files. The second is which tests to run based on the
738         TestExpectations.txt file.
739
740         After this change, the baseline search path will be determined by the type of device running a
741         test. Device type will be passed into any function which picks a file based on the baseline search
742         path.
743
744         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
745         (Worker._update_test_input): Pass device_type to self._port.reference_files(...).
746         * Scripts/webkitpy/layout_tests/controllers/manager.py:
747         (Manager.run): Print baseline search path for each round of devices.
748         * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
749         (SingleTestRunner.__init__): Pass device_type into expected_*(...).
750         (SingleTestRunner._expected_driver_output): Ditto.
751         (SingleTestRunner._driver_input): Ditto.
752         * Scripts/webkitpy/layout_tests/views/printing.py:
753         (Printer.print_config): Move printing of baseline search path to a separate function.
754         (Printer.print_baseline_search_path): Moved from Printer.print_config.
755         * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
756         (Testprinter.test_print_config):
757         (Testprinter.test_print_baseline_search_path):
758         * Scripts/webkitpy/port/base.py:
759         (Port.baseline_search_path): Pass device_type through.
760         (Port._expected_baselines_for_suffixes): Ditto.
761         (Port.expected_baselines): Ditto.
762         (Port.expected_filename): Ditto.
763         (Port.expected_checksum): Ditto.
764         (Port.expected_image): Ditto.
765         (Port.expected_audio): Ditto.
766         (Port.expected_text): Ditto.
767         (Port.reference_files): Ditto.
768         (Port.tests): Ditto.
769         (Port._expanded_paths): Ditto.
770         (Port.skipped_layout_tests): Ditto.
771         (Port.expectations_dict): Ditto.
772         (Port._port_specific_expectations_files): Ditto.
773         (Port.expectations_files): Ditto.
774         (Port.test_search_path): Ditto.
775         (Port._tests_for_other_platforms): Ditto.
776         * Scripts/webkitpy/port/base_unittest.py:
777         (PortTest.test_additional_platform_directory): Accept, but do not use, device_type.
778         (PortTest.test_nonexistant_expectations): Ditto.
779         (test_ref_tests_platform_directory): Ditto.
780         * Scripts/webkitpy/port/darwin.py:
781         (DarwinPort._port_specific_expectations_files): Accept device_type.
782         * Scripts/webkitpy/port/driver.py:
783         (DriverProxy):
784         (DriverProxy.host): Expose _target_host for device_type information.
785         * Scripts/webkitpy/port/gtk.py:
786         (GtkPort._port_specific_expectations_files): Accept, but do not use, device_type.
787         * Scripts/webkitpy/port/ios.py:
788         (IOSPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs.
789         * Scripts/webkitpy/port/mac.py:
790         (MacPort. default_baseline_search_path): Ditto.
791         * Scripts/webkitpy/port/port_testcase.py:
792         (TestWebKitPort._tests_for_other_platforms): Accept, but do not use, device_type.
793         * Scripts/webkitpy/port/test.py:
794         * Scripts/webkitpy/port/watch.py:
795         (WatchPort. default_baseline_search_path): Remove memoized, since it does not accept **kwargs.
796         * Scripts/webkitpy/port/win.py:
797         (WinPort.test_search_path): Accept, but do not use, device_type.
798         * Scripts/webkitpy/port/wpe.py:
799         (WPEPort._port_specific_expectations_files): Ditto.
800         * Scripts/webkitpy/tool/servers/rebaselineserver.py:
801         (get_test_baselines.AllPlatformsPort.baseline_search_path): Ditto.
802
803 2019-01-15  Zalan Bujtas  <zalan@apple.com>
804
805         [LFC] Use the containing block's padding box to position out-of-flow elements.
806         https://bugs.webkit.org/show_bug.cgi?id=193431
807
808         Reviewed by Antti Koivisto.
809
810         * LayoutReloaded/misc/LFC-passing-tests.txt:
811
812 2019-01-14  Tim Horton  <timothy_horton@apple.com>
813
814         Move a test implementation file that got misplaced in the Xcode project
815
816         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
817
818 2019-01-14  Commit Queue  <commit-queue@webkit.org>
819
820         Unreviewed, rolling out r239901, r239909, r239910, r239912,
821         r239913, and r239914.
822         https://bugs.webkit.org/show_bug.cgi?id=193407
823
824         These revisions caused an internal failure (Requested by
825         Truitt on #webkit).
826
827         Reverted changesets:
828
829         "[Cocoa] Avoid importing directly from subumbrella frameworks"
830         https://bugs.webkit.org/show_bug.cgi?id=186016
831         https://trac.webkit.org/changeset/239901
832
833         "Tried to fix USE(APPLE_INTERNAL_SDK) builds after r239901."
834         https://trac.webkit.org/changeset/239909
835
836         "Tried to fix the build."
837         https://trac.webkit.org/changeset/239910
838
839         "Fixed iOS builds after r239910."
840         https://trac.webkit.org/changeset/239912
841
842         "More build fixing."
843         https://trac.webkit.org/changeset/239913
844
845         "Tried to fix USE(APPLE_INTERNAL_SDK) 32-bit builds."
846         https://trac.webkit.org/changeset/239914
847
848 2019-01-14  Mark Lam  <mark.lam@apple.com>
849
850         Re-enable ability to build --cloop builds.
851         https://bugs.webkit.org/show_bug.cgi?id=192955
852         <rdar://problem/46882363>
853
854         Reviewed by Saam barati and Keith Miller.
855
856         The --cloop build option was being ignored this whole time since r236381.
857         This patch makes it possible to build CLoop builds again.
858
859         * Scripts/build-jsc:
860         * Scripts/webkitperl/FeatureList.pm:
861         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
862
863 2019-01-14  Jonathan Bedard  <jbedard@apple.com>
864
865         webkitpy: Expose device_type from host-like objects
866         https://bugs.webkit.org/show_bug.cgi?id=193406
867         <rdar://problem/47262305>
868
869         Reviewed by Lucas Forschler.
870
871         Devices should expose device_type. As a result, all host objects should
872         provide a device_type property, even if they do not yet define a device_type.
873
874         * Scripts/webkitpy/common/system/systemhost.py:
875         (SystemHost):
876         (SystemHost.device_type):
877         * Scripts/webkitpy/common/system/systemhost_mock.py:
878         (MockSystemHost):
879         (MockSystemHost.device_type):
880         * Scripts/webkitpy/port/device.py:
881         (Device):
882         (Device.device_type):
883         * Scripts/webkitpy/xcode/simulated_device.py:
884         (SimulatedDeviceManager._find_exisiting_device_for_request):
885         (SimulatedDeviceManager._disambiguate_device_type):
886         (SimulatedDeviceManager._does_fulfill_request):
887         (SimulatedDeviceManager.device_count_for_type):
888         (SimulatedDeviceManager.initialize_devices):
889         * Scripts/webkitpy/xcode/simulated_device_unittest.py:
890         (test_available_devices):
891         (test_swapping_devices):
892
893 2019-01-14  Jonathan Bedard  <jbedard@apple.com>
894
895         webkitpy: Support alternate simctl device list output (Follow-up fix)
896         https://bugs.webkit.org/show_bug.cgi?id=193362
897         <rdar://problem/47122965>
898
899         Rubber-stamped by Lucas Forschler.
900
901         * Scripts/webkitpy/xcode/simulated_device.py:
902         (SimulatedDeviceManager.populate_available_devices):
903
904 2019-01-14  Wenson Hsieh  <wenson_hsieh@apple.com>
905
906         [iOS] Expose SPI to access the current sentence boundary and selection state
907         https://bugs.webkit.org/show_bug.cgi?id=193398
908         <rdar://problem/45893108>
909
910         Reviewed by Dean Jackson.
911
912         Add an API test to verify that an SPI client can observe changes in the `@"_selectionAttributes"` key path on
913         WKWebView, and that inserting text, deleting, and changing the selection cause selection attributes to change as
914         expected.
915
916         * TestWebKitAPI/EditingTestHarness.h:
917         * TestWebKitAPI/EditingTestHarness.mm:
918         (-[EditingTestHarness moveBackward]):
919         (-[EditingTestHarness moveForward]):
920         (-[EditingTestHarness moveForwardAndExpectEditorStateWith:]):
921
922         Add a couple of new helper methods on EditingTestHarness.
923
924         * TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
925         (-[SelectionChangeObserver initWithWebView:]):
926         (-[SelectionChangeObserver webView]):
927         (-[SelectionChangeObserver observeValueForKeyPath:ofObject:change:context:]):
928         (-[SelectionChangeObserver currentSelectionAttributes]):
929
930 2019-01-14  Zalan Bujtas  <zalan@apple.com>
931
932         [LFC][BFC] Add basic box-sizing support.
933         https://bugs.webkit.org/show_bug.cgi?id=193392
934
935         Reviewed by Antti Koivisto.
936
937         * LayoutReloaded/misc/LFC-passing-tests.txt:
938
939 2019-01-14  Charlie Turner  <cturner@igalia.com>
940
941         [WPE] API test gardening
942         https://bugs.webkit.org/show_bug.cgi?id=193319
943
944         Reviewed by Michael Catanzaro.
945
946         * TestWebKitAPI/glib/TestExpectations.json: Remove some now
947         passing tests.
948
949 2019-01-14  Charlie Turner  <cturner@igalia.com>
950
951         [GStreamer] Add sharedBuffer utility to GstMappedBuffer, and a testsuite
952         https://bugs.webkit.org/show_bug.cgi?id=192977
953
954         Reviewed by Carlos Garcia Campos.
955
956         * TestWebKitAPI/PlatformGTK.cmake: Build the new GStreamer test harness
957         * TestWebKitAPI/PlatformWPE.cmake: Ditto.
958         * TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp: Added.
959         (TestWebKitAPI::GStreamerTest::SetUp):
960         (TestWebKitAPI::GStreamerTest::TearDown):
961         * TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.h: Added.
962         * TestWebKitAPI/Tests/WebCore/gstreamer/GstMappedBuffer.cpp: Added.
963         (TestWebKitAPI::TEST_F):
964
965 2019-01-14  Charlie Turner  <cturner@igalia.com>
966
967         [WPE] Workaround for incorrect template specialization being selected when UChar=char16_t
968         https://bugs.webkit.org/show_bug.cgi?id=193332
969
970         Reviewed by Michael Catanzaro.
971
972         * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: When UChar is
973         defined as a char16_t, which changed in ICU 59, the
974         StringTypeAdapter<UnsignedInt, ...> overload catches casts to
975         unsigned short. This test is relying on the behaviour that
976         UChar=unsigned short, which doesn't hold across platforms and ICU
977         library versions. The full fix would be a special syntax for
978         literal characters so that these ambiguities do not arise. That
979         work is proposed in https://bugs.webkit.org/show_bug.cgi?id=193101.
980         (TestWebKitAPI::TEST):
981
982 2019-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
983
984         Unreviewed. [GTK][WPE] Run distcheck with gtkdoc and MiniBrowser enabled
985
986         * Scripts/make-dist:
987         (Distcheck.configure):
988
989 2019-01-13  Aakash Jain  <aakash_jain@apple.com>
990
991         [ews-build] Update macOS queue configurations
992         https://bugs.webkit.org/show_bug.cgi?id=193365
993         <rdar://problem/47221073>
994
995         Unreviewed, renamed mac-high-sierra to mac-highsierra to match with build.webkit.org configuration.
996
997         * BuildSlaveSupport/ews-build/config.json:
998
999 2019-01-13  Zalan Bujtas  <zalan@apple.com>
1000
1001         [LFC] Adjust assert for statically positioned fixed elements
1002         https://bugs.webkit.org/show_bug.cgi?id=193385
1003
1004         Reviewed by Antti Koivisto.
1005
1006         * LayoutReloaded/misc/LFC-passing-tests.txt:
1007
1008 2019-01-13  Philippe Normand  <pnormand@igalia.com>
1009
1010         [WPE][MiniBrowser] Ephemeral WebContext leaks in automation mode
1011         https://bugs.webkit.org/show_bug.cgi?id=193387
1012
1013         Reviewed by Carlos Garcia Campos.
1014
1015         * MiniBrowser/wpe/main.cpp:
1016         (main):
1017
1018 2019-01-12  Timothy Hatcher  <timothy@apple.com>
1019
1020         Have prefers-color-scheme: light always match on macOS versions before Mojave.
1021         https://bugs.webkit.org/show_bug.cgi?id=191655
1022         rdar://problem/46074680
1023
1024         Reviewed by Megan Gardner.
1025
1026         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
1027         * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm:
1028
1029 2019-01-12  Dan Bernstein  <mitz@apple.com>
1030
1031         [Cocoa] Avoid importing directly from subumbrella frameworks
1032         https://bugs.webkit.org/show_bug.cgi?id=186016
1033         <rdar://problem/40591038>
1034
1035         Reviewed by Sam Weinig.
1036
1037         * DumpRenderTree/cg/PixelDumpSupportCG.cpp: Include CoreServices.h instead of a
1038           LaunchServices header.
1039         * DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Removed -iframework options from
1040           OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
1041         * DumpRenderTree/mac/LayoutTestHelper.m: Import ApplicationServices.h instead of ColorSync.h
1042           when using SDKs earlier than 10.13.
1043         * TestWebKitAPI/Configurations/Base.xcconfig: Removed -iframework options from OTHER_CFLAGS
1044           and OTHER_CPLUSPLUSFLAGS.
1045         * WebKitTestRunner/Configurations/BaseTarget.xcconfig: Removed -iframework options from
1046           OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
1047         * WebKitTestRunner/cg/TestInvocationCG.cpp: Include CoreServices.h instead of a
1048           LaunchServices header.
1049
1050 2019-01-11  John Wilander  <wilander@apple.com>
1051
1052         Compile out Web API Statistics Collection
1053         https://bugs.webkit.org/show_bug.cgi?id=193370
1054         <rdar://problem/45388584>
1055
1056         Reviewed by Brent Fulgham.
1057
1058         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1059             Defined ENABLE_WEB_API_STATISTICS, off by default.
1060
1061 2019-01-11  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1062
1063         [WPE] Add gtk-doc
1064         https://bugs.webkit.org/show_bug.cgi?id=178900
1065
1066         Reviewed by Michael Catanzaro.
1067
1068         Add Tools/gtkdoc to manifest.txt.in files.
1069         This should have been done in r238853 and caused failure in building WebKitGTK+ unstable release 2.23.2.
1070
1071         * gtk/manifest.txt.in: Add Tools/gtkdoc directory.
1072         * wpe/manifest.txt.in: Add Tools/gtkdoc directory and uncomment lines to move documentation artifacts.
1073
1074 2019-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1075
1076         [iOS] Precision drop state thrashes when dragging near the top edge of an editable element
1077         https://bugs.webkit.org/show_bug.cgi?id=193364
1078         <rdar://problem/47214117>
1079
1080         Reviewed by Tim Horton.
1081
1082         Add a test to verify that dragging near the top of a textarea element does not flag the drop proposal as
1083         precise, whereas dragging near the middle of the textarea does.
1084
1085         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
1086         (TestWebKitAPI::TEST):
1087
1088 2019-01-11  Jonathan Bedard  <jbedard@apple.com>
1089
1090         webkitpy: Support alternate simctl device list output
1091         https://bugs.webkit.org/show_bug.cgi?id=193362
1092         <rdar://problem/47122965>
1093
1094         Reviewed by Lucas Forschler.
1095
1096         * Scripts/webkitpy/xcode/simulated_device.py:
1097         (SimulatedDeviceManager.populate_available_devices):
1098
1099 2019-01-11  Aakash Jain  <aakash_jain@apple.com>
1100
1101         [ews-build] Update macOS queue configurations
1102         https://bugs.webkit.org/show_bug.cgi?id=193365
1103
1104         Reviewed by Lucas Forschler.
1105
1106         * BuildSlaveSupport/ews-build/config.json:
1107
1108 2019-01-11  Jonathan Bedard  <jbedard@apple.com>
1109
1110         webkitpy: Incorporate device type into baseline search path
1111         https://bugs.webkit.org/show_bug.cgi?id=193356
1112         <rdar://problem/47215515>
1113
1114         Reviewed by Lucas Forschler.
1115
1116         We need a way to include device type in the baseline search path for iOS to support device specific test expectations.
1117
1118         * Scripts/webkitpy/port/base.py:
1119         (Port.default_baseline_search_path): Allow device type to be passed in.
1120         * Scripts/webkitpy/port/gtk.py:
1121         (GtkPort.default_baseline_search_path): Ignore device type.
1122         * Scripts/webkitpy/port/ios.py:
1123         (IOSPort.default_baseline_search_path): Optionally allow device type to be incorporated into the baseline search path.
1124         (IOSPort.test_expectations_file_position): Update index for the additional device-type specific baseline search path.
1125         * Scripts/webkitpy/port/ios_device_unittest.py:
1126         (IOSDeviceTest):
1127         * Scripts/webkitpy/port/ios_simulator_unittest.py:
1128         (IOSSimulatorTest):
1129         * Scripts/webkitpy/port/mac.py:
1130         (MacPort.default_baseline_search_path): Ignore device type.
1131         * Scripts/webkitpy/port/watch.py:
1132         (WatchPort.default_baseline_search_path): Ditto.
1133         * Scripts/webkitpy/port/win.py:
1134         (WinPort.default_baseline_search_path): Ditto.
1135         (WinCairoPort.default_baseline_search_path): Ditto.
1136         * Scripts/webkitpy/port/wpe.py:
1137         (WPEPort.default_baseline_search_path): Ditto.
1138
1139 2019-01-11  Jonathan Bedard  <jbedard@apple.com>
1140
1141         webkitpy: Print abbreviated baseline search path that includes only folders that exist
1142         https://bugs.webkit.org/show_bug.cgi?id=193352
1143         <rdar://problem/47210736>
1144
1145         Reviewed by Lucas Forschler.
1146
1147         * Scripts/webkitpy/layout_tests/views/printing.py:
1148         (Printer.print_config): Print list on only baseline search paths which exist. 
1149         * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
1150         (Testprinter.test_print_config):
1151
1152 2019-01-11  Joseph Pecoraro  <pecoraro@apple.com>
1153
1154         Cleanup possible WK*Copy/Create leaks in WebKitTestRunner
1155         https://bugs.webkit.org/show_bug.cgi?id=193340
1156
1157         Reviewed by David Kilzer.
1158
1159         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1160         (WTR::InjectedBundle::didReceiveMessageToPage):
1161         Pull the strings out into a WKRetainPtr.
1162
1163         * WebKitTestRunner/WebNotificationProvider.cpp:
1164         (WTR::WebNotificationProvider::closeWebNotification):
1165         Adopt the created value into the WKRetainPtr.
1166
1167         * WebKitTestRunner/mac/TestControllerMac.mm:
1168         (WTR::generateWhitelist):
1169         Immediately adopt a created value to avoid potential mistakes.
1170
1171 2019-01-11  Dominik Infuehr  <dinfuehr@igalia.com>
1172
1173         Enable DFG on ARM/Linux again
1174         https://bugs.webkit.org/show_bug.cgi?id=192496
1175
1176         Reviewed by Yusuke Suzuki.
1177
1178         After changing the bytecode format DFG was disabled on all 32-bit
1179         architectures. Enable DFG now again on ARM/Linux. Run again JIT-tests
1180         on ARM by default.
1181
1182         * Scripts/run-jsc-stress-tests:
1183
1184 2019-01-11  Timothy Hatcher  <timothy@apple.com>
1185
1186         Unreviewed, fix #ifdef in API test added in r239851.
1187         https://bugs.webkit.org/show_bug.cgi?id=193327
1188         rdar://problem/47093222
1189
1190         * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm:
1191
1192 2019-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1193
1194         Introduce IDL files for runtime-enabled UndoManager and UndoItem JavaScript API
1195         https://bugs.webkit.org/show_bug.cgi?id=193109
1196         <rdar://problem/44807048>
1197
1198         Reviewed by Ryosuke Niwa.
1199
1200         Introduce and respect a test option to enable the UndoManager API.
1201
1202         * WebKitTestRunner/TestController.cpp:
1203         (WTR::updateTestOptionsFromTestHeader):
1204         * WebKitTestRunner/TestOptions.h:
1205         (WTR::TestOptions::hasSameInitializationOptions const):
1206         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1207         (WTR::TestController::platformCreateWebView):
1208
1209 2019-01-11  Zalan Bujtas  <zalan@apple.com>
1210
1211         [LFC][BFC][MarginCollapsing] Adjust vertical position when box margin collapses through.
1212         https://bugs.webkit.org/show_bug.cgi?id=193346
1213
1214         Reviewed by Antti Koivisto.
1215
1216         * LayoutReloaded/misc/LFC-passing-tests.txt:
1217
1218 2019-01-10  Ryan Haddad  <ryanhaddad@apple.com>
1219
1220         Unreviewed, fix typo that breaks dashboard link.
1221
1222         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
1223         (WebKitBuildbot):
1224
1225 2019-01-10  Ryan Haddad  <ryanhaddad@apple.com>
1226
1227         Update macOS queue configurations
1228         https://bugs.webkit.org/show_bug.cgi?id=193329
1229
1230         Reviewed by Alexey Proskuryakov.
1231
1232         * BuildSlaveSupport/build.webkit.org-config/config.json:
1233         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
1234         (BubbleQueueServer):
1235         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
1236         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
1237         (WebKitBuildbot):
1238         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
1239         (table.queue-grid tr.platform.macos-sierra img.logo): Deleted.
1240         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1241
1242 2019-01-10  Joseph Pecoraro  <pecoraro@apple.com>
1243
1244         MiniBrowser should be able to navigate to about:blank
1245         https://bugs.webkit.org/show_bug.cgi?id=193345
1246
1247         Reviewed by Simon Fraser.
1248
1249         * MiniBrowser/mac/BrowserWindowController.m:
1250         (-[BrowserWindowController addProtocolIfNecessary:]):
1251         Don't prepend "http://" to "about:" prefixed URLs like "about:blank".
1252
1253         * MiniBrowser/mac/WK1BrowserWindowController.m:
1254         (-[WK1BrowserWindowController fetch:]):
1255         * MiniBrowser/mac/WK2BrowserWindowController.m:
1256         (-[WK2BrowserWindowController fetch:]):
1257         Clean up the code that uses this to match style.
1258
1259 2019-01-10  Joseph Pecoraro  <pecoraro@apple.com>
1260
1261         Remove MiniBrowser custom "Process Swap" menu item which does not work
1262         https://bugs.webkit.org/show_bug.cgi?id=193344
1263
1264         Reviewed by Simon Fraser.
1265
1266         There is a menu item under the Experimental menu that does work.
1267
1268         * MiniBrowser/mac/AppDelegate.m:
1269         (defaultConfiguration):
1270         * MiniBrowser/mac/SettingsController.h:
1271         * MiniBrowser/mac/SettingsController.m:
1272         (-[SettingsController _populateMenu]):
1273         (-[SettingsController validateMenuItem:]):
1274         (-[SettingsController processSwapOnNavigationEnabled]): Deleted.
1275         (-[SettingsController toggleProcessSwapOnNavigation:]): Deleted.
1276
1277 2019-01-10  Timothy Hatcher  <timothy@apple.com>
1278
1279         Add WKBundlePage SPI to temporarily force light or dark appearance on a page.
1280         https://bugs.webkit.org/show_bug.cgi?id=193327
1281         rdar://problem/47093222
1282
1283         Reviewed by Tim Horton.
1284
1285         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1286         * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm: Added.
1287         (TestWebKitAPI::didFinishNavigation):
1288         (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
1289         (TestWebKitAPI::TEST):
1290         * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: Added.
1291         (TestWebKitAPI::ForceLightAppearanceInBundleTest::ForceLightAppearanceInBundleTest):
1292         (TestWebKitAPI::ForceLightAppearanceInBundleTest::didCreatePage):
1293         (TestWebKitAPI::ForceLightAppearanceInBundleTest::didReceiveMessage):
1294         * TestWebKitAPI/Tests/WebKit/mac/dark-mode.html: Added.
1295
1296 2019-01-10  Joseph Pecoraro  <pecoraro@apple.com>
1297
1298         Leak of WKWebProcessPlugInHitTestResult (160 bytes) in com.apple.WebKit.WebContent running layout tests
1299         https://bugs.webkit.org/show_bug.cgi?id=193338
1300         <rdar://problem/46664774>
1301
1302         Reviewed by David Kilzer.
1303
1304         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
1305         (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
1306
1307 2019-01-10  Commit Queue  <commit-queue@webkit.org>
1308
1309         Unreviewed, rolling out r239825.
1310         https://bugs.webkit.org/show_bug.cgi?id=193330
1311
1312         Broke tests on armv7/linux bots (Requested by guijemont on
1313         #webkit).
1314
1315         Reverted changeset:
1316
1317         "Enable DFG on ARM/Linux again"
1318         https://bugs.webkit.org/show_bug.cgi?id=192496
1319         https://trac.webkit.org/changeset/239825
1320
1321 2019-01-10  Zhifei Fang  <zhifei_fang@apple.com>
1322
1323         Disable the run-jsc-stress-test remote host key check.
1324         https://bugs.webkit.org/show_bug.cgi?id=192988
1325
1326         Reviewed by Alexey Proskuryakov.
1327
1328         * Scripts/run-jsc-stress-tests:
1329
1330 2019-01-10  John Wilander  <wilander@apple.com>
1331
1332         Override the session configuration for cookieAcceptPolicy
1333         https://bugs.webkit.org/show_bug.cgi?id=190925
1334         <rdar://problem/45497382>
1335
1336         Reviewed by Alexey Proskuryakov and Alex Christensen.
1337
1338         Test infrastructure for setting a first-party-only cookie policy.
1339
1340         * DumpRenderTree/TestRunner.cpp:
1341         (setOnlyAcceptFirstPartyCookiesCallback):
1342         (TestRunner::staticFunctions):
1343         * DumpRenderTree/TestRunner.h:
1344         * DumpRenderTree/mac/TestRunnerMac.mm:
1345         (TestRunner::setOnlyAcceptFirstPartyCookies):
1346         * DumpRenderTree/win/TestRunnerWin.cpp:
1347         (TestRunner::setOnlyAcceptFirstPartyCookies):
1348         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1349         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1350         (WTR::TestRunner::setOnlyAcceptFirstPartyCookies):
1351         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1352         * WebKitTestRunner/TestInvocation.cpp:
1353         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1354
1355 2019-01-09  Matt Rajca  <mrajca@apple.com>
1356
1357         Put per-document autoplay behavior behind runtime website policies quirk instead of a compile time flag
1358         https://bugs.webkit.org/show_bug.cgi?id=193301
1359
1360         Reviewed by Jer Noble.
1361         
1362         Added API tests.
1363
1364         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1365         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
1366         (TEST):
1367         * TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html: Added.
1368
1369 2019-01-10  Zalan Bujtas  <zalan@apple.com>
1370
1371         [LFC][BFC][MarginCollapsing] Take collapsed through siblings into account when computing vertical position
1372         https://bugs.webkit.org/show_bug.cgi?id=193310
1373
1374         Reviewed by Antti Koivisto.
1375
1376         * LayoutReloaded/misc/LFC-passing-tests.txt:
1377
1378 2019-01-10  Dominik Infuehr  <dinfuehr@igalia.com>
1379
1380         Enable DFG on ARM/Linux again
1381         https://bugs.webkit.org/show_bug.cgi?id=192496
1382
1383         Reviewed by Yusuke Suzuki.
1384
1385         After changing the bytecode format DFG was disabled on all 32-bit
1386         architectures. Enable DFG now again on ARM/Linux. Run again JIT-tests
1387         on ARM by default.
1388
1389         * Scripts/run-jsc-stress-tests:
1390
1391 2019-01-09  Fujii Hironori  <Hironori.Fujii@sony.com>
1392
1393         [Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
1394         https://bugs.webkit.org/show_bug.cgi?id=193271
1395
1396         Reviewed by Brent Fulgham.
1397
1398         BSTR is a special data structure created by SysAllocString, not a
1399         wchar_t null-terminated string.
1400
1401         * DumpRenderTree/win/TestRunnerWin.cpp:
1402         (TestRunner::setDatabaseQuota): Use L"" instead of "" for _bstr_t.
1403         * MiniBrowser/win/MiniBrowserWebHost.cpp:
1404         (MiniBrowserWebHost::didFinishLoadForFrame): Use _bstr_t to create
1405         BSTR from wide string literals.
1406
1407 2019-01-09  Alexey Proskuryakov  <ap@apple.com>
1408
1409         Tweak wording for build/version_check style checker error
1410         https://bugs.webkit.org/show_bug.cgi?id=193256
1411
1412         Reviewed by Tim Horton.
1413
1414         * Scripts/webkitpy/style/checkers/cpp.py:
1415         (check_os_version_checks):
1416         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
1417         (WebKitStyleTest.test_os_version_checks):
1418
1419 2019-01-09  Aakash Jain  <aakash_jain@apple.com>
1420
1421         [ews-build] Add link to bug along with bug title
1422         https://bugs.webkit.org/show_bug.cgi?id=193293
1423
1424         Reviewed by Lucas Forschler.
1425
1426         * BuildSlaveSupport/ews-build/steps.py:
1427         (ValidatePatch._is_bug_closed): Fetch bug title from Bugzilla and add it to the build.
1428         (ConfigureBuild.add_bug_id_url): Deleted.
1429         (ConfigureBuild.getBugURL): Deleted.
1430
1431 2019-01-09  Aakash Jain  <aakash_jain@apple.com>
1432
1433         [ews-build] Use https for ews-build server
1434         https://bugs.webkit.org/show_bug.cgi?id=193193
1435
1436         Reviewed by Lucas Forschler.
1437
1438         * BuildSlaveSupport/ews-build/steps.py:
1439
1440 2019-01-09  Aakash Jain  <aakash_jain@apple.com>
1441
1442         [ews-build] Parse and display number of style failures
1443         https://bugs.webkit.org/show_bug.cgi?id=193280
1444
1445         Reviewed by Lucas Forschler.
1446
1447         * BuildSlaveSupport/ews-build/steps.py:
1448         (CheckStyle): Use TestWithFailureCount as base class.
1449         (CheckStyle.countFailures): Count the number of style failures.
1450
1451 2019-01-09  Aakash Jain  <aakash_jain@apple.com>
1452
1453         [ews-build] use patch_id instead of ewspatchid
1454         https://bugs.webkit.org/show_bug.cgi?id=193235
1455
1456         Reviewed by Lucas Forschler.
1457
1458         * BuildSlaveSupport/ews-build/factories.py: Replaced ewspatchid with patch_id.
1459         * BuildSlaveSupport/ews-build/steps.py: Ditto.
1460         * BuildSlaveSupport/ews-build/steps_unittest.py: Ditto.
1461
1462 2019-01-09  Zalan Bujtas  <zalan@apple.com>
1463
1464         [LFC][BFC][MarginCollapsing] Add support for peculiar cases.
1465         https://bugs.webkit.org/show_bug.cgi?id=192625
1466
1467         Reviewed by Antti Koivisto.
1468
1469         * LayoutReloaded/misc/LFC-passing-tests.txt:
1470
1471 2019-01-09  Michael Catanzaro  <mcatanzaro@igalia.com>
1472
1473         [WPE][GTK] Purge use of g_assert() under TestWebKitAPI
1474         https://bugs.webkit.org/show_bug.cgi?id=192841
1475
1476         Reviewed by Carlos Garcia Campos.
1477
1478         There are separate g_assert_*() macros for use in tests, which we use inconsistently
1479         currently. Use them always. We'll get nicer error messages now when tests fail, and the
1480         assertions will now run during tests even if G_DISABLE_ASSERT is used when building.
1481
1482         Note that the documentation of g_assert() says that it is not to be used when writing tests.
1483
1484         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
1485         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp:
1486         (WebKitWebEditorTest::testSelectionChanged):
1487         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
1488         (WebKitFrameTest::testMainFrame):
1489         (WebKitFrameTest::testURI):
1490         (WebKitFrameTest::testJavaScriptContext):
1491         (WebKitFrameTest::testJavaScriptValues):
1492         * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
1493         (testWebViewAuthenticationRequest):
1494         (testWebViewAuthenticationLoadCancelled):
1495         (testWebViewAuthenticationFailure):
1496         (testWebViewAuthenticationStorage):
1497         (ProxyAuthenticationTest::ProxyAuthenticationTest):
1498         (testWebViewAuthenticationProxy):
1499         (testWebViewAuthenticationProxyHTTPS):
1500         * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
1501         (testAutomationSessionRequestSession):
1502         * TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp:
1503         (testBackForwardListNavigation):
1504         (testWebKitWebViewSessionState):
1505         (testWebKitWebViewSessionStateWithFormData):
1506         * TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
1507         (ConsoleMessageTest::consoleMessageReceivedCallback):
1508         (testWebKitConsoleMessageConsoleAPI):
1509         (testWebKitConsoleMessageJavaScriptException):
1510         (testWebKitConsoleMessageNetworkError):
1511         (testWebKitConsoleMessageSecurityError):
1512         * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
1513         (testCookieManagerAcceptPolicy):
1514         (testCookieManagerCookiesChanged):
1515         (testCookieManagerPersistentStorage):
1516         (testCookieManagerPersistentStorageDeleteAll):
1517         (testCookieManagerEphemeral):
1518         * TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp:
1519         (testWebKitDOMElementAutoFill):
1520         * TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
1521         (downloadLocalFileSuccessfully):
1522         (createFileAtDestination):
1523         (testDownloadOverwriteDestinationDisallowed):
1524         (testDownloadLocalFileError):
1525         (testDownloadRemoteFile):
1526         (testDownloadRemoteFileError):
1527         (testWebViewDownloadURI):
1528         (testPolicyResponseDownload):
1529         (testPolicyResponseDownloadCancel):
1530         (testDownloadMIMEType):
1531         (contextMenuCallback):
1532         (testContextMenuDownloadActions):
1533         (testBlobDownload):
1534         * TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp:
1535         (testWebKitWebEditorSelectionChanged):
1536         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
1537         (testWebKitFrameMainFrame):
1538         (testWebKitFrameURI):
1539         (testWebKitFrameJavaScriptContext):
1540         (testWebKitFrameJavaScriptValues):
1541         * TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:
1542         (LoadStopTrackingTest::loadFailed):
1543         (testWebViewTitle):
1544         (testURIRequestHTTPHeaders):
1545         (testURIRequestHTTPMethod):
1546         (testURIResponseHTTPHeaders):
1547         (testRedirectToDataURI):
1548         * TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp:
1549         (testProcessPerWebView):
1550         (testWebProcessLimit):
1551         * TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:
1552         (testWebViewResources):
1553         (testWebResourceLoading):
1554         (testWebResourceSuggestedFilename):
1555         (testWebResourceGetData):
1556         (testWebResourceGetDataError):
1557         (testWebViewResourcesHistoryCache):
1558         (testWebResourceSendRequest):
1559         * TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
1560         (testSSL):
1561         (testInsecureContent):
1562         (testTLSErrorsPolicy):
1563         (testTLSErrorsRedirect):
1564         (testTLSErrorsHTTPAuth):
1565         (testLoadFailedWithTLSErrors):
1566         (testSubresourceLoadFailedWithTLSErrors):
1567         (httpsServerCallback):
1568         * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
1569         (testWebViewCreateNavigationData):
1570         (testWebViewJavaScriptDialogs):
1571         (testWebViewWindowProperties):
1572         (testWebViewMouseTarget):
1573         (testWebViewFileChooserRequest):
1574         (testWebViewColorChooserRequest):
1575         * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
1576         (testWebExtensionGetTitle):
1577         (testDocumentLoadedSignal):
1578         (testWebKitWebViewProcessCrashed):
1579         (testWebExtensionWindowObjectCleared):
1580         (testWebExtensionIsolatedWorld):
1581         (permissionRequestCallback):
1582         (didAssociateFormControlsCallback):
1583         (testWebExtensionFormControlsAssociated):
1584         (FormSubmissionTest::FormSubmissionTest):
1585         (FormSubmissionTest::testFormSubmissionResult):
1586         (testWebExtensionFormSubmissionSteps):
1587         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
1588         (testNotInitialized):
1589         (testClearDatabase):
1590         (testPrivateBrowsing):
1591         (testGetFavicon):
1592         (testWebViewFavicon):
1593         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitFindController.cpp:
1594         (testFindControllerTextFound):
1595         (testFindControllerTextNotFound):
1596         (testFindControllerMatchCount):
1597         (testFindControllerMaxMatchCount):
1598         (testFindControllerNext):
1599         (testFindControllerPrevious):
1600         (testFindControllerCountedMatches):
1601         (testFindControllerOptions):
1602         (testFindControllerHide):
1603         (testFindControllerInstance):
1604         (testFindControllerGetters):
1605         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp:
1606         (testNavigationPolicy):
1607         (testResponsePolicy):
1608         (testNewWindowPolicy):
1609         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:
1610         (testSecurityOriginBasicConstructor):
1611         (testSecurityOriginURIConstructor):
1612         (testSecurityOriginDefaultPort):
1613         (testSecurityOriginFileURI):
1614         (testOpaqueSecurityOrigin):
1615         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
1616         (testWebKitSettings):
1617         (testWebKitSettingsNewWithSettings):
1618         (testWebKitSettingsUserAgent):
1619         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
1620         (testWebViewNewWithUserContentManager):
1621         (isStyleSheetInjectedForURLAtPath):
1622         (isScriptInjectedForURLAtPath):
1623         (testUserContentManagerInjectedStyleSheet):
1624         (testUserContentManagerInjectedScript):
1625         (UserScriptMessageTest::scriptMessageReceived):
1626         (UserScriptMessageTest::waitUntilMessageReceived):
1627         (UserScriptMessageTest::runJavaScriptFinished):
1628         (testUserContentManagerScriptMessageReceived):
1629         (testUserContentManagerScriptMessageInWorldReceived):
1630         (testUserContentManagerScriptMessageFromDOMBindings):
1631         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
1632         (testWebContextDefault):
1633         (testWebContextEphemeral):
1634         (testWebContextGetPlugins):
1635         (testWebContextURIScheme):
1636         (testWebContextSpellChecker):
1637         (testWebContextLanguages):
1638         (consoleMessageReceivedCallback):
1639         (testWebContextSecurityFileXHR):
1640         (ProxyTest::ProxyTest):
1641         (testWebContextProxySettings):
1642         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
1643         (testWebViewWebContext):
1644         (testWebViewWebBackend):
1645         (testWebViewEphemeral):
1646         (testWebViewCustomCharset):
1647         (testWebViewSettings):
1648         (testWebViewRunJavaScript):
1649         (testWebViewCanShowMIMEType):
1650         (testWebViewSubmitForm):
1651         (testWebViewSave):
1652         (testWebViewPageVisibility):
1653         (testWebViewSnapshot):
1654         (testWebViewNotification):
1655         (testWebViewNotificationInitialPermissionAllowed):
1656         (testWebViewNotificationInitialPermissionDisallowed):
1657         (testWebViewIsPlayingAudio):
1658         * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
1659         (WebsiteDataTest::WebsiteDataTest):
1660         (WebsiteDataTest::remove):
1661         (WebsiteDataTest::clear):
1662         (testWebsiteDataConfiguration):
1663         (testWebsiteDataEphemeral):
1664         (testWebsiteDataCache):
1665         (testWebsiteDataStorage):
1666         (testWebsiteDataDatabases):
1667         (testWebsiteDataAppcache):
1668         (testWebsiteDataCookies):
1669         (testWebsiteDataDeviceIdHashSalt):
1670         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
1671         (emitDocumentLoaded):
1672         (emitURIChanged):
1673         (sendRequestCallback):
1674         (contextMenuCallback):
1675         (consoleMessageSentCallback):
1676         (emitFormControlsAssociated):
1677         (formControlsAssociatedCallback):
1678         (emitFormSubmissionEvent):
1679         (willSubmitFormCallback):
1680         (windowObjectCleared):
1681         (methodCallCallback):
1682         (registerGResource):
1683         (webkit_web_extension_initialize_with_user_data):
1684         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
1685         (checkLeaks):
1686         (WebProcessTest::create):
1687         (runTest):
1688         * TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
1689         (AutocleanupsTest::testWebProcessAutocleanups):
1690         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
1691         (WebKitDOMClientRectTest::testDivBoundingClientRectPosition):
1692         (WebKitDOMClientRectTest::testDivClientRectsPositionAndLength):
1693         * TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp:
1694         (WebKitDOMDOMWindowTest::testSignals):
1695         (WebKitDOMDOMWindowTest::testDispatchEvent):
1696         (WebKitDOMDOMWindowTest::testGetComputedStyle):
1697         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
1698         (WebKitDOMNodeFilterTest::testTreeWalker):
1699         (WebKitDOMNodeFilterTest::testNodeIterator):
1700         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
1701         (WebKitDOMNodeTest::testHierarchyNavigation):
1702         (WebKitDOMNodeTest::testInsertion):
1703         (WebKitDOMNodeTest::testTagNamesNodeList):
1704         (WebKitDOMNodeTest::testTagNamesHTMLCollection):
1705         (WebKitDOMNodeTest::testDOMCache):
1706         * TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
1707         (WebKitDOMXPathNSResolverTest::evaluateFooChildTextAndCheckResult):
1708         (WebKitDOMXPathNSResolverTest::testXPathNSResolverNative):
1709         (WebKitDOMXPathNSResolverTest::testXPathNSResolverCustom):
1710         * TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:
1711         (testUIProcessAutocleanups):
1712         (testWebProcessAutocleanups):
1713         * TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:
1714         (testContextMenuPopulateMenu):
1715         (testContextMenuDismissed):
1716         * TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:
1717         (testWebKitDOMClientRectDivBoundingClientRectPosition):
1718         (testWebKitDOMClientRectDivClientRectsPositionAndLength):
1719         * TestWebKitAPI/Tests/WebKitGtk/TestDOMDOMWindow.cpp:
1720         (testWebKitDOMDOMWindowSignals):
1721         (testWebKitDOMDOMWindowDispatchEvent):
1722         (testWebKitDOMDOMWindowGetComputedStyle):
1723         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:
1724         (testWebKitDOMNodeHierarchyNavigation):
1725         (testWebKitDOMNodeInsertion):
1726         (testWebKitDOMNodeTagNamesNodeList):
1727         (testWebKitDOMNodeTagNamesHTMLCollection):
1728         (testWebKitDOMObjectCache):
1729         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:
1730         (testWebKitDOMNodeFilterTreeWalker):
1731         (testWebKitDOMNodeFilterNodeIterator):
1732         * TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:
1733         (testWebKitDOMXPathNSResolverNative):
1734         (testWebKitDOMXPathNSResolverCustom):
1735         * TestWebKitAPI/Tests/WebKitGtk/TestInspector.cpp:
1736         (testInspectorDefault):
1737         (testInspectorManualAttachDetach):
1738         (testInspectorCustomContainerDestroyed):
1739         * TestWebKitAPI/Tests/WebKitGtk/TestInspectorServer.cpp:
1740         (startTestServer):
1741         (testInspectorServerPageList):
1742         * TestWebKitAPI/Tests/WebKitGtk/TestOptionMenu.cpp:
1743         (OptionMenuTest::showOptionMenuCallback):
1744         (OptionMenuTest::menuCloseCallback):
1745         (OptionMenuTest::close):
1746         (OptionMenuTest::activateItem):
1747         (OptionMenuTest::selectItem):
1748         (testOptionMenuSimple):
1749         (testOptionMenuGroups):
1750         (testOptionMenuActivate):
1751         (testOptionMenuSelect):
1752         * TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:
1753         (testPrintOperationPrintSettings):
1754         (webViewPrintCallback):
1755         (testPrintOperationPrint):
1756         (testPrintCustomWidget):
1757         * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
1758         (checkAtspiAccessible):
1759         (testAtspiBasicHierarchy):
1760         * TestWebKitAPI/Tests/WebKitGtk/TestWebKitVersion.cpp:
1761         (testWebKitCheckVersion):
1762         * TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:
1763         (testWebViewEditorCutCopyPasteNonEditable):
1764         (testWebViewEditorCutCopyPasteEditable):
1765         (testWebViewEditorSelectAllNonEditable):
1766         (testWebViewEditorSelectAllEditable):
1767         (loadContentsAndTryToCutSelection):
1768         (testWebViewEditorNonEditable):
1769         (testWebViewEditorEditable):
1770         (testWebViewEditorEditorStateTypingAttributes):
1771         (testWebViewEditorInsertImage):
1772         (testWebViewEditorCreateLink):
1773         * TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp:
1774         (loadChangedCallback):
1775         (loadFailedCallback):
1776         (loadFailedWithTLSErrorsCallback):
1777         (LoadTrackingTest::LoadTrackingTest):
1778         * TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
1779         (registerGResource):
1780         (removeNonEmptyDirectory):
1781         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
1782         (Test::adoptView):
1783         (Test::~Test):
1784         * TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp:
1785         (WebKitTestBus::getOrCreateConnection):
1786         (WebKitTestBus::createProxy):
1787         * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:
1788         (WebKitTestServer::getWebSocketURIForPath const):
1789         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
1790         (WebViewTest::initializeWebView):
1791         (WebViewTest::loadURI):
1792         (WebViewTest::loadHtml):
1793         (WebViewTest::loadPlainText):
1794         (WebViewTest::loadBytes):
1795         (WebViewTest::loadRequest):
1796         (WebViewTest::loadAlternateHTML):
1797         (WebViewTest::goBack):
1798         (WebViewTest::goForward):
1799         (WebViewTest::goToBackForwardListItem):
1800         (resourceGetDataCallback):
1801         (WebViewTest::mainResourceData):
1802         (WebViewTest::javascriptResultToCString):
1803         (WebViewTest::javascriptResultToNumber):
1804         (WebViewTest::javascriptResultToBoolean):
1805         (WebViewTest::javascriptResultIsNull):
1806         (WebViewTest::javascriptResultIsUndefined):
1807         (onSnapshotReady):
1808         (WebViewTest::runWebProcessTest):
1809         * TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp:
1810         (WebViewTest::platformInitializeWebView):
1811         (WebViewTest::showInWindow):
1812         (WebViewTest::showInWindowAndWaitUntilMapped):
1813         (WebViewTest::mouseMoveTo):
1814         (WebViewTest::emitPopupMenuSignal):
1815         (WebViewTest::keyStroke):
1816         (WebViewTest::doMouseButtonEvent):
1817
1818 2019-01-09  Philippe Normand  <pnormand@igalia.com>
1819
1820         [WPE] API tests can't run in flatpak environment
1821         https://bugs.webkit.org/show_bug.cgi?id=193242
1822
1823         Reviewed by Michael Catanzaro.
1824
1825         * Scripts/run-wpe-tests: Add --wpe to arguments passed to
1826         flatpakutils so that it knows which port it's dealing with.
1827         * glib/common.py: Remove build_dir globals so that subsequent
1828         calls actually take args into account.
1829         (library_build_path):
1830         (binary_build_path):
1831
1832 2019-01-08  Dean Jackson  <dino@apple.com>
1833
1834         Blob references for System Previews don't get a correct file extension
1835         https://bugs.webkit.org/show_bug.cgi?id=193268
1836         <rdar://problem/47133037>
1837
1838         Reviewed by Tim Horton.
1839
1840         New test that a Blob download of a USDZ file gets named correctly.
1841
1842         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1843         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
1844         (-[BlobWithUSDZExtensionDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
1845         (-[BlobWithUSDZExtensionDownloadDelegate _downloadDidFinish:]):
1846         (TEST):
1847         * TestWebKitAPI/Tests/WebKitCocoa/SystemPreviewBlobNaming.html: Added.
1848
1849 2019-01-08  Jiewen Tan  <jiewen_tan@apple.com>
1850
1851         [WebAuthN] Support U2F HID Authenticators on macOS
1852         https://bugs.webkit.org/show_bug.cgi?id=191535
1853         <rdar://problem/47102027>
1854
1855         Reviewed by Brent Fulgham.
1856
1857         This patch:
1858         1) adds support for U2F mocking mechanism;
1859         2) updates tests to reflect U2fCommandConstructor changes.
1860
1861         * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
1862         (TestWebKitAPI::TEST):
1863         * TestWebKitAPI/Tests/WebCore/FidoTestData.h:
1864         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1865         (WTR::TestRunner::setWebAuthenticationMockConfiguration):
1866
1867 2019-01-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1868
1869         [iOS] Dispatch a synthetic mousedown event prior to starting drags
1870         https://bugs.webkit.org/show_bug.cgi?id=193229
1871         <rdar://problem/46717097>
1872
1873         Reviewed by Tim Horton.
1874
1875         Add a cross-platform drag and drop test to verify that calling `preventDefault()` on the mousedown event
1876         prevents a drag from starting.
1877
1878         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
1879         * TestWebKitAPI/Tests/WebKitCocoa/link-and-target-div.html:
1880
1881         Tweak this test to make it robust when dragging the link to the target element multiple times in a single test.
1882
1883 2019-01-08  Zhifei Fang  <zhifei_fang@apple.com>
1884   
1885         Layout test will generate a perf metric file to results dir.
1886         https://bugs.webkit.org/show_bug.cgi?id=192030
1887         <rdar://problem/32779516>
1888
1889         Reviewed by Aakash Jain.
1890
1891         Layout test running time will be collected to a perf metric file.
1892         For now, instead of outputing running time of all tests (which is huge),
1893         we aggregate them by test directories which are at most two level deep. 
1894
1895         * Scripts/webkitpy/layout_tests/controllers/manager.py:
1896         (Manager._end_test_run):
1897         (Manager._output_perf_metrics):
1898         (Manager._print_expectation_line_for_test):
1899         * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
1900         (add_test_perf_metric):
1901         (test_perf_metrics):
1902         * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
1903         (JSONGeneratorTest.test_test_timings_trie):
1904         (JSONGeneratorTest):
1905         (JSONGeneratorTest.test_test_perf_metrics):
1906         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
1907         (RebaselineTest.test_reset_results):
1908         (RebaselineTest.test_missing_results):
1909         (RebaselineTest.test_new_baseline):
1910
1911 2019-01-08  Patrick Griffis  <pgriffis@igalia.com>
1912
1913         [WPE][GTK] Add php-json to install-dependencies
1914         https://bugs.webkit.org/show_bug.cgi?id=193233
1915
1916         Reviewed by Michael Catanzaro.
1917
1918         * gtk/install-dependencies:
1919         * wpe/install-dependencies:
1920
1921 2019-01-08  Chris Dumez  <cdumez@apple.com>
1922
1923         Regression(PSON-r239182): Blank view when navigating back and forth between google.com and stack overflow
1924         https://bugs.webkit.org/show_bug.cgi?id=193224
1925         <rdar://problem/47097726>
1926
1927         Reviewed by Alex Christensen.
1928
1929         Add API test coverage.
1930
1931         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1932
1933 2019-01-07  David Kilzer  <ddkilzer@apple.com>
1934
1935         Leak of ScrollCompletionCallbackData (16 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1936         <https://webkit.org/b/193222>
1937         <rdar://problem/46862309>
1938
1939         Reviewed by Joseph Pecoraro.
1940
1941         * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
1942         (WTR::executeCallback): Fix camel case of variable name.
1943         (WTR::EventSendingController::callAfterScrollingCompletes): If
1944         WKBundlePageRegisterScrollOperationCompletionCallback() returns
1945         false, make sure to release the ScrollCompletionCallbackData
1946         object.  This fixes the leak.
1947
1948 2019-01-07  Fujii Hironori  <Hironori.Fujii@sony.com>
1949
1950         [Win] EWS: wincairo-ews cannot apply a patch with *.png
1951         https://bugs.webkit.org/show_bug.cgi?id=193044
1952
1953         Reviewed by Daniel Bates.
1954
1955         WinCairo EWS bots are using Windows Perl. Binary files should be
1956         opened as binary mode.
1957
1958         * Scripts/svn-apply:
1959         (handleGitBinaryChange): Use 'binmode' for binary file handles.
1960
1961 2019-01-07  Don Olmstead  <don.olmstead@sony.com>
1962
1963         [CMake] Add ENABLE_CSS_TYPED_OM option
1964         https://bugs.webkit.org/show_bug.cgi?id=193216
1965
1966         Reviewed by Michael Catanzaro.
1967
1968         * Scripts/webkitperl/FeatureList.pm:
1969
1970 2019-01-07  David Kilzer  <ddkilzer@apple.com>
1971
1972         Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
1973         <https://webkit.org/b/193056>
1974
1975         Reviewed by Alex Christensen.
1976
1977         * Scripts/webkitpy/style/checker.py:
1978         - Ignore use of new runtime/retainptr check in
1979           Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm since it
1980           contains tests to ensure RetainPtr<NSObject *> is compatible
1981           with RetainPtr<NSObject>.
1982
1983         * Scripts/webkitpy/style/checkers/cpp.py:
1984         (check_language):
1985         (CppChecker):
1986         - Add checker for use of '*' in RetainPtr<> type.  A for loop
1987           was used instead of a single regex so that angle brackets
1988           could be matched up when checking the type contained within
1989           the RetainPtr<> type.
1990
1991         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
1992         (CppStyleTest):
1993         - Add unit test for new runtime/retainptr check.
1994
1995         * TestRunnerShared/EventSerialization/mac/EventSerializerMac.h:
1996         * TestWebKitAPI/EditingTestHarness.h:
1997         - Remove '*' from RetainPtr<> type.
1998
1999         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2000         - Add cf/RetainPtr.cpp back to TestWTFLibrary target!  This
2001           regressed in r201938.
2002
2003         * TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp:
2004         (TestWebKitAPI::TEST):
2005         - Update tests to match RetainPtr.mm tests (except for the
2006           `*SimilarNSType` tests since there is no CF equivalent of
2007           RetainPtr<NSString> and RetainPtr<NSString *>).
2008
2009         * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
2010         (TestWebKitAPI::TEST):
2011         - Update tests to:
2012           - Not conflict by name with equivalent CF tests in
2013             RetainPtr.cpp.
2014           - Add test cases for RetainPtr<NSObject>,
2015             RetainPtr<NSObject *> and RetainPtr<id> were appropriate.
2016           - Add `*SimilarNSType` tests for converting between
2017             RetainPtr<NSObject> and RetainPtr<NSObject *>.
2018           - Change `0` to `nil` as appropriate.
2019           - Re-alphabetize the tests by name.
2020           - Add Optional<RetainPtr<>> tests.
2021           - Add retainPtr() tests.
2022
2023         * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
2024         (-[DownloadProgressTestRunner _download:decideDestinationWithSuggestedFilename:completionHandler:]):
2025         * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
2026         (TEST):
2027         - Remove '*' from RetainPtr<> type.
2028
2029         * TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm:
2030         (TEST(WebKit, JITEnabled)):
2031         - Add missing WTFMove().  Apparently a temporary was being
2032           created before in the argument list due to mismatched
2033           RetainPtr<> types.
2034
2035         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2036         * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
2037         (TestWebKitAPI::setUpWebViewForTestingVideoControlsManager):
2038         (TestWebKitAPI::TEST):
2039         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2040         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2041         * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
2042         (WTR::resourcesDirectoryURL):
2043         * WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
2044         (WTR::InjectedBundle::platformInitialize):
2045         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
2046         - Remove '*' from RetainPtr<> type.
2047
2048 2019-01-07  Eric Carlson  <eric.carlson@apple.com>
2049
2050         A MediaTime timescale must never be zero
2051         https://bugs.webkit.org/show_bug.cgi?id=193156
2052         <rdar://problem/32504501>
2053
2054         Reviewed by Jer Noble.
2055
2056         * TestWebKitAPI/Tests/WTF/MediaTime.cpp:
2057         (TestWebKitAPI::TEST): Add tests for zero timescale.
2058
2059 2019-01-07  Youenn Fablet  <youenn@apple.com>
2060
2061         API test broken: TestWebKitAPI.WebKit.CustomDataStorePathsVersusCompletionHandlers
2062         https://bugs.webkit.org/show_bug.cgi?id=193175
2063
2064         Reviewed by Chris Dumez.
2065
2066         Updated API test as we bumped the SW schema to version 4.
2067
2068         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2069         * TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-4.sqlite3: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-3.sqlite3.
2070         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
2071         (TEST):
2072
2073 2019-01-06  Fujii Hironori  <Hironori.Fujii@sony.com>
2074
2075         [Win][Clang] Fix compilation warnings of MiniBrowser
2076         https://bugs.webkit.org/show_bug.cgi?id=193029
2077
2078         Reviewed by Ross Kirsling.
2079
2080         * MiniBrowser/win/MiniBrowserWebHost.h: Removed unused m_oldFont
2081         and m_URLBarFont. Reorder member variables to fix -Wreorder
2082         warning.
2083         * MiniBrowser/win/PageLoadTestClient.cpp:
2084         (PageLoadTestClient::PageLoadTestClient): Reorder the member initializer list.
2085         * MiniBrowser/win/PageLoadTestClient.h: Removed 'virtual' of
2086         pageLoadStartedAtTime and pageLoadEndedAtTime. Removed unused
2087         m_currentURLIndex.
2088         * MiniBrowser/win/WebKitBrowserWindow.cpp:
2089         (WebKitBrowserWindow::WebKitBrowserWindow): Initialize
2090         navigationClient with '{ }' to fix the missing field warning.
2091         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
2092         (initDocStruct): Changed the argument type docname to const.
2093
2094 2019-01-06  Jiewen Tan  <jiewen_tan@apple.com>
2095
2096         [WebAuthN] Import U2F command/response converters from Chromium
2097         https://bugs.webkit.org/show_bug.cgi?id=193150
2098         <rdar://problem/47054028>
2099
2100         Reviewed by Brent Fulgham.
2101
2102         Adds API tests.
2103
2104         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2105         * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
2106         (TestWebKitAPI::getTestAttestedCredentialDataBytes):
2107         (TestWebKitAPI::getTestAuthenticatorDataBytes):
2108         (TestWebKitAPI::getTestAttestationObjectBytes):
2109         (TestWebKitAPI::getTestSignResponse):
2110         (TestWebKitAPI::getTestU2fRegisterResponse):
2111         (TestWebKitAPI::TEST):
2112         (TestWebKitAPI::convertToVector): Deleted.
2113         * TestWebKitAPI/Tests/WebCore/FidoTestData.h:
2114         * TestWebKitAPI/Tests/WebCore/U2fCommandConstructorTest.cpp: Added.
2115         (TestWebKitAPI::constructMakeCredentialRequest):
2116         (TestWebKitAPI::constructGetAssertionRequest):
2117         (TestWebKitAPI::TEST):
2118
2119 2019-01-05  Oriol Brufau  <obrufau@igalia.com>
2120
2121         [GTK] Add python3-setuptools, libunistring-dev, bison and flex dependencies
2122         https://bugs.webkit.org/show_bug.cgi?id=193136
2123
2124         Reviewed by Michael Catanzaro.
2125
2126         * gtk/install-dependencies:
2127         Add python3-setuptools, libunistring-dev, bison and flex to install-dependencies,
2128         they are needed by update-webkitgtk-libs.
2129
2130 2019-01-05  Aakash Jain  <aakash_jain@apple.com>
2131
2132         Unreviewed follow-up fix to r239650
2133         https://bugs.webkit.org/show_bug.cgi?id=193140
2134         <rdar://problem/47063037>
2135
2136         Typecast patch_id to string.
2137
2138         * BuildSlaveSupport/ews-build/steps.py:
2139         (ValidatePatch._is_patch_obsolete):
2140
2141 2019-01-04  Daniel Bates  <dabates@apple.com>
2142
2143         [lldb-webkit]: Add support for pretty-printing raw bitmask types
2144         https://bugs.webkit.org/show_bug.cgi?id=193024
2145
2146         Reviewed by Jer Noble.
2147
2148         Add support infrastructure to pretty-print a raw bitmask type. Included is a pretty-printer
2149         for the bitmask type WebEventFlags as an example.
2150
2151         Exposed a new function lldb_webkit.addSummaryAndSyntheticFormattersForRawBitmaskType()
2152         that can be used to register summary and synthetic child formatters for a bitmask type.
2153         For example, consider the following enum and bitmask typedefs:
2154
2155         typedef enum {
2156             A = 1 << 0,
2157             B = 1 << 1,
2158             C = 1 << 2,
2159         } SpecialFlagValues;
2160         typedef unsigned SpecialFlags;
2161
2162         To teach lldb-webkit how to pretty print SpecialFlags types, add the following code inside
2163         __lldb_init_module():
2164
2165             addSummaryAndSyntheticFormattersForRawBitmaskType(debugger, "SpecialFlags", {
2166                     1 << 0: "A",
2167                     1 << 1: "B",
2168                     1 << 2: "C",
2169             })
2170
2171         * lldb/lldb_webkit.py:
2172         (addSummaryAndSyntheticFormattersForRawBitmaskType):
2173         (addSummaryAndSyntheticFormattersForRawBitmaskType.GeneratedRawBitmaskProvider):
2174         (addSummaryAndSyntheticFormattersForRawBitmaskType.raw_bitmask_summary_provider):
2175         (addSummaryAndSyntheticFormattersForRawBitmaskType.lldb_webkit):
2176         A convenience function to dynamically creaste a synthetic formatter class and summary
2177         string function for the specified bitmask type and enumerator value to name map. This
2178         function register the dynamically created class and function with LLDB.
2179
2180         (__lldb_init_module):
2181         (FlagEnumerationProvider):
2182         (FlagEnumerationProvider._enumerator_value_to_name_map):
2183         (FlagEnumerationProvider._bitmask):
2184         (FlagEnumerationProvider._update):
2185         (FlagEnumerationProvider.has_children):
2186         (FlagEnumerationProvider.num_children):
2187         (FlagEnumerationProvider.get_child_index):
2188         (FlagEnumerationProvider.get_child_at_index):
2189         (FlagEnumerationProvider.update):
2190         Extract out provider logic from WTFOptionSetProvider into a base class that can be shared.
2191
2192         (WTFOptionSetProvider):
2193         (WTFOptionSetProvider._enumerator_value_to_name_map):
2194         (WTFOptionSetProvider._bitmask):
2195         (WTFOptionSetProvider._update):
2196         Write in terms of the base class.
2197
2198         (RawBitmaskProviderBase):
2199         (RawBitmaskProviderBase._enumerator_value_to_name_map):
2200         (RawBitmaskProviderBase._bitmask):
2201         Added. Base synthetic formatter class for a raw bitmask type. Derived classes are expected to
2202         override the class variable ENUMERATOR_VALUE_TO_NAME_MAP with a dictionary of the form:
2203         {
2204             1 << 0: "A",
2205             1 << 1: "B",
2206             1 << 2: "C",
2207         }
2208         It is not necessary to instantiate such a derived class directory. Instead use the convenience
2209         function addSummaryAndSyntheticFormattersForRawBitmaskType.
2210
2211         (WTFOptionSetProvider.has_children): Deleted.
2212         (WTFOptionSetProvider.num_children): Deleted.
2213         (WTFOptionSetProvider.get_child_index): Deleted.
2214         (WTFOptionSetProvider.get_child_at_index): Deleted.
2215         (WTFOptionSetProvider.update): Deleted.
2216
2217 2019-01-04  Aakash Jain  <aakash_jain@apple.com>
2218
2219         [ews-build] Add build step to validate the patch before processing it
2220         https://bugs.webkit.org/show_bug.cgi?id=193140
2221
2222         Reviewed by Lucas Forschler.
2223
2224         * BuildSlaveSupport/ews-build/factories.py:
2225         (Factory.__init__): Added ValidatePatch step.
2226         * BuildSlaveSupport/ews-build/steps.py:
2227         (ValidatePatch):
2228         (ValidatePatch.fetch_data_from_url): Fetch data from a url.
2229         (ValidatePatch.get_patch_json): Get patch json data.
2230         (ValidatePatch.get_bug_json): Get bug json data.
2231         (ValidatePatch.get_bug_id_from_patch): Get bug id from a patch id.
2232         (ValidatePatch._is_patch_obsolete): Check if the patch is obsolete.
2233         (ValidatePatch._is_patch_review_denied): Check if the patch is marked r-.
2234         (ValidatePatch._is_bug_closed): Check if the bug is already closed.
2235         (ValidatePatch.skip_build): Skip the build.
2236         (ValidatePatch.start):
2237
2238 2019-01-04  Alex Christensen  <achristensen@webkit.org>
2239
2240         Progress towards fixing Mac CMake build
2241         https://bugs.webkit.org/show_bug.cgi?id=193105
2242
2243         Reviewed by Don Olmstead.
2244
2245         * TestWebKitAPI/PlatformMac.cmake:
2246
2247 2019-01-04  Alex Christensen  <achristensen@webkit.org>
2248
2249         Fix API test after r239631
2250         https://bugs.webkit.org/show_bug.cgi?id=193118
2251
2252         * TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
2253         (TestWebKitAPI::TEST):
2254         This test relied on m_maximumProcessCount being set to 1 in ProcessPoolConfiguration::createWithLegacyOptions.
2255         Do the same thing via the API to fix the test.
2256
2257 2019-01-04  Jer Noble  <jer.noble@apple.com>
2258
2259         [WebKitLegacy] Media playback pauses on scroll
2260         https://bugs.webkit.org/show_bug.cgi?id=192829
2261
2262         Reviewed by Eric Carlson.
2263
2264         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2265         * TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm: Added.
2266         (TestWebKitAPI::TEST):
2267         * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: Added.
2268         (-[ScrollingDoesNotPauseMediaDelegate webViewDidFinishLoad:]):
2269         (-[ScrollingDoesNotPauseMediaDelegate uiWebView:didCommitLoadForFrame:]):
2270         (-[ScrollingDoesNotPauseMediaDelegate handleEvent:]):
2271         (TestWebKitAPI::TEST):
2272
2273 2019-01-04  Chris Dumez  <cdumez@apple.com>
2274
2275         Add support for toggling device orientation API support per site
2276         https://bugs.webkit.org/show_bug.cgi?id=193143
2277         <rdar://problem/46605724>
2278
2279         Reviewed by Alex Christensen.
2280
2281         Add API test coverage.
2282
2283         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2284         (-[DataMappingSchemeHandler setTaskHandler:]):
2285         (-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
2286         (-[WebsitePoliciesDeviceOrientationDelegate initWithDeviceOrientationEventEnabled:]):
2287         (-[WebsitePoliciesDeviceOrientationDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2288         (-[WebsitePoliciesDeviceOrientationDelegate webView:didFinishNavigation:]):
2289
2290 2019-01-04  Aakash Jain  <aakash_jain@apple.com>
2291
2292         [ews-build] use svn-apply script to apply the patches
2293         https://bugs.webkit.org/show_bug.cgi?id=193138
2294
2295         Reviewed by Lucas Forschler.
2296
2297         * BuildSlaveSupport/ews-build/factories.py:
2298         (Factory.__init__): Add the ApplyPatch step.
2299         * BuildSlaveSupport/ews-build/steps.py:
2300         (CheckOutSource): Added step name.
2301         (CheckOutSource.__init__): Used alwaysUseLatest so that it doesn't apply patch.
2302         (ApplyPatch): Build step to apply patch using svn-apply script.
2303         (UnApplyPatchIfRequired):
2304         (UnApplyPatchIfRequired.__init__): Deleted, since the alwaysUseLatest parameter is now in base class.
2305
2306 2019-01-04  Alex Christensen  <achristensen@webkit.org>
2307
2308         Deprecate WKContextCreate
2309         https://bugs.webkit.org/show_bug.cgi?id=193118
2310
2311         Reviewed by Brady Eidson.
2312
2313         * MiniBrowser/win/WebKitBrowserWindow.cpp:
2314         (WebKitBrowserWindow::WebKitBrowserWindow):
2315         * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
2316         (TestWebKitAPI::TEST):
2317         * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp:
2318         (TestWebKitAPI::TEST):
2319         * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
2320         (TestWebKitAPI::TEST):
2321         * TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
2322         (TestWebKitAPI::TEST):
2323         * TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp:
2324         (TestWebKitAPI::TEST):
2325         * TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp:
2326         (TestWebKitAPI::TEST):
2327         * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
2328         (TestWebKitAPI::TEST):
2329         * TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp:
2330         (TestWebKitAPI::TEST):
2331         * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
2332         (TestWebKitAPI::TEST):
2333         * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
2334         (TestWebKitAPI::TEST):
2335         * TestWebKitAPI/Tests/WebKit/Find.cpp:
2336         (TestWebKitAPI::TEST):
2337         * TestWebKitAPI/Tests/WebKit/FindMatches.mm:
2338         (TestWebKitAPI::TEST):
2339         * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
2340         (TestWebKitAPI::TEST):
2341         * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
2342         (TestWebKitAPI::TEST):
2343         * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
2344         (TestWebKitAPI::TEST):
2345         * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
2346         (TestWebKitAPI::TEST):
2347         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
2348         (TestWebKitAPI::TEST):
2349         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
2350         (TestWebKitAPI::TEST):
2351         * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
2352         (TestWebKitAPI::loadAlternateHTMLString):
2353         * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
2354         (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
2355         * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
2356         (TestWebKitAPI::buildAndPerformTest):
2357         * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp:
2358         (TestWebKitAPI::TEST):
2359         * TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp:
2360         (TestWebKitAPI::TEST):
2361         * TestWebKitAPI/Tests/WebKit/PageGroup.cpp:
2362         (TestWebKitAPI::TEST):
2363         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
2364         (TestWebKitAPI::TEST):
2365         * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
2366         (TestWebKitAPI::TEST):
2367         * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
2368         (TestWebKitAPI::TEST):
2369         * TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp:
2370         (TestWebKitAPI::TEST):
2371         * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
2372         (TestWebKitAPI::TEST):
2373         * TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp:
2374         (TestWebKitAPI::TEST):
2375         * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
2376         (TestWebKitAPI::TEST):
2377         * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
2378         (TestWebKitAPI::TEST):
2379         * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
2380         (TestWebKitAPI::TEST):
2381         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
2382         (TestWebKitAPI::TEST):
2383         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
2384         (TestWebKitAPI::TEST):
2385         * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
2386         (TestWebKitAPI::TEST):
2387         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
2388         (TestWebKitAPI::TEST):
2389         * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
2390         (TestWebKitAPI::TEST):
2391         * TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
2392         (TestWebKitAPI::TEST):
2393         * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
2394         (TestWebKitAPI::TEST):
2395         * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
2396         (TestWebKitAPI::TEST):
2397         * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
2398         (TestWebKitAPI::TEST):
2399         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
2400         (TestWebKitAPI::TEST):
2401         * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
2402         (TestWebKitAPI::TEST):
2403         * TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp:
2404         (TestWebKitAPI::TEST):
2405         * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
2406         (TestWebKitAPI::TEST):
2407         * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
2408         (TestWebKitAPI::TEST):
2409         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
2410         (WebKit2_CommandBackForwardTestWKView::SetUp):
2411         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
2412         (TestWebKitAPI::TEST):
2413         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2414         (TestWebKitAPI::TEST):
2415         * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm:
2416         (TestWebKitAPI::TEST):
2417         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
2418         (TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):
2419
2420 2019-01-03  Matt Rajca  <mrajca@apple.com>
2421
2422         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
2423         https://bugs.webkit.org/show_bug.cgi?id=193128
2424         rdar://34554231
2425
2426         Reviewed by Jer Noble.
2427
2428         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
2429         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
2430         event along with a flag that indicates whether or not autoplay was actually prevented.
2431
2432         Tests: existing API tests were updated to reflect the new names. New API tests
2433         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
2434
2435         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2436         * TestWebKitAPI/Tests/WebKit/long-test.mp4: Added.
2437         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2438         (TEST):
2439         * TestWebKitAPI/Tests/WebKitCocoa/audio-with-play-button.html: Added.
2440         * TestWebKitAPI/Tests/WebKitCocoa/video-with-play-button.html: Added.
2441
2442 2019-01-04  Chris Dumez  <cdumez@apple.com>
2443
2444         [PSON] Calling history.back() from inside the load event handler prevents process-swapping
2445         https://bugs.webkit.org/show_bug.cgi?id=193120
2446
2447         Reviewed by Alex Christensen.
2448
2449         Add API test coverage.
2450
2451         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2452
2453 2019-01-04  Chris Dumez  <cdumez@apple.com>
2454
2455         Crash under WebProcessPool::addSuspendedPage()
2456         https://bugs.webkit.org/show_bug.cgi?id=193110
2457
2458         Reviewed by Youenn Fablet.
2459
2460         Add API test coverage.
2461
2462         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2463
2464 2019-01-04  Aakash Jain  <aakash_jain@apple.com>
2465
2466         [ews-build] Check patch relevance before applying the patch
2467         https://bugs.webkit.org/show_bug.cgi?id=193102
2468
2469         Reviewed by Lucas Forschler.
2470
2471         * BuildSlaveSupport/ews-build/factories.py:
2472         (Factory.__init__): Moved CheckPatchRelevance step to base class.
2473
2474 2019-01-04  Aakash Jain  <aakash_jain@apple.com>
2475
2476         [ews-build] Check patch relevance step should print patch id
2477         https://bugs.webkit.org/show_bug.cgi?id=193137
2478
2479         Reviewed by Lucas Forschler.
2480
2481         * BuildSlaveSupport/ews-build/steps.py:
2482         (CheckPatchRelevance.start): Update the status to include patch id.
2483
2484 2019-01-04  Jonathan Bedard  <jbedard@apple.com>
2485
2486         webkitpy: Increase simulator teardown timeout
2487         https://bugs.webkit.org/show_bug.cgi?id=193141
2488         <rdar://problem/46174217>
2489
2490         Rubber-stamped by Aakash Jain.
2491
2492         * Scripts/webkitpy/xcode/simulated_device.py:
2493         (SimulatedDeviceManager.tear_down): Use SIMULATOR_BOOT_TIMEOUT.
2494
2495 2019-01-03  Ross Kirsling  <ross.kirsling@sony.com>
2496
2497         test262-runner misbehaves when test file YAML has a trailing space
2498         https://bugs.webkit.org/show_bug.cgi?id=193053
2499
2500         Reviewed by Yusuke Suzuki.
2501
2502         * Scripts/test262/Runner.pm:
2503         (parseData):
2504         Accept trailing space when parsing a test file's YAML block.
2505
2506 2019-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2507
2508         UserMedia test should use WKPageNavigationClient
2509         https://bugs.webkit.org/show_bug.cgi?id=192913
2510
2511         Reviewed by Youenn Fablet.
2512
2513         The test currently uses the deprecated WKPageLoaderClient. It should use
2514         WKPageNavigationClient instead, which provides the same callback under a similar name.
2515
2516         * TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
2517         (TestWebKitAPI::TEST):
2518
2519 2019-01-02  Alex Christensen  <achristensen@webkit.org>
2520
2521         Homograph with LATIN SMALL LETTER R WITH FISHHOOK
2522         https://bugs.webkit.org/show_bug.cgi?id=192944
2523
2524         Reviewed by Tim Horton.
2525
2526         * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
2527         (TestWebKitAPI::TEST):
2528
2529 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
2530
2531         Add support for using the current text selection as the find string on iOS
2532         https://bugs.webkit.org/show_bug.cgi?id=193034
2533         <rdar://problem/45138739>
2534
2535         Reviewed by Tim Horton.
2536
2537         Add a new API test to verify that the new WebKit SPI (_stringForFind, _takeFindStringFromSelection:, and
2538         _setStringForFind) works as expected.
2539
2540         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2541         * TestWebKitAPI/Tests/WebKitCocoa/UseSelectionAsFindString.mm: Added.
2542
2543 2019-01-02  Aakash Jain  <aakash_jain@apple.com>
2544
2545         [ews-build] Use git on OpenSource EWS bots
2546         https://bugs.webkit.org/show_bug.cgi?id=193092
2547
2548         Reviewed by Lucas Forschler.
2549
2550         * BuildSlaveSupport/ews-build/steps.py:
2551         (CheckOutSource): Use git instead of svn.
2552         (CheckOutSource.__init__): Use timeout of 2 hours since the initial checkout might take a long time.
2553
2554 2019-01-02  Daniel Bates  <dabates@apple.com>
2555
2556         [lldb-webkit] Remove broken code to print WTF::OptionSet::m_storage
2557         https://bugs.webkit.org/show_bug.cgi?id=193023
2558
2559         Reviewed by Simon Fraser.
2560
2561         The code to print WTF::OptionSet::m_storage as an item in the set never worked and does
2562         not seem meaningful to fix because WTF::OptionSet::m_storage is just the sum of the printed
2563         enumerator values. We should just remove this code.
2564
2565         * lldb/lldb_webkit.py:
2566         (WTFOptionSetProvider.has_children):
2567         (WTFOptionSetProvider.num_children):
2568         (WTFOptionSetProvider.get_child_index):
2569         (WTFOptionSetProvider.get_child_at_index):
2570
2571 2018-12-29  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
2572
2573         .ycm_extra_conf.py should handle XXXInlines.h
2574         https://bugs.webkit.org/show_bug.cgi?id=193055
2575
2576         Reviewed by Carlos Garcia Campos.
2577
2578         compile_commands.json database only records flags and options for cpp source files.
2579         So, when we open headers, this database does not have any information for that.
2580         Our .ycm_extra_conf.py alleviates this by using XXX.cpp's configuration for XXX.h.
2581         But this mitigation does not handle XXXInlines.h well since we do not have XXXInlines.cpp.
2582         This patch adds support for XXXInlines.h in .ycm_extra_conf.py. When XXXInlines.h is queried,
2583         we attempt to find XXX.cpp and use the configuration if it exists.
2584
2585         * gtk/ycm_extra_conf.py:
2586         (getImplementationFilename):
2587         (FlagsForFile):
2588
2589 2018-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2590
2591         Unreviewed. Support PHP 7.3 in Debian.
2592
2593         Add 7.3 to the list of php versions supported in Debian.
2594
2595         * Scripts/webkitpy/port/base.py:
2596         (Port._debian_php_version):
2597
2598 2018-12-27  Alex Christensen  <achristensen@webkit.org>
2599
2600         Resurrect Mac CMake build
2601         https://bugs.webkit.org/show_bug.cgi?id=192658
2602
2603         Reviewed by Yusuke Suzuki.
2604
2605         * DumpRenderTree/PlatformMac.cmake:
2606         * MiniBrowser/mac/CMakeLists.txt:
2607         * TestWebKitAPI/PlatformMac.cmake:
2608
2609 2018-12-26  Adrian Perez de Castro  <aperez@igalia.com>
2610
2611         [Tools] Remove references to Bison and Flex
2612         https://bugs.webkit.org/show_bug.cgi?id=193033
2613
2614         Reviewed by Michael Catanzaro.
2615
2616         The Bison and Flex tools are not needed anymore since r209883.
2617
2618         * CygwinDownloader/cygwin-downloader.py:
2619         * EWSTools/ubuntu-ews-packages:
2620         * Scripts/filter-build-webkit:
2621         (shouldIgnoreLine):
2622         * gtk/install-dependencies:
2623         * wpe/install-dependencies:
2624
2625 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2626
2627         WebDriver: warn about non existing tests when parsing expectations
2628         https://bugs.webkit.org/show_bug.cgi?id=192979
2629
2630         Reviewed by Michael Catanzaro.
2631
2632         It's common to update web driver tests and forget updating the test expectations in case of tests removed or
2633         renamed.
2634
2635         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
2636         (WebDriverTestRunner.__init__):
2637
2638 2018-12-21  Chris Dumez  <cdumez@apple.com>
2639
2640         navigator.userAgent in service workers does not reflect customUserAgent set by client
2641         https://bugs.webkit.org/show_bug.cgi?id=192951
2642
2643         Reviewed by Youenn Fablet.
2644
2645         Extend API test coverage.
2646
2647         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2648         (-[SWCustomUserAgentDelegate initWithUserAgent:]):
2649         (-[SWCustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2650         (-[SWUserAgentMessageHandler initWithExpectedMessage:]):
2651         (-[SWUserAgentMessageHandler userContentController:didReceiveScriptMessage:]):
2652
2653 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2654
2655         [WebAuthN] userPresence should always be true
2656         https://bugs.webkit.org/show_bug.cgi?id=192835
2657         <rdar://problem/46538788>
2658
2659         Reviewed by Brent Fulgham.
2660
2661         * TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
2662         (TestWebKitAPI::TEST):
2663
2664 2018-12-19  Simon Fraser  <simon.fraser@apple.com>
2665
2666         Add support to run-benchmark to use non-default copies of the browser apps
2667         https://bugs.webkit.org/show_bug.cgi?id=192905
2668         rdar://problem/46845840
2669
2670         Reviewed by Dewei Zhu.
2671         
2672         Add support for a --browser-path argument to run-benchmark, which allows you to use
2673         a custom app bundle for a given browser (only implemented for Safari at present).
2674
2675         * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
2676         (BenchmarkRunner.__init__):
2677         * Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
2678         (BrowserDriver.__init__):
2679         * Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
2680         (BrowserDriverFactory.create):
2681         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
2682         (OSXBrowserDriver._launch_process):
2683         (OSXBrowserDriver._launch_process_with_caffeinate): Fix spelling.
2684         (OSXBrowserDriver._launch_process_with_caffinate): Deleted.
2685         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
2686         (OSXChromeCanaryDriver.launch_url):
2687         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
2688         (OSXFirefoxNightlyDriver.launch_url):
2689         * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
2690         (OSXSafariDriver.__init__):
2691         (OSXSafariDriver.launch_url):
2692         * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
2693         (parse_args):
2694         (run_benchmark_plan):
2695         * Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
2696         (WebServerBenchmarkRunner.__init__):
2697         * Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py:
2698         (FakeBenchmarkRunner.__init__):
2699
2700 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2701
2702         [WebAuthN] Import an APDU coder from Chromium
2703         https://bugs.webkit.org/show_bug.cgi?id=192949
2704         <rdar://problem/46879933>
2705
2706         Reviewed by Brent Fulgham.
2707
2708         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2709         * TestWebKitAPI/Tests/WebCore/ApduTest.cpp: Added.
2710         (TestWebKitAPI::TEST):
2711
2712 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2713
2714         Setting the file wrapper and content type of an attachment to a PDF should update its image
2715         https://bugs.webkit.org/show_bug.cgi?id=192984
2716         <rdar://problem/46798028>
2717
2718         Reviewed by Tim Horton.
2719
2720         Add an API test to verify that setting the file wrapper for a _WKAttachment with an enclosing image element with
2721         PDF data correctly updates the image element.
2722
2723         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2724
2725 2018-12-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2726
2727         Add JSCOnly to bot dashboard
2728         https://bugs.webkit.org/show_bug.cgi?id=192964
2729
2730         Reviewed by Alexey Proskuryakov.
2731
2732         Apparently we have five JSCOnly test bots and multiple developers working on keeping them in
2733         good shape. Sadly, they are hidden bots not exposed in the dashboard. They would be more
2734         useful if they were not so secret, so add them.
2735
2736         There appear to be no build-only bots, so the first column is blank. And of course there are
2737         no WebKit1 or WebKit2 bots, because this is JSCOnly, so the second and third columns are
2738         blank too. That's OK. This will be the last bot on the dashboard, so it won't look too bad,
2739         and there's plenty of room in the final column for all the bots.
2740
2741         I had a hard time picking a logo to use, because the JavaScript language does not have an
2742         official logo. But I believe I've found one that will be satisfactory.
2743
2744         I will sneak in one bonus change: WPE's EWS queue was missing, and has been added.
2745
2746         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish.png: Added.
2747         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/SquirrelFish@2x.png: Added.
2748         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
2749         (BubbleQueueServer):
2750         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
2751         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
2752         (WebKitBuildbot):
2753         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
2754         (table.queue-grid tr.platform.linux-jsconly img.logo):
2755
2756 2018-12-21  Benjamin Poulain  <benjamin@webkit.org>
2757
2758         <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
2759         https://bugs.webkit.org/show_bug.cgi?id=192821
2760
2761         Reviewed by Chris Dumez.
2762
2763         * DumpRenderTree/mac/DumpRenderTree.mm:
2764         (createWebViewAndOffscreenWindow):
2765         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
2766
2767 2018-12-20  Fujii Hironori  <Hironori.Fujii@sony.com>
2768
2769         [Win][Clang] Fix compilation warnings of DumpRenderTree
2770         https://bugs.webkit.org/show_bug.cgi?id=192924
2771
2772         Reviewed by Alex Christensen.
2773
2774         * DumpRenderTree/AccessibilityController.h: Added member variable initializations in the class definition.
2775         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
2776         (AccessibilityController::AccessibilityController): Moved member variable initializations to the class definition.
2777         * DumpRenderTree/win/DumpRenderTree.cpp:
2778         (dumpHistoryItem): String literals can't be converted non-const type. Use auto for them.
2779         (resetWebPreferencesToConsistentValues): Pass a temporal _bstr_t
2780         object to the argument of setDefaultTextEncodingName instead of a
2781         const string literal.
2782         (createWebViewAndOffscreenWindow): Use %lx for HRESULT (aka 'long').
2783         (main): Exit if _dup2 fails. Use %lu for'DWORD'(aka 'unsigned long').
2784         (setCacheFolder): Deleted.
2785         * DumpRenderTree/win/DumpRenderTreeWin.h: Fix class/struct mismatch of FrameLoadDelegate and PolicyDelegate declarations.
2786         * DumpRenderTree/win/EditingDelegate.cpp:
2787         (dump): Use %d for int.
2788         * DumpRenderTree/win/FrameLoadDelegate.cpp: Removed unused variable g_delegateWaitingOnTimer.
2789         * DumpRenderTree/win/ResourceLoadDelegate.cpp:
2790         (BSTRFromString): Deleted unused function.
2791         * DumpRenderTree/win/TestRunnerWin.cpp:
2792         (TestRunner::setDatabaseQuota): Pass a temporal _bstr_t object to
2793         the arguemnt of setQuota instead of const string literal.
2794         * DumpRenderTree/win/WorkQueueItemWin.cpp:
2795         (jsStringRefToWString): Deleted unused function.
2796
2797 2018-12-20  Chris Dumez  <cdumez@apple.com>
2798
2799         Add API test coverage for customUserAgent client setting and service workers
2800         https://bugs.webkit.org/show_bug.cgi?id=192952
2801
2802         Reviewed by Alex Christensen.
2803
2804         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2805         (-[SWMessageHandler userContentController:didReceiveScriptMessage:]):
2806         (-[SWSchemes webView:startURLSchemeTask:]):
2807         (-[SWCustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
2808         (-[SWUserAgentMessageHandler userContentController:didReceiveScriptMessage:]):
2809
2810 2018-12-20  Chris Dumez  <cdumez@apple.com>
2811
2812         Use Optional::hasValue() instead of Optional::has_value()
2813         https://bugs.webkit.org/show_bug.cgi?id=192948
2814
2815         Reviewed by Tim Horton.
2816
2817         * TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp:
2818         (TestWebKitAPI::TEST):
2819         * TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp:
2820         (TestWebKitAPI::TEST):
2821         * TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
2822         (TestWebKitAPI::TEST_F):
2823
2824 2018-12-20  Chris Dumez  <cdumez@apple.com>
2825
2826         Add style script rule to check for uses of std::optional<>
2827         https://bugs.webkit.org/show_bug.cgi?id=192931
2828
2829         Reviewed by Tim Horton.
2830
2831         * Scripts/webkitpy/style/checkers/cpp.py:
2832         (check_wtf_optional):
2833         (check_style):
2834
2835 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2836
2837         [WebAuthN] Add a runtime flag for local authenticator
2838         https://bugs.webkit.org/show_bug.cgi?id=192792
2839         <rdar://problem/46798738>
2840
2841         Reviewed by Brent Fulgham.
2842
2843         * DumpRenderTree/TestOptions.cpp:
2844         (TestOptions::TestOptions):
2845         * DumpRenderTree/TestOptions.h:
2846         * DumpRenderTree/mac/DumpRenderTree.mm:
2847         (enableExperimentalFeatures):
2848         (setWebPreferencesForTestOptions):
2849         * WebKitTestRunner/TestController.cpp:
2850         (WTR::TestController::resetPreferencesToConsistentValues):
2851         (WTR::updateTestOptionsFromTestHeader):
2852         * WebKitTestRunner/TestOptions.h:
2853         (WTR::TestOptions::hasSameInitializationOptions const):
2854
2855 2018-12-20  Jonathan Bedard  <jbedard@apple.com>
2856
2857         webkitpy: Autoinstall package URLs have changed
2858         https://bugs.webkit.org/show_bug.cgi?id=192909
2859         <rdar://problem/46860359>
2860
2861         Rubber-stamped by Alexey Proskuryakov.
2862
2863         PyPi urls have been moved around, we need to update our auto-installed packages.
2864
2865         We should check for Selenium before asking PyPi for the latest version.
2866
2867         * Scripts/webkitpy/thirdparty/__init__.py:
2868         (AutoinstallImportHook._install_mechanize): Update with new pypi url.
2869         (AutoinstallImportHook._install_keyring): Ditto.
2870         (AutoinstallImportHook._install_pep8): Ditto.
2871         (AutoinstallImportHook._install_mozlog): Ditto.
2872         (AutoinstallImportHook._install_mozprocess): Ditto.
2873         (AutoinstallImportHook._install_pytest_timeout): Ditto.
2874         (AutoinstallImportHook._install_pytest): Ditto.
2875         (AutoinstallImportHook._install_pylint): Ditto.
2876         (AutoinstallImportHook._install_buildbot): Ditto.
2877         (AutoinstallImportHook._install_coverage): Ditto.
2878         (AutoinstallImportHook._install_twisted_15_5_0): Ditto.
2879         (AutoinstallImportHook._install_selenium): Update with new pypi url, only check
2880         for new Selenium if the installed version isn't sufficient.
2881         (AutoinstallImportHook.get_latest_pypi_url): Update with new pypi url.
2882
2883 2018-12-20  Chris Dumez  <cdumez@apple.com>
2884
2885         Use Optional::valueOr() instead of Optional::value_or()
2886         https://bugs.webkit.org/show_bug.cgi?id=192933
2887
2888         Reviewed by Geoffrey Garen.
2889
2890         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
2891         (TestWebKitAPI::checkURL):
2892         (TestWebKitAPI::checkRelativeURL):
2893         (TestWebKitAPI::checkURLDifferences):
2894         (TestWebKitAPI::checkRelativeURLDifferences):
2895         * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
2896         (TestWebKitAPI::checkURL):
2897
2898 2018-12-20  Ryan Haddad  <ryanhaddad@apple.com>
2899
2900         Unreviewed, rolling out r239417.
2901
2902         Introduced two API test failures on macOS.
2903
2904         Reverted changeset:
2905
2906         "<rdar://problem/46194315> macOS: WebKit1 does not handle
2907         occlusion changes"
2908         https://bugs.webkit.org/show_bug.cgi?id=192821
2909         https://trac.webkit.org/changeset/239417
2910
2911 2018-12-20  Devin Rousso  <drousso@apple.com>
2912
2913         Web Inspector: UIString should take an optional key and description to aid localization
2914         https://bugs.webkit.org/show_bug.cgi?id=153962
2915         <rdar://problem/24542505>
2916
2917         Reviewed by Brian Burg.
2918
2919         * Scripts/extract-localizable-js-strings:
2920
2921 2018-12-20  Tim Horton  <timothy_horton@apple.com>
2922
2923         Unparented WKWebView can't retrieve main resource data for a main frame plugin
2924         https://bugs.webkit.org/show_bug.cgi?id=192923
2925         <rdar://problem/46859068>
2926
2927         Reviewed by Wenson Hsieh.
2928
2929         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2930         * TestWebKitAPI/WebKitCocoa/GetResourceData.mm:
2931         Add a test ensuring that both parented and unparented WKWebViews can
2932         retrieve main resource data when loading a PDF.
2933
2934 2018-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2935
2936         [GTK][WPE] Bump webkitgtk-test-fonts to 0.0.8
2937         https://bugs.webkit.org/show_bug.cgi?id=192852
2938
2939         Reviewed by Michael Catanzaro.
2940
2941         EmojiOne font was replaced by Noto Color Emoji.
2942
2943         * WebKitTestRunner/gtk/fonts/fonts.conf: Use Noto Color Emoji when Apple Color Emoji font family is used in tests.
2944         * gtk/jhbuild.modules:
2945         * wpe/jhbuild.modules:
2946
2947 2018-12-19  Chris Dumez  <cdumez@apple.com>
2948
2949         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
2950         https://bugs.webkit.org/show_bug.cgi?id=192728
2951         <rdar://problem/46746779>
2952
2953         Reviewed by Geoff Garen.
2954
2955         * DumpRenderTree/*:
2956         * MiniBrowser/*:
2957         * TestRunnerShared/*:
2958         * TestWebKitAPI/*:
2959         * WebGPUAPIStructure/*:
2960         * WebKitTestRunner/*:
2961
2962 2018-12-19  Benjamin Poulain  <benjamin@webkit.org>
2963
2964         <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
2965         https://bugs.webkit.org/show_bug.cgi?id=192821
2966
2967         Reviewed by Chris Dumez.
2968
2969         * DumpRenderTree/mac/DumpRenderTree.mm:
2970         (createWebViewAndOffscreenWindow):
2971
2972 2018-12-19  Alex Christensen  <achristensen@webkit.org>
2973
2974         Navigations away from the SafeBrowsing interstitial show a flash of old content
2975         https://bugs.webkit.org/show_bug.cgi?id=192676
2976
2977         Reviewed by Chris Dumez.
2978
2979         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
2980         (safeBrowsingView):
2981         (TEST):
2982         (-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Deleted.
2983
2984 2018-12-19  Adrian Perez de Castro  <aperez@igalia.com>
2985
2986         [GTK][WPE] Unify TestController::platformRunUntil() and honor condition flag
2987         https://bugs.webkit.org/show_bug.cgi?id=192855
2988
2989         Reviewed by Michael Catanzaro.
2990
2991         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
2992         (WTR::TestController::notifyDone): Use the WPE implementation.
2993         (WTR::TestController::platformRunUntil): Use the WPE implementation.
2994         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2995         (WTR::TestController::platformRunUntil): Honor the condition flag.
2996
2997 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
2998
2999         Allow clients to set the navigator platform
3000         https://bugs.webkit.org/show_bug.cgi?id=192735
3001
3002         Reviewed by Tim Horton.
3003
3004         Add a test for setting a custom navigator platform.
3005
3006         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3007         (-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
3008         (-[CustomNavigatorPlatformDelegate webView:didFinishNavigation:]):
3009
3010 2018-12-19  Truitt Savell  <tsavell@apple.com>
3011
3012         Unreviewed, rolling out r239358.
3013
3014         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
3015         crash on Debug bots
3016
3017         Reverted changeset:
3018
3019         "Clean up IndexedDB files between tests"
3020         https://bugs.webkit.org/show_bug.cgi?id=192796
3021         https://trac.webkit.org/changeset/239358
3022
3023 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3024
3025         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
3026         https://bugs.webkit.org/show_bug.cgi?id=192842
3027         <rdar://problem/46823586>
3028
3029         Reviewed by Tim Horton.
3030
3031         Adjusts an existing API test to verify that "com.apple.webarchive" is not one of the types registered to the
3032         item provider when dragging a rich text selection.
3033
3034         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3035
3036 2018-12-18  David Quesada  <david_quesada@apple.com>
3037
3038         REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
3039         https://bugs.webkit.org/show_bug.cgi?id=192810
3040         <rdar://problem/46812536>
3041
3042         Reviewed by Alex Christensen.
3043
3044         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
3045         (-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
3046             After releasing our reference to the web view, wait until the next turn of the runloop
3047             before checking that the originatingWebView has been zeroed, since the web view might
3048             still be referenced in the autorelease pool. This _WKDownload unit test isn't about
3049             testing general memory management of WKWebViews, only that _WKDownload does not retain
3050             its web view via the 'originatingWebView' property.
3051
3052 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
3053
3054         Clean up IndexedDB files between tests
3055         https://bugs.webkit.org/show_bug.cgi?id=192796
3056
3057         Reviewed by Geoffrey Garen.
3058
3059         * DumpRenderTree/mac/DumpRenderTree.mm:
3060         (runTest):
3061         * WebKitTestRunner/TestController.cpp:
3062         (WTR::TestController::resetStateToConsistentValues):
3063         (WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext):
3064         (WTR::RemoveAllIndexedDatabasesCallback):
3065         (WTR::TestController::ClearIndexedDatabases):
3066         * WebKitTestRunner/TestController.h:
3067
3068 2018-12-18  Alex Christensen  <achristensen@webkit.org>
3069
3070         Fix API test introduced in r239339 on iOS.
3071         https://bugs.webkit.org/show_bug.cgi?id=192675
3072
3073         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3074         (TEST):
3075         The iOS implementation of the safe browsing warning is a little different.
3076         It does some element creation when it is added to the window so it knows how big it is.
3077         To test these elements, we need to simulate adding it to the window.
3078         A similar technique is done in other iOS API tests, such as SafeBrowsing.ShowWarningSPI.
3079
3080 2018-12-18  Jonathan Bedard  <jbedard@apple.com>
3081
3082         webkitpy: Ignore device type for test when using --force
3083         https://bugs.webkit.org/show_bug.cgi?id=192786
3084         <rdar://problem/46794894>
3085
3086         Reviewed by Daniel Bates.
3087
3088         It is sometimes the case that a contributor will wish to run a test on a specific device,
3089         despite expectations which indicate a test should not be run on that device.
3090
3091         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
3092         (parse_args):
3093         * Scripts/webkitpy/port/device_port.py:
3094         (DevicePort.default_child_processes): Strip device type information when using --force.
3095         (DevicePort.setup_test_run): Only allow incomplete match when using --force.
3096
3097 2018-12-18  Alex Christensen  <achristensen@webkit.org>
3098
3099         WKWebView has old URL while displaying SafeBrowsing interstitial, for link-click navigations
3100         https://bugs.webkit.org/show_bug.cgi?id=192675
3101
3102         Reviewed by Geoffrey Garen.
3103
3104         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3105         (goBack):
3106         (TEST):
3107         (visitUnsafeSite):
3108         (-[SafeBrowsingHelper observeValueForKeyPath:ofObject:change:context:]):
3109         (-[SafeBrowsingHelper webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
3110
3111 2018-12-18  Chris Dumez  <cdumez@apple.com>
3112
3113         Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
3114         https://bugs.webkit.org/show_bug.cgi?id=192772
3115
3116         Reviewed by Antti Koivisto.
3117
3118         Add API test coverage.
3119
3120         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3121
3122 2018-12-18  Philippe Normand  <pnormand@igalia.com>
3123
3124         Unreviewed, JHBuild GTK build fix attempt
3125
3126         * gtk/jhbuild.modules: There's no libffi in this moduleset anymore.
3127         There's no ninja module either, it should be provided by the
3128         host system.
3129
3130 2018-12-17  Chris Dumez  <cdumez@apple.com>
3131
3132         Allow passing nil as session state to [WKWebView _restoreSessionState:]
3133         https://bugs.webkit.org/show_bug.cgi?id=192789
3134         <rdar://problem/46755277>
3135
3136         Reviewed by Alex Christensen.
3137
3138         Add API test coverage.
3139
3140         * TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm:
3141         (TEST):
3142
3143 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3144
3145         Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled
3146         https://bugs.webkit.org/show_bug.cgi?id=192780
3147         rdar://problem/43394387
3148
3149         Reviewed by Tim Horton.
3150
3151         No need to set "AppleFontSmoothing" defaults for WK2.
3152
3153         * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
3154         (WTR::InjectedBundle::platformInitialize):
3155
3156 2018-12-17  Jonathan Bedard  <jbedard@apple.com>
3157
3158         webkitpy: Handle case where stdout and stderr don't accept unicode
3159         https://bugs.webkit.org/show_bug.cgi?id=192775
3160         <rdar://problem/46497303>
3161
3162         Reviewed by Stephanie Lewis.
3163
3164         * Scripts/webkitpy/layout_tests/views/metered_stream.py:
3165         (MeteredStream.write): If unicode cannot be written to the stream, replace unicode
3166         characters with '?'.
3167         * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
3168         (RegularTest.test_stream_with_encoding):
3169
3170 2018-12-17  Daniel Bates  <dabates@apple.com>
3171
3172         Support concatenating StringView with other string types
3173         https://bugs.webkit.org/show_bug.cgi?id=177566
3174
3175         Reviewed by Darin Adler.
3176
3177         Add some tests to ensure we do not regress the number of allocations needed when performing
3178         string concatenation with string views.
3179
3180         * TestWebKitAPI/Tests/WTF/StringOperators.cpp:
3181         (TestWebKitAPI::TEST):
3182
3183 2018-12-17  Commit Queue  <commit-queue@webkit.org>
3184
3185         Unreviewed, rolling out r239265 and r239274.
3186         https://bugs.webkit.org/show_bug.cgi?id=192765
3187
3188         unorm_normalize is deprecated, and broke an internal build
3189         (Requested by Truitt on #webkit).
3190
3191         Reverted changesets:
3192
3193         "[GTK][WPE] Need a function to convert internal URI to display
3194         ("pretty") URI"
3195         https://bugs.webkit.org/show_bug.cgi?id=174816
3196         https://trac.webkit.org/changeset/239265
3197
3198         "Fix the Apple Internal Mac build with a newer SDK"
3199         https://trac.webkit.org/changeset/239274
3200
3201 2018-12-17  Daniel Bates  <dabates@apple.com>
3202
3203         Implement UIScriptController::toggleCapsLock() for iOS
3204         https://bugs.webkit.org/show_bug.cgi?id=191815
3205
3206         Reviewed by Andy Estes.
3207
3208         Add support for toggling the caps lock state in WebKitTestRunner on iOS.
3209
3210         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3211         * WebKitTestRunner/TestController.cpp:
3212         (WTR::TestController::resetStateToConsistentValues): Clear the current modifier state
3213         before running a test. This ensures that the caps lock state does not persist between
3214         tests should a test enable caps lock and not disable it.
3215         * WebKitTestRunner/ios/HIDEventGenerator.mm:
3216         (hidUsageCodeForCharacter): Map "capsLock" to the Caps Lock key usage code.
3217         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3218         (WTR::createUIPhysicalKeyboardEvent): Modified to take the keyboard input flags to use to
3219         create the event. Also substituted NSString* for const String& as the data type for the first
3220         two parameters to avoid conversions in the implementation of UIScriptController::toggleCapsLock()
3221         below.
3222         (WTR::UIScriptController::keyDown): Update as needed due to changes to prototype of createUIPhysicalKeyboardEvent().
3223         (WTR::UIScriptController::toggleCapsLock): Dispatch a UIEvent to toggle caps lock.
3224
3225 2018-12-17  Daniel Bates  <dabates@apple.com>
3226
3227         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
3228         https://bugs.webkit.org/show_bug.cgi?id=192633
3229
3230         Reviewed by Wenson Hsieh.
3231
3232         Update code to use the modern initializer.
3233
3234         * DumpRenderTree/mac/EventSendingController.mm:
3235         (-[EventSendingController keyDown:withModifiers:withLocation:]):
3236
3237 2018-12-17  Matt Lewis  <jlewis3@apple.com>
3238
3239         Unreviewed, rolling out r239254.
3240
3241         This broke the Windows 10 Debug build
3242
3243         Reverted changeset:
3244
3245         "Replace many uses of String::format with more type-safe
3246         alternatives"
3247         https://bugs.webkit.org/show_bug.cgi?id=192742
3248         https://trac.webkit.org/changeset/239254
3249
3250 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3251
3252         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
3253         <https://webkit.org/b/192751>
3254         <rdar://problem/46771623>
3255
3256         Reviewed by Daniel Bates.
3257
3258         Change loop variables to const references to avoid unnecessary
3259         copies.
3260
3261         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
3262         (-[LocalPasteboard pasteboardItems]):
3263
3264 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
3265
3266         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
3267         https://bugs.webkit.org/show_bug.cgi?id=174816
3268
3269         Reviewed by Michael Catanzaro.
3270
3271         Add tests for userVisibleString() and (for GTK and WPE) webkit_uri_for_display().
3272
3273         * TestWebKitAPI/CMakeLists.txt:
3274         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3275         * TestWebKitAPI/Tests/WTF/URLHelpers.cpp: Added.
3276         (TestWebKitAPI::TEST):
3277         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitURIUtilities.cpp: Added.
3278         (testURIForDisplayUnaffected):
3279         (testURIForDisplayAffected):
3280         (beforeAll):
3281         (afterAll):
3282         * TestWebKitAPI/glib/CMakeLists.txt:
3283
3284 2018-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3285
3286         [WPE] Add API to notify about frame displayed view backend callback
3287         https://bugs.webkit.org/show_bug.cgi?id=192224
3288
3289         Reviewed by Michael Catanzaro.
3290
3291         Add a test case to check the new API.
3292
3293         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
3294         (testWebViewFrameDisplayed):
3295         (beforeAll):
3296         * wpe/jhbuild.modules: Bump WPEBackend-fdo to 1.1.0.
3297
3298 2018-12-16  Adrian Perez de Castro  <aperez@igalia.com>
3299
3300         Unreviewed build fix after r239253
3301
3302         * gtk/jhbuild.modules: Fix typo in libpsl dependency name.
3303
3304 2018-12-15  Darin Adler  <darin@apple.com>
3305
3306         Use warning-ignoring macros more consistently and simply
3307         https://bugs.webkit.org/show_bug.cgi?id=192743
3308
3309         Reviewed by Mark Lam.
3310
3311         * DumpRenderTree/TestNetscapePlugIn/main.cpp:
3312         (handleEventCarbon): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3313         * DumpRenderTree/mac/TextInputControllerMac.m:
3314         (-[TextInputController interpretKeyEvents:withSender:]): Use
3315         IGNORE_WARNINGS_BEGIN/END.
3316         * WebKitTestRunner/mac/EventSenderProxy.mm:
3317         (WTR::EventSenderProxy::mouseForceClick): Use
3318         IGNORE_NULL_CHECK_WARNINGS_BEGIN/END.
3319         (WTR::EventSenderProxy::startAndCancelMouseForceClick): Ditto.
3320         (WTR::EventSenderProxy::mouseForceDown): Ditto.
3321         (WTR::EventSenderProxy::mouseForceUp): Ditto.
3322         (WTR::EventSenderProxy::mouseForceChanged): Ditto.
3323
3324 2018-12-15  Darin Adler  <darin@apple.com>
3325
3326         Replace many uses of String::format with more type-safe alternatives
3327         https://bugs.webkit.org/show_bug.cgi?id=192742
3328
3329         Reviewed by Mark Lam.
3330
3331         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3332         (WTR::cacheTestRunnerCallback): Use makeString.
3333         * WebKitTestRunner/TestController.cpp:
3334         (WTR::TestController::didReceiveAuthenticationChallenge): Use makeString.
3335         (WTR::TestController::downloadDidFail): Use an ASCIILiteral via the _s syntax.
3336
3337 2018-12-15  Adrian Perez de Castro  <aperez@igalia.com>
3338
3339         [WPE][GTK] Add libpsl to JHBuild module sets
3340         https://bugs.webkit.org/show_bug.cgi?id=192740
3341
3342         Reviewed by Michael Catanzaro.
3343
3344         * gtk/jhbuild.modules: Add libpsl module.
3345         * wpe/jhbuild.modules: Ditto.
3346
3347 2018-12-14  Alexey Proskuryakov  <ap@apple.com>
3348
3349         Add a style checker rule for Xcode version macros use
3350         https://bugs.webkit.org/show_bug.cgi?id=192703
3351
3352         Reviewed by Alex Christensen.
3353
3354         * Scripts/webkitpy/style/checkers/cpp.py:
3355         (check_os_version_checks):
3356         (process_line):
3357         (CppChecker):
3358         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
3359         (WebKitStyleTest.test_os_version_checks):
3360
3361 2018-12-14  Chris Dumez  <cdumez@apple.com>
3362
3363         [PSON] Process-swapping on a loadHTMLString causes duplicate decidePolicyForNavigationAction delegate calls
3364         https://bugs.webkit.org/show_bug.cgi?id=192704
3365
3366         Reviewed by Geoffrey Garen.
3367
3368         Extend existing API test to reproduce the problem.
3369
3370         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3371
3372 2018-12-14  Chris Dumez  <cdumez@apple.com>
3373
3374         [PSON] WebsitePolicies are lost on process-swap
3375         https://bugs.webkit.org/show_bug.cgi?id=192694
3376         <rdar://problem/46715748>
3377
3378         Reviewed by Brady Eidson.
3379
3380         Extend existing API test to reproduce the issue.
3381
3382         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3383
3384 2018-12-14  Michael Catanzaro  <mcatanzaro@igalia.com>
3385
3386         [GTK] Error writing data to TLS socket in some sites when using the jhbuild
3387         https://bugs.webkit.org/show_bug.cgi?id=192678
3388
3389         Reviewed by Carlos Garcia Campos.
3390
3391         Update our ancient versions of libsoup and glib-networking.
3392
3393         * gtk/install-dependencies:
3394         * gtk/jhbuild.modules:
3395         * gtk/patches/libsoup-auth-Fix-async-authentication-when-flag-SOUP_MESSAGE.patch: Removed.
3396         * gtk/patches/libsoup-auth-do-not-use-cached-credentials-in-lookup-method-.patch: Removed.
3397         * gtk/patches/libsoup-soup-message-io-Do-not-fail-when-there-s-no-empty-li.patch: Removed.
3398         * gtk/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
3399         * wpe/install-dependencies:
3400         * wpe/jhbuild.modules:
3401         * wpe/patches/libsoup-soup-socket-fix-critical-warning-when-the-peer-certi.patch: Removed.
3402
3403 2018-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3404
3405         [WPE] Use new view state API from libwpe
3406         https://bugs.webkit.org/show_bug.cgi?id=191906
3407
3408         Reviewed by Žan Doberšek.
3409
3410         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
3411         (beforeAll): Enable /webkit/WebKitWebView/page-visibility in WPE.
3412         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
3413         (Test::createWebViewBackend): Make the view initially hidden for consistency with GTK+ tests.
3414         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
3415         * TestWebKitAPI/glib/WebKitGLib/wpe/WebViewTestWPE.cpp:
3416         (WebViewTest::showInWindow): Add wpe_view_activity_state_visible, wpe_view_activity_state_in_window and
3417         wpe_view_activity_state_focused state flags.
3418         (WebViewTest::hideView): Remove wpe_view_activity_state_visible and wpe_view_activity_state_focused state flags.
3419         * wpe/backends/HeadlessViewBackend.cpp:
3420         (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Assume view is always visible, focused and in window.
3421         * wpe/backends/WindowViewBackend.cpp:
3422         (WPEToolingBackends::WindowViewBackend::WindowViewBackend): Update the view state flags depending on state
3423         received in configure callback.
3424         * wpe/jhbuild.modules: Bump libwpe to 1.1.0
3425
3426 2018-12-13  Fujii Hironori  <Hironori.Fujii@sony.com>
3427
3428         [WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
3429         https://bugs.webkit.org/show_bug.cgi?id=192688
3430
3431         Reviewed by Ross Kirsling.
3432
3433         * win/DLLLauncher/DLLLauncherMain.cpp:
3434         (copyEnvironmentVariable): Moved.
3435         (getStringValue): Enclosed with #if !defined(WIN_CAIRO).
3436         (applePathFromRegistry): Ditto.
3437         (appleApplicationSupportDirectory): Ditto.
3438         (prependPath): Ditto.
3439
3440 2018-12-13  Don Olmstead  <don.olmstead@sony.com>
3441
3442         Unreviewed. Changed my status to a reviewer.
3443
3444         * Scripts/webkitpy/common/config/contributors.json:
3445
3446 2018-12-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3447
3448         [iOS] Support dropping contact card data (public.vcard) in editable content
3449         https://bugs.webkit.org/show_bug.cgi?id=192570
3450         <rdar://problem/35626913>
3451
3452         Reviewed by Tim Horton.
3453
3454         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3455
3456         Add API tests to verify that registering `MKMapItem`s and `CNContact`s to item providers and dropping them in
3457         attachment-enabled rich text editable areas inserts attachment elements (and in the case of `MKMapItem`,
3458         additionally inserts a link).
3459
3460         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3461         (TestWebKitAPI::createMapItemForTesting):
3462         (TestWebKitAPI::createContactItemForTesting):
3463
3464         Add API tests to verify that dropping map items and contact items into rich and plain editable areas behaves as
3465         expected (in the case where a URL is present, e.g. dropping a map item, we insert the URL as an anchor, and when
3466         there is no other suitable representation in the item provider, we do nothing at all, which is the case for the
3467         dropped `CNContact`). Also, add a test to verify that drag and drop can be used to upload these items as .vcf
3468         files.
3469
3470 2018-12-13  Ross Kirsling  <ross.kirsling@sony.com>
3471
3472         Unreviewed -- update my status to "reviewer".
3473
3474         * Scripts/webkitpy/common/config/contributors.json:
3475
3476 2018-12-13  Youenn Fablet  <youenn@apple.com>
3477
3478         On page close, WebPage::m_userMediaPermissionRequestManager is nullified too early
3479         https://bugs.webkit.org/show_bug.cgi?id=192657
3480
3481         Reviewed by Eric Carlson.
3482
3483         Add a test that loads a page registering ondevicechange,
3484         load another page in the same process, closes the first page.
3485         Ensure that the process does not crash in that case.
3486
3487         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3488         * TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
3489         (TestWebKitAPI::TEST):
3490         (TestWebKitAPI::didCrashCallback):
3491         * TestWebKitAPI/Tests/WebKit/ondevicechange.html: Added.
3492
3493 2018-12-13  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
3494
3495         [GStreamer][JHBuild] update-webkit{gtk,wpe}-libs fails with libfdk-2.0.0
3496         https://bugs.webkit.org/show_bug.cgi?id=192643
3497
3498         Reviewed by Philippe Normand.
3499
3500         This problem happens with Arch Linux users which have libfdk-2.0.0
3501         installed (which is anybody with gst-plugins-bad 1.14.4 installed).
3502
3503         The problem has already been solved upstream at
3504         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/77.
3505
3506         Adding patches while this problem is not in a release yet.
3507
3508         * gstreamer/jhbuild.modules: Add patches to fix build of gst-plugins-bad with libfdk-2.0.0.
3509         * gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch: Added.
3510         * gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch: Added.
3511
3512 2018-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3513
3514         [FreeType] Add initial implementation of variation fonts
3515         https://bugs.webkit.org/show_bug.cgi?id=192151
3516
3517         Reviewed by Michael Catanzaro.
3518
3519         Add cairo patch to avoid crashes.
3520
3521         * gtk/jhbuild.modules:
3522         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.
3523
3524 2018-12-12  Fujii Hironori  <Hironori.Fujii@sony.com>
3525
3526         [Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
3527         https://bugs.webkit.org/show_bug.cgi?id=192618
3528
3529         Reviewed by Alex Christensen.
3530
3531         * DumpRenderTree/win/DRTDataObject.cpp:
3532         * DumpRenderTree/win/DRTDataObject.h:
3533         * DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
3534         * DumpRenderTree/win/DRTDropSource.h:
3535         * DumpRenderTree/win/EditingDelegate.h:
3536         * DumpRenderTree/win/PolicyDelegate.h:
3537         * DumpRenderTree/win/UIDelegate.h:
3538
3539 2018-12-12  Ryosuke Niwa  <rniwa@webkit.org>
3540
3541         Make TextInputController.legacyAttributedString take DOM nodes and offsets
3542         https://bugs.webkit.org/show_bug.cgi?id=192653
3543
3544         Reviewed by Wenson Hsieh.
3545
3546         Updated TextInputController.legacyAttributedString to take DOM nodes and offsets instead of
3547         a DOM Range object in preparation to add layout tests for HTMLConverter which crosses
3548         shadow boundaries.
3549
3550         * DumpRenderTree/mac/TextInputControllerMac.m:
3551         (+[TextInputController isSelectorExcludedFromWebScript:]): Updated the selector signature.
3552         (+[TextInputController webScriptNameForSelector:]): Ditto.
3553         (-[TextInputController legacyAttributedString:offset:to:offset:]): Made this function take
3554         start node and offset then end node and offset pairs.
3555
3556 2018-12-12  Alex Christensen  <achristensen@webkit.org>
3557
3558         Implement safe browsing in WebKit on WatchOS
3559         https://bugs.webkit.org/show_bug.cgi?id=192641
3560         <rdar://problem/46376188>
3561
3562         Reviewed by Geoff Garen.
3563
3564         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3565         (-[SafeBrowsingNavigationDelegate _webViewDidShowSafeBrowsingWarning:]):
3566         (safeBrowsingView):
3567         Add a test that the new delegate callback is called.
3568
3569 2018-12-12  Michael Catanzaro  <mcatanzaro@igalia.com>
3570
3571         Unreviewed manual rollout of r239100-r239102 and r239116
3572         https://bugs.webkit.org/show_bug.cgi?id=192151
3573         <rdar://problem/46655586>
3574
3575         * gtk/jhbuild.modules:
3576         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Removed.
3577
3578 2018-12-12  Commit Queue  <commit-queue@webkit.org>
3579
3580         Unreviewed, rolling out r239103.
3581         https://bugs.webkit.org/show_bug.cgi?id=192627
3582
3583         It broke the built because it depends on another patch that
3584         didn't land yet (Requested by KaL on #webkit).
3585
3586         Reverted changeset:
3587
3588         "[WPE] Add API to notify about frame displayed view backend
3589         callback"
3590         https://bugs.webkit.org/show_bug.cgi?id=192224
3591         https://trac.webkit.org/changeset/239103
3592
3593 2018-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3594
3595         [WPE] Add API to notify about frame displayed view backend callback
3596         https://bugs.webkit.org/show_bug.cgi?id=192224
3597
3598         Reviewed by Michael Catanzaro.
3599
3600         Add a test case to check the new API.
3601
3602         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
3603         (testWebViewFrameDisplayed):
3604         (beforeAll):
3605
3606 2018-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3607
3608         [FreeType] Add initial implementation of variation fonts
3609         https://bugs.webkit.org/show_bug.cgi?id=192151
3610
3611         Reviewed by Michael Catanzaro.
3612
3613         Add cairo patch to avoid crashes.
3614
3615         * gtk/jhbuild.modules:
3616         * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Added.
3617
3618 2018-12-11  Justin Michaud  <justin_michaud@apple.com>
3619
3620         Implement feature flag for CSS Typed OM
3621         https://bugs.webkit.org/show_bug.cgi?id=192610
3622
3623         Reviewed by Ryosuke Niwa.
3624
3625         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3626
3627 2018-12-11  Chris Dumez  <cdumez@apple.com>
3628
3629         Unreviewed, fix bad check in API test added in r239080.
3630
3631         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3632
3633 2018-12-11  Fujii Hironori  <Hironori.Fujii@sony.com>
3634
3635         [Win][Clang] Fix warning -Wmissing-field-initializers
3636         https://bugs.webkit.org/show_bug.cgi?id=192584
3637
3638         Reviewed by Yusuke Suzuki.
3639
3640         Initialize a struct with '{ }' instead of '= {0}'.
3641
3642         * DumpRenderTree/win/DumpRenderTree.cpp:
3643         (runTest):
3644         * DumpRenderTree/win/EventSender.cpp:
3645         (makeMsg):
3646         (replaySavedEvents):
3647         (beginDragWithFilesCallback):
3648         * DumpRenderTree/win/PixelDumpSupportWin.cpp:
3649         (createBitmapContextFromWebView):
3650         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
3651         (updateMenuItemForHistoryItem):
3652         * MiniBrowser/win/WinMain.cpp:
3653         (wWinMain):
3654         * TestWebKitAPI/win/HostWindow.cpp:
3655         (TestWebKitAPI::HostWindow::clientRect const):
3656         (TestWebKitAPI::HostWindow::registerWindowClass):
3657         * TestWebKitAPI/win/PlatformWebViewWin.cpp:
3658         (TestWebKitAPI::PlatformWebView::registerWindowClass):
3659         * WebKitTestRunner/win/PlatformWebViewWin.cpp:
3660         (WTR::registerWindowClass):
3661         (WTR::PlatformWebView::windowFrame):
3662         (WTR::PlatformWebView::windowSnapshotImage):
3663
3664 2018-12-11  Chris Dumez  <cdumez@apple.com>
3665
3666         PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
3667         https://bugs.webkit.org/show_bug.cgi?id=192482
3668         <rdar://problem/46470145>
3669
3670         Reviewed by Antti Koivisto.
3671
3672         Add API test coverage.
3673
3674         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3675
3676 2018-12-11  Andy Estes  <aestes@apple.com>
3677
3678         Introduce makeBlockPtr for lambdas
3679         https://bugs.webkit.org/show_bug.cgi?id=192594
3680
3681         Reviewed by Alex Christensen.
3682
3683         Adopted makeBlockPtr and added API tests.
3684
3685         * DumpRenderTree/TestRunner.cpp:
3686         (TestRunner::callUIScriptCallback):
3687         * TestWebKitAPI/Tests/WTF/BlockPtr.mm:
3688         (TestWebKitAPI::TEST):
3689         * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
3690         (-[DownloadProgressTestRunner init]):
3691         (-[DownloadProgressTestRunner subscribeAndWaitForProgress]):
3692
3693 2018-12-11  Chris Dumez  <cdumez@apple.com>
3694
3695         REGRESSION (r238764-238783): TestWTF.WTF.StringOperators is failing
3696         https://bugs.webkit.org/show_bug.cgi?id=192361
3697         <rdar://problem/46524903>
3698
3699         Reviewed by Alex Christensen.
3700
3701         Compile StringOperators.cpp with -O1 optimization level instead of -Os. This
3702         fixes the failures for me locally.
3703
3704         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3705
3706 2018-12-11  Philippe Normand  <pnormand@igalia.com>
3707
3708         Unreviewed, WPE build fix after r239028
3709
3710         The FLATPAK_USER_DIR env var is not set early enough, leading to:
3711
3712         Traceback (most recent call last):
3713         File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>
3714           sys.exit(WebkitFlatpak.load_from_args().run())
3715         File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run
3716           if not self.clean_args():
3717         File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args
3718           _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"])
3719         File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
3720           raise KeyError(key)
3721         KeyError: 'FLATPAK_USER_DIR'
3722
3723         * flatpak/flatpakutils.py:
3724         (WebkitFlatpak.clean_args):
3725
3726 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
3727
3728         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
3729         https://bugs.webkit.org/show_bug.cgi?id=192573
3730
3731         Reviewed by Simon Fraser.
3732
3733         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3734
3735 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
3736
3737         [CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
3738         https://bugs.webkit.org/show_bug.cgi?id=192574
3739
3740         Reviewed by Michael Catanzaro.
3741
3742         * Scripts/webkitperl/FeatureList.pm:
3743
3744 2018-12-10  Don Olmstead  <don.olmstead@sony.com>
3745
3746         Sync FeatureList.pm
3747         https://bugs.webkit.org/show_bug.cgi?id=192565
3748
3749         Reviewed by Michael Catanzaro.
3750
3751         * Scripts/webkitperl/FeatureList.pm:
3752
3753 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
3754
3755         [iOS] Unable to upload data that conforms to "public.item" but not "public.content"
3756         https://bugs.webkit.org/show_bug.cgi?id=192555
3757         <rdar://problem/35204990>
3758
3759         Reviewed by Tim Horton.
3760
3761         Add a test to verify that `.p12` files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
3762         example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
3763         only support uploading "public.content", so files such as these would not be accepted when dropping into file
3764         inputs, or be exposed as files on DataTransfer.
3765
3766         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3767         (TestWebKitAPI::TEST):
3768
3769 2018-12-10  David Kilzer  <ddkilzer@apple.com>
3770
3771         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
3772         <https://webkit.org/b/192481>
3773         <rdar://problem/46539059>
3774
3775         Follow-up to address Darin's feedback.
3776
3777         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3778         (WTR::TestRunner::shouldDumpPixels const):
3779         (WTR::TestRunner::whatToDump const):
3780         (WTR::TestRunner::shouldWaitUntilDone const):
3781         (WTR::TestRunner::shouldDumpFrameLoadCallbacks):
3782         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
3783         (WTR::TestRunner::secureEventInputIsEnabled const):
3784         (WTR::TestRunner::isStatisticsPrevalentResource):
3785         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
3786         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
3787         (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
3788         (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
3789         (WTR::TestRunner::isStatisticsHasHadUserInteraction):
3790         (WTR::TestRunner::isStatisticsGrandfathered):
3791         (WTR::TestRunner::hasDOMCache):
3792         (WTR::TestRunner::keyExistsInKeychain):
3793
3794 2018-12-10  Jonathan Bedard  <jbedard@apple.com>
3795
3796         webkitpy: Ref tests don't respect platform specific expectations
3797         https://bugs.webkit.org/show_bug.cgi?id=192515
3798         <rdar://problem/46564839>
3799
3800         Reviewed by Lucas Forschler.
3801
3802         * Scripts/webkitpy/port/base.py:
3803         (Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
3804         (Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
3805         (Port.expected_filename): Remove irrelevant FIXME, code clean-up.
3806         (Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
3807         search all platform expectations as well.
3808         * Scripts/webkitpy/port/base_unittest.py:
3809         (test_ref_tests_platform_directory):
3810
3811 2018-12-10  Chris Dumez  <cdumez@apple.com>
3812
3813         Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
3814         https://bugs.webkit.org/show_bug.cgi?id=192509
3815         <rdar://problem/46500832>
3816
3817         Reviewed by Alex Christensen.
3818
3819         Add API test coverage.
3820
3821         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3822         (-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
3823         (-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
3824         (-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
3825         (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
3826         (-[CustomUserAgentDelegate webView:didFinishNavigation:]):
3827
3828 2018-12-10  Wenson Hsieh  <wenson_hsieh@apple.com>
3829
3830         [iOS] Caret is obscured by finger when dragging over an editable element
3831         https://bugs.webkit.org/show_bug.cgi?id=192499
3832         <rdar://problem/46570101>
3833
3834         Reviewed by Tim Horton.
3835
3836         Augment some existing API tests to check that the `precise` flag is either on or off on `UIDropProposal`.
3837
3838         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3839         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
3840         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
3841         (-[DragAndDropSimulator _resetSimulatedState]):
3842         (-[DragAndDropSimulator lastKnownDropProposal]):
3843
3844         Rename `currentDropProposal` to `lastKnownDropProposal`, and expose it as a readonly property.
3845
3846         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
3847         (-[DragAndDropSimulator _advanceProgress]):
3848         (-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
3849         (-[DragAndDropSimulator showCustomActionSheetBlock]):
3850         (-[DragAndDropSimulator setConvertItemProvidersBlock:]):
3851         (-[DragAndDropSimulator convertItemProvidersBlock]):
3852         (-[DragAndDropSimulator setOverridePerformDropBlock:]):
3853         (-[DragAndDropSimulator overridePerformDropBlock]):
3854         (-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
3855         (-[DragAndDropSimulator overrideDragUpdateBlock]):
3856         (-[DragAndDropSimulator setDropCompletionBlock:]):
3857         (-[DragAndDropSimulator dropCompletionBlock]):
3858
3859         Refactor these properties to return and take normal Objective-C blocks, rather than `BlockPtr`s. However, use
3860         `BlockPtr` instance variables to manage the lifetimes of these blocks.
3861
3862         (-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
3863         (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.
3864
3865         Update this to use the new WebKit delegate hook for overriding the drop proposal.
3866
3867 2018-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
3868
3869         [WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
3870         https://bugs.webkit.org/show_bug.cgi?id=190241
3871
3872         Reviewed by Carlos Garcia Campos.
3873
3874         run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
3875         Currently this actually creates the directories needed for the flatpak environment. Fix it.
3876
3877         * flatpak/flatpakutils.py:
3878         (WebkitFlatpak.clean_args):
3879         (WebkitFlatpak.run):
3880
3881 2018-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
3882
3883         [GTK] Don't use the slice allocator
3884         https://bugs.webkit.org/show_bug.cgi?id=192360
3885
3886         Reviewed by Carlos Garcia Campos.
3887
3888         * MiniBrowser/gtk/main.c:
3889         (aboutDataRequestFree):
3890         (aboutDataRequestNew):
3891
3892 2018-12-10  Tim Horton  <timothy_horton@apple.com>
3893
3894         WKWebView should support custom tintColor
3895         https://bugs.webkit.org/show_bug.cgi?id=192518
3896         <rdar://problem/37243261>
3897
3898         Reviewed by Wenson Hsieh.
3899
3900         * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
3901         (TestWebKitAPI::TEST):
3902         Add a test that tintColor affects UITextInputTraits' interaction colors.
3903
3904 2018-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3905
3906         [iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
3907         https://bugs.webkit.org/show_bug.cgi?id=192524
3908
3909         Reviewed by Ryosuke Niwa.
3910
3911         This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
3912         (see <rdar://problem/28300343>). This API test simulates two drops from external sources, both from the point
3913         (300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
3914         first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
3915         wide selection rect and increases the width of the document; revealing this selection causes the web view to
3916         scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
3917         these window coordinates no longer correspond to the drop destination element in the document.
3918
3919         To fix this test, we simply mark the drop destination as `overflow: hidden` to ensure that we don't try and
3920         scroll horizontally after the first drop.
3921
3922         * TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
3923
3924 2018-12-08  Daniel Bates  <dabates@apple.com>
3925
3926         Fix lldb_webkit.py following r238771
3927         (https://bugs.webkit.org/show_bug.cgi?id=190234)
3928
3929         Substitute WTFURLProvider for WebCoreURLProvider in one call site that was inadvertently
3930         missed in r238771.
3931
3932         * lldb/lldb_webkit.py:
3933         (WebCoreDocumentProvider.url):
3934
3935 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
3936
3937         [ews-build] check-patch-relevance failure should not mark the overall build as failure
3938         https://bugs.webkit.org/show_bug.cgi?id=192510
3939
3940         Reviewed by Lucas Forschler.
3941
3942         * BuildSlaveSupport/ews-build/steps.py:
3943         (CheckPatchRelevance.start):
3944
3945 2018-12-07  Chris Dumez  <cdumez@apple.com>
3946
3947         ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
3948         https://bugs.webkit.org/show_bug.cgi?id=192362
3949         <rdar://problem/46460360>
3950
3951         Reviewed by Ryosuke Niwa.
3952
3953         Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
3954         *after* we know for sure we have a network process to communicate the policy to.
3955         This should address the failures on iOS.
3956
3957         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3958
3959 2018-12-07  Jiewen Tan  <jiewen_tan@apple.com>
3960
3961         Add keychain access entitlement to WebKitTestRunnerApp
3962         https://bugs.webkit.org/show_bug.cgi?id=192489
3963         <rdar://problem/45057952>
3964
3965         Reviewed by Alexey Proskuryakov.
3966
3967         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
3968
3969 2018-12-07  Saam Barati  <sbarati@apple.com>
3970
3971         WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
3972         https://bugs.webkit.org/show_bug.cgi?id=192473
3973
3974         Reviewed by Andy Estes.
3975
3976         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3977         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: Added.
3978         (-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
3979         (TEST):
3980         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.
3981         (-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
3982         (-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
3983         (-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):
3984         * TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.
3985
3986 2018-12-07  Jonathan Bedard  <jbedard@apple.com>
3987
3988         REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
3989         https://bugs.webkit.org/show_bug.cgi?id=192470
3990         <rdar://problem/46532001>
3991
3992         Unreviewed infrastructure fix.
3993
3994         * Scripts/webkitpy/port/device_port.py:
3995         (DevicePort.setup_test_run): Check that the number of initialized devices matches the
3996         number of child processes.
3997
3998 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
3999
4000         [ews-app] Send bug id as a build property
4001         https://bugs.webkit.org/show_bug.cgi?id=192494
4002
4003         Reviewed by Lucas Forschler.
4004
4005         * BuildSlaveSupport/ews-app/ews/fetcher.py:
4006         (BugzillaPatchFetcher.fetch):
4007
4008 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
4009
4010         [ews-build] Builds should have a link to patch and bug
4011         https://bugs.webkit.org/show_bug.cgi?id=192492
4012
4013         Reviewed by Lucas Forschler.
4014
4015         * BuildSlaveSupport/ews-build/steps.py:
4016         (ConfigureBuild.add_patch_id_url): Method to add Patch URL.
4017         (ConfigureBuild.add_bug_id_url): Method to add Bug URL.
4018         (ConfigureBuild.getPatchURL): Method to get Patch URL.
4019         (ConfigureBuild.getBugURL): Method to get Bug URL.
4020
4021 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
4022
4023         [ews-app] Configure logfile for ews-app logs
4024         https://bugs.webkit.org/show_bug.cgi?id=192493
4025
4026         Reviewed by Lucas Forschler.
4027
4028         * BuildSlaveSupport/ews-app/ews/__init__.py:
4029
4030 2018-12-07  Aakash Jain  <aakash_jain@apple.com>
4031
4032         Style queue exception on some security bugs
4033         https://bugs.webkit.org/show_bug.cgi?id=190793
4034
4035         Reviewed by Lucas Forschler.
4036
4037         * Scripts/webkitpy/tool/steps/applywatchlist.py:
4038         (ApplyWatchList.run):
4039
4040 2018-12-07  Wenson Hsieh  <wenson_hsieh@apple.com>
4041
4042         [Attachment Support] Cloned attachment elements lose their unique identifiers
4043         https://bugs.webkit.org/show_bug.cgi?id=192483
4044
4045         Reviewed by Tim Horton.
4046
4047         Introduce a new API test.
4048
4049         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
4050         (TestWebKitAPI::TEST):
4051
4052 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
4053
4054         Consecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since r238903
4055         https://bugs.webkit.org/show_bug.cgi?id=192486
4056
4057         Unreviewed infrastructure fix.
4058
4059         WinCairo bots define WEBKIT_TEST_CHILD_PROCESSES to run less processes due to RAM restrictions.
4060
4061         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
4062         (_set_up_derived_options):
4063
4064 2018-12-06  David Kilzer  <ddkilzer@apple.com>
4065
4066         Injected bundle for WebKitTestRunner leaks WKTypeRef objects
4067         <https://webkit.org/b/192481>
4068         <rdar://problem/46539059>
4069
4070         Reviewed by Simon Fraser.
4071
4072         This patch:
4073         - Fixes leaks in various injected bundle methods that return +1
4074           retained WKTypeRef objects via pointer.
4075         - Asserts the returned object is the expected WKTypeRef.
4076         - Replaces 0 with nullptr in many places.
4077
4078         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
4079         (WTR::InjectedBundle::didCreatePage):
4080         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
4081         (WTR::TestRunner::shouldDumpPixels const):
4082         (WTR::TestRunner::whatToDump const):
4083         (WTR::TestRunner::shouldWaitUntilDone const):
4084         (WTR::TestRunner::shouldDumpFrameLoadCallbacks):
4085         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
4086         (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
4087         (WTR::TestRunner::secureEventInputIsEnabled const):
4088         (WTR::TestRunner::isStatisticsPrevalentResource):
4089         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
4090         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
4091         (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
4092         (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
4093         (WTR::TestRunner::isStatisticsHasHadUserInteraction):
4094         (WTR::TestRunner::isStatisticsGrandfathered):
4095         (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords):
4096         (WTR::TestRunner::statisticsUpdateCookieBlocking):
4097         (WTR::TestRunner::statisticsSubmitTelemetry):
4098         (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
4099         (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
4100         (WTR::TestRunner::statisticsResetToConsistentState):
4101         (WTR::TestRunner::getAllStorageAccessEntries):
4102         (WTR::TestRunner::hasDOMCache):
4103         (WTR::TestRunner::domCacheSize):
4104         (WTR::TestRunner::injectUserScript):
4105         (WTR::TestRunner::keyExistsInKeychain):
4106
4107 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
4108
4109         REGRESSION: run-webkit-tests may fail when using booted simulators
4110         https://bugs.webkit.org/show_bug.cgi?id=192470
4111         <rdar://problem/46532001>
4112
4113         Reviewed by Lucas Forschler.
4114
4115         * Scripts/webkitpy/layout_tests/controllers/manager.py:
4116         (Manager.run): Logging uses the number of child processes to print out information about how efficiently tests
4117         were sharded after the fact. This number is the most meaningful if it is the maximum number of child processes used.
4118         * Scripts/webkitpy/port/base.py:
4119         (Port.max_child_processes): By default, Ports do not support running on any specific kind of device.
4120         * Scripts/webkitpy/port/device_port.py:
4121         (DevicePort.default_child_processes): Rather than using the currently initialized devices as a proxy for how many
4122         child processes are being used, check the device manager every time. Regardless of which devices are attached or
4123         available, iOS cannot boot watchOS devices and vice-versa. dedicated_simulators is not a known argument to
4124         device_count_for_type, use use_booted_simulator instead.
4125         (DevicePort.max_child_processes): Simulators can boot more devices than what is specified by device_count_for_type,
4126         but, if no devices are available, then max_child_processes should return 0 even for simulators.
4127         * Scripts/webkitpy/port/ios_device_unittest.py:
4128         (IOSDeviceTest):
4129         (IOSDeviceTest.test_max_child_processes):
4130         * Scripts/webkitpy/port/ios_simulator_unittest.py:
4131         (IOSSimulatorTest):
4132         (IOSSimulatorTest.test_max_child_processes):
4133         * Scripts/webkitpy/port/port_testcase.py:
4134         (PortTestCase):
4135         (PortTestCase.test_max_child_processes):
4136         * Scripts/webkitpy/port/watch_simulator_unittest.py:
4137         (WatchSimulatorTest):
4138         (WatchSimulatorTest.test_max_child_processes):
4139
4140 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
4141
4142         webkitpy: Ignore case when comparing device types (Follow-up fix)
4143         https://bugs.webkit.org/show_bug.cgi?id=192409
4144         <rdar://problem/46491558>
4145
4146         Unreviewed typo fix.
4147
4148         * Scripts/webkitpy/xcode/device_type_unittest.py:
4149         (DeviceTypeTest.test_comparison_lower_case):
4150         (DeviceTypeTest.test_comparsion_lower_case): Deleted.
4151
4152 2018-12-06  Jonathan Bedard  <jbedard@apple.com>
4153
4154         webkitpy: Create device given lower-case DeviceType
4155         <https://bugs.webkit.org/show_bug.cgi?id=192472>
4156         <rdar://problem/46532650>
4157
4158         Reviewed by Lucas Forschler.
4159
4160         * Scripts/webkitpy/xcode/simulated_device.py:
4161         (SimulatedDeviceManager._get_device_identifier_for_type): Comparing simctl device identifiers with DeviceTypes
4162         should be letter-case agnostic.
4163         * Scripts/webkitpy/xcode/simulated_device_unittest.py:
4164         (test_lower_case_device_type):
4165
4166 2018-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
4167
4168         [iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
4169         https://bugs.webkit.org/show_bug.cgi?id=187554
4170         <rdar://problem/42075638>
4171
4172         Reviewed by Tim Horton.
4173
4174         Add support for simulating the keyboard input mode in layout tests using UIScriptController, as well as a new
4175         `TestOption` to make the web view editable.
4176
4177         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
4178         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
4179         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
4180         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
4181         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
4182         * TestRunnerShared/UIScriptContext/UIScriptController.h:
4183         * WebKitTestRunner/PlatformWebView.h:
4184         * WebKitTestRunner/TestController.cpp:
4185         (WTR::updateTestOptionsFromTestHeader):
4186         * WebKitTestRunner/TestController.h:
4187         (WTR::TestController::overriddenKeyboardInputMode const):
4188         * WebKitTestRunner/TestOptions.h:
4189         (WTR::TestOptions::hasSameInitializationOptions const):
4190         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
4191         (WTR::TestController::platformCreateWebView):
4192         * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
4193         (WTR::PlatformWebView::setEditable):
4194         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
4195         (WTR::PlatformWebView::setEditable):
4196         * WebKitTestRunner/ios/TestControllerIOS.mm:
4197         (WTR::TestController::platformResetStateToConsistentValues):
4198         (WTR::swizzleCurrentInputMode):
4199         (WTR::TestController::setKeyboardInputModeIdentifier):
4200
4201         Swizzle out several `UIKeyboardInputModeController` methods in order to convince UIKit that the user has
4202         selected a `UIKeyboardInputMode` corresponding to the given identifier. The call to
4203         `-prepareKeyboardInputModeFromPreferences:` is also necessary on iOS 12 in order to update cached writing
4204         direction state in UIKit.
4205
4206         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
4207         (WTR::UIScriptController::setKeyboardInputModeIdentifier):
4208         * WebKitTestRunner/mac/PlatformWebViewMac.mm:
4209         (WTR::PlatformWebView::setEditable):
4210         * WebKitTestRunner/win/PlatformWebViewWin.cpp:
4211         (WTR::PlatformWebView::setEditable):
4212         * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
4213         (WTR::PlatformWebView::setEditable):
4214
4215 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
4216
4217         [Cocoa] Share ClassMethodSwizzler and InstanceMethodSwizzler between TestWebKitAPI and WebKitTestRunner
4218         https://bugs.webkit.org/show_bug.cgi?id=192437
4219
4220         Reviewed by Tim Horton.
4221
4222         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
4223         * TestRunnerShared/cocoa/ClassMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.h.
4224         * TestRunnerShared/cocoa/ClassMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.mm.
4225         (ClassMethodSwizzler::ClassMethodSwizzler):
4226         (ClassMethodSwizzler::~ClassMethodSwizzler):
4227         * TestRunnerShared/cocoa/InstanceMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h.
4228         * TestRunnerShared/cocoa/InstanceMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm.
4229         (InstanceMethodSwizzler::InstanceMethodSwizzler):
4230         (InstanceMethodSwizzler::~InstanceMethodSwizzler):
4231
4232         Move these swizzling helper classes into TestRunnerShared.
4233
4234         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4235         * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:
4236         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
4237         (safeBrowsingView):
4238         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm:
4239         * TestWebKitAPI/cocoa/TestWKWebView.mm:
4240         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
4241
4242         Remove namespacing around ClassMethodSwizzler and InstanceMethodSwizzler in a few API tests.
4243
4244         * TestWebKitAPI/mac/TestFontOptions.mm:
4245         * WebKitTestRunner/TestController.h:
4246         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
4247         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
4248         (WTR::ClassMethodSwizzler::ClassMethodSwizzler): Deleted.
4249         (WTR::ClassMethodSwizzler::~ClassMethodSwizzler): Deleted.
4250
4251         Remove this duplicate implementation of ClassMethodSwizzler in WebKitTestRunner.
4252
4253 2018-12-05  Jonathan Bedard  <jbedard@apple.com>
4254
4255         webkitpy: Clean-up apple_additions
4256         https://bugs.webkit.org/show_bug.cgi?id=192413
4257         <rdar://problem/46493491>
4258
4259         Reviewed by Lucas Forschler.
4260
4261         After the addition of watchOS, some functions which were originally iOS specific were
4262         generalized to include all devices.
4263
4264         * Scripts/webkitpy/port/ios_device.py:
4265         (IOSDevicePort._driver_class): Replace iOS specific call with generalized device call.
4266         (IOSDevicePort.path_to_crash_logs): Ditto.
4267         (IOSDevicePort.clean_up_test_run): Ditto.
4268
4269 2018-12-05  Jonathan Bedard  <jbedard@apple.com>
4270
4271         webkitpy: Ignore case when comparing device types
4272         https://bugs.webkit.org/show_bug.cgi?id=192409
4273         <rdar://problem/46491558>
4274
4275         Reviewed by Lucas Forschler.
4276
4277         This allows DeviceTypes constructed with lowercase strings to correctly compare
4278         against DeviceTypes coming from the simulator runtime.
4279
4280         * Scripts/webkitpy/xcode/device_type.py:
4281         (DeviceType.__eq__):
4282         (DeviceType.__contains__):
4283         * Scripts/webkitpy/xcode/device_type_unittest.py:
4284         (DeviceTypeTest):
4285         (DeviceTypeTest.test_comparsion_lower_case):
4286
4287 2018-12-05  Jonathan Bedard  <jbedard@apple.com>