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