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