3d226d781412542e37aab1fc3856e1d865491e1b
[WebKit-https.git] / Tools / ChangeLog
1 2018-04-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         [WPE] libgstggtk.so broken in jhbuild environment
4         https://bugs.webkit.org/show_bug.cgi?id=184984
5
6         Reviewed by Carlos Alberto Lopez Perez.
7
8         Don't pass --enable-glx=no when building libepoxy, to ensure it's compatible with
9         gst-plugins-good.
10
11         * wpe/jhbuild.modules:
12
13 2018-04-25  Ryosuke Niwa  <rniwa@webkit.org>
14
15         PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
16         https://bugs.webkit.org/show_bug.cgi?id=184962
17
18         Reviewed by Youenn Fablet.
19
20         Added four test cases for navigating to a blob URL, data URL, and about:blank with process-swap-on-navigation turned on.
21
22         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
23         (ProcessSwap.SameOriginBlobNavigation): Added.
24         (ProcessSwap.CrossOriginBlobNavigation): Added.
25         (ProcessSwap.NavigateToAboutBlank): Added.
26         (ProcessSwap.NavigateToDataURL): Added.
27
28 2018-04-25  Michael Catanzaro  <mcatanzaro@igalia.com>
29
30         [WPE] Remove deprecated functions and properties from the API
31         https://bugs.webkit.org/show_bug.cgi?id=179295
32
33         Reviewed by Žan Doberšek.
34
35         * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
36         (testWebViewAuthenticationStorage): Disable this test for now. It will require some effort
37         to rewrite LoadTrackingTest to not require the web view at construction time.
38         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
39         (testWebKitSettings): Don't test private browsing setting, which is gone.
40         * TestWebKitAPI/glib/CMakeLists.txt: Disable TestCookieManager for now.
41
42 2018-04-25  Andy Estes  <aestes@apple.com>
43
44         [Mac] Number of drop items is always 0 when performing a DHTML drag
45         https://bugs.webkit.org/show_bug.cgi?id=184943
46
47         Reviewed by Ryosuke Niwa.
48
49         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
50         * TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:
51         (-[DragInfo numberOfValidItemsForDrop]):
52         (-[DragInfo setNumberOfValidItemsForDrop:]):
53         (TestWebKitAPI::TEST):
54         * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Added.
55
56 2018-04-25  Jonathan Bedard  <jbedard@apple.com>
57
58         API test harness should be Python
59         https://bugs.webkit.org/show_bug.cgi?id=181043
60         <rdar://problem/36164410>
61
62         Reviewed by David Kilzer.
63
64         Run API tests from a Python script rather than Perl. The Python API tests have
65         the same structure as the layout tests.
66
67         * Scripts/run-api-tests: Changed from Perl to Python.
68         * Scripts/webkitpy/api_tests: Added.
69         * Scripts/webkitpy/api_tests/__init__.py: Added.
70         * Scripts/webkitpy/api_tests/manager.py: Added.
71         (Manager):
72         (Manager.__init__):
73         (Manager._test_list_from_output): Construct a list of tests from the output of
74         TestWTF and TestWebKitAPI.
75         (Manager._find_test_subset): Given a list of all possible tests and command line
76         arguments, return a list of tests which match the provided arguments.
77         (Manager._collect_tests): Run TestWTF and TestWebKitAPI with --gtest_list_tests
78         to determine which tests will be run.
79         (Manager._print_test_result): Formatted print of a test with it's output.
80         (Manager._print_tests_result_with_status): Print all tests and output for tests
81         which ran with a specified exit status.
82         (Manager.run): Collect all tests, run them and then print results from the run.
83         * Scripts/webkitpy/api_tests/run_api_tests.py: Added.
84         (main): Parse arguments, construct a port, early exit for illegal ports and
85         then run tests.
86         (run): Setup logging and printing before using the Manager to run tests.
87         (parse_args): Use argparse to define all options used by run-api-tests.
88         * Scripts/webkitpy/api_tests/runner.py: Added.
89         (Runner):
90         (Runner.__init__):
91         (Runner._shard_tests): Split tests so that each suite runs together.
92         (Runner.command_for_port): Run a command on the device specified by the given
93         port object. Once <https://bugs.webkit.org/show_bug.cgi?id=175204> is completed,
94         this function would be entirely replaced by the server_process factory owned
95         by the port object.
96         (Runner.run): Run all shards in the message_pool.
97         (Runner.handle): Handle reports from child processes.
98         (Runner.result_map_by_status): Return a mapping of tests to output for tests
99         which exit with a specific status.
100         (_Worker):
101         (_Worker.__init__):
102         (_Worker._filter_noisy_output): Filter out objc warnings since these polite the log.
103         (_Worker._run_single_test): Runs a single test in a single child process.
104         (_Worker._run_shard_with_binary): Attempts to run a group of tests in the same
105         child process. If this technique fails, the remaining tests are run singly.
106         (_Worker.handle): Run the specified shard.
107         * Scripts/webkitpy/port/base.py:
108         (Port):
109         (Port.check_api_test_build): Check if TestWTF and TestWebKitAPI are built.
110         (Port.environment_for_api_tests): Return the environment needed to run
111         the TestWebKitAPI binary.
112         (Port. path_to_api_test_binaries): Return a list of the path to all binaries
113         used when running API tests.
114         (Port._build_api_tests): Build TestWTF and TestWebKitAPI if required.
115         * Scripts/webkitpy/port/mac.py:
116         (MacPort.environment_for_api_tests): Enable GuardMalloc for API tests.
117         * Scripts/webkitpy/port/server_process.py: 
118         (ServerProcess.pop_all_buffered_stdout):
119
120 2018-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
121
122         Incorrect number of WebDriver test failures shown in the bots
123         https://bugs.webkit.org/show_bug.cgi?id=184959
124
125         Reviewed by Michael Catanzaro.
126
127         The regular expression we are using to get the number of failures from the log is matching a particular test
128         error output. Improve the regular expression to avoid matching other strings in the log. Ensure that only
129         matches at the beginning of lines and add spaces after Unexpected and before the (<failures>).
130
131         * BuildSlaveSupport/build.webkit.org-config/steps.py:
132         (RunWebDriverTests.commandComplete):
133
134 2018-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
135
136         [GTK] Implement MouseEvent.buttons
137         https://bugs.webkit.org/show_bug.cgi?id=184913
138
139         Reviewed by Žan Doberšek.
140
141         Include the mouse buttons state in WTR synthesized events.
142
143         * WebKitTestRunner/EventSenderProxy.h:
144         * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
145         (WTR::EventSenderProxy::EventSenderProxy):
146         (WTR::EventSenderProxy::createMouseButtonEvent):
147         (WTR::EventSenderProxy::mouseDown):
148         (WTR::EventSenderProxy::mouseUp):
149         (WTR::EventSenderProxy::mouseMoveTo):
150
151 2018-04-24  Pablo Saavedra  <psaavedra@igalia.com>
152
153         [GTK][WPE] Fix triggered bot name on the WPE Debug Build bot
154         https://bugs.webkit.org/show_bug.cgi?id=184954
155
156         Reviewed by Michael Catanzaro.
157
158         * BuildSlaveSupport/build.webkit.org-config/config.json:
159
160 2018-04-24  Saam Barati  <sbarati@apple.com>
161
162         Keep around a pre-warmed process when doing process swap on navigation
163         https://bugs.webkit.org/show_bug.cgi?id=184765
164         <rdar://problem/39685099>
165
166         Reviewed by Ryosuke Niwa and Brady Eidson.
167
168         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
169
170 2018-04-24  Aakash Jain  <aakash_jain@apple.com>
171
172         [build.webkit.org] unit-tests fail when passwords.json is missing
173         https://bugs.webkit.org/show_bug.cgi?id=180390
174
175         Reviewed by Carlos Alberto Lopez Perez.
176
177         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
178         (loadBuilderConfig): Add support for test_mode. Load mock passwords in test_mode.
179         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
180         (BuildBotConfigLoader._add_dependant_modules_to_sys_modules): Call _add_webkitpy_to_sys_path as well.
181         (BuildBotConfigLoader._mock_open): Deleted.
182         (BuildBotConfigLoader.load_config): Deleted.
183
184 2018-04-24  John Wilander  <wilander@apple.com>
185
186         From-Origin: Support for 'same' and 'same-site' response header, nested frame origin check
187         https://bugs.webkit.org/show_bug.cgi?id=184560
188         <rdar://problem/38901344>
189
190         Reviewed by Youenn Fablet and Daniel Bates.
191
192         This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
193         We consume the From-Origin response header and only load the resource if:
194         - The header is non-existent, empty, or invalid.
195         - The header specifies 'same' and the resource's origin matches the originating
196           document's origin and the origins up the frame tree.
197         - The header specifies 'same-site' and the resource's eTLD+1 matches the originating
198           document's eTLD+1 and the eTLD+1 of the documents up the frame tree.
199
200         This feature is experimental and off by default.
201
202         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
203         * TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: Added.
204         (TestWebKitAPI::TEST):
205             Tests for From-Origin header parsing.
206
207 2018-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
208
209         Unreviewed. Update W3C WebDriver imported tests.
210
211         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
212         (WebDriverW3CExecutor.__init__):
213
214 2018-04-24  Zan Dobersek  <zdobersek@igalia.com>
215
216         [WPE] Remove libgbm dependency
217         https://bugs.webkit.org/show_bug.cgi?id=184906
218
219         Reviewed by Carlos Garcia Campos.
220
221         Stop searching for libgbm, using its compiler flags for the
222         HeadlessViewBackend compilation and linking against the .so object.
223         This is not necessary anymore after r230562 switched to a different
224         backend implementation for testing.
225
226         * wpe/HeadlessViewBackend/CMakeLists.txt:
227         * wpe/install-dependencies:
228
229 2018-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
230
231         [GLIB] Make it possible to use a different timeout for slow test cases in GLib tests
232         https://bugs.webkit.org/show_bug.cgi?id=184816
233
234         Reviewed by Michael Catanzaro.
235
236         Pass a function from api test runner to glib test runner to check if a test is slow and use the given slow
237         timeout.
238
239         * TestWebKitAPI/glib/TestExpectations.json:
240         * glib/api_test_runner.py:
241         (TestRunner._run_test_glib.is_slow_test):
242         (TestRunner._run_test_glib):
243         * glib/glib_test_runner.py:
244         (GLibTestRunner.__init__):
245         (GLibTestRunner._stop_timeout):
246         (GLibTestRunner._subtest_start):
247         (GLibTestRunner._subtest_end):
248
249 2018-04-23  Wenson Hsieh  <wenson_hsieh@apple.com>
250
251         [Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI
252         https://bugs.webkit.org/show_bug.cgi?id=184901
253         <rdar://problem/39664797>
254
255         Reviewed by Tim Horton.
256
257         Introduce a new UIScriptController method to set the value of a currently focused input of type time, by
258         interacting with the UI. See WebKit ChangeLogs for more detail.
259
260         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
261         (WTR::UIScriptController::setTimePickerValue):
262         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
263         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
264         (WTR::UIScriptController::setTimePickerValue):
265         * TestRunnerShared/UIScriptContext/UIScriptController.h:
266         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
267         (WTR::UIScriptController::setTimePickerValue):
268
269 2018-04-23  Zalan Bujtas  <zalan@apple.com>
270
271         [LayoutFormattingContext] Initial commit.
272         https://bugs.webkit.org/show_bug.cgi?id=184896
273
274         Reviewed by Antti Koivisto.
275
276         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
277
278 2018-04-23  Chris Dumez  <cdumez@apple.com>
279
280         [WKTR] Move navigation policy decision from the injected bundle to the UIProcess
281         https://bugs.webkit.org/show_bug.cgi?id=184801
282
283         Reviewed by Geoffrey Garen.
284
285         Move navigation policy decision from the injected bundle to the UIProcess in WebKitTestRunner.
286         This is a more common configuration and therefore should be the default testing configuration.
287
288         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
289         (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
290         Always respond with 'PassThrough' in the InjectedBundle so the UIProcess
291         is now asked for the policy decision.
292
293 2018-04-23  Pablo Saavedra  <psaavedra@igalia.com>
294
295         [GTK][WPE] Add Debug bots (build and tests) for WPE
296         https://bugs.webkit.org/show_bug.cgi?id=184887
297
298         Reviewed by Carlos Alberto Lopez Perez.
299
300         Deployed 2 new bots for WPE Debug: wpe-linux-bot-3 and
301         wpe-linux-bot-4
302
303         Both bots have already the credentials ready to authenticated against
304         build.webkit.org. They provides the bots for the "debug" configuration over
305         the "WPE" platform and building for the "x86_64" architecture:
306         WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests) 
307
308         * BuildSlaveSupport/build.webkit.org-config/config.json:
309         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
310
311 2018-04-23  Chris Dumez  <cdumez@apple.com>
312
313         HTML String load cannot be prevented by responding 'Cancel' asynchronously in decidePolicyForNavigationAction
314         https://bugs.webkit.org/show_bug.cgi?id=184848
315         <rdar://problem/39145306>
316
317         Reviewed by Brady Eidson.
318
319         Add API test coverage.
320
321         * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
322         (-[DecidePolicyForNavigationActionController webView:decidePolicyForNavigationAction:decisionHandler:]):
323         (TEST):
324
325 2018-04-23  Michael Catanzaro  <mcatanzaro@igalia.com>
326
327         [GTK][WPE] TestSSL fails due to additional TLS errors returned
328         https://bugs.webkit.org/show_bug.cgi?id=184860
329
330         Reviewed by Carlos Garcia Campos.
331
332         Add script and config file for regenerating the test certificate.
333         Regenerate it. TestSSL no longer fails on my machine.
334
335         I do see a ton of network process crashes and JavaScript errors, none of
336         which prevent the test from passing, but this commit only claims to fix
337         the certificate validation portion of the test.
338
339         * TestWebKitAPI/Tests/WebKitGLib/resources/generate-test-cert.sh: Added.
340         * TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.conf: Added.
341         * TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.pem:
342
343 2018-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
344
345         [GLIB] ERROR: Thread was unable to be detached when running /jsc/vm test in debug
346         https://bugs.webkit.org/show_bug.cgi?id=184815
347
348         Reviewed by Michael Catanzaro.
349
350         This is because in the test we are calling both join and detach. We should only call join.
351
352         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
353         (testsJSCVirtualMachine):
354
355 2018-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
356
357         [GLIB] Test /jsc/prototypes crashes in debug
358         https://bugs.webkit.org/show_bug.cgi?id=184814
359
360         Reviewed by Michael Catanzaro.
361
362         We should also call the constructor/destructor of Bar struct to ensure Foo is constructed.
363
364         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
365         (barCreate):
366         (barFree):
367
368 2018-04-20  Michael Catanzaro  <mcatanzaro@igalia.com>
369
370         REGRESSION(r228088): [SOUP] Check TLS errors for WebSockets on GTlsConnection::accept-certificate
371         https://bugs.webkit.org/show_bug.cgi?id=184804
372
373         Reviewed by Carlos Garcia Campos.
374
375         * TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
376         (WebSocketTest::WebSocketTest):
377         (WebSocketTest::~WebSocketTest):
378         (WebSocketTest::serverWebSocketCallback):
379         (WebSocketTest::webSocketTestResultCallback):
380         (WebSocketTest::connectToServerAndWaitForEvents):
381         (testWebSocketTLSErrors):
382         (beforeAll):
383
384 2018-04-20  Chris Dumez  <cdumez@apple.com>
385
386         Unreviewed, update 2 more API tests after r230876.
387
388         * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
389         (TEST):
390         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
391         (TestWebKitAPI::TEST):
392
393 2018-04-20  Tim Horton  <timothy_horton@apple.com>
394
395         Adjust geolocation feature flag
396         https://bugs.webkit.org/show_bug.cgi?id=184856
397
398         Reviewed by Wenson Hsieh.
399
400         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
401
402 2018-04-20  Chris Dumez  <cdumez@apple.com>
403
404         REGRESSION (r229828): web view doesn’t update or respond to resizing until client calls policy decision handler
405         https://bugs.webkit.org/show_bug.cgi?id=184210
406         <rdar://problem/39072354>
407
408         Reviewed by Wenson Hsieh.
409
410         * TestWebKitAPI/Tests/WebKit/large-red-square-image.html:
411         * TestWebKitAPI/Tests/WebKitCocoa/dragstart-change-selection-offscreen.html:
412         Add viewport meta tags.
413
414         * TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
415         (-[WKWebView _test_waitForDidFinishNavigation]):
416         Update _test_waitForDidFinishNavigation to wait for the next presentation update
417         to make iOS API tests happy without having to modify each of them.
418
419 2018-04-20  Timothy Hatcher  <timothy@apple.com>
420
421         REGRESSION: API test WebKit.BackgroundColorSystemColor is failing
422
423         https://bugs.webkit.org/show_bug.cgi?id=184849
424         rdar://problem/39386405
425
426         Reviewed by Brian Burg.
427
428         * TestWebKitAPI/Tests/mac/BackgroundColor.mm:
429         (TestWebKitAPI::TEST): Use CGColorEqualToColor since we might get a different
430         CGColor pointer from NSColor each time.
431
432 2018-04-20  Wenson Hsieh  <wenson_hsieh@apple.com>
433
434         [Extra zoom mode] Injected bundle form client should be notified when editing text fields
435         https://bugs.webkit.org/show_bug.cgi?id=184822
436         <rdar://problem/38807319>
437
438         Reviewed by Tim Horton.
439
440         Add WebKitTestRunner support for listening to form editing SPI hooks in the injected bundle. The new layout test
441         installs callbacks that listen for "begin editing", "end editing", and "text changed" calls to injected bundle
442         SPI. See other ChangeLogs for more detail.
443
444         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
445         (WTR::UIScriptController::enterText):
446         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
447
448         Add UIScriptController support for simulating text entry in the currently focused element.
449
450         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
451         (WTR::UIScriptController::enterText):
452         * TestRunnerShared/UIScriptContext/UIScriptController.h:
453         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
454
455         Add TestRunner bindings for registering injected bundle form client callbacks.
456
457         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
458         (WTR::handleTextDidChangeInTextField):
459         (WTR::handleTextFieldDidBeginEditing):
460         (WTR::handleTextFieldDidEndEditing):
461         (WTR::InjectedBundle::didCreatePage):
462
463         Set the injected bundle form editor client.
464
465         (WTR::InjectedBundle::setUpInjectedBundleClients):
466         (WTR::InjectedBundle::textDidChangeInTextField):
467         (WTR::InjectedBundle::textFieldDidBeginEditing):
468         (WTR::InjectedBundle::textFieldDidEndEditing):
469         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
470         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
471         (WTR::TestRunner::installTextDidChangeInTextFieldCallback):
472         (WTR::TestRunner::textDidChangeInTextFieldCallback):
473         (WTR::TestRunner::installTextFieldDidBeginEditingCallback):
474         (WTR::TestRunner::textFieldDidBeginEditingCallback):
475         (WTR::TestRunner::installTextFieldDidEndEditingCallback):
476         (WTR::TestRunner::textFieldDidEndEditingCallback):
477         * WebKitTestRunner/InjectedBundle/TestRunner.h:
478         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
479         (WTR::UIScriptController::enterText):
480
481 2018-04-20  Youenn Fablet  <youenn@apple.com>
482
483         WebPage sometimes incorrectly rules out PDF as a mime type that can be showed
484         https://bugs.webkit.org/show_bug.cgi?id=184369
485
486         Reviewed by Chris Dumez.
487
488         * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
489         (TEST):
490
491 2018-04-20  Daniel Bates  <dabates@apple.com>
492
493         Remove Strong Password decoration when text field type changes
494         https://bugs.webkit.org/show_bug.cgi?id=184795
495         <rdar://problem/38325108>
496
497         Reviewed by Antti Koivisto.
498
499         Add a unit test to ensure the injected bundle API and WebKit UI delegate SPI is invoked
500         when the field has the Strong Password button and its type changes.
501
502         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
503         * TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm: Added.
504         (didResignInputElementStrongPasswordAppearance):
505         (-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
506         * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
507         (-[DidResignInputElementStrongPasswordAppearanceDelegate _webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:]):
508         (-[DidResignInputElementStrongPasswordAppearanceDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
509         (TEST):
510
511 2018-04-20  Brady Eidson  <beidson@apple.com>
512
513         Add a test to verify load/unload/pageshow/pagehide all work with process swapping.
514         https://bugs.webkit.org/show_bug.cgi?id=184807
515
516         Reviewed by Chris Dumez.
517
518         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
519         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
520
521 2018-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
522
523         Unreviewed. Mark TestJSC as slow in debug.
524
525         Only /jsc/vm is slow, but GLib API test runner only checks the test binary for GLib tests.
526
527         * TestWebKitAPI/glib/TestExpectations.json:
528
529 2018-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
530
531         [GTK] Local cross references are broken in API documentation
532         https://bugs.webkit.org/show_bug.cgi?id=184771
533
534         Reviewed by Michael Catanzaro.
535
536         The problem is that gtkdoc-fixxref expects the links to be in the form html/modulename (like the installed
537         ones), but we generate the documentation as modulename/html. So, links to WebKitDOM or JSC are generated as
538         ../html/Foo. The rebase command considers html to be the module name in this case, creating broken links in all
539         the cases.
540
541         * gtk/gtkdoc.py:
542         (GTKDoc._copy_doc_files_to_output_dir): We don't have any html dir in the source tree so, we are not copying
543         anything here.
544         (GTKDoc._run_gtkdoc_mkhtml): Create the html dir here using html/modulename instead now.
545         (GTKDoc._run_gtkdoc_fixxref): Pass the new directory as module dir to gtkdoc-fixxref and fix several links for
546         which gtkdoc-fixxref always uses absolute paths.
547         * gtk/manifest.txt.in: Update the documentation html paths and include the JSC GLib API in the tarball too.
548
549 2018-04-19  Brady Eidson  <beidson@apple.com>
550
551         Make back forward cache work with process swapping.
552         <rdar://problem/38676604> and https://bugs.webkit.org/show_bug.cgi?id=184793
553
554         Reviewed by Chris Dumez.
555
556         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
557
558 2018-04-19  David Kilzer  <ddkilzer@apple.com>
559
560         Enable Objective-C weak references
561         <https://webkit.org/b/184789>
562         <rdar://problem/39571716>
563
564         Reviewed by Dan Bernstein.
565
566         * ContentExtensionTester/Configurations/Base.xcconfig:
567         (CLANG_ENABLE_OBJC_WEAK): Enable.
568         * DumpRenderTree/mac/Configurations/Base.xcconfig:
569         (CLANG_ENABLE_OBJC_WEAK): Enable.
570         * ImageDiff/cg/Configurations/Base.xcconfig:
571         (CLANG_ENABLE_OBJC_WEAK): Enable.
572         * MiniBrowser/Configurations/Base.xcconfig:
573         (CLANG_ENABLE_OBJC_WEAK): Enable.
574         * TestWebKitAPI/Configurations/Base.xcconfig:
575         (CLANG_ENABLE_OBJC_WEAK): Enable.
576         * WebEditingTester/Configurations/Base.xcconfig:
577         (CLANG_ENABLE_OBJC_ARC): Re-order.
578         * WebKitLauncher/Configurations/Base.xcconfig: Add newline at
579         end of file.
580         (CLANG_ENABLE_OBJC_WEAK): Enable.
581         * WebKitTestRunner/Configurations/Base.xcconfig:
582         (CLANG_ENABLE_OBJC_WEAK): Enable.
583
584 2018-04-19  Chris Dumez  <cdumez@apple.com>
585
586         REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string
587         https://bugs.webkit.org/show_bug.cgi?id=184209
588         <rdar://problem/39145306>
589
590         Reviewed by Ryosuke Niwa.
591
592         Add API test coverage.
593
594         * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
595         (TEST):
596
597 2018-04-18  Ross Kirsling  <ross.kirsling@sony.com>
598
599         [WinCairo][EWS] Build bot should clean user temp directory each time.
600         https://bugs.webkit.org/show_bug.cgi?id=184761
601
602         Reviewed by Lucas Forschler.
603
604         * EWSTools/Start-Queue.ps1:
605         Clean user's temp directory before each build, so that Windows git doesn't fill it up over time.
606
607 2018-04-18  Ross Kirsling  <ross.kirsling@sony.com>
608
609         Buildbots using Python zipfile should enable compression
610         https://bugs.webkit.org/show_bug.cgi?id=184759
611
612         Reviewed by Lucas Forschler.
613
614         * BuildSlaveSupport/built-product-archive:
615         (createZipManually):
616         Default is to archive without compressing, so tell it to compress as well. 
617
618 2018-04-18  Nan Wang  <n_wang@apple.com>
619
620         AX: [macOS] WebKit hangs when triggering an alert from an AOM increment event
621         https://bugs.webkit.org/show_bug.cgi?id=184742
622
623         Reviewed by Chris Fleizach.
624
625         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
626         (AccessibilityUIElement::increment):
627         (AccessibilityUIElement::decrement):
628         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
629         (WTR::AccessibilityUIElement::asyncIncrement):
630         (WTR::AccessibilityUIElement::asyncDecrement):
631         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
632         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
633         (WTR::AccessibilityUIElement::increment):
634         (WTR::AccessibilityUIElement::decrement):
635         (WTR::AccessibilityUIElement::asyncIncrement):
636         (WTR::AccessibilityUIElement::asyncDecrement):
637
638 2018-04-18  Ross Kirsling  <ross.kirsling@sony.com>
639
640         Fix archive step for WinCairo build bot.
641         https://bugs.webkit.org/show_bug.cgi?id=184715
642
643         Reviewed by Lucas Forschler.
644
645         * BuildSlaveSupport/built-product-archive:
646         (archiveBuiltProduct):
647         (extractBuiltProduct):
648
649 2018-04-18  Sihui Liu  <sihui_liu@apple.com>
650
651         REGRESSION: Using the reload button while offline pushes identical pages onto the back/forward list
652         https://bugs.webkit.org/show_bug.cgi?id=184570
653         <rdar://problem/34807323>
654
655         Reviewed by Chris Dumez.
656
657         Add API test coverage.
658
659         * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
660         (TEST):
661
662 2018-04-18  Chris Dumez  <cdumez@apple.com>
663
664         Add support for converting a local window to a remote window
665         https://bugs.webkit.org/show_bug.cgi?id=184515
666         <rdar://problem/39011318>
667
668         Reviewed by Ryosuke Niwa.
669
670         * MiniBrowser/mac/AppDelegate.m:
671         (defaultConfiguration):
672         * MiniBrowser/mac/SettingsController.h:
673         * MiniBrowser/mac/SettingsController.m:
674         (-[SettingsController _populateMenu]):
675         (-[SettingsController validateMenuItem:]):
676         (-[SettingsController processSwapOnWindowOpenWithOpenerEnabled]):
677         (-[SettingsController toggleProcessSwapOnWindowOpenWithOpener:]):
678         Add menu entry in minibrowser to turn on process swap on cross-origin window.open().
679
680         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
681         Turn on process swap on cross-origin window.open() for corresponding test and update
682         test to expect that a new WebProcess is created.
683
684         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
685         (WTR::InjectedBundlePage::decidePolicyForResponse):
686         Add null checks for injectedBundle.testRunner(). When we swap process on navigation,
687         the InjectedBundlePage::decidePolicyForResponse() gets called in the new process.
688         In this new process, we have constructed a InjectedBundlePage for the page but we
689         have not initialized the InjectedBundle members such as testRunner.
690
691         * WebKitTestRunner/TestController.cpp:
692         (WTR::TestController::createWebViewWithOptions):
693         (WTR::updateTestOptionsFromTestHeader):
694         * WebKitTestRunner/TestOptions.h:
695         (WTR::TestOptions::hasSameInitializationOptions const):
696         Add a way for layout tests to turn on process swap on navigation via a test header.
697
698 2018-04-18  Yusuke Suzuki  <utatane.tea@gmail.com>
699
700         Unreviewed, reland r230697, r230720, and r230724.
701         https://bugs.webkit.org/show_bug.cgi?id=184600
702
703         * Scripts/run-jsc-stress-tests:
704
705 2018-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
706
707         [GLIB] Make it possible to handle JSCClass external properties not added to the prototype
708         https://bugs.webkit.org/show_bug.cgi?id=184687
709
710         Reviewed by Michael Catanzaro.
711
712         Add test cases for the new API.
713
714         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
715         (fooCreate):
716         (fooFree):
717         (fooGetProperty):
718         (fooSetProperty):
719         (testJSCPromises):
720         (testJSCGarbageCollector):
721         (testsJSCVirtualMachine):
722         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
723         (windowObjectClearedCallback):
724
725 2018-04-17  Wenson Hsieh  <wenson_hsieh@apple.com>
726
727         [Extra zoom mode] Programmatically changing focus when an element already has focus is a confusing experience
728         https://bugs.webkit.org/show_bug.cgi?id=184635
729         <rdar://problem/39440642>
730
731         Reviewed by Tim Horton.
732
733         Add plumbing to support invoking `didHideKeyboardCallback` and `didShowKeyboardCallback` when (respectively)
734         dismissing or presenting fullscreen input view controllers in extra zoom mode.
735
736         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
737         (-[TestRunnerWKWebView initWithFrame:configuration:]):
738         (-[TestRunnerWKWebView dealloc]):
739         (-[TestRunnerWKWebView _invokeShowKeyboardCallbackIfNecessary]):
740         (-[TestRunnerWKWebView _invokeHideKeyboardCallbackIfNecessary]):
741         (-[TestRunnerWKWebView _keyboardDidShow:]):
742         (-[TestRunnerWKWebView _keyboardDidHide:]):
743         (-[TestRunnerWKWebView _webView:didPresentFocusedElementViewController:]):
744         (-[TestRunnerWKWebView _webView:didDismissFocusedElementViewController:]):
745
746 2018-04-17  Michael Catanzaro  <mcatanzaro@igalia.com>
747
748         [GTK] Webkit should spoof as Safari on a Mac for Outlook.com
749         https://bugs.webkit.org/show_bug.cgi?id=184573
750
751         Reviewed by Carlos Alberto Lopez Perez.
752
753         * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
754         (TestWebKitAPI::TEST):
755
756 2018-04-17  Fujii Hironori  <Hironori.Fujii@sony.com>
757
758         [WinCairo][TestWebKitAPI] Implement PlatformWebView for TestWebKit
759         https://bugs.webkit.org/show_bug.cgi?id=184524
760
761         Reviewed by Alex Christensen.
762
763         Resurrect PlatformWebView for Windows port which was removed in Bug 104607.
764
765         * TestWebKitAPI/PlatformWebView.h:
766         * TestWebKitAPI/PlatformWin.cmake:
767         * TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Added.
768         (TestWebKitAPI::InjectedBundleController::platformInitialize):
769         * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Added.
770         (TestWebKitAPI::Util::moduleDirectory):
771         (TestWebKitAPI::Util::createInjectedBundlePath):
772         (TestWebKitAPI::Util::createURLForResource):
773         (TestWebKitAPI::Util::URLForNonExistentResource):
774         (TestWebKitAPI::Util::isKeyDown):
775         * TestWebKitAPI/win/PlatformWebViewWin.cpp: Added.
776         (TestWebKitAPI::PlatformWebView::registerWindowClass):
777         (TestWebKitAPI::PlatformWebView::PlatformWebView):
778         (TestWebKitAPI::PlatformWebView::initialize):
779         (TestWebKitAPI::PlatformWebView::~PlatformWebView):
780         (TestWebKitAPI::PlatformWebView::page const):
781         (TestWebKitAPI::PlatformWebView::resizeTo):
782         (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
783         (TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
784         (TestWebKitAPI::PlatformWebView::simulateRightClick):
785         (TestWebKitAPI::PlatformWebView::simulateMouseMove):
786         (TestWebKitAPI::PlatformWebView::wndProc):
787         * TestWebKitAPI/win/UtilitiesWin.cpp: Added.
788         (TestWebKitAPI::Util::run):
789         (TestWebKitAPI::Util::spinRunLoop):
790         (TestWebKitAPI::Util::sleep):
791
792 2018-04-17  Jonathan Bedard  <jbedard@apple.com>
793
794         Fix hasher tests for system with 32 bit longs
795         https://bugs.webkit.org/show_bug.cgi?id=184708
796         <rdar://problem/39459977>
797
798         Reviewed by Mark Lam.
799
800         Some systems have 32 bit longs. The Hasher WTF tests should handle this case.
801
802         * TestWebKitAPI/Tests/WTF/Hasher.cpp:
803         (TestWebKitAPI::TEST):
804
805 2018-04-17  Commit Queue  <commit-queue@webkit.org>
806
807         Unreviewed, rolling out r230697, r230720, and r230724.
808         https://bugs.webkit.org/show_bug.cgi?id=184717
809
810         These caused multiple failures on the Test262 testers.
811         (Requested by mlewis13 on #webkit).
812
813         Reverted changesets:
814
815         "[WebAssembly][Modules] Prototype wasm import"
816         https://bugs.webkit.org/show_bug.cgi?id=184600
817         https://trac.webkit.org/changeset/230697
818
819         "[WebAssembly][Modules] Implement function import from wasm
820         modules"
821         https://bugs.webkit.org/show_bug.cgi?id=184689
822         https://trac.webkit.org/changeset/230720
823
824         "[JSC] Rename runWebAssembly to runWebAssemblySuite"
825         https://bugs.webkit.org/show_bug.cgi?id=184703
826         https://trac.webkit.org/changeset/230724
827
828 2018-04-17  Jonathan Bedard  <jbedard@apple.com>
829
830         Unreviewed rollout of r230632. Regression in memory usage.
831
832         That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569.
833
834         * DumpRenderTree/TestOptions.h:
835         * DumpRenderTree/mac/DumpRenderTree.mm:
836         (runTest):
837         (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference): Deleted.
838         * WebKitTestRunner/TestController.cpp:
839         (WTR::TestController::resetPreferencesToConsistentValues):
840         * WebKitTestRunner/TestOptions.cpp:
841         (WTR::TestOptions::TestOptions):
842         (WTR::isLegacyAnimationEngineTestPath): Deleted.
843         * WebKitTestRunner/TestOptions.h:
844
845 2018-04-17  Yusuke Suzuki  <utatane.tea@gmail.com>
846
847         [JSC] Rename runWebAssembly to runWebAssemblySuite
848         https://bugs.webkit.org/show_bug.cgi?id=184703
849
850         Reviewed by JF Bastien.
851
852         * Scripts/run-jsc-stress-tests:
853
854 2018-04-17  Yusuke Suzuki  <utatane.tea@gmail.com>
855
856         [WebAssembly][Modules] Implement function import from wasm modules
857         https://bugs.webkit.org/show_bug.cgi?id=184689
858
859         Reviewed by JF Bastien.
860
861         Add runWebAssemblyDirect, which runs wasm file directly.
862
863         * Scripts/run-jsc-stress-tests:
864
865 2018-04-17  Saam Barati  <sbarati@apple.com>
866
867         Add system trace points for process launch and for initializeWebProcess
868         https://bugs.webkit.org/show_bug.cgi?id=184669
869
870         Reviewed by Simon Fraser.
871
872         * Tracing/SystemTracePoints.plist:
873
874 2018-04-17  Ross Kirsling  <ross.kirsling@sony.com>
875
876         Add debug bots for WinCairo.
877         https://bugs.webkit.org/show_bug.cgi?id=184663
878
879         Reviewed by Lucas Forschler.
880
881         * BuildSlaveSupport/build.webkit.org-config/config.json:
882         Add a debug build bot and two debug test bots.
883
884         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
885         * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
886         Add a WinCairo category to build.webkit.org.
887
888 2018-04-17  Zalan Bujtas  <zalan@apple.com>
889
890         [LayoutReloaded] Set inline-block box position.
891         https://bugs.webkit.org/show_bug.cgi?id=184690
892
893         Reviewed by Antti Koivisto.
894
895         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
896         (InlineFormattingContext.prototype._handleInlineBlock):
897         * LayoutReloaded/Utils.js:
898         (Utils._dumpBox):
899         * LayoutReloaded/test/inline-block-with-fixed-width-height.html:
900
901 2018-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
902
903         [GLIB] Add API to clear JSCContext uncaught exception
904         https://bugs.webkit.org/show_bug.cgi?id=184685
905
906         Reviewed by Žan Doberšek.
907
908         Add test cases for the new API.
909
910         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
911         (testJSCExceptions):
912
913 2018-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
914
915         [GLIB] Add API to query, delete and enumerate properties
916         https://bugs.webkit.org/show_bug.cgi?id=184647
917
918         Reviewed by Michael Catanzaro.
919
920         Add test cases for the new API.
921
922         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
923         (testJSCObject):
924         (testJSCClass):
925         (testJSCPrototypes):
926
927 2018-04-16  Zalan Bujtas  <zalan@apple.com>
928
929         [LayoutReloaded] Add support for replaced box.
930         https://bugs.webkit.org/show_bug.cgi?id=184680
931
932         Reviewed by Antti Koivisto.
933
934         Basic support for inline replaced.
935
936         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
937         (InlineFormattingContext.prototype._handleInlineBox):
938         (InlineFormattingContext.prototype._handleInlineBlock):
939         (InlineFormattingContext.prototype._handleReplaced):
940         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
941         (Line.prototype.lastLineBox):
942         (Line.prototype.addInlineBox):
943         (Line.prototype.addInlineContainerBox): Deleted.
944         * LayoutReloaded/TreeBuilder.js:
945         (TreeBuilder.prototype._createAndAttachBox):
946         * LayoutReloaded/Utils.js:
947         (Utils._dumpBox):
948         * LayoutReloaded/test/index.html:
949         * LayoutReloaded/test/inline-simple-replaced.html: Added.
950
951 2018-04-16  Zalan Bujtas  <zalan@apple.com>
952
953         [LayoutReloaded] Minor InlineFormattingContext::layout() cleanup.
954         https://bugs.webkit.org/show_bug.cgi?id=184679
955
956         Reviewed by Antti Koivisto.
957
958         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
959         (InlineFormattingContext):
960         (InlineFormattingContext.prototype.layout):
961         (InlineFormattingContext.prototype._handleInlineContainer):
962         (InlineFormattingContext.prototype._handleInlineContent):
963         (InlineFormattingContext.prototype._handleInlineBlock):
964         (InlineFormattingContext.prototype._handleReplacedBox):
965         (InlineFormattingContext.prototype._clearNeedsLayoutAndMoveToNextSibling):
966         (InlineFormattingContext.prototype._handleInlineBlockContainer): Deleted.
967         (InlineFormattingContext.prototype._clearAndMoveToNext): Deleted.
968
969 2018-04-16  Zalan Bujtas  <zalan@apple.com>
970
971         [LayoutReloaded] Introduce fragmentation state/context.
972         https://bugs.webkit.org/show_bug.cgi?id=184677
973
974         Reviewed by Antti Koivisto.
975
976         State/context for fragmented content (multicol, regions, pagination etc).
977
978         * LayoutReloaded/FormattingContext/FragmentationContext.js: Added.
979         (FragmentationContext):
980         * LayoutReloaded/FormattingState/FragmentationState.js: Added.
981         (FragmentationState):
982         (FragmentationState.prototype.formattingState):
983
984 2018-04-16  Andy Estes  <aestes@apple.com>
985
986         [iOS] Enable WKPDFView by default
987         https://bugs.webkit.org/show_bug.cgi?id=184675
988         <rdar://problem/27885452>
989
990         Reviewed by Darin Adler.
991
992         * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
993
994 2018-04-16  Leo Balter  <leonardo.balter@gmail.com>
995
996         Perl-based Test262 runner
997         https://bugs.webkit.org/show_bug.cgi?id=183343
998
999         Reviewed by Michael Saboff.
1000
1001         * Scripts/test262-helpers/README.md: Added.
1002         * Scripts/test262-helpers/agent.js: Added.
1003         (262.getGlobal):
1004         (262.setGlobal):
1005         (262.destroy):
1006         (262.IsHTMLDDA):
1007         * Scripts/test262-helpers/cpanfile: Added.
1008         * Scripts/test262-helpers/cpanfile.snapshot: Added.
1009         * Scripts/test262-helpers/test262-runner.pl: Added.
1010         (main):
1011         (processFile):
1012         (getScenarios):
1013         (addScenario):
1014         (compileTest):
1015         (runTest):
1016         (processResult):
1017         (getTempFile):
1018         (getContents):
1019         (parseData):
1020         (getHarness):
1021         * Scripts/test262-helpers/tests.log: Added.
1022
1023 2018-04-15  Andy Estes  <aestes@apple.com>
1024
1025         [iOS] Add API tests for PDF find-in-page
1026         https://bugs.webkit.org/show_bug.cgi?id=184634
1027
1028         Reviewed by Dan Bernstein.
1029
1030         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1031         * TestWebKitAPI/Tests/WebKit/find.pdf: Added.
1032         * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
1033         (-[TestFindDelegate findString]):
1034         (-[TestFindDelegate _webView:didCountMatches:forString:]):
1035         (-[TestFindDelegate _webView:didFindMatches:forString:withMatchIndex:]):
1036         (-[TestFindDelegate _webView:didFailToFindString:]):
1037         (loadWebView):
1038         (TEST):
1039
1040 2018-04-13  Zalan Bujtas  <zalan@apple.com>
1041
1042         [LayoutReloaded] Update class documentation
1043         https://bugs.webkit.org/show_bug.cgi?id=184625
1044
1045         Reviewed by Antti Koivisto.
1046
1047         * LayoutReloaded/DisplayTree/Box.js:
1048         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1049         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
1050         * LayoutReloaded/FormattingContext/FloatingContext.js:
1051         * LayoutReloaded/FormattingContext/FormattingContext.js:
1052         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1053         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1054         * LayoutReloaded/FormattingState/BlockFormattingState.js:
1055         * LayoutReloaded/FormattingState/FloatingState.js:
1056         * LayoutReloaded/FormattingState/FormattingState.js:
1057         * LayoutReloaded/FormattingState/InlineFormattingState.js:
1058         * LayoutReloaded/LayoutState.js:
1059         * LayoutReloaded/LayoutTree/BlockContainer.js:
1060         * LayoutReloaded/LayoutTree/Box.js:
1061         * LayoutReloaded/LayoutTree/Container.js:
1062         * LayoutReloaded/LayoutTree/InlineBox.js:
1063         * LayoutReloaded/LayoutTree/InlineContainer.js:
1064         * LayoutReloaded/LayoutTree/Text.js:
1065         * LayoutReloaded/misc/headers/BlockContainer.h: Removed.
1066         * LayoutReloaded/misc/headers/BlockFormattingContext.h: Removed.
1067         * LayoutReloaded/misc/headers/BlockMarginCollapse.h: Removed.
1068         * LayoutReloaded/misc/headers/Box.h: Removed.
1069         * LayoutReloaded/misc/headers/Container.h: Removed.
1070         * LayoutReloaded/misc/headers/FloatingContext.h: Removed.
1071         * LayoutReloaded/misc/headers/FormattingContext.h: Removed.
1072         * LayoutReloaded/misc/headers/InitialBlockContainer.h: Removed.
1073         * LayoutReloaded/misc/headers/InlineBox.h: Removed.
1074         * LayoutReloaded/misc/headers/LayoutContext.h: Removed.
1075         * LayoutReloaded/misc/headers/Line.h: Removed.
1076         * LayoutReloaded/misc/headers/Text.h: Removed.
1077
1078 2018-04-13  Zalan Bujtas  <zalan@apple.com>
1079
1080         [LayoutReloaded] Add simple implementation for FormattingState::markNeedsLayout()
1081         https://bugs.webkit.org/show_bug.cgi?id=184621
1082
1083         Reviewed by Antti Koivisto.
1084
1085         This is just a simple, mark ancestors dirty implementation.
1086
1087         * LayoutReloaded/FormattingState/FormattingState.js:
1088         (FormattingState.prototype.markNeedsLayout):
1089         * LayoutReloaded/LayoutState.js:
1090         (LayoutState.prototype.markNeedsLayout):
1091         (LayoutState.prototype.setNeedsLayoutById): Deleted.
1092         (LayoutState.prototype.setNeedsLayout): Deleted.
1093         * LayoutReloaded/TreeBuilder.js:
1094         (TreeBuilder.prototype._createAndAttachBox):
1095         (TreeBuilder.prototype._findBox): Deleted.
1096         * LayoutReloaded/Utils.js:
1097         (Utils.layoutBoxById):
1098         * LayoutReloaded/test/index.html:
1099         * LayoutReloaded/test/simple-incremental-layout-with-static-content.html:
1100
1101 2018-04-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1102
1103         [WPE] [webkitpy] The driver requirements should be checked before starting the tests
1104         https://bugs.webkit.org/show_bug.cgi?id=184595
1105
1106         Reviewed by Michael Catanzaro.
1107
1108         Ensure Driver.check_driver() is checked at check_sys_deps() time.
1109
1110         * Scripts/webkitpy/port/wpe.py:
1111         (WPEPort.check_sys_deps):
1112
1113 2018-04-13  Zalan Bujtas  <zalan@apple.com>
1114
1115         Rebaseline LayoutReloaded patch file (collectRenderersWithNeedsLayout).
1116
1117         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1118
1119 2018-04-13  Jonathan Bedard  <jbedard@apple.com>
1120
1121         Boot fewer simulators in CI/EWS machines
1122         https://bugs.webkit.org/show_bug.cgi?id=184594
1123         <rdar://problem/39188082>
1124
1125         Reviewed by Alexey Proskuryakov.
1126
1127         This is a temporary workaround fro <rdar://problem/39393590>.
1128
1129         * Scripts/webkitpy/xcode/simulated_device.py:
1130         (SimulatedDeviceManager): Treat simulators as taking 6 gigs instead of 2.
1131
1132 2018-04-13  Brady Eidson  <beidson@apple.com>
1133
1134         Introduce SuspendedPageProxy to keep old web processes around after their WebPageProxy has been swapped to a new one.
1135         https://bugs.webkit.org/show_bug.cgi?id=184559
1136
1137         Reviewed by Alex Christensen.
1138
1139         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1140
1141 2018-04-13  Chris Dumez  <cdumez@apple.com>
1142
1143         input.webkitEntries does not work as expected when folder contains accented chars
1144         https://bugs.webkit.org/show_bug.cgi?id=184517
1145         <rdar://problem/39265537>
1146
1147         Reviewed by Alex Christensen.
1148
1149         Add API test coverage.
1150
1151         * TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
1152         (TestWebKitAPI::TEST_F):
1153
1154 2018-04-13  Thibault Saunier  <tsaunier@igalia.com>
1155
1156         Update my emails ordering in contributors.json
1157         https://bugs.webkit.org/show_bug.cgi?id=184587
1158
1159         Rubber-stamped by Philippe Normand.
1160
1161         Bugzilla seems to pick up tsaunier@igalia.com which is not the one I use there.
1162
1163         * Scripts/webkitpy/common/config/contributors.json:
1164
1165 2018-04-13  Michael Catanzaro  <mcatanzaro@igalia.com>
1166
1167         [WPE] xkbcommon: ERROR: failed to add default include path /home/mcatanzaro/Projects/WebKit/WebKitBuild/DependenciesWPE/Root/share/X11/xkb
1168         https://bugs.webkit.org/show_bug.cgi?id=184388
1169
1170         Reviewed by Carlos Alberto Lopez Perez.
1171
1172         Remove libxkbcommon from the JHBuild environment. We could alternatively add
1173         xkeyboard-config, but there doesn't seem to be any need to build libxkbcommon because I do
1174         not believe it depends on anything else in the JHBuild environment.
1175
1176         * wpe/install-dependencies:
1177         * wpe/jhbuild.modules:
1178
1179 2018-04-12  Antoine Quint  <graouts@apple.com>
1180
1181         [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
1182         https://bugs.webkit.org/show_bug.cgi?id=184569
1183         <rdar://problem/38671301>
1184
1185         Reviewed by Jon Lee.
1186
1187         We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
1188         but override it to be false always in the LayoutTests/legacy-animation-engine directory.
1189
1190         * DumpRenderTree/TestOptions.h:
1191         * DumpRenderTree/mac/DumpRenderTree.mm:
1192         (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
1193         (runTest):
1194         * WebKitTestRunner/TestController.cpp:
1195         (WTR::TestController::resetPreferencesToConsistentValues):
1196         * WebKitTestRunner/TestOptions.cpp:
1197         (WTR::isLegacyAnimationEngineTestPath):
1198         (WTR::TestOptions::TestOptions):
1199         * WebKitTestRunner/TestOptions.h:
1200
1201 2018-04-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1202
1203         [GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added
1204         https://bugs.webkit.org/show_bug.cgi?id=184531
1205
1206         Reviewed by Michael Catanzaro.
1207
1208         It's not a bug in WebKit, but in the tests. The problem is that those tests are using RunLoop::main() but main
1209         run loop hasn't been initialized. ReleaseInNonMainThread doesn't really need to initialize the main run loop if
1210         we change Util::run() to always use RunLop::current() instead of RunLoop::main(). But
1211         ReleaseInNonMainThreadDestroyInMainThread ends up scheduling a task to the main thread, and the generic
1212         implementation fo that uses RunLoop::main(), so we need to initialize the main loop in this case.
1213
1214         * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
1215         (TestWebKitAPI::TEST): Call RunLoop::initializeMainRunLoop().
1216         * TestWebKitAPI/glib/UtilitiesGLib.cpp:
1217         (TestWebKitAPI::Util::run): Use RunLop::current() to stop the current run loop.
1218         (TestWebKitAPI::Util::sleep): Ditto.
1219
1220 2018-04-12  Zalan Bujtas  <zalan@apple.com>
1221
1222         [LayoutReloaded] Add support for incremental layout
1223         https://bugs.webkit.org/show_bug.cgi?id=184578
1224
1225         Reviewed by Antti Koivisto.
1226
1227         * LayoutReloaded/Layout.js:
1228         (layout):
1229         * LayoutReloaded/LayoutState.js:
1230         (LayoutState.prototype.rootContainer):
1231         (LayoutState.prototype.setNeedsLayoutById):
1232         * LayoutReloaded/Utils.js:
1233         (Utils.layoutTreeDump):
1234         * LayoutReloaded/test/TestHarness.js:
1235         (verifyLayout):
1236         (runLayout):
1237         (verifyLayoutTreeDump): Deleted.
1238         * LayoutReloaded/test/index.html:
1239         * LayoutReloaded/test/simple-incremental-layout-with-static-content.html: Added.
1240
1241 2018-04-12  Zalan Bujtas  <zalan@apple.com>
1242
1243         [LayoutReloaded] Move root container ownership to layout state
1244         https://bugs.webkit.org/show_bug.cgi?id=184575
1245
1246         Reviewed by Antti Koivisto.
1247
1248         Now the root container is on the associated layout state (ICB only at this point though).
1249
1250         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1251         (BlockFormattingContext.prototype.layout):
1252         * LayoutReloaded/FormattingContext/FormattingContext.js:
1253         (FormattingContext.prototype._layoutOutOfFlowDescendants):
1254         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1255         (InlineFormattingContext.prototype._handleInlineBlockContainer):
1256         (InlineFormattingContext.prototype._handleFloatingBox):
1257         * LayoutReloaded/Layout.js:
1258         (layout):
1259         * LayoutReloaded/LayoutState.js:
1260         (LayoutState):
1261         (LayoutState.prototype.formattingContext):
1262         (LayoutState.prototype.establishedFormattingState):
1263         (LayoutState.prototype.formattingStateForBox):
1264         (LayoutState.prototype.needsLayout):
1265         (LayoutState.prototype.displayBox):
1266         (LayoutState.prototype._formattingContext):
1267         (LayoutState.prototype.layout): Deleted.
1268         (LayoutState.prototype.formattingStates): Deleted.
1269         (LayoutState.prototype.initialDisplayBox): Deleted.
1270         * LayoutReloaded/Utils.js:
1271         (Utils._dumpBox):
1272         (Utils._findDisplayBox): Deleted.
1273
1274 2018-04-12  Jonathan Bedard  <jbedard@apple.com>
1275
1276         Fix --build-directory flag for run-webkit-tests
1277         https://bugs.webkit.org/show_bug.cgi?id=184545
1278         <rdar://problem/39385080>
1279
1280         Rubber-stamped by Aakash Jain.
1281
1282         The --build-directory path does not work with iOS-Simulator.
1283
1284         * Scripts/webkitpy/port/base.py:
1285         (Port._build_path): Use the port configuration to calculate the root directory.
1286         * Scripts/webkitpy/port/base_unittest.py:
1287         (PortTest.test_build_path): Test build directories for embedded configurations.
1288
1289 2018-04-12  Ross Kirsling  <ross.kirsling@sony.com>
1290
1291         pemfile.py should not assume POSIX line endings
1292         https://bugs.webkit.org/show_bug.cgi?id=184507
1293
1294         Reviewed by Daniel Bates.
1295
1296         * Scripts/webkitpy/common/system/pemfile.py:
1297         (_parse_pem_format):
1298         * Scripts/webkitpy/common/system/pemfile_unittest.py:
1299         (PemFileTest.test_parse_crlf):
1300         (PemFileTest.test_parse_cr):
1301
1302 2018-04-12  Zalan Bujtas  <zalan@apple.com>
1303
1304         [LayoutReloaded] Minor cleanup in LayoutSate
1305         https://bugs.webkit.org/show_bug.cgi?id=184546
1306
1307         Reviewed by Antti Koivisto.
1308
1309         * LayoutReloaded/FormattingContext/FormattingContext.js:
1310         (FormattingContext.isInFormattingContext):
1311         * LayoutReloaded/FormattingState/FormattingState.js:
1312         (FormattingState.prototype.displayBoxes):
1313         (FormattingState.prototype.displayBox):
1314         (FormattingState.prototype._markSubTreeNeedsLayout):
1315         (FormattingState):
1316         (FormattingState.prototype.displayBoxMap): Deleted.
1317         * LayoutReloaded/LayoutState.js:
1318         (LayoutState.prototype.formattingStateForBox):
1319         (LayoutState.prototype.needsLayout):
1320         (LayoutState.prototype.displayBox):
1321         (LayoutState.prototype._createFormattingState):
1322         (LayoutState):
1323         * LayoutReloaded/LayoutTree/Box.js:
1324         (Layout.Box.prototype.isFormattingContextDescendant): Deleted.
1325         * LayoutReloaded/LayoutTree/Container.js:
1326         (Layout.Container.prototype.isContainingBlockDescendant): Deleted.
1327         * LayoutReloaded/Utils.js:
1328         (Utils._findDisplayBox):
1329
1330 2018-04-12  Zalan Bujtas  <zalan@apple.com>
1331
1332         [LayoutReloaded] Introduce needsLayout to InlineFormattingContext
1333         https://bugs.webkit.org/show_bug.cgi?id=184538
1334
1335         Reviewed by Antti Koivisto.
1336
1337         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1338         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
1339         (BlockFormattingContext):
1340         (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout): Deleted.
1341         (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): Deleted.
1342         * LayoutReloaded/FormattingContext/FormattingContext.js:
1343         (FormattingContext.prototype._firstInFlowChildWithNeedsLayout):
1344         (FormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
1345         (FormattingContext):
1346         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1347         (InlineFormattingContext.prototype.layout):
1348         (InlineFormattingContext.prototype._handleInlineContainer):
1349         (InlineFormattingContext.prototype._handleInlineBlockContainer):
1350         (InlineFormattingContext.prototype._handleInlineContent):
1351         (InlineFormattingContext.prototype._clearAndMoveToNext):
1352         (InlineFormattingContext):
1353
1354 2018-04-12  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1355
1356         [GStreamer] Speed up GStreamer dependency build by removing examples compilation
1357         https://bugs.webkit.org/show_bug.cgi?id=184528
1358
1359         Reviewed by Philippe Normand.
1360
1361         * gstreamer/jhbuild.modules: Added --disable-examples for GStreamer package.
1362
1363 2018-04-12  Zan Dobersek  <zdobersek@igalia.com>
1364
1365         [WPE] Switch testing process to using WPEBackend-fdo
1366         https://bugs.webkit.org/show_bug.cgi?id=184357
1367
1368         Reviewed by Carlos Alberto Lopez Perez.
1369
1370         Switch WPE testing to using the WPEBackend-fdo implementation that
1371         depends on the WL_bind_wayland_display EGL extension, as defined under
1372         the freedesktop.org project.
1373         https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec
1374
1375         HeadlessViewBackend is refactored to use the WPEBackend-fdo API, but
1376         otherwise is not changed in functionality.
1377
1378         Unit tests now have to unconditionally use HeadlessViewBackend as a
1379         wpe_view_backend provider, since WPEBackend-fdo does not provide a
1380         default wpe_view_backend implementation. Unit tests covering that are
1381         adjusted to instead use a mock wpe_view_backend interface.
1382
1383         * Scripts/webkitdirs.pm:
1384         (builtDylibPathForName): Fix the libWPEWebKit.so name to also include
1385         the API version that was added in r230449.
1386         * Scripts/webkitpy/port/waylanddriver.py:
1387         (WaylandDriver._setup_environ_for_test): Export EGL_PLATFORM=wayland.
1388         * Scripts/webkitpy/port/wpe.py:
1389         (WPEPort._driver_class): Use WaylandDriver by default.
1390         * TestWebKitAPI/PlatformWebView.h:
1391         (): Deleted.
1392         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
1393         (testWebViewWebBackend):
1394         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
1395         (Test::createWebViewBackend):
1396         * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
1397         (TestWebKitAPI::PlatformWebView::~PlatformWebView):
1398         (TestWebKitAPI::PlatformWebView::initialize):
1399         * wpe/HeadlessViewBackend/CMakeLists.txt:
1400         * wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
1401         (getEGLDisplay):
1402         (HeadlessViewBackend::HeadlessViewBackend):
1403         (HeadlessViewBackend::~HeadlessViewBackend):
1404         (HeadlessViewBackend::backend const):
1405         (HeadlessViewBackend::createSnapshot):
1406         (HeadlessViewBackend::performUpdate):
1407         (HeadlessViewBackend::makeCurrent): Deleted.
1408         * wpe/HeadlessViewBackend/HeadlessViewBackend.h:
1409         * wpe/jhbuild.modules: Module name cleanup. Dyz version is bumped.
1410
1411 2018-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1412
1413         [GTK] Switch to use always complex text code path
1414         https://bugs.webkit.org/show_bug.cgi?id=183285
1415
1416         Reviewed by Michael Catanzaro.
1417
1418         Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests.
1419
1420         * WebKitTestRunner/gtk/main.cpp:
1421         (main): Set WEBKIT_FORCE_COMPLEX_TEXT to 0 unless it's already present in the environment.
1422
1423 2018-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1424
1425         [GLIB] Handle strings containing null characters
1426         https://bugs.webkit.org/show_bug.cgi?id=184450
1427
1428         Reviewed by Michael Catanzaro.
1429
1430         Add test case for strings with null characters and update all calls to evaluate to pass the script length.
1431
1432         * TestWebKitAPI/PlatformGTK.cmake:
1433         * TestWebKitAPI/PlatformWPE.cmake:
1434         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
1435         (testJSCBasic):
1436         (testJSCFunction):
1437         (testJSCObject):
1438         (testJSCClass):
1439         (testJSCPrototypes):
1440         (testJSCExceptions):
1441         (testJSCPromises):
1442         (testJSCGarbageCollector):
1443         (testJSCWeakValue):
1444         (testsJSCVirtualMachine):
1445         (testsJSCAutocleanups):
1446         * TestWebKitAPI/Tests/JavaScriptCore/glib/script.js: Added.
1447         * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp:
1448         (DOMElementTest::testAutoFill):
1449         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp:
1450         (WebKitWebEditorTest::testSelectionChanged):
1451         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
1452         (WebKitFrameTest::testJavaScriptValues):
1453         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
1454         (consoleMessageSentCallback):
1455         (methodCallCallback):
1456
1457 2018-04-11  Zan Dobersek  <zdobersek@igalia.com>
1458
1459         [WPE] Make WebKitWebViewBackend object mandatory for webkit_web_view_new*() constructors
1460         https://bugs.webkit.org/show_bug.cgi?id=184513
1461
1462         Reviewed by Michael Catanzaro.
1463
1464         Update the WPE-specific testWebViewWebBackend() test case, removing the
1465         test that passes a null WebKitWebViewBackend object to the
1466         webkit_web_view_new() call.
1467
1468         Helper createWebViewBackend() that's called via Test::createWebView()
1469         variations is updated to, in case of not using the headless backend,
1470         return a WebKitWebViewBackend instance that wraps around a
1471         default wpe_view_backend object.
1472
1473         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
1474         (testWebViewWebBackend):
1475         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
1476         (Test::createWebViewBackend):
1477
1478 2018-04-11  Zalan Bujtas  <zalan@apple.com>
1479
1480         [LayoutReloaded] Introduce needsLayout flag
1481         https://bugs.webkit.org/show_bug.cgi?id=184527
1482
1483         Reviewed by Antti Koivisto.
1484
1485         Use the formatting state to mark boxes dirty.
1486
1487         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1488         (BlockFormattingContext.prototype.layout):
1489         (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout):
1490         (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
1491         (BlockFormattingContext):
1492         * LayoutReloaded/FormattingContext/FormattingContext.js:
1493         (FormattingContext.prototype._layoutOutOfFlowDescendants):
1494         * LayoutReloaded/FormattingState/FormattingState.js:
1495         (FormattingState):
1496         (FormattingState.prototype.markNeedsLayout):
1497         (FormattingState.prototype.clearNeedsLayout):
1498         (FormattingState.prototype.needsLayout):
1499         (FormattingState.prototype.layoutNeeded):
1500         (FormattingState.prototype._markSubTreeNeedsLayout):
1501         * LayoutReloaded/LayoutState.js:
1502         (LayoutState.prototype.formattingStateForBox):
1503         (LayoutState.prototype.setNeedsLayout):
1504         (LayoutState.prototype.needsLayout):
1505         * LayoutReloaded/LayoutTree/Box.js:
1506         (Layout.Box.prototype.isFormattingContextDescendant):
1507         * LayoutReloaded/LayoutTree/Container.js:
1508         (Layout.Container.prototype.isContainingBlockDescendant):
1509
1510 2018-04-11  Jonathan Bedard  <jbedard@apple.com>
1511
1512         Fix TestInvocation class for newer versions of clang.
1513         https://bugs.webkit.org/show_bug.cgi?id=184508
1514         <rdar://problem/39328648>
1515
1516         Reviewed by Alexey Proskuryakov.
1517
1518         Declare TestInvocation to be final so it does not require a virtual destructor.
1519
1520         * WebKitTestRunner/TestInvocation.h:
1521
1522 2018-04-10  Alex Christensen  <achristensen@webkit.org>
1523
1524         IDN spoofing with Hebrew combining characters
1525         https://bugs.webkit.org/show_bug.cgi?id=184472
1526         <rdar://problem/39148687>
1527
1528         Reviewed by Brent Fulgham.
1529
1530         * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
1531         (TestWebKitAPI::TEST):
1532
1533 2018-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1534
1535         [Extra zoom mode] Missing label when focusing a <select> with a title attribute but no associated <label>
1536         https://bugs.webkit.org/show_bug.cgi?id=184352
1537         <rdar://problem/39237683>
1538
1539         Reviewed by Andy Estes.
1540
1541         Add support for UIScriptController::selectFormPopoverTitle, which returns the title of the current select
1542         popover's UITableViewController (for testing purposes).
1543
1544         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
1545         (WTR::UIScriptController::selectFormPopoverTitle const):
1546         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
1547         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
1548         (WTR::UIScriptController::selectFormPopoverTitle const):
1549         * TestRunnerShared/UIScriptContext/UIScriptController.h:
1550         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
1551         (WTR::UIScriptController::selectFormPopoverTitle const):
1552
1553 2018-04-10  Nan Wang  <n_wang@apple.com>
1554
1555         AX: Expose strong password fields on iOS
1556         https://bugs.webkit.org/show_bug.cgi?id=184465
1557         <rdar://problem/39325104>
1558
1559         Reviewed by Chris Fleizach.
1560
1561         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
1562         (AccessibilityUIElement::boolAttributeValue):
1563         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
1564         (WTR::AccessibilityUIElement::boolAttributeValue):
1565
1566 2018-04-10  Zalan Bujtas  <zalan@apple.com>
1567
1568         [LayoutReloaded] Add support for out-of-flow descendants in inline formatting context.
1569         https://bugs.webkit.org/show_bug.cgi?id=184454
1570
1571         Reviewed by Antti Koivisto.
1572
1573         When the containing block of an out-of-flow positioned element establishes an inline formatting context.
1574         This is mostly about moving out-of-flow logic from BlockFormattingContext to the base class.
1575
1576         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1577         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
1578         (BlockFormattingContext):
1579         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants): Deleted.
1580         (BlockFormattingContext.prototype._computeOutOfFlowWidth): Deleted.
1581         (BlockFormattingContext.prototype._computeInFlowWidth): Deleted.
1582         (BlockFormattingContext.prototype._computeOutOfFlowHeight): Deleted.
1583         (BlockFormattingContext.prototype._computeOutOfFlowPosition): Deleted.
1584         (BlockFormattingContext.prototype._shrinkToFitWidth): Deleted.
1585         * LayoutReloaded/FormattingContext/FormattingContext.js:
1586         (FormattingContext.prototype._placeInFlowPositionedChildren):
1587         (FormattingContext.prototype._computeInFlowWidth):
1588         (FormattingContext.prototype._layoutOutOfFlowDescendants):
1589         (FormattingContext.prototype._computeOutOfFlowWidth):
1590         (FormattingContext.prototype._computeOutOfFlowHeight):
1591         (FormattingContext.prototype._computeOutOfFlowPosition):
1592         (FormattingContext.prototype._shrinkToFitWidth):
1593         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1594         (InlineFormattingContext.prototype.layout):
1595         (InlineFormattingContext.prototype._handleInlineContainer):
1596         (InlineFormattingContext.prototype._handleInlineBlockContainer):
1597         (InlineFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
1598         * LayoutReloaded/test/index.html:
1599         * LayoutReloaded/test/inline-with-out-of-flow-descendant.html: Added.
1600
1601 2018-04-09  Zan Dobersek  <zdobersek@igalia.com>
1602
1603         WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms
1604         https://bugs.webkit.org/show_bug.cgi?id=184414
1605
1606         Reviewed by Michael Catanzaro.
1607
1608         Enable clearServiceWorkerRegistrations(), clearDOMCache() and
1609         clearDOMCaches() implementations in WebKitTestRunner's TestController
1610         class for non-Cocoa platforms. Implementations depend on the generic
1611         WK2 C API that other ports can leverage as well.
1612
1613         The clearDOMCache() and clearDOMCaches() calls are now operational for
1614         tests that invoke them. clearServiceWorkerRegistrations() and
1615         clearDOMCaches() are also called between each test, cleaning up relevant
1616         resources.
1617
1618         The TestController::getAllStorageAccessEntries() stub for non-Cocoa
1619         platforms is moved into the main !PLATFORM(COCOA) block.
1620
1621         * WebKitTestRunner/TestController.cpp:
1622         (WTR::TestController::getAllStorageAccessEntries):
1623         (WTR::clearServiceWorkerRegistrationsCallback):
1624         (WTR::TestController::clearServiceWorkerRegistrations):
1625         (WTR::clearDOMCacheCallback):
1626         (WTR::TestController::clearDOMCache):
1627         (WTR::TestController::clearDOMCaches):
1628
1629 2018-04-09  Zalan Bujtas  <zalan@apple.com>
1630
1631         [LayoutReloaded] Add support for relatively positioned containers in inline formatting context.
1632         https://bugs.webkit.org/show_bug.cgi?id=184439
1633
1634         Reviewed by Antti Koivisto.
1635
1636         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1637         (BlockFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
1638         (BlockFormattingContext.prototype._computeInFlowPositionedPosition): Deleted.
1639         * LayoutReloaded/FormattingContext/FormattingContext.js:
1640         (FormattingContext.prototype._computeInFlowPositionedPosition):
1641         (FormattingContext.prototype._placeInFlowPositionedChildren):
1642         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1643         (InlineFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
1644         * LayoutReloaded/Utils.js:
1645         (Utils._dumpBox):
1646         (Utils._dumpLines.):
1647         (Utils._dumpLines):
1648         (Utils.precisionRoundWithDecimals):
1649         (Utils.precisionRound):
1650         (Utils):
1651         * LayoutReloaded/test/index.html:
1652         * LayoutReloaded/test/inline-with-relative-positioning.html: Added.
1653
1654 2018-04-09  Zalan Bujtas  <zalan@apple.com>
1655
1656         [LayoutReloaded] Remove Layout.InitialContainingBlock class
1657         https://bugs.webkit.org/show_bug.cgi?id=184436
1658
1659         Reviewed by Antti Koivisto.
1660
1661         * LayoutReloaded/LayoutTree/Box.js:
1662         (Layout.Box.prototype.establishesBlockFormattingContext):
1663         * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Removed.
1664         * LayoutReloaded/TreeBuilder.js:
1665         (TreeBuilder.prototype.createTree):
1666         * LayoutReloaded/test/index.html:
1667
1668 2018-04-09  Zalan Bujtas  <zalan@apple.com>
1669
1670         [LayoutReloaded] Add support for inline-block.
1671         https://bugs.webkit.org/show_bug.cgi?id=184434
1672
1673         Reviewed by Antti Koivisto.
1674
1675         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1676         (InlineFormattingContext):
1677         (InlineFormattingContext.prototype.layout):
1678         (InlineFormattingContext.prototype._handleInlineContainer):
1679         (InlineFormattingContext.prototype._handleInlineBlockContainer):
1680         (InlineFormattingContext.prototype._handleInlineContent):
1681         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1682         (Line.prototype.addInlineContainerBox):
1683         (Line.prototype.addTextLineBox):
1684         (Line):
1685         * LayoutReloaded/LayoutTree/Box.js:
1686         (Layout.Box.prototype.isInlineBlockBox):
1687         * LayoutReloaded/Utils.js:
1688         (LayoutRect.prototype.growHorizontally):
1689         (Utils.isBlockContainerElement):
1690         (Utils.isInlineBlockElement):
1691         (Utils._dumpLines.):
1692         (Utils._dumpLines):
1693         * LayoutReloaded/test/index.html:
1694         * LayoutReloaded/test/inline-block-with-fixed-width-height.html: Added.
1695
1696 2018-04-09  Timothy Hatcher  <timothy@apple.com>
1697
1698         Add support for setting a background color on WKWebView and WKView
1699         https://bugs.webkit.org/show_bug.cgi?id=184426
1700
1701         Reviewed by Wenson Hsieh.
1702
1703         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1704         * TestWebKitAPI/Tests/mac/BackgroundColor.mm: Added.
1705
1706 2018-04-09  Charlie Turner  <cturner@igalia.com>
1707
1708         [WPE] Add some missing install dependencies
1709         https://bugs.webkit.org/show_bug.cgi?id=184383
1710
1711         Reviewed by Michael Catanzaro.
1712
1713         * wpe/install-dependencies:
1714
1715 2018-04-09  Sihui Liu  <sihui_liu@apple.com>
1716
1717         REGRESSION(r229929): localStorage is broken for WebInspector
1718         https://bugs.webkit.org/show_bug.cgi?id=184382
1719         <rdar://problem/39257355>
1720
1721         Reviewed by Chris Dumez.
1722
1723         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
1724         (TEST):
1725         * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html:
1726
1727 2018-04-09  Zan Dobersek  <zdobersek@igalia.com>
1728
1729         Unreviewed follow-up to r230389.
1730
1731         * WebKitTestRunner/TestController.cpp:
1732         (WTR::TestController::platformAdjustContext): Use the 'ServiceWorkers'
1733         subdirectory for the temporary testing-purpose SW registration directory
1734         like it's used in Cocoa's TestController, addressing the review comment
1735         that I forgot about.
1736
1737 2018-04-08  Zan Dobersek  <zdobersek@igalia.com>
1738
1739         Non-Cocoa ports use default directory for ServiceWorker data during testing
1740         https://bugs.webkit.org/show_bug.cgi?id=183784
1741
1742         Reviewed by Youenn Fablet.
1743
1744         * WebKitTestRunner/TestController.cpp:
1745         (WTR::TestController::platformAdjustContext): Set the service worker registration
1746         directory through the new WKWebsiteDataStore API for non-Cocoa ports.
1747
1748 2018-04-08  Zalan Bujtas  <zalan@apple.com>
1749
1750         [LayoutReloaded] Adjust line with inline container's margin border and padding
1751         https://bugs.webkit.org/show_bug.cgi?id=184409
1752
1753         Reviewed by Antti Koivisto.
1754
1755         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1756         (InlineFormattingContext.prototype.layout):
1757         (InlineFormattingContext.prototype._handleFloatingBox):
1758         (InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
1759         (InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
1760         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1761         (Line.prototype.shrink):
1762         (Line.prototype.adjustWithOffset):
1763         (Line.prototype.moveContentHorizontally):
1764         (Line.prototype.addTextLineBox):
1765         (Line):
1766         (Line.prototype.addFloatingBox): Deleted.
1767         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1768         * LayoutReloaded/test/index.html:
1769         * LayoutReloaded/test/inline-with-padding-border-margin-offsets.html: Added.
1770
1771 2018-04-07  Zalan Bujtas  <zalan@apple.com>
1772
1773         [LayoutReloaded] Add support for InlineContainer
1774         https://bugs.webkit.org/show_bug.cgi?id=184394
1775
1776         Reviewed by Antti Koivisto.
1777
1778         * LayoutReloaded/FormattingContext/FormattingContext.js:
1779         (FormattingContext.prototype._addToLayoutQueue):
1780         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1781         (InlineFormattingContext.prototype.layout):
1782         (InlineFormattingContext.prototype._handleInlineContent):
1783         (InlineFormattingContext.prototype._handleFloatingBox):
1784         (InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
1785         (InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
1786         (InlineFormattingContext.prototype._placeInFlowPositionedChildren):
1787         (InlineFormattingContext.prototype._placeOutOfFlowDescendants):
1788         (InlineFormattingContext.prototype._createNewLine):
1789         (InlineFormattingContext.prototype._handleContent): Deleted.
1790         * LayoutReloaded/LayoutState.js:
1791         (LayoutState.prototype._createFormattingState):
1792         * LayoutReloaded/LayoutTree/Box.js:
1793         (Layout.Box.prototype.isContainer):
1794         (Layout.Box.prototype.isInlineContainer):
1795         (Layout.Box.prototype.isInlineBox):
1796         * LayoutReloaded/LayoutTree/Container.js:
1797         (Layout.Container.prototype.isContainer): Deleted.
1798         * LayoutReloaded/LayoutTree/InlineContainer.js: Added.
1799         (Layout.InlineContainer):
1800         * LayoutReloaded/TreeBuilder.js:
1801         (TreeBuilder.prototype._createAndAttachBox):
1802         * LayoutReloaded/Utils.js:
1803         (Utils._dumpBox):
1804         (Utils.precisionRound):
1805         (Utils):
1806         * LayoutReloaded/test/index.html:
1807         * LayoutReloaded/test/inline-content-simple2.html: Added.
1808         * LayoutReloaded/test/inline-floating1.html: Added.
1809         * LayoutReloaded/test/inline-formatting-context-floats1.html: Added.
1810         * LayoutReloaded/test/inline-formatting-context-floats2.html: Added.
1811
1812 2018-04-07  Timothy Hatcher  <timothy@apple.com>
1813
1814         Use the system's link color when system appearance is desired for a WebView.
1815
1816         https://bugs.webkit.org/show_bug.cgi?id=184353
1817         rdar://problem/9420053
1818
1819         Reviewed by Wenson Hsieh.
1820
1821         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1822         * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: Added.
1823         (TestWebKitAPI::WebKit::LinkColor):
1824         (TestWebKitAPI::WebKit::LinkColorWithSystemAppearance):
1825
1826 2018-04-06  Zalan Bujtas  <zalan@apple.com>
1827
1828         Rebaseline LayoutReloaded patch file.
1829
1830         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1831
1832 2018-04-06  Fujii Hironori  <Hironori.Fujii@sony.com>
1833
1834         [Win][WebCore] Expose a constant for scrollbar pixels per line (cScrollbarPixelsPerLine)
1835         https://bugs.webkit.org/show_bug.cgi?id=184296
1836
1837         Reviewed by Alex Christensen.
1838
1839         * DumpRenderTree/win/EventSender.cpp:
1840         (mouseScrollBy): Removed the duplicated cScrollbarPixelsPerLine
1841         definition. Use WebCore::cScrollbarPixelsPerLine.
1842
1843 2018-04-06  Zalan Bujtas  <zalan@apple.com>
1844
1845         Rebaseline LayoutReloaded patch file.
1846
1847         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1848
1849 2018-04-05  Youenn Fablet  <youenn@apple.com>
1850
1851         Test expectation updater should handle Win bot results
1852         https://bugs.webkit.org/show_bug.cgi?id=184274
1853
1854         Reviewed by Ryosuke Niwa.
1855
1856         Add processing of win bot results.
1857         They will update platform/win results.
1858
1859         Updated the script so that if there is no mac-wk2 results, it will still process specific results.
1860
1861         * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:
1862         (TestExpectationUpdater.__init__):
1863         (TestExpectationUpdater._bot_type):
1864         (TestExpectationUpdater.do_update):
1865         * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py:
1866         (MockAttachment):
1867         (MockAttachment.__init__):
1868         (MockAttachment.contents):
1869         (MockBugzilla):
1870         (MockBugzilla.__init__):
1871         (MockBugzilla.fetch_bug):
1872         (MockBugzilla.attachments):
1873         (MockZip):
1874         (MockZip.__init__):
1875         (MockZip.unzip):
1876         (MockZip.read):
1877         (TestExpectationUpdaterTest.test_update_test_expectations):
1878         (TestExpectationUpdaterTest):
1879         (TestExpectationUpdaterTest.test_update_win_future_test_expectations):
1880
1881 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1882
1883         [LayoutReloaded] Fix static position for floating boxes when they don't fit the current line
1884         https://bugs.webkit.org/show_bug.cgi?id=184354
1885
1886         Reviewed by Antti Koivisto.
1887
1888         Do not shrink the current line with the floating box unless it is on the current line.
1889
1890         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1891         (InlineFormattingContext.prototype._handleFloatingBox):
1892         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
1893         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1894         (Line.prototype.addFloatingBox):
1895         (Line):
1896         * LayoutReloaded/test/index.html:
1897         * LayoutReloaded/test/inline-with-right-floats3.html: Added.
1898
1899 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1900
1901         [LayoutReloaded] Add support for right floating boxes in inline formatting context
1902         https://bugs.webkit.org/show_bug.cgi?id=184351
1903
1904         Reviewed by Antti Koivisto.
1905
1906         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1907         (InlineFormattingContext.prototype._handleFloatingBox):
1908         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
1909         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1910         (Line.prototype.addFloatingBox):
1911         (Line):
1912         * LayoutReloaded/test/index.html:
1913         * LayoutReloaded/test/inline-with-right-float-simple.html: Added.
1914         * LayoutReloaded/test/inline-with-right-floats2.html: Added.
1915
1916 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1917
1918         [LayoutReloaded] Move floating box to the next line when needed
1919         https://bugs.webkit.org/show_bug.cgi?id=184349
1920
1921         Reviewed by Antti Koivisto.
1922
1923         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1924         (InlineFormattingContext.prototype.layout):
1925         (InlineFormattingContext.prototype._handleContent):
1926         (InlineFormattingContext.prototype._handleText):
1927         (InlineFormattingContext.prototype._handleFloatingBox):
1928         (InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
1929         (InlineFormattingContext):
1930         (InlineFormattingContext.prototype._handleFloatingBoxes): Deleted.
1931         (InlineFormattingContext.prototype._floatingBoxes): Deleted.
1932         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1933         (Line.prototype.addTextLineBox):
1934         (Line.prototype.addFloatingBox):
1935         (Line):
1936         * LayoutReloaded/Utils.js:
1937         (LayoutRect.prototype.moveHorizontally):
1938         (LayoutRect.prototype.moveVertically):
1939         * LayoutReloaded/test/index.html:
1940         * LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html: Added.
1941
1942 2018-04-05  Brady Eidson  <beidson@apple.com>
1943
1944         Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
1945         <rdar://problem/39162236> and https://bugs.webkit.org/show_bug.cgi?id=184318
1946
1947         Reviewed by Andy Estes.
1948
1949         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1950         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
1951         (-[PSONScheme addMappingFromURLString:toData:]):
1952         (-[PSONScheme webView:startURLSchemeTask:]):
1953
1954 2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1955
1956         [WTF] Remove StaticLock
1957         https://bugs.webkit.org/show_bug.cgi?id=184332
1958
1959         Reviewed by Mark Lam.
1960
1961         * DumpRenderTree/JavaScriptThreading.cpp:
1962
1963 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1964
1965         [LayoutReloaded] Find the correct left edge for a line when floating boxes are in parent formatting context.
1966         https://bugs.webkit.org/show_bug.cgi?id=184330
1967
1968         Reviewed by Antti Koivisto.
1969
1970         In inline formatting context, the floating boxes can come from the parent (block) formatting context. Let's
1971         take them into account when computing the line edges.
1972
1973         * LayoutReloaded/FormattingContext/FloatingContext.js:
1974         (FloatingContext.prototype.left):
1975         (FloatingContext.prototype.right):
1976         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1977         (InlineFormattingContext.prototype._createNewLine):
1978         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
1979         (InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
1980         (InlineFormattingContext.prototype._mapFloatingPosition): Deleted.
1981         * LayoutReloaded/test/index.html:
1982         * LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html: Added.
1983
1984 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1985
1986         [LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
1987         https://bugs.webkit.org/show_bug.cgi?id=184329
1988
1989         Reviewed by Antti Koivisto.
1990
1991         Let's do this for now. There might be some cases where this violates layout.
1992
1993         * LayoutReloaded/FormattingContext/FormattingContext.js:
1994         (FormattingContext.prototype._outOfFlowDescendants):
1995         (FormattingContext):
1996         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1997         (InlineFormattingContext.prototype.layout):
1998         (InlineFormattingContext.prototype._handleFloatingBoxes):
1999         (InlineFormattingContext.prototype._handleFloatingBox):
2000         (InlineFormattingContext.prototype._floatingBoxes):
2001         (InlineFormattingContext):
2002         * LayoutReloaded/test/index.html:
2003         * LayoutReloaded/test/multiple-left-floats-on-line-simple.html: Added.
2004
2005 2018-04-04  Youenn Fablet  <youenn@apple.com>
2006
2007         WebRTC data channel only applications require capture permissions for direct connections
2008         https://bugs.webkit.org/show_bug.cgi?id=174500
2009         <rdar://problem/34134281>
2010
2011         Reviewed by Eric Carlson.
2012
2013         Adding options to enable MDNS ICE candidates.
2014
2015         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2016         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2017         (WTR::TestRunner::setMediaDevicesEnabled):
2018         (WTR::TestRunner::setMDNSICECandidatesEnabled):
2019         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2020         * WebKitTestRunner/TestController.cpp:
2021         (WTR::TestController::resetPreferencesToConsistentValues):
2022
2023 2018-04-04  Ryan Haddad  <ryanhaddad@apple.com>
2024
2025         Disable failing WKWebViewAutofillTests
2026         https://bugs.webkit.org/show_bug.cgi?id=184196
2027
2028         Unreviewed test gardening.
2029
2030         * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
2031         (TestWebKitAPI::TEST):
2032
2033 2018-04-04  Youenn Fablet  <youenn@apple.com>
2034
2035         Introduce a ThreadSafeRefCounted parameter to ensure being destroyed on the main thread
2036         https://bugs.webkit.org/show_bug.cgi?id=183988
2037
2038         Reviewed by Darin Adler.
2039
2040         * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
2041         (TestWebKitAPI::ThreadSafeRefCountedObject::create):
2042         (TestWebKitAPI::ThreadSafeRefCountedObject::~ThreadSafeRefCountedObject):
2043         (TestWebKitAPI::MainThreadSafeRefCountedObject::create):
2044         (TestWebKitAPI::MainThreadSafeRefCountedObject::~MainThreadSafeRefCountedObject):
2045         (TestWebKitAPI::TEST):
2046
2047 2018-04-04  Ms2ger  <Ms2ger@igalia.com>
2048
2049         Test gardening for GTK.
2050         https://bugs.webkit.org/show_bug.cgi?id=184298
2051
2052         Unreviewed test gardening.
2053
2054         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Add pointer to
2055         https://bugs.webkit.org/show_bug.cgi?id=184295.
2056
2057 2018-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2058
2059         ASSERTION FAILED: !m_mainFrame->coreFrame()->loader().frameHasLoaded() || !m_pendingNavigationID when reloading page while a page is loading
2060         https://bugs.webkit.org/show_bug.cgi?id=153210
2061
2062         Reviewed by Alex Christensen.
2063
2064         Add unit tests to WebKit C API and WebKitGLib.
2065
2066         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
2067         (TestWebKitAPI::TEST):
2068         * TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:
2069         (LoadTwiceAndReloadTest::reloadOnFinishLoad):
2070         (LoadTwiceAndReloadTest::LoadTwiceAndReloadTest):
2071         (LoadTwiceAndReloadTest::~LoadTwiceAndReloadTest):
2072         (LoadTwiceAndReloadTest::waitUntilFinished):
2073         (testWebViewLoadTwiceAndReload):
2074         (beforeAll):
2075
2076 2018-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2077
2078         [GTK] Test /webkit/WebKitWebPage/context-menu is failing since r229831
2079         https://bugs.webkit.org/show_bug.cgi?id=184260
2080
2081         Reviewed by Michael Catanzaro.
2082
2083         This is not a regression introduced in r229831, though, it's a bug in the test itself revealed by r229831. We
2084         should wait for the load to complete before trying to show the context menu.
2085
2086         * TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:
2087         (testContextMenuWebExtensionMenu):
2088
2089 2018-04-03  Zalan Bujtas  <zalan@apple.com>
2090
2091         [LayoutReloaded] Introduce floating to InlineFormattingContext
2092         https://bugs.webkit.org/show_bug.cgi?id=184288
2093
2094         Reviewed by Antti Koivisto.
2095
2096         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2097         (BlockFormattingContext.prototype._computeFloatingWidth): Deleted.
2098         (BlockFormattingContext.prototype._computeFloatingHeight): Deleted.
2099         * LayoutReloaded/FormattingContext/FormattingContext.js:
2100         (FormattingContext.prototype._computeFloatingWidth):
2101         (FormattingContext.prototype._computeFloatingHeight):
2102         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2103         (InlineFormattingContext.prototype.layout):
2104         (InlineFormattingContext.prototype._handleFloatingBox):
2105         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
2106         (Line.prototype.addFloatingBox):
2107         (Line):
2108         * LayoutReloaded/test/float-is-inside-inline-formatting-context-simple.html: Added.
2109         * LayoutReloaded/test/index.html:
2110
2111 2018-04-03  Youenn Fablet  <youenn@apple.com>
2112
2113         NetworkResourceLoader does not need to expose all redirect response headers
2114         https://bugs.webkit.org/show_bug.cgi?id=184114
2115         <rdar://problem/39010557>
2116
2117         Reviewed by Ryosuke Niwa.
2118
2119         Add an option to dump the number of headers in a response.
2120         This allows validating that filtering does happen or not.
2121
2122         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2123         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2124         (WTR::dumpResponseDescriptionSuitableForTestResult):
2125         (WTR::InjectedBundlePage::responseHeaderCount):
2126         (WTR::InjectedBundlePage::willSendRequestForFrame):
2127         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
2128         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2129         (WTR::TestRunner::dumpAllHTTPRedirectedResponseHeaders):
2130         (WTR::TestRunner::shouldDumpAllHTTPRedirectedResponseHeaders const):
2131         * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
2132         (WTR::InjectedBundlePage::responseHeaderCount):
2133         * WebKitTestRunner/TestController.cpp:
2134         (WTR::TestController::resetPreferencesToConsistentValues):
2135
2136 2018-04-03  Andy Estes  <aestes@apple.com>
2137
2138         [Mac] Prioritize file promises over filenames during drag and drop
2139         https://bugs.webkit.org/show_bug.cgi?id=184237
2140         <rdar://problem/38278076>
2141
2142         Reviewed by Wenson Hsieh.
2143
2144         * DumpRenderTree/mac/EventSendingController.mm:
2145         (-[EventSendingController beginDragWithFilePromises:]):
2146
2147 2018-04-03  Brady Eidson  <beidson@apple.com>
2148
2149         Make SessionStorage work with process swapping.
2150         https://bugs.webkit.org/show_bug.cgi?id=184270
2151
2152         Reviewed by Andy Estes.
2153
2154         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2155         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
2156
2157 2018-04-03  Chris Dumez  <cdumez@apple.com>
2158
2159         Drop MainFrame class
2160         https://bugs.webkit.org/show_bug.cgi?id=184191
2161
2162         Reviewed by Darin Adler.
2163
2164         * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
2165
2166 2018-04-03  Charlie Turner  <cturner@igalia.com>
2167
2168         [WPE] Add WPE port to garden-o-matic
2169         https://bugs.webkit.org/show_bug.cgi?id=182998
2170
2171         Reviewed by Michael Catanzaro.
2172
2173         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
2174         Add WPE as a port to check.
2175         (config.kPlatforms.string_appeared_here._builderApplies): Use less
2176         surprising equality operator.
2177         (config.kPlatforms.string_appeared_here.resultsDirectoryNameFromBuilderName):
2178         Ditto.
2179         (config.kPlatforms.string_appeared_here.resultsDirectoryForBuildNumber):
2180         Ditto.
2181
2182 2018-04-03  Adrian Perez de Castro  <aperez@igalia.com>
2183
2184         [GTK][JHBuild] Tools/gtk/install-dependencies: Replace libxfont with libxfont2 in Arch Linux
2185         https://bugs.webkit.org/show_bug.cgi?id=184258
2186
2187         Reviewed by Carlos Alberto Lopez Perez.
2188
2189         * gtk/install-dependencies: Use libxfont2 on Arch Linux as well.
2190
2191 2018-04-02  Brady Eidson  <beidson@apple.com>
2192
2193         Process swapping on navigation needs to handle server redirects.
2194         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
2195
2196         Reviewed by Alex Christensen.
2197
2198         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2199         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
2200         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
2201         (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
2202         (-[PSONScheme addRedirectFromURLString:toURLString:]):
2203         (-[PSONScheme webView:startURLSchemeTask:]):
2204
2205 2018-04-02  Daniel Bates  <dabates@apple.com>
2206
2207         Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKitTestRunner
2208         https://bugs.webkit.org/show_bug.cgi?id=184239
2209
2210         Reviewed by Alexey Proskuryakov.
2211
2212         Adds a new optional command line option --allow-any-certificate-for-allowed-hosts (defaults to disabled)
2213         to allow the allowed hosts to accept any HTTPS certificate. You can specify an allowed host
2214         by using the existing command line option --allowed-host.
2215
2216         Currently both DumpRenderTree and WebKitTestRunner relax SSL certificate validation
2217         for 127.0.0.1 and localhost so that we can run HTTPS tests from these hosts using
2218         a self-signed certificate. They do not relax these restrictions for any allowed host,
2219         specified using the optional command line option --allowed-host. For testing purposes
2220         it is useful to be able to run a local HTTPS server with a self-signed certificate and
2221         mimic a non-localhost hostname (by adding an alias(es) for 127.0.0.1 to /etc/hosts).
2222         We should support relaxing SSL restrictions for such testing purposes.
2223
2224         For example, to allow host example.test to present any HTTPS certificate when running
2225         tests you would invoke:
2226
2227             run-webkit-tests --allowed-host example.test --additional-drt-flag '--allow-any-certificate-for-allowed-hosts'
2228
2229         * DumpRenderTree/mac/DumpRenderTree.mm:
2230         (initializeGlobalsFromCommandLineOptions): Parse the command line option --allow-any-certificate-for-allowed-hosts.
2231         (dumpRenderTree): Allow any HTTPS certificate from each allowed host.
2232         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2233         (WTR::InjectedBundle::didReceiveMessageToPage): Clear out the existing list of allowed hosts
2234         before appending entries to it to avoid growing the list of allowed hosts without bound. Call
2235         platformAllowAnyHTTPSCertificateForAllowedHosts() to apply SSL relaxation for each allowed host.
2236         * WebKitTestRunner/Options.cpp:
2237         (WTR::handleOptionAllowAnyHTTPSCertificateForAllowedHosts): Added.
2238         (WTR::handleOptionAllowedHost): Update code as needed now that Options::allowedHosts is a std::set.
2239         (WTR::OptionsHandler::OptionsHandler):
2240         * WebKitTestRunner/Options.h: Change the data type of allowedHosts from a std::vector to a std::set
2241         so that we can make use of the convenience functon std::set::find() in TestController::canAuthenticateAgainstProtectionSpace().
2242         * WebKitTestRunner/TestController.cpp:
2243         (WTR::TestController::initialize):
2244         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Allow any HTTPS certificate from each allowed host.
2245         * WebKitTestRunner/TestController.h:
2246
2247 2018-04-02  Ryan Haddad  <ryanhaddad@apple.com>
2248
2249         Unreviewed, rolling out r230174.
2250
2251         Caused LayoutTests to exit early with assertion failures.
2252
2253         Reverted changeset:
2254
2255         "Process swapping on navigation needs to handle server
2256         redirects."
2257         https://bugs.webkit.org/show_bug.cgi?id=184142
2258         https://trac.webkit.org/changeset/230174
2259
2260 2018-04-02  Daniel Bates  <dabates@apple.com>
2261
2262         Remove pre-Network Session code path for allowing any HTTPS certificate on Mac and iOS
2263         https://bugs.webkit.org/show_bug.cgi?id=184242
2264
2265         Reviewed by Alexey Proskuryakov.
2266
2267         Following r227364 we use the Network Session (NSURLSession) code path by default in
2268         modern WebKit on Mac and iOS. That is, we no longer use {CF, NS}URLConnection in modern
2269         WebKit on these platforms. So, we can remove code that used NSURLRequest SPI to allow
2270         any HTTPS certificate from localhost and 127.0.0.1 when using {CF, NS}URLConnection.
2271         The equivalent functionality is implemented in TestController::canAuthenticateAgainstProtectionSpace().
2272
2273         * WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
2274         (WTR::InjectedBundle::platformInitialize):
2275         * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
2276         (WTR::InjectedBundle::platformInitialize):
2277
2278 2018-04-02  Brady Eidson  <beidson@apple.com>
2279
2280         Process swapping on navigation needs to handle server redirects.
2281         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
2282
2283         Reviewed by Alex Christensen.
2284
2285         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2286         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
2287         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
2288         (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
2289         (-[PSONScheme addRedirectFromURLString:toURLString:]):
2290         (-[PSONScheme webView:startURLSchemeTask:]):
2291
2292 2018-04-02  Thibault Saunier  <tsaunier@igalia.com>
2293
2294         webkitpy: Use current environment value for GST_DEBUG(_FILE) and DOT_DIR env vars
2295         https://bugs.webkit.org/show_bug.cgi?id=184036
2296
2297         Reviewed by Philippe Normand.
2298
2299         Those variables are for debug purpose and should not change the behaviour
2300         itself, and developers expect them to have effect.
2301
2302         * Scripts/webkitpy/port/gtk.py:
2303         (GtkPort.setup_environ_for_server):
2304
2305 2018-04-02  Daniel Bates  <dabates@apple.com>
2306
2307         Remove Options constructor and use internal linkage for option handlers
2308         https://bugs.webkit.org/show_bug.cgi?id=184229
2309
2310         Reviewed by Andy Estes.
2311
2312         Use C++11 default initializer syntax to remove the need to explicitly have a constructor
2313         for the struct Options. Use internal linkage for option handler functions as these
2314         are never invoked outside the translation unit they are defined in.
2315
2316         * WebKitTestRunner/Options.cpp:
2317         (WTR::handleOptionNoTimeout):
2318         (WTR::handleOptionVerbose):
2319         (WTR::handleOptionGcBetweenTests):
2320         (WTR::handleOptionPixelTests):
2321         (WTR::handleOptionPrintSupportedFeatures):
2322         (WTR::handleOptionComplexText):
2323         (WTR::handleOptionAcceleratedDrawing):
2324         (WTR::handleOptionRemoteLayerTree):
2325         (WTR::handleOptionShowWebView):
2326         (WTR::handleOptionShowTouches):
2327         (WTR::handleOptionAllowedHost):
2328         (WTR::handleOptionUnmatched):
2329         (WTR::Options::Options): Deleted.
2330         * WebKitTestRunner/Options.h:
2331
2332 2018-04-02  Alejandro G. Castro  <alex@igalia.com>
2333
2334         Unreviewed GTK port dependencies fix after r230152.
2335
2336         Add alsa library dependency for gtk.
2337
2338         * gtk/install-dependencies:
2339
2340 2018-04-02  Alejandro G. Castro  <alex@igalia.com>
2341
2342         [GTK] Make libwebrtc backend buildable for GTK  port
2343         https://bugs.webkit.org/show_bug.cgi?id=178860
2344
2345         Reviewed by Youenn Fablet.
2346
2347         * gstreamer/jhbuild.modules: Modified the libvpx module for the
2348         libwebrtc compilation.
2349         * gtk/install-dependencies: Add libevent as a system requirement.
2350         * Scripts/webkitpy/style/checker.py: Added libwebrtc to the list of third
2351         party libraries with reduced style checks.
2352
2353 2018-04-01  Zalan Bujtas  <zalan@apple.com>
2354
2355         [LayoutReloaded] Use containing block's contentBox left edge when the float is to the right.
2356         https://bugs.webkit.org/show_bug.cgi?id=184230
2357
2358         Reviewed by Antti Koivisto.
2359
2360         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2361         (InlineFormattingContext.prototype._mapFloatingPosition):
2362         (InlineFormattingContext):
2363         * LayoutReloaded/test/index.html:
2364         * LayoutReloaded/test/inline-formatting-context-with-floats2.html: Added.
2365
2366 2018-04-01  Zalan Bujtas  <zalan@apple.com>
2367
2368         [LayoutReloaded] Right floating box reduces available line width.
2369         https://bugs.webkit.org/show_bug.cgi?id=184226
2370
2371         Reviewed by Antti Koivisto.
2372
2373         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2374         (InlineFormattingContext.prototype._createNewLine):
2375         * LayoutReloaded/test/index.html:
2376         * LayoutReloaded/test/inline-with-floats-right-left-simple.html: Added.
2377
2378 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2379
2380         [LayoutReloaded] Floating box reduces line with in inline formatting context
2381         https://bugs.webkit.org/show_bug.cgi?id=184223
2382
2383         Reviewed by Antti Koivisto.
2384
2385         * LayoutReloaded/FormattingContext/FloatingContext.js:
2386         (FloatingContext.prototype.left):
2387         (FloatingContext.prototype.right):
2388         (FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
2389         (FloatingContext.prototype._mapBorderBoxToFormattingRoot):
2390         (FloatingContext.prototype._mapContentBoxToFormattingRoot):
2391         (FloatingContext.prototype.formattingRoot):
2392         (FloatingContext.prototype._floatingState):
2393         (FloatingContext.prototype._formattingRoot): Deleted.
2394         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2395         (InlineFormattingContext.prototype._createNewLine):
2396         (InlineFormattingContext.prototype._mapFloatingPosition):
2397         (InlineFormattingContext):
2398         * LayoutReloaded/FormattingState/FormattingState.js:
2399         (FormattingState.prototype.displayBox):
2400         (FormattingState):
2401         * LayoutReloaded/test/index.html:
2402         * LayoutReloaded/test/inline-formatting-context-with-floats.html: Added.
2403
2404 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2405
2406         [LayoutReloaded] InlineFormattingState should inherit the floating state from its parent formatting state
2407         https://bugs.webkit.org/show_bug.cgi?id=184220
2408
2409         Reviewed by Antti Koivisto.
2410
2411         If the block container box that initiates an inline formatting context also establishes a block context,
2412         create a new float state, otherwise use the existing one.
2413
2414         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2415         (BlockFormattingContext.prototype._contentHeight):
2416         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2417         (InlineFormattingState):
2418         * LayoutReloaded/LayoutState.js:
2419         (LayoutState.prototype.establishedFormattingState):
2420         (LayoutState.prototype.formattingStateForBox):
2421         (LayoutState.prototype.formattingState): Deleted.
2422         * LayoutReloaded/Utils.js:
2423
2424 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2425
2426         [LayoutReloaded] FloatingContext does not need a parent formatting context.
2427         https://bugs.webkit.org/show_bug.cgi?id=184219
2428
2429         Reviewed by Antti Koivisto.
2430
2431         We don't need the formatting context in the FloatingContext now that margins are moved over to Display.Box.
2432         This is in preparation for being able to create a FloatingContext for an inline formatting context,
2433         when the inline context actually inherits the floating state from its formatting root.
2434
2435         * LayoutReloaded/FormattingContext/FloatingContext.js:
2436         (FloatingContext):
2437         (FloatingContext.prototype._availableSpace):
2438         (FloatingContext.prototype._adjustedFloatingPosition):
2439         (FloatingContext.prototype._addFloatingBox):
2440         (FloatingContext.prototype._formattingContext): Deleted.
2441         * LayoutReloaded/FormattingContext/FormattingContext.js:
2442         (FormattingContext):
2443
2444 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2445
2446         [LayoutReloaded] Do not clone Display.Box for FloatingState stacks.
2447         https://bugs.webkit.org/show_bug.cgi?id=184218
2448
2449         Reviewed by Antti Koivisto.
2450
2451         Now that Display.Box is in a tree context, we can't just clone it for the purpose of caching its absolute position.
2452
2453         * LayoutReloaded/DisplayTree/Box.js:
2454         (Display.Box.prototype.clone): Deleted.
2455         * LayoutReloaded/FormattingContext/FloatingContext.js:
2456         (FloatingContext.prototype._positionForFloating):
2457         (FloatingContext.prototype._moveToNextVerticalPosition):
2458         (FloatingContext.prototype._availableSpace):
2459         (FloatingContext.prototype._findFloatingAtVerticalPosition):
2460         (FloatingContext.prototype._adjustedFloatingPosition):
2461         (FloatingContext.prototype._bottom):
2462         (FloatingContext.prototype._addFloatingBox):
2463         (FloatingContext.prototype._mapMarginBoxToFormattingRoot):
2464         (FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
2465         * LayoutReloaded/FormattingState/FloatingState.js:
2466         (FloatingState.prototype.addFloating):
2467
2468 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2469
2470         [LayoutReloaded] Remove all FormattingContext::absolute*Box functions.
2471         https://bugs.webkit.org/show_bug.cgi?id=184215
2472
2473         Reviewed by Antti Koivisto.
2474
2475         Use Display.Box instead.
2476
2477         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2478         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2479         * LayoutReloaded/FormattingContext/FloatingContext.js:
2480         (FloatingContext.prototype._availableSpace):
2481         (FloatingContext.prototype._adjustedFloatingPosition):
2482         (FloatingContext.prototype._mapBorderBoxToFormattingRoot):
2483         (FloatingContext.prototype._mapContentBoxToFormattingRoot):
2484         * LayoutReloaded/FormattingContext/FormattingContext.js:
2485         (FormattingContext.prototype.absoluteBorderBox): Deleted.
2486         (FormattingContext.prototype.absolutePaddingBox): Deleted.
2487         (FormattingContext.prototype.absoluteContentBox): Deleted.
2488         (FormattingContext.prototype._toAbsolutePosition): Deleted.
2489         (FormattingContext.prototype._toRootAbsolutePosition): Deleted.
2490         * LayoutReloaded/Utils.js:
2491         (Utils.mapPosition):
2492         (Utils.marginBox):
2493         (Utils.borderBox):
2494         (Utils.contentBox):
2495
2496 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2497
2498         [LayoutReloaded] Remove FormattingContext::absoluteMarginBox
2499         https://bugs.webkit.org/show_bug.cgi?id=184213
2500
2501         Reviewed by Antti Koivisto.
2502
2503         Display.Box already has the margin values.
2504
2505         * LayoutReloaded/FormattingContext/FloatingContext.js:
2506         (FloatingContext.prototype._positionForFloating):
2507         (FloatingContext.prototype._addFloatingBox):
2508         (FloatingContext.prototype._mapMarginBoxToFormattingRoot):
2509         (FloatingContext.prototype._formattingRoot):
2510         * LayoutReloaded/FormattingContext/FormattingContext.js:
2511         (FormattingContext.prototype.absoluteMarginBox): Deleted.
2512         * LayoutReloaded/Utils.js:
2513         (Utils.marginBox):
2514
2515 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2516
2517         [layoutReloaded] Introduce margin to Display.Box
2518         https://bugs.webkit.org/show_bug.cgi?id=184212
2519
2520         Reviewed by Antti Koivisto.
2521
2522         This is in preparation for moving margin box out of formatting context to Display.Box.
2523
2524         * LayoutReloaded/DisplayTree/Box.js:
2525         (Display.Box):
2526         (Display.Box.prototype.setRect):
2527         (Display.Box.prototype.setTopLeft):
2528         (Display.Box.prototype.setTop):
2529         (Display.Box.prototype.setLeft):
2530         (Display.Box.prototype.setSize):
2531         (Display.Box.prototype.setWidth):
2532         (Display.Box.prototype.setHeight):
2533         (Display.Box.prototype.width):
2534         (Display.Box.prototype.setMarginTop):
2535         (Display.Box.prototype.setMarginLeft):
2536         (Display.Box.prototype.setMarginBottom):
2537         (Display.Box.prototype.setMarginRight):
2538         (Display.Box.prototype.marginTop):
2539         (Display.Box.prototype.marginLeft):
2540         (Display.Box.prototype.marginBottom):
2541         (Display.Box.prototype.marginRight):
2542         (Display.Box.prototype.marginBox):
2543         * LayoutReloaded/FormattingContext/FormattingContext.js:
2544         (FormattingContext.prototype.absoluteMarginBox):
2545         (FormattingContext.prototype._addToLayoutQueue):
2546         * LayoutReloaded/FormattingState/FormattingState.js:
2547         (FormattingState.prototype.createDisplayBox):
2548
2549 2018-03-31  Zalan Bujtas  <zalan@apple.com>
2550
2551         [LayoutReloaded] Add tree context to Display.Box
2552         https://bugs.webkit.org/show_bug.cgi?id=184211
2553
2554         Reviewed by Antti Koivisto.
2555
2556         This is preparation for using the Display.Box tree to resolve absolute coordinates.
2557
2558         * LayoutReloaded/DisplayTree/Box.js:
2559         (Display.Box):
2560         (Display.Box.prototype.setParent):
2561         (Display.Box.prototype.setNextSibling):
2562         (Display.Box.prototype.setPreviousSibling):
2563         (Display.Box.prototype.setFirstChild):
2564         (Display.Box.prototype.setLastChild):
2565         (Display.Box.prototype.parent):
2566         (Display.Box.prototype.nextSibling):
2567         (Display.Box.prototype.previousSibling):
2568         (Display.Box.prototype.firstChild):
2569         (Display.Box.prototype.lastChild):
2570         * LayoutReloaded/FormattingState/FormattingState.js:
2571         (FormattingState.prototype.createDisplayBox):
2572
2573 2018-03-30  Ryosuke Niwa  <rniwa@webkit.org>
2574
2575         Copying a list from Microsoft Word to TinyMCE fails when mso-list is the first property
2576         https://bugs.webkit.org/show_bug.cgi?id=182938
2577         <rdar://problem/37683007>
2578
2579         Reviewed by Wenson Hsieh.
2580
2581         Added more assertions to PasteHTML.PreservesMSOList for preserving an inline style which starts with mso-list
2582         or the one which line-breaks right before it.
2583
2584         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
2585         * TestWebKitAPI/Tests/WebKitCocoa/mso-list.html:
2586
2587 2018-03-29  Ryosuke Niwa  <rniwa@webkit.org>
2588
2589         Copying a list from Microsoft Word to TinyMCE fails when mso-list is on tags other than P
2590         https://bugs.webkit.org/show_bug.cgi?id=182954
2591         <rdar://problem/37713141>
2592
2593         Reviewed by Wenson Hsieh.
2594
2595         Added a test case for a HTML generated by Microsoft Word which sets mso-list on h4.
2596
2597         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2598         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
2599         * TestWebKitAPI/Tests/WebKitCocoa/mso-list-compat-mode.html: Fixed the file path.
2600         * TestWebKitAPI/Tests/WebKitCocoa/mso-list-on-h4.html: Added.
2601
2602 2018-03-29  Ross Kirsling  <ross.kirsling@sony.com>
2603
2604         run-jsc-benchmarks should recognize Windows-style build directory structure.
2605         https://bugs.webkit.org/show_bug.cgi?id=184117
2606
2607         Reviewed by Yusuke Suzuki.
2608
2609         * Scripts/run-jsc-benchmarks:
2610         Allow not only bin/jsc but also bin64/jsc.exe.
2611
2612 2018-03-29  Zalan Bujtas  <zalan@apple.com>
2613
2614         [LayoutReloaded] Decouple formatting state and context lifetime.
2615         https://bugs.webkit.org/show_bug.cgi?id=184136
2616
2617         Reviewed by Antti Koivisto.
2618
2619         FormattingContext is about the layout logic. We don't need to hold on to it.
2620
2621         * LayoutReloaded/FormattingContext/FloatingContext.js:
2622         (FloatingContext):
2623         (FloatingContext.prototype.computePosition):
2624         (FloatingContext.prototype._positionForClear):
2625         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
2626         (FloatingContext.prototype._addFloatingBox):
2627         (FloatingContext.prototype._formattingContext):
2628         (FloatingContext.prototype._formattingState):
2629         * LayoutReloaded/FormattingContext/FormattingContext.js:
2630         (FormattingContext):
2631         * LayoutReloaded/FormattingState/BlockFormattingState.js:
2632         (BlockFormattingState):
2633         * LayoutReloaded/FormattingState/FloatingState.js:
2634         (FloatingState):
2635         (FloatingState.prototype.addFloating):
2636         (FloatingState.prototype.formattingState):
2637         (FloatingState.prototype.formattingContext): Deleted.
2638         * LayoutReloaded/FormattingState/FormattingState.js:
2639         (FormattingState):
2640         (FormattingState.prototype.formattingContext): Deleted.
2641         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2642         (InlineFormattingState):
2643         * LayoutReloaded/LayoutState.js:
2644         (LayoutState.prototype.layout):
2645         (LayoutState.prototype.formattingContext):
2646
2647 2018-03-28  Zalan Bujtas  <zalan@apple.com>
2648
2649         [LayoutReloaded] Introduce FloatingState.
2650         https://bugs.webkit.org/show_bug.cgi?id=184126
2651
2652         Reviewed by Antti Koivisto.
2653
2654         It holds the floating state (left/right floating stack) for a given formatting state (Block or Inline).
2655         (FormattingState -> FloatingState/FormattingContext -> FloatingContext)
2656
2657         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2658         (BlockFormattingContext):
2659         * LayoutReloaded/FormattingContext/FloatingContext.js:
2660         (FloatingContext):
2661         (FloatingContext.prototype.computePosition):
2662         (FloatingContext.prototype.bottom):
2663         (FloatingContext.prototype._positionForFloating):
2664         (FloatingContext.prototype._positionForClear):
2665         (FloatingContext.prototype._findInnerMostLeftAndRight):
2666         (FloatingContext.prototype._isEmpty):
2667         (FloatingContext.prototype._floatingState):
2668         (FloatingContext.prototype._formattingContext):
2669         (FloatingContext.prototype._lastFloating):
2670         (FloatingContext.prototype._leftFloatingStack):
2671         (FloatingContext.prototype._rightFloatingStack):
2672         (FloatingContext.prototype._addFloating): Deleted.
2673         * LayoutReloaded/FormattingContext/FormattingContext.js:
2674         (FormattingContext):
2675         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2676         (InlineFormattingContext):
2677         * LayoutReloaded/FormattingState/BlockFormattingState.js:
2678         (BlockFormattingState):
2679         * LayoutReloaded/FormattingState/FloatingState.js: Copied from Tools/LayoutReloaded/FormattingState/InlineFormattingState.js.
2680         (FloatingState):
2681         (FloatingState.prototype.addFloating):
2682         (FloatingState.prototype.leftFloatingStack):
2683         (FloatingState.prototype.rightFloatingStack):
2684         (FloatingState.prototype.lastFloating):
2685         (FloatingState.prototype.formattingContext):
2686         * LayoutReloaded/FormattingState/FormattingState.js:
2687         (FormattingState):
2688         (FormattingState.prototype.floatingState):
2689         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2690         (InlineFormattingState):
2691         * LayoutReloaded/test/index.html:
2692
2693 2018-03-28  Zalan Bujtas  <zalan@apple.com>
2694
2695         [LayoutReloaded] Convert floating left/right stack display boxes absolute to the formatting context's root.
2696         https://bugs.webkit.org/show_bug.cgi?id=184123
2697
2698         Reviewed by Antti Koivisto.
2699
2700         1. The left/right floating array should hold the Display.Box (and not the Layout.Box)
2701         2. Clone the Display.Box and convert its rect absolute to the formatting context's root so that we
2702         don't have to keep converting the coordinates while computing the positions. 
2703
2704         * LayoutReloaded/DisplayTree/Box.js:
2705         (Display.Box.prototype.clone):
2706         (Display.Box.prototype.setRect):
2707         * LayoutReloaded/FormattingContext/FloatingContext.js:
2708         (FloatingContext.prototype.computePosition):
2709         (FloatingContext.prototype._positionForFloating):
2710         (FloatingContext.prototype._addFloating):
2711         (FloatingContext.prototype._moveToNextVerticalPosition):
2712         (FloatingContext.prototype._availableSpace):
2713         (FloatingContext.prototype._findFloatingAtVerticalPosition):
2714         (FloatingContext.prototype._adjustedFloatingPosition):
2715         (FloatingContext.prototype._bottom):
2716
2717 2018-03-28  Chris Dumez  <cdumez@apple.com>
2718
2719         Unreviewed iOS build fix after r230060.
2720
2721         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2722
2723 2018-03-28  Chris Dumez  <cdumez@apple.com>
2724
2725         Unreviewed, disable new window.open() API tests introduced in r230051 on iOS.
2726
2727         I will investigate if this is testable on iOS.
2728
2729         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2730
2731 2018-03-28  Chris Dumez  <cdumez@apple.com>
2732
2733         Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
2734         https://bugs.webkit.org/show_bug.cgi?id=183962
2735         <rdar://problem/38817833>
2736
2737         Reviewed by Brady Eidson.
2738
2739         Add API test coverage.
2740
2741         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2742         (-[PSONUIDelegate initWithNavigationDelegate:]):
2743         (-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
2744
2745 2018-03-28  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
2746
2747         Add Carlos Eduardo Ramalho as contributor
2748         https://bugs.webkit.org/show_bug.cgi?id=184082
2749
2750         Reviewed by Carlos Alberto Lopez Perez.
2751
2752         * Scripts/webkitpy/common/config/contributors.json:
2753
2754 2018-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2755
2756         [Extra zoom mode] Make boosted text autosizing values switchable at runtime
2757         https://bugs.webkit.org/show_bug.cgi?id=184092
2758         <rdar://problem/38939917>
2759
2760         Reviewed by Tim Horton.
2761
2762         Add an API test to check that toggling the boosted text autosizing preference causes text to lay out larger than
2763         it would with normal text autosizing.
2764
2765         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2766         * TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm: Added.
2767         (TEST):
2768
2769 2018-03-28  Zalan Bujtas  <zalan@apple.com>
2770
2771         [LayoutReloaded] InlineFormattingContext::_handleText should support runs on multiple lines
2772         https://bugs.webkit.org/show_bug.cgi?id=184101
2773
2774         Reviewed by Antti Koivisto.
2775
2776         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2777         (InlineFormattingContext):
2778         (InlineFormattingContext.prototype.layout):
2779         (InlineFormattingContext.prototype._handleText):
2780         (InlineFormattingContext.prototype._createNewLine):
2781         * LayoutReloaded/test/index.html:
2782         * LayoutReloaded/test/simple-multiline-text.html: Added.
2783
2784 2018-03-28  Zalan Bujtas  <zalan@apple.com>
2785
2786         [LayoutReloaded] Add InlineTextBreaker::skipLeadingWhitespaceIfNeeded
2787         https://bugs.webkit.org/show_bug.cgi?id=184099
2788
2789         Reviewed by Antti Koivisto.
2790
2791         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2792
2793 2018-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2794
2795         [GLIB] Add JSCWeakValue to JavaScriptCore GLib API
2796         https://bugs.webkit.org/show_bug.cgi?id=184041
2797
2798         Reviewed by Michael Catanzaro.
2799
2800         Add test case for JSCWeakValue.
2801
2802         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
2803         (weakValueClearedCallback):
2804         (testJSCWeakValue):
2805         (main):
2806
2807 2018-03-27  Zalan Bujtas  <zalan@apple.com>
2808
2809         [LayoutReloaded] Start using window.collectTextRuns() to layout text lines in inline formatting context
2810         https://bugs.webkit.org/show_bug.cgi?id=184070
2811
2812         Reviewed by Antti Koivisto.
2813
2814         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2815         (InlineFormattingContext.prototype._handleText):
2816         (InlineFormattingContext.prototype._commitLine):
2817         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
2818         (Line.prototype.addTextLineBox):
2819         (Line):
2820         (Line.prototype.addLineBox): Deleted.
2821         * LayoutReloaded/FormattingState/BlockFormattingState.js:
2822         (BlockFormattingState):
2823         * LayoutReloaded/FormattingState/FormattingState.js:
2824         (FormattingState.prototype.displayBox):
2825         (FormattingState):
2826         (FormattingState.prototype._setFormattingContext): Deleted.
2827         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2828         (InlineFormattingState):
2829         * LayoutReloaded/LayoutTree/Text.js:
2830         (Text.prototype.content):
2831         * LayoutReloaded/Utils.js:
2832         (Utils.textRuns):
2833         (Utils.textRunsForLine):
2834         (Utils._dumpLines.):
2835         (Utils._dumpLines):
2836         * LayoutReloaded/test/simple-inline-text.html:
2837
2838 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
2839
2840         https://bugs.webkit.org/show_bug.cgi?id=183876
2841         <rdar://problem/38726459>
2842         
2843         Unreviewed, fix for the test added in r229995 in the iOS simulator.
2844
2845         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
2846         (TestWebKitAPI::AVFoundationPref::testWithPreference):
2847
2848 2018-03-27  Jiewen Tan  <jiewen_tan@apple.com>
2849
2850         [WebAuthN] Implement authenticatorGetAssertion
2851         https://bugs.webkit.org/show_bug.cgi?id=183881
2852         <rdar://problem/37258628>
2853
2854         Reviewed by Brent Fulgham.
2855
2856         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
2857         (TestWebKitAPI::getTestKey):
2858         (TestWebKitAPI::addTestKeyToKeychain):
2859         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
2860         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
2861         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::LAEvaluateAccessControlFailedSwizzler):
2862         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::evaluateAccessControlFailed):
2863         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::LAEvaluateAccessControlPassedSwizzler):
2864         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::evaluateAccessControlPassed):
2865         (TestWebKitAPI::TEST):
2866
2867 2018-03-27  Brian Burg  <bburg@apple.com>
2868
2869         REGRESSION(r229937): WebDriver tests no longer run, test runner hangs when launching wpt web server
2870         https://bugs.webkit.org/show_bug.cgi?id=184056
2871         <rdar://problem/38925058>
2872
2873         Reviewed by Timothy Hatcher and Youenn Fablet.
2874
2875         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
2876         (WebDriverW3CWebServer.start):
2877         The config key used in upstream WPT has changed from 'host' to 'browser_host'.
2878
2879 2018-03-27  Timothy Hatcher  <timothy@hatcher.name>
2880
2881         Update my email address in contributors.json and scripts
2882         https://bugs.webkit.org/show_bug.cgi?id=184054
2883
2884         * Scripts/validate-committer-lists:
2885         (CommitterListFromGit):
2886         * Scripts/webkitpy/common/config/contributors.json:
2887
2888 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
2889
2890         Make AVFoundationEnabled preference available on iOS
2891         https://bugs.webkit.org/show_bug.cgi?id=183876
2892         <rdar://problem/38726459>
2893
2894         Reviewed by Youenn Fablet.
2895
2896         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2897         * TestWebKitAPI/Tests/WebKit/video.html: Added.
2898         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: Added.
2899         (-[PreferenceTestMessageHandler userContentController:didReceiveScriptMessage:]):
2900         (TestWebKitAPI::AVFoundationPref::SetUp):
2901         (TestWebKitAPI::AVFoundationPref::testWithPreference):
2902         (TestWebKitAPI::TEST_F):
2903
2904 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
2905
2906         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
2907         https://bugs.webkit.org/show_bug.cgi?id=183911
2908         <rdar://problem/38762306>
2909
2910         Reviewed by Youenn Fablet.
2911
2912         Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
2913         should never call Cookie API directly. That should only happen in the Networking or
2914         UIProcess. 
2915
2916         * DumpRenderTree/mac/DumpRenderTree.mm:
2917         (DumpRenderTreeMain):
2918         * TestWebKitAPI/TestsController.cpp:
2919         (TestWebKitAPI::TestsController::TestsController):
2920         * WebKitTestRunner/TestController.cpp:
2921         (WTR::TestController::initialize):
2922
2923 2018-03-26  Zalan Bujtas  <zalan@apple.com>
2924
2925         [LayoutReloaded] Add InlineText DOM interface and dependencies
2926         https://bugs.webkit.org/show_bug.cgi?id=184010
2927
2928         Reviewed by Antti Koivisto.
2929
2930         to help inline text layout.
2931
2932         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2933
2934 2018-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2935
2936         [GTK][WPE] Add API to convert between DOM and JSCValue
2937         https://bugs.webkit.org/show_bug.cgi?id=183448
2938
2939         Reviewed by Michael Catanzaro.
2940
2941         Add unit tests for non-deprecated DOM API and switch existing tests to use non-deprecated API except for the
2942         ones that test the deprecated API.
2943
2944         * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp: Added.
2945         (DOMElementTest::create):
2946         (DOMElementTest::testAutoFill):
2947         (registerTests):
2948         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp: Added.
2949         (WebKitWebEditorTest::create):
2950         (WebKitWebEditorTest::selectionChangedCallback):
2951         (WebKitWebEditorTest::testSelectionchanged):
2952         (registerTests):
2953         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
2954         (WebKitFrameTest::testJavaScriptValues):
2955         (registerTests):
2956         * TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
2957         (testWebKitDOMElementAutoFill):
2958         (beforeAll):
2959         (afterAll):
2960         * TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp.
2961         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
2962         (testWebKitFrameJavaScriptValues):
2963         (beforeAll):
2964         * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
2965         (inputElementIsUserEdited):
2966         (testWebExtensionInputElementIsUserEdited):
2967         (testWebExtensionFormSubmissionSteps):
2968         (beforeAll):
2969         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
2970         (documentLoadedCallback):
2971         (serializeNode):
2972         (contextMenuCallback):
2973         (consoleMessageSentCallback):
2974         (formControlsAssociatedCallback):
2975         (willSubmitFormCallback):
2976         (pageCreatedCallback):
2977         (methodCallCallback):
2978         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
2979         (checkLeaks):
2980         (webProcessTestRunnerFinalize):
2981         (checkLeaksAtExit):
2982         * TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
2983         (AutocleanupsTest::testWebProcessAutocleanups):
2984         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
2985         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
2986         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
2987         * TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
2988         * TestWebKitAPI/Tests/WebKitGtk/EditorTest.cpp: Removed.
2989         * TestWebKitAPI/glib/CMakeLists.txt:
2990         * TestWebKitAPI/glib/PlatformGTK.cmake:
2991         * TestWebKitAPI/glib/PlatformWPE.cmake:
2992
2993 2018-03-24  Jonathan Bedard  <jbedard@apple.com>
2994
2995         webkitpy: Unrecognized mac versions always use WebKitTestRunner
2996         https://bugs.webkit.org/show_bug.cgi?id=183681
2997         <rdar://problem/38509162>
2998
2999         Reviewed by Daniel Bates.
3000
3001         When an unrecognized version is used, we were unconditionally adding '-wk2'
3002         to the mac version name. This would mean that the port object would always
3003         use WebKitTestRunner as the driver, even if DumpRenderTree was explicitly
3004         requested.
3005
3006         * Scripts/webkitpy/port/apple.py:
3007         (ApplePort.determine_full_port_name): Only add wk2 to port names if
3008         WebKitTestRunner is specified.
3009         * Scripts/webkitpy/port/mac.py:
3010         (MacPort.__init__): Compare length of split string, and do not treat wk2 as a
3011         version name.
3012         * Scripts/webkitpy/port/mac_unittest.py:
3013         (MacTest):
3014         (MacTest.test_factory_with_future_version): Confirm that future versions correctly
3015         assign the driver and have undefined version names.
3016         (MacTest.test_factory_with_portname_version): Confirm that general versions correctly assign
3017         the driver and have defined versions.
3018         (MacTest.test_factory_with_portname_wk2): Ensure that mac ports ending in 'wk2' set
3019         the driver to be WebKitTestRunner even if webkit_test_runner=False.
3020
3021 2018-03-23  Zan Dobersek  <zdobersek@igalia.com>
3022
3023         Fix the run-benchmark script, properly specifying the plan directory
3024         where the Skipped file is located.
3025
3026         Rubber-stamped by Carlos Alberto Lopez Perez.
3027
3028         * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
3029         (start):
3030
3031 2018-03-23  Tim Horton  <timothy_horton@apple.com>
3032
3033         Fix the build with no pasteboard
3034         https://bugs.webkit.org/show_bug.cgi?id=183973
3035
3036         Reviewed by Dan Bernstein.
3037
3038         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3039
3040 2018-03-23  Youenn Fablet  <youenn@apple.com>
3041
3042         Update WPT tools to a1ec330
3043         https://bugs.webkit.org/show_bug.cgi?id=183934
3044
3045         Reviewed by Chris Dumez.
3046
3047         Update script to run WPT server  according updated WPT tools.
3048
3049         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
3050         (main):
3051         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
3052         (base_http_url):
3053         (base_https_url):
3054
3055 2018-03-23  Sihui Liu  <sihui_liu@apple.com>
3056
3057         Local storage getItem() for an empty string returned UNDEFINED value.
3058         https://bugs.webkit.org/show_bug.cgi?id=69138
3059         <rdar://problem/13410974>
3060
3061         Reviewed by Brady Eidson.
3062
3063         Add API test coverage.
3064
3065         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3066         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Added.
3067         (-[LocalStorageMessageHandler userContentController:didReceiveScriptMessage:]):
3068         (TEST):
3069         * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html: Added.
3070
3071 2018-03-23  Chris Dumez  <cdumez@apple.com>
3072
3073         Promptly terminate service worker processes when they are no longer needed
3074         https://bugs.webkit.org/show_bug.cgi?id=183873
3075         <rdar://problem/38676995>
3076
3077         Reviewed by Youenn Fablet.
3078
3079         Add API test coverage.
3080
3081         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3082
3083 2018-03-23  Brady Eidson  <beidson@apple.com>
3084
3085         Go to back/forward list items after a process-swapped navigation.
3086         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
3087
3088         Reviewed by Andy Estes.
3089
3090         Add a new API test that does some process-swapping navigations (including a back navigation)
3091         and verifies the state of the engine afterwards.
3092
3093         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3094         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
3095         (-[PSONScheme initWithBytes:]):
3096         (-[PSONScheme webView:startURLSchemeTask:]):
3097         (log):
3098         (function):
3099         (TEST): Deleted.
3100
3101 2018-03-23  Brendan McLoughlin  <brendan@bocoup.com>
3102
3103         Lint web-platform-tests changes with the wpt linter before exporting
3104         https://bugs.webkit.org/show_bug.cgi?id=183796
3105
3106         Reviewed by Youenn Fablet.
3107
3108         * Scripts/webkitpy/w3c/test_exporter.py:
3109         (TestExporter.__init__):
3110         (TestExporter.do_export):
3111         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
3112         (TestExporterTest.MockWPTLinter):
3113         (TestExporterTest.MockWPTLinter.__init__):
3114         (TestExporterTest.MockWPTLinter.lint):
3115         (TestExporterTest.test_export):
3116         (TestExporterTest.test_export_with_specific_branch):
3117         * Scripts/webkitpy/w3c/wpt_linter.py: Added.
3118         (WPTLinter):
3119         (WPTLinter.__init__):
3120         (WPTLinter.lint):
3121
3122 2018-03-23  David Kilzer  <ddkilzer@apple.com>
3123
3124         Stop using dispatch_set_target_queue()
3125         <https://webkit.org/b/183908>
3126         <rdar://problem/33553533>
3127
3128         Reviewed by Daniel Bates.
3129
3130         * Scripts/webkitpy/style/checkers/cpp.py:
3131         (check_language): Add check for use of
3132         dispatch_set_target_queue().
3133         (CppChecker): Add 'runtime/dispatch_set_target_queue' category.
3134         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
3135         (CppStyleTest): Add test.
3136
3137 2018-03-23  Youenn Fablet  <youenn@apple.com>
3138
3139         Allow fully whitelisted plug-ins to match non HTTP URLs
3140         https://bugs.webkit.org/show_bug.cgi?id=183938
3141         rdar://problem/38534312
3142
3143         Reviewed by Chris Dumez.
3144
3145         * TestWebKitAPI/Tests/WebCore/URL.cpp:
3146         (TestWebKitAPI::TEST_F):
3147
3148 2018-03-23  JF Bastien  <jfbastien@apple.com>
3149
3150         dump-class-layout is just wrong
3151         https://bugs.webkit.org/show_bug.cgi?id=183939
3152
3153         Reviewed by Yusuke Suzuki.
3154
3155         Looks like r229291 contained a half-renamed variable in it, so it
3156         just doesn't work.
3157
3158         * Scripts/dump-class-layout:
3159         (verify_type):
3160         (verify_type_recursive):
3161
3162 2018-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3163
3164         Unreviewed. Run JSC GLib API tests in GTK+ and WPE bots.
3165
3166         The test runners were still considering the JSC tests as google tests, but they are now GLib tests.
3167
3168         * Scripts/run-gtk-tests:
3169         (GtkTestRunner.is_glib_test):
3170         (GtkTestRunner.is_google_test):
3171         * Scripts/run-wpe-tests:
3172         (WPETestRunner.is_glib_test):
3173         (WPETestRunner.is_google_test):
3174
3175 2018-03-22  Daniel Bates  <dabates@apple.com>
3176
3177         Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
3178         https://bugs.webkit.org/show_bug.cgi?id=183907
3179         <rdar://problem/38759127>
3180
3181         Reviewed by Alex Christensen.
3182
3183         Adds unit tests for the modern Objective-C and C SPI to ensure we do not regress it.
3184
3185         We use the deprecated -[WKBrowsingContextController registerSchemeForCustomProtocol:]
3186         in both the modern Objective-C API and C API tests to share code. Once we no longer
3187         need to support the C API we should remove the tests and transition the modern Objective-
3188         C tests to use -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:].
3189
3190         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3191         * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: Added.
3192         (+[EchoURLProtocol canInitWithRequest:]):
3193         (+[EchoURLProtocol canonicalRequestForRequest:]):
3194         (+[EchoURLProtocol requestIsCacheEquivalent:toRequest:]):
3195         (-[EchoURLProtocol startLoading]):
3196         (-[EchoURLProtocol stopLoading]):
3197         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextController:didFailProvisionalLoadWithError:]):
3198         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextControllerDidFinishLoad:]):
3199         (TestWebKitAPI::TEST):
3200
3201 2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
3202
3203         [WPE] Enable WOFF2 support
3204         https://bugs.webkit.org/show_bug.cgi?id=178158
3205
3206         Reviewed by Frédéric Wang.
3207
3208         * wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.
3209
3210 2018-03-22  Brendan McLoughlin  <brendan@bocoup.com>
3211
3212         Do not export web-platform-test files generated by the wpt importer to assist the webkit test runner
3213         https://bugs.webkit.org/show_bug.cgi?id=183916
3214
3215         Reviewed by Youenn Fablet.
3216
3217         * Scripts/webkitpy/w3c/test_exporter.py:
3218         (TestExporter.create_branch_with_patch):
3219         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
3220         (TestExporterTest.test_export):
3221         (TestExporterTest.test_export_with_specific_branch):
3222
3223 2018-03-22  Tim Horton  <timothy_horton@apple.com>
3224
3225         Improve readability of WebCore's OTHER_LDFLAGS
3226         https://bugs.webkit.org/show_bug.cgi?id=183909
3227         <rdar://problem/38760992>
3228
3229         Reviewed by Dan Bernstein.
3230
3231         * TestWebKitAPI/Configurations/Base.xcconfig:
3232         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3233
3234 2018-03-21  Fujii Hironori  <Hironori.Fujii@sony.com>
3235
3236         Unreviewed. Marked myself as a committer.
3237
3238         * Scripts/webkitpy/common/config/contributors.json:
3239
3240 2018-03-21  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
3241
3242         Unreviewed, make the email address of Yoshiaki Jitsukawa all lower case.
3243
3244         * Scripts/webkitpy/common/config/contributors.json:
3245
3246 2018-03-21  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
3247
3248         Unreviewed, add myself as a WebKit committer.
3249
3250         * Scripts/webkitpy/common/config/contributors.json:
3251
3252 2018-03-21  Chris Dumez  <cdumez@apple.com>
3253
3254         ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
3255         https://bugs.webkit.org/show_bug.cgi?id=183787
3256
3257         Reviewed by Wenson Hsieh.
3258
3259         Add API test coverage.
3260
3261         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
3262         (-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
3263         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationAction:decisionHandler:]):
3264         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationResponse:decisionHandler:]):
3265         (-[AsyncPolicyDelegateForInsetTest webViewWebContentProcessDidTerminate:]):
3266         (TestWebKitAPI::TEST):
3267
3268 2018-03-21  Chris Dumez  <cdumez@apple.com>
3269
3270         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
3271         https://bugs.webkit.org/show_bug.cgi?id=183858
3272
3273         Reviewed by Wenson Hsieh.
3274
3275         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
3276         instead of loadTestPageNamed because injecting script.
3277
3278         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
3279         (TestWebKitAPI::TEST):
3280
3281 2018-03-21  Zalan Bujtas  <zalan@apple.com>
3282
3283         [LayoutReloaded] Enable formatting state for InlineFormattingContext
3284         https://bugs.webkit.org/show_bug.cgi?id=183853
3285
3286         Reviewed by Antti Koivisto.
3287
3288         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3289         (BlockFormattingContext.prototype._contentHeight):
3290         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3291         (InlineFormattingContext):
3292         (InlineFormattingContext.prototype.layout):
3293         (InlineFormattingContext.prototype._createNewLine):
3294         * LayoutReloaded/LayoutState.js:
3295         (LayoutState.prototype.formattingState):
3296         * LayoutReloaded/README.md:
3297         * LayoutReloaded/Utils.js:
3298         (Utils._dumpTree):
3299         * LayoutReloaded/test/index.html:
3300         * LayoutReloaded/test/simple-inline-text.html: Added.
3301
3302 2018-03-21  Zalan Bujtas  <zalan@apple.com>
3303
3304         [LayoutReloaded] Move inline lines to InlineFormattingState.
3305         https://bugs.webkit.org/show_bug.cgi?id=183814
3306
3307         Reviewed by Antti Koivisto.
3308
3309         InlineFormattingContext is not supposed to hold state.
3310
3311         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3312         (InlineFormattingContext):
3313         (InlineFormattingContext.prototype._commitLine):
3314         (InlineFormattingContext.prototype._createNewLine):
3315         (InlineFormattingContext.prototype.lines): Deleted.
3316         (InlineFormattingContext.prototype._initializeLine): Deleted.
3317         * LayoutReloaded/FormattingState/InlineFormattingState.js:
3318         (InlineFormattingState):
3319         (InlineFormattingState.prototype.lines):
3320         (InlineFormattingState.prototype.appendLine):
3321
3322 2018-03-21  Ms2ger  <Ms2ger@igalia.com>
3323
3324         [WPE] Disable most of TestWebKitFaviconDatabase.
3325         https://bugs.webkit.org/show_bug.cgi?id=183813
3326
3327         Unreviewed test gardening.
3328
3329         The relevant APIs were mostly removed in r223953, making this test
3330         time out consistently.
3331
3332         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
3333
3334 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3335
3336         [GTK][WPE] JSC bindings not introspectable
3337         https://bugs.webkit.org/show_bug.cgi?id=136989
3338
3339         Reviewed by Michael Catanzaro.
3340
3341         Use the new API instead of the deprecated one.
3342
3343         * MiniBrowser/gtk/main.c:
3344         (aboutDataScriptMessageReceivedCallback):
3345         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
3346         (WebKitFrameTest::testJavaScriptContext):
3347         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
3348         (testWebViewRunJavaScript):
3349         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
3350         (consoleMessageSentCallback):
3351         (echoCallback):
3352         (windowObjectCleared):
3353         (methodCallCallback):
3354         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
3355         (runTest):
3356         (webProcessTestRunnerFinalize):
3357         (windowObjectClearedCallback):
3358         * TestWebKitAPI/glib/PlatformGTK.cmake:
3359         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
3360         (WebViewTest::javascriptResultToCString):
3361         (WebViewTest::javascriptResultToNumber):
3362         (WebViewTest::javascriptResultToBoolean):
3363         (WebViewTest::javascriptResultIsNull):
3364         (WebViewTest::javascriptResultIsUndefined):
3365
3366 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3367
3368         [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
3369         https://bugs.webkit.org/show_bug.cgi?id=164061
3370
3371         Reviewed by Michael Catanzaro.
3372
3373         Add unit tests for the new API and generate the API documentation with generate-gtkdoc.
3374
3375         * Scripts/webkitpy/style/checker.py: Ignore some style errors in public GLib API headers.
3376         * TestWebKitAPI/PlatformGTK.cmake:
3377         * TestWebKitAPI/PlatformWPE.cmake:
3378         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: Added.
3379         (LeakChecker::~LeakChecker):
3380         (LeakChecker::watch):
3381         (ExceptionHandler::ExceptionHandler):
3382         (ExceptionHandler::~ExceptionHandler):
3383         (ExceptionHandler::push):
3384         (ExceptionHandler::pop):
3385         (jscContextGarbageCollect):
3386         (testJSCBasic):
3387         (testJSCTypes):
3388         (foo):
3389         (callback):
3390         (doubleAndSetInResult):
3391         (sumFunction):
3392         (testJSCFunction):
3393         (testJSCObject):
3394         (fooCreate):
3395         (fooCreateWithFoo):
3396         (fooFree):
3397         (setFoo):
3398         (getFoo):
3399         (setSibling):
3400         (getSibling):
3401         (multiplyFoo):
3402         (getMultiplyFoo):
3403         (getMultiplyFooAsync):
3404         (bazCreate):
3405         (testJSCClass):
3406         (barCreate):
3407         (barFree):
3408         (setBar):
3409         (getBar):
3410         (testJSCPrototypes):
3411         (createError):
3412         (testJSCExceptions):
3413         (testJSCPromises):
3414         (fooFreeAndLog):
3415         (testJSCGarbageCollector):
3416         (testsJSCVirtualMachine):
3417         (testsJSCAutocleanups):
3418         (main):
3419         * gtk/generate-gtkdoc:
3420         (get_generator_for_config):
3421
3422 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3423
3424         Enable the minimal simulator feature flag when appropriate
3425         https://bugs.webkit.org/show_bug.cgi?id=183807
3426
3427         Reviewed by Dan Bernstein.
3428
3429         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3430
3431 2018-03-20  Zalan Bujtas  <zalan@apple.com>
3432
3433         [LayoutReloaded] Disconnect Display.Box from Layout.Box
3434         https://bugs.webkit.org/show_bug.cgi?id=183805
3435
3436         Reviewed by Antti Koivisto.
3437
3438         Display.Box is only accessed through the FormattingState.
3439
3440         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3441         (BlockFormattingContext):
3442         (BlockFormattingContext.prototype.layout):
3443         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3444         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
3445         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3446         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3447         * LayoutReloaded/FormattingContext/FormattingContext.js:
3448         (FormattingContext):
3449         (FormattingContext.prototype.formattingRoot):
3450         (FormattingContext.prototype.formattingState):
3451         (FormattingContext.prototype.layoutState):
3452         (FormattingContext.prototype._toAbsolutePosition):
3453         (FormattingContext.prototype._toRootAbsolutePosition):
3454         (FormattingContext.prototype._addToLayoutQueue):
3455         (FormattingContext.prototype.displayBox):
3456         (FormattingContext.prototype._outOfFlowDescendants):
3457         (FormattingContext.prototype.rootContainer): Deleted.
3458         (FormattingContext.prototype.layoutContext): Deleted.
3459         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3460         (InlineFormattingContext):
3461         (InlineFormattingContext.prototype.layout):
3462         (InlineFormattingContext.prototype._initializeLine):
3463         * LayoutReloaded/FormattingState/BlockFormattingState.js:
3464         (BlockFormattingState):
3465         * LayoutReloaded/FormattingState/FormattingState.js:
3466         (FormattingState):
3467         (FormattingState.prototype.formattingRoot):
3468         (FormattingState.prototype.layoutState):
3469         (FormattingState.prototype.createDisplayBox):
3470         (FormattingState.prototype.displayBoxMap):
3471         (FormattingState.prototype.displayBox):
3472         (FormattingState.prototype.layoutContext): Deleted.
3473         * LayoutReloaded/FormattingState/InlineFormattingState.js:
3474         (InlineFormattingState):
3475         * LayoutReloaded/Layout.js:
3476         (layout):
3477         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
3478         * LayoutReloaded/LayoutState.js: Renamed from Tools/LayoutReloaded/LayoutContext.js.
3479         (LayoutState):
3480         (LayoutState.prototype.layout):
3481         (LayoutState.prototype._createFormattingState):
3482         (LayoutState.prototype.formattingStates):
3483         (LayoutState.prototype.initialDisplayBox):
3484         * LayoutReloaded/LayoutTree/Box.js:
3485         (Layout.Box.prototype.isOutOfFlowPositioned):
3486         (Layout.Box.prototype.containingBlock):
3487         (Layout.Box.prototype.setDisplayBox): Deleted.
3488         (Layout.Box.prototype.displayBox): Deleted.
3489         * LayoutReloaded/Utils.js:
3490         (Utils.layoutTreeDump):
3491         (Utils._findDisplayBox):
3492         (Utils._dumpBox):
3493         (Utils._dumpTree):
3494         * LayoutReloaded/misc/headers/BlockFormattingContext.h:
3495         * LayoutReloaded/misc/headers/FormattingContext.h:
3496         * LayoutReloaded/misc/headers/LayoutContext.h:
3497         * LayoutReloaded/test/index.html:
3498
3499 2018-03-19  Ryosuke Niwa  <rniwa@webkit.org>
3500
3501         Expose content attributes on _WKLinkIconParameters
3502         https://bugs.webkit.org/show_bug.cgi?id=183768
3503
3504         Reviewed by Alex Christensen.
3505
3506         Expanded the basic test case for _WKLinkIconParameters's properties including newly added "attributes".
3507
3508         * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
3509         (IconLoading.DefaultFavicon):
3510
3511 2018-03-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3512
3513         Add AssistedNodeInformation plumbing for form control placeholder text and label text
3514         https://bugs.webkit.org/show_bug.cgi?id=183802
3515         <rdar://problem/38686273>
3516
3517         Reviewed by Tim Horton.
3518
3519         Adds a new API test to exercise new placeholder and label SPI on _WKFocusedFormElement.
3520
3521         * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
3522         (-[InputDelegate _webView:focusShouldStartInputSession:]):
3523         (-[InputDelegate shouldStartInputSessionHandler]):
3524         (-[InputDelegate setShouldStartInputSessionHandler:]):
3525         (TEST):
3526         (-[FormSubmissionDelegate webView:startURLSchemeTask:]): Deleted.
3527         (-[FormSubmissionDelegate webView:stopURLSchemeTask:]): Deleted.
3528         (-[FormSubmissionDelegate _webView:willSubmitFormValues:userObject:submissionHandler:]): Deleted.
3529
3530 2018-03-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3531
3532         [WinCairo] Fix to run-webkit-httpd from native Windows.
3533         https://bugs.webkit.org/show_bug.cgi?id=183605
3534
3535         Reviewed by Daniel Bates.
3536
3537         This fix is to run Apache HTTP server from native Windows. The environment is different
3538         from cygwin, which is used for AppleWin, in following points:
3539         - A temporary file behaves differently. It cannot reopen by anybody when indicated as 
3540           delete on close. To solve this situation, filesystem.mkdtemp() is used instead.
3541         - It's not unix so that `tail` command is not available. Replaced with python equivalent
3542           function.
3543
3544         * Scripts/webkitpy/common/system/filesystem.py:
3545         (FileSystem.mkdtemp.TemporaryDirectory.__init__):
3546         (FileSystem.mkdtemp.TemporaryDirectory.__exit__): The existing contents would be deleted.
3547         (FileSystem.mkdtemp):
3548         * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
3549         (parse_args):
3550         (run_server):
3551         (run_server_with_log_file):
3552         (follow_file):
3553
3554 2018-03-20  Brady Eidson  <beidson@apple.com>
3555
3556         First piece of process swapping on navigation.
3557         https://bugs.webkit.org/show_bug.cgi?id=183665
3558
3559         Reviewed by Andy Estes.
3560
3561         Expose the "swaps processes on navigation" setting in MiniBrowser UI for testing:
3562
3563         * MiniBrowser/mac/AppDelegate.m:
3564         (defaultConfiguration):
3565         * MiniBrowser/mac/SettingsController.h:
3566         * MiniBrowser/mac/SettingsController.m:
3567         (-[SettingsController _populateMenu]):
3568         (-[SettingsController validateMenuItem:]):
3569         (-[SettingsController processSwapOnNavigationEnabled]):
3570         (-[SettingsController toggleProcessSwapOnNavigation:]):
3571
3572         Makes sure the current behavior is tested:
3573         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3574         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Added.
3575         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
3576         (-[PSONScheme webView:startURLSchemeTask:]):
3577         (-[PSONScheme webView:stopURLSchemeTask:]):
3578         (TEST):
3579
3580 2018-03-20  Chris Dumez  <cdumez@apple.com>
3581
3582         QuickLook.NavigationDelegate API test is failing on iOS with async policy delegates
3583         https://bugs.webkit.org/show_bug.cgi?id=183791
3584
3585         Reviewed by Alex Christensen.
3586
3587         Add API test coverage.
3588
3589         * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
3590         (-[QuickLookAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
3591         (-[QuickLookAsyncNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
3592         (-[QuickLookAsyncNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
3593         (-[QuickLookAsyncNavigationDelegate webView:didFinishNavigation:]):
3594         (TEST):
3595
3596 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3597
3598         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
3599         https://bugs.webkit.org/show_bug.cgi?id=183758
3600         <rdar://problem/38017644>
3601
3602         Reviewed by Dan Bernstein.
3603
3604         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3605
3606 2018-03-20  Chris Dumez  <cdumez@apple.com>
3607
3608         Unreviewed, rolling out r229726 and r229763.
3609
3610         Caused some API test failures on iOS
3611
3612         Reverted changesets:
3613
3614         "Make policy decisions asynchronous"
3615         https://bugs.webkit.org/show_bug.cgi?id=180568
3616         https://trac.webkit.org/changeset/229726
3617
3618         "Rebaseline three webarchive tests for WK2 after r229726."
3619         https://bugs.webkit.org/show_bug.cgi?id=180568
3620         https://trac.webkit.org/changeset/229763
3621
3622 2018-03-20  Zalan Bujtas  <zalan@apple.com>
3623
3624         [LayoutReloaded] Move Display.Box handling from FormattingContext to FormattingState
3625         https://bugs.webkit.org/show_bug.cgi?id=183779
3626
3627         Reviewed by Antti Koivisto.
3628
3629         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3630         (BlockFormattingContext.prototype._computeStaticPosition):
3631         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3632         (BlockFormattingContext.prototype._computeFloatingWidth):
3633         (BlockFormattingContext.prototype._computeInFlowWidth):
3634         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3635         (BlockFormattingContext.prototype._computeFloatingHeight):
3636         (BlockFormattingContext.prototype._computeInFlowHeight):
3637         (BlockFormattingContext.prototype._horizontalConstraint):
3638         (BlockFormattingContext.prototype._contentHeight):
3639         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3640         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3641         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3642         * LayoutReloaded/FormattingContext/FloatingContext.js:
3643         (FloatingContext.prototype.computePosition):
3644         (FloatingContext.prototype._positionForClear):
3645         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
3646         (FloatingContext.prototype._availableSpace):
3647         (FloatingContext.prototype._adjustedFloatingPosition):
3648         * LayoutReloaded/FormattingContext/FormattingContext.js:
3649         (FormattingContext):
3650         (FormattingContext.prototype.absoluteMarginBox):
3651         (FormattingContext.prototype.absoluteBorderBox):
3652         (FormattingContext.prototype.absolutePaddingBox):
3653         (FormattingContext.prototype.absoluteContentBox):
3654         (FormattingContext.prototype._toAbsolutePosition):
3655         (FormattingContext.prototype._toRootAbsolutePosition):
3656         (FormattingContext.prototype._addToLayoutQueue):
3657         (FormattingContext.prototype.displayBox):
3658         (FormattingContext.prototype._createDisplayBox): Deleted.
3659         (FormattingContext.prototype.toDisplayBox): Deleted.
3660         (FormattingContext.prototype.toLayoutBox): Deleted.
3661         * LayoutReloaded/FormattingState/FormattingState.js:
3662         (FormattingState):
3663         (FormattingState.prototype.createDisplayBox):
3664         (FormattingState.prototype.displayBox):
3665
3666 2018-03-20  Zalan Bujtas  <zalan@apple.com>
3667
3668         [LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
3669         https://bugs.webkit.org/show_bug.cgi?id=183777
3670
3671         Reviewed by Antti Koivisto.
3672
3673         This is in preparation for moving out states from the formatting contexts.
3674
3675         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3676         (BlockFormattingContext):
3677         * LayoutReloaded/FormattingContext/FormattingContext.js:
3678         (FormattingContext):
3679         (FormattingContext.prototype.layoutState):
3680         (FormattingContext.prototype.layoutContext):
3681         (FormattingContext.prototype.layout):
3682         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3683         (InlineFormattingContext):
3684         * LayoutReloaded/FormattingState/BlockFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
3685         (BlockFormattingState):
3686         * LayoutReloaded/FormattingState/FormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
3687         (FormattingState):
3688         (FormattingState.prototype.formattingContext):
3689         (FormattingState.prototype.layoutContext):
3690         (FormattingState.prototype._setFormattingContext):
3691         * LayoutReloaded/FormattingState/InlineFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
3692         (InlineFormattingState):
3693         * LayoutReloaded/LayoutContext.js:
3694         (LayoutContext):
3695         (LayoutContext.prototype.layout):
3696         (LayoutContext.prototype._createFormattingState):
3697         (LayoutContext.prototype._createFormattingContext): Deleted.
3698         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
3699         * LayoutReloaded/test/index.html:
3700
3701 2018-03-19  Zalan Bujtas  <zalan@apple.com>
3702
3703         [LayoutReloaded] Layout.Box should not create the formatting context.
3704         https://bugs.webkit.org/show_bug.cgi?id=183766
3705
3706         Reviewed by Antti Koivisto.
3707
3708         Since the formattingContext's lifetime is tied to the layout, the LayoutContext
3709         should construct it instead.
3710
3711         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3712         (BlockFormattingContext):
3713         (BlockFormattingContext.prototype.layout):
3714         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
3715         (BlockFormattingContext.prototype._contentHeight):
3716         * LayoutReloaded/FormattingContext/FormattingContext.js:
3717         (FormattingContext):
3718         (FormattingContext.prototype.layoutContext):
3719         (FormattingContext.prototype.toDisplayBox):
3720         (FormattingContext.prototype._outOfFlowDescendants):
3721         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3722         (InlineFormattingContext):
3723         (InlineFormattingContext.prototype.layout):
3724         * LayoutReloaded/Layout.js:
3725         (layout):
3726         * LayoutReloaded/LayoutContext.js:
3727         (LayoutContext.prototype.layout):
3728         (LayoutContext.prototype._createFormattingContext):
3729         (LayoutContext):
3730         (LayoutContext.prototype.layoutFormattingContext): Deleted.
3731         * LayoutReloaded/LayoutTree/Box.js:
3732         (Layout.Box):
3733         (Layout.Box.prototype.establishedFormattingContext): Deleted.
3734         * LayoutReloaded/misc/headers/Box.h:
3735
3736 2018-03-19  Chris Dumez  <cdumez@apple.com>
3737
3738         Have one service worker process per security origin
3739         https://bugs.webkit.org/show_bug.cgi?id=183600
3740         <rdar://problem/35280128>
3741
3742         Reviewed by Brady Eidson.
3743
3744         Add API test coverage.
3745
3746         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3747
3748 2018-03-19  Zalan Bujtas  <zalan@apple.com>
3749
3750         [LayoutReloaded] Remove border/padding/contentBox() functions from Layout.Box
3751         https://bugs.webkit.org/show_bug.cgi?id=183761
3752
3753         Reviewed by Antti Koivisto.
3754
3755         Display.Box has them.
3756
3757         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3758         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3759         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3760         (BlockFormattingContext.prototype._horizontalConstraint):
3761         (BlockFormattingContext.prototype._contentHeight):
3762         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3763         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3764         * LayoutReloaded/FormattingContext/FloatingContext.js:
3765         (FloatingContext.prototype._availableSpace):
3766         * LayoutReloaded/FormattingContext/FormattingContext.js:
3767         (FormattingContext.prototype.absoluteBorderBox):
3768         (FormattingContext.prototype.absolutePaddingBox):
3769         (FormattingContext.prototype.absoluteContentBox):
3770         * LayoutReloaded/LayoutTree/Box.js:
3771         (Layout.Box.prototype.isDescendantOf):
3772         (Layout.Box):
3773         (Layout.Box.prototype.borderBox): Deleted.
3774         (Layout.Box.prototype.paddingBox): Deleted.
3775         (Layout.Box.prototype.contentBox): Deleted.
3776
3777 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
3778
3779         Unreviewed, another quick fix for r229699
3780
3781         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
3782
3783         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3784         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
3785
3786 2018-03-19  Zalan Bujtas  <zalan@apple.com>
3787
3788         [LayoutReloaded] Move statically positioned absolute box positioning to _computeOutOfFlowPosition
3789         https://bugs.webkit.org/show_bug.cgi?id=183750
3790
3791         Reviewed by Antti Koivisto.
3792
3793         * LayoutReloaded/DisplayTree/Box.js:
3794         (Display.Box.prototype.setTop):
3795         (Display.Box.prototype.paddingBox):
3796         (Display.Box.prototype.contentBox):
3797         (Display.Box):
3798         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3799         (BlockFormattingContext.prototype._computeStaticPosition):
3800         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
3801         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3802         * LayoutReloaded/FormattingContext/FormattingContext.js:
3803         (FormattingContext.prototype.absoluteMarginBox):
3804         (FormattingContext.prototype.absoluteBorderBox):
3805         (FormattingContext.prototype.absolutePaddingBox):
3806         (FormattingContext.prototype.absoluteContentBox):
3807         (FormattingContext.prototype._toAbsolutePosition):
3808         (FormattingContext.prototype._toRootAbsolutePosition):
3809         (FormattingContext.prototype.toDisplayBox):
3810         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
3811         (Layout.InitialBlockContainer.prototype.establishesBlockFormattingContext):
3812         (Layout.InitialBlockContainer):
3813         (Layout.InitialBlockContainer.prototype.paddingBox): Deleted.
3814         (Layout.InitialBlockContainer.prototype.contentBox): Deleted.
3815         * LayoutReloaded/Utils.js:
3816         (Utils.isStaticallyPositioned):
3817
3818 2018-03-19  Chris Dumez  <cdumez@apple.com>
3819
3820         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
3821         https://bugs.webkit.org/show_bug.cgi?id=183702
3822         <rdar://problem/38566060>
3823
3824         Reviewed by Alex Christensen.
3825
3826         Add API test coverage.
3827
3828         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3829         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3830         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
3831         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
3832         (TEST):
3833
3834 2018-03-19  Daniel Bates  <dabates@apple.com>
3835
3836         test-webkitpy no longer runs WebKit2 tests
3837         https://bugs.webkit.org/show_bug.cgi?id=183724
3838
3839         Reviewed by Alexey Proskuryakov.
3840
3841         The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
3842
3843         * Scripts/webkitpy/test/main.py:
3844         (main):
3845
3846 2018-03-19  Daniel Bates  <dabates@apple.com>
3847
3848         Make run-webkit-app work for non-GUI apps
3849         https://bugs.webkit.org/show_bug.cgi?id=183701
3850
3851         Reviewed by Lucas Forschler.
3852
3853         Launch the app directly if it is an executable file. Otherwise, assume it is an app bundle
3854         and launch it using open(1) as we currently do.
3855
3856         Note that open(1) is meant for launching GUI apps. Standard output and standard error are
3857         not sent to the tty when using open(1) to launch a non-GUI app.
3858
3859         * Scripts/run-webkit-app: We make the assumption that 
3860         * Scripts/webkitdirs.pm:
3861             - Define and export constant DO_NOT_USE_OPEN_COMMAND.
3862
3863 2018-03-19  Daniel Bates  <dabates@apple.com>
3864
3865         run-webkit-app -g does not work
3866         https://bugs.webkit.org/show_bug.cgi?id=183699
3867
3868         Reviewed by Lucas Forschler.
3869
3870         Check for the optional command line argument -g/--guard-malloc before taking the
3871         first argument passed to be the path to the app to run.
3872
3873         * Scripts/run-webkit-app:
3874
3875 2018-03-18  Commit Queue  <commit-queue@webkit.org>
3876
3877         Unreviewed, rolling out r229689.
3878         https://bugs.webkit.org/show_bug.cgi?id=183735
3879
3880         Causes fast/loader/inner-iframe-loads-data-url-into-parent-on-
3881         unload-crash.html to fail with async delegates (Requested by
3882         cdumez_ on #webkit).
3883
3884         Reverted changeset:
3885
3886         "WebKit.WebsitePoliciesAutoplayQuirks API test times out with
3887         async policy delegates"
3888         https://bugs.webkit.org/show_bug.cgi?id=183702
3889         https://trac.webkit.org/changeset/229689
3890
3891 2018-03-18  Zalan Bujtas  <zalan@apple.com>
3892
3893         [LayoutReloaded] Remove left/right width/height getters from Layout.Box
3894         https://bugs.webkit.org/show_bug.cgi?id=183734
3895
3896         Reviewed by Antti Koivisto.
3897
3898         ...and use Display.Box instead.
3899
3900         * LayoutReloaded/DisplayTree/Box.js:
3901         (Display.Box.prototype.bottomRight):
3902         (Display.Box.prototype.size):
3903         (Display.Box.prototype.height):
3904         (Display.Box.prototype.width):
3905         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3906         (BlockFormattingContext.prototype._computeStaticPosition):
3907         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3908         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3909         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3910         * LayoutReloaded/FormattingContext/FloatingContext.js:
3911         (FloatingContext.prototype._positionForClear):
3912         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
3913         (FloatingContext.prototype._adjustedFloatingPosition):
3914         * LayoutReloaded/FormattingContext/FormattingContext.js:
3915         (FormattingContext.prototype.absoluteMarginBox):
3916         (FormattingContext.prototype.absoluteBorderBox):
3917         (FormattingContext.prototype.absolutePaddingBox):
3918         (FormattingContext.prototype.absoluteContentBox):
3919         (FormattingContext.prototype._toAbsolutePosition):
3920         (FormattingContext.prototype._toRootAbsolutePosition):
3921         * LayoutReloaded/LayoutTree/Box.js:
3922         (Layout.Box.prototype.rect): Deleted.
3923         (Layout.Box.prototype.topLeft): Deleted.
3924         (Layout.Box.prototype.bottomRight): Deleted.
3925         * LayoutReloaded/Utils.js:
3926         (Utils._dumpBox):
3927         (Utils.mapToContainer): Deleted.
3928
3929 2018-03-18  Zalan Bujtas  <zalan@apple.com>
3930
3931         [LayoutReloaded] Remove left/right width/height setters from Layout.Box
3932         https://bugs.webkit.org/show_bug.cgi?id=183731
3933
3934         Reviewed by Antti Koivisto.
3935
3936         ...and use Display.Box instead.
3937
3938         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3939         (BlockFormattingContext.prototype._computeStaticPosition):
3940         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3941         (BlockFormattingContext.prototype._computeFloatingWidth):
3942         (BlockFormattingContext.prototype._computeInFlowWidth):
3943         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3944         (BlockFormattingContext.prototype._computeFloatingHeight):
3945         (BlockFormattingContext.prototype._computeInFlowHeight):
3946         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3947         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3948         * LayoutReloaded/FormattingContext/FloatingContext.js:
3949         (FloatingContext.prototype.computePosition):
3950         * LayoutReloaded/FormattingContext/FormattingContext.js:
3951         (FormattingContext.prototype._toDisplayBox):
3952         (FormattingContext.prototype._toLayoutBox):
3953         * LayoutReloaded/Layout.js:
3954         (layout):
3955         * LayoutReloaded/LayoutTree/Box.js:
3956         (Layout.Box.prototype.setTopLeft): Deleted.
3957         (Layout.Box.prototype.setSize): Deleted.
3958         (Layout.Box.prototype.setWidth): Deleted.
3959         (Layout.Box.prototype.setHeight): Deleted.
3960
3961 2018-03-18  Zalan Bujtas  <zalan@apple.com>
3962
3963         [LayoutReloaded] Collect out-of-flow positioned boxes for a given formatting context.
3964         https://bugs.webkit.org/show_bug.cgi?id=183730
3965
3966         Reviewed by Antti Koivisto.
3967
3968         Collect and layout out-of-flow positioned boxes as the final step of the formatting context layout.
3969
3970         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3971         (BlockFormattingContext.prototype.layout):
3972         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3973         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
3974         (BlockFormattingContext.prototype._placePositionedDescendants): Deleted.
3975         (BlockFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
3976         * LayoutReloaded/FormattingContext/FormattingContext.js:
3977         (FormattingContext.prototype._toAbsolutePosition):
3978         (FormattingContext.prototype._outOfFlowDescendants):
3979         (FormattingContext):
3980         * LayoutReloaded/LayoutTree/Box.js:
3981         (Layout.Box.prototype.nextInFlowOrFloatSibling):
3982         (Layout.Box.prototype.isDescendantOf):
3983         * LayoutReloaded/LayoutTree/Container.js:
3984         (Layout.Container.prototype.firstInFlowOrFloatChild):
3985         (Layout.Container.prototype.hasInFlowOrFloatChild):
3986         (Layout.Container.prototype.outOfFlowDescendants):
3987         (Layout.Container):
3988         * LayoutReloaded/Utils.js:
3989         (Utils.isDescendantOf): Deleted.
3990         (Utils.collectOutOfFlowDescendants): Deleted.
3991
3992 2018-03-17  Jiewen Tan  <jiewen_tan@apple.com>
3993
3994         [WebAuthN] Implement authenticatorMakeCredential
3995         https://bugs.webkit.org/show_bug.cgi?id=183527
3996         <rdar://problem/35275886>
3997
3998         Reviewed by Brent Fulgham.
3999
4000         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4001         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Added.
4002         (TestWebKitAPI::getTestKey):
4003         (TestWebKitAPI::cleanUpKeychain):
4004         (TestWebKitAPI::LACantEvaluatePolicySwizzler::LACantEvaluatePolicySwizzler):
4005         (TestWebKitAPI::LACantEvaluatePolicySwizzler::cantEvaluatePolicy):
4006         (TestWebKitAPI::LACanEvaluatePolicySwizzler::LACanEvaluatePolicySwizzler):
4007         (TestWebKitAPI::LACanEvaluatePolicySwizzler::canEvaluatePolicy):
4008         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::LAEvaluatePolicyFailedSwizzler):
4009         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
4010         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::LAEvaluatePolicyPassedSwizzler):
4011         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
4012         (TestWebKitAPI::TestLocalAuthenticator::setFailureFlag):
4013         (TestWebKitAPI::TEST):
4014
4015 2018-03-17  Zalan Bujtas  <zalan@apple.com>
4016
4017         [LayoutReloaded] BlockFormattingContext::placePositionedDescendants takes care of both in- and out-of-flow placement
4018         https://bugs.webkit.org/show_bug.cgi?id=183727
4019
4020         Reviewed by Antti Koivisto.
4021
4022         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4023         (BlockFormattingContext.prototype.layout):
4024         (BlockFormattingContext.prototype._placePositionedDescendants):
4025         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
4026         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
4027         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
4028         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
4029         * LayoutReloaded/test/index.html:
4030         * LayoutReloaded/test/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
4031
4032 2018-03-17  Zalan Bujtas  <zalan@apple.com>
4033
4034         [LayoutReloaded] Ensure that positioning happens within the formatting context
4035         https://bugs.webkit.org/show_bug.cgi?id=183722
4036
4037         Reviewed by Antti Koivisto.
4038
4039         All sizing and positioning need to happen in the formatting context that the box lives in
4040         including the final position of in- and out-of-flow descendants.
4041
4042         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4043         (BlockFormattingContext.prototype.layout):
4044         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
4045         * LayoutReloaded/LayoutTree/Box.js:
4046         (Layout.Box.prototype.establishesBlockFormattingContext):
4047         (Layout.Box.prototype.isPositioned):
4048         (Layout.Box.prototype.isRelativelyPositioned):
4049         (Layout.Box.prototype.isAbsolutelyPositioned):
4050         (Layout.Box.prototype.isOutOfFlowPositioned):
4051         (Layout.Box.prototype.containingBlock):
4052         (Layout.Box.prototype.isRelativePositioned): Deleted.
4053         (Layout.Box.prototype.isAbsolutePositioned): Deleted.
4054         * LayoutReloaded/Utils.js:
4055         (Utils.isRelativelyPositioned):
4056         (Utils.isAbsolutelyPositioned):
4057         (Utils.isRelativePositioned): Deleted.
4058         (Utils.isAbsolutePositioned): Deleted.
4059         * LayoutReloaded/misc/headers/Box.h:
4060
4061 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
4062
4063         Unreviewed, rolling out r229688.
4064
4065         There's a solution that doesn't require this SPI.
4066
4067         Reverted changeset:
4068
4069         "Add SPI to expose width and height anchors for WKWebView's
4070         content view"
4071         https://bugs.webkit.org/show_bug.cgi?id=183711
4072         https://trac.webkit.org/changeset/229688
4073
4074 2018-03-16  Zalan Bujtas  <zalan@apple.com>
4075
4076         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext
4077         https://bugs.webkit.org/show_bug.cgi?id=183719
4078
4079         Reviewed by Antti Koivisto.
4080
4081         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4082         (BlockFormattingContext):
4083         (BlockFormattingContext.prototype.layout):
4084         (BlockFormattingContext.prototype._shrinkToFitWidth):
4085         (BlockFormattingContext.prototype._toAbsolutePosition): Deleted.
4086         (BlockFormattingContext.prototype._needsLayout): Deleted.
4087         (BlockFormattingContext.prototype._addToLayoutQueue): Deleted.
4088         (BlockFormattingContext.prototype._nextInLayoutQueue): Deleted.
4089         (BlockFormattingContext.prototype._removeFromLayoutQueue): Deleted.
4090         (BlockFormattingContext.prototype._createDisplayBox): Deleted.
4091         (BlockFormattingContext.prototype._toDisplayBox): Deleted.
4092         (BlockFormattingContext.prototype._toLayoutBox): Deleted.
4093         * LayoutReloaded/FormattingContext/FormattingContext.js:
4094         (FormattingContext):
4095         (FormattingContext.prototype._toAbsolutePosition):
4096         (FormattingContext.prototype._descendantNeedsLayout):
4097         (FormattingContext.prototype._addToLayoutQueue):
4098         (FormattingContext.prototype._nextInLayoutQueue):
4099         (FormattingContext.prototype._removeFromLayoutQueue):
4100         (FormattingContext.prototype._createDisplayBox):
4101         (FormattingContext.prototype._toDisplayBox):
4102         (FormattingContext.prototype._toLayoutBox):
4103         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
4104         (InlineFormattingContext.prototype.layout):
4105
4106 2018-03-16  Chris Dumez  <cdumez@apple.com>
4107
4108         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
4109         https://bugs.webkit.org/show_bug.cgi?id=183702
4110
4111         Reviewed by Alex Christensen.
4112
4113         Add API test coverage.
4114
4115         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
4116         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
4117         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
4118         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
4119         (TEST):
4120
4121 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
4122
4123         Add SPI to expose width and height anchors for WKWebView's content view
4124         https://bugs.webkit.org/show_bug.cgi?id=183711
4125         <rdar://problem/38562899>
4126
4127         Reviewed by Tim Horton.
4128
4129         Adds an API test exercising the new SPI.
4130
4131         * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
4132         (checkCGRect):
4133         (TEST):
4134
4135 2018-03-16  Chris Dumez  <cdumez@apple.com>
4136
4137         WebKit.RestoreSessionStateContainingScrollRestorationDefault API test is failing with async policy delegates
4138         https://bugs.webkit.org/show_bug.cgi?id=183679
4139
4140         Reviewed by Alex Christensen.
4141
4142         Add API test coverage.
4143
4144         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
4145         (TestWebKitAPI::decidePolicyForNavigationAction):
4146         (TestWebKitAPI::decidePolicyForResponse):
4147         (TestWebKitAPI::TEST):
4148
4149 2018-03-16  Zalan Bujtas  <zalan@apple.com>
4150
4151         [LayoutReloaded] Introduce Display.Box
4152         https://bugs.webkit.org/show_bug.cgi?id=183700
4153
4154         Reviewed by Antti Koivisto.
4155
4156         Display.Box objects will end up in the display(box) tree. Currently
4157         they are just hanging off of the Layout.Box objects.
4158
4159         * LayoutReloaded/DisplayTree/Box.js: Added.
4160         (Display.Box):
4161         (Display.Box.prototype.rect):
4162         (Display.Box.prototype.top):
4163         (Display.Box.prototype.left):
4164         (Display.Box.prototype.bottom):
4165         (Display.Box.prototype.right):
4166         (Display.Box.prototype.topLeft):
4167         (Display.Box.prototype.bottomRight):
4168         (Display.Box.prototype.setTopLeft):
4169         (Display.Box.prototype.setSize):
4170         (Display.Box.prototype.setWidth):
4171         (Display.Box.prototype.setHeight):
4172         (Display.Box.prototype.borderBox):
4173         (Display.Box.prototype.paddingBox):
4174         (Display.Box.prototype.contentBox):
4175         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4176         (BlockFormattingContext):
4177         (BlockFormattingContext.prototype.layout):
4178         (BlockFormattingContext.prototype._toAbsolutePosition):
4179         (BlockFormattingContext.prototype._needsLayout):
4180         (BlockFormattingContext.prototype._addToLayoutQueue):
4181         (BlockFormattingContext.prototype._nextInLayoutQueue):
4182         (BlockFormattingContext.prototype._removeFromLayoutQueue):
4183         (BlockFormattingContext.prototype._createDisplayBox):
4184         (BlockFormattingContext.prototype._toDisplayBox):
4185         (BlockFormattingContext.prototype._toLayoutBox):
4186         * LayoutReloaded/Layout.js:
4187         (layout):
4188         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
4189         * LayoutReloaded/LayoutTree/Box.js:
4190         (Layout.Box):
4191         (Layout.Box.prototype.setDisplayBox):
4192         (Layout.Box.prototype.displayBox):
4193         (Layout.Box.prototype.rect):
4194         (Layout.Box.prototype.setTopLeft):
4195         (Layout.Box.prototype.setSize):
4196         (Layout.Box.prototype.setWidth):
4197         (Layout.Box.prototype.setHeight):
4198         (Layout.Box.prototype.borderBox):
4199         (Layout.Box.prototype.paddingBox):
4200         (Layout.Box.prototype.contentBox):
4201         * LayoutReloaded/test/index.html:
4202
4203 2018-03-16  Chris Dumez  <cdumez@apple.com>
4204
4205         URLSchemeHandler.Basic API test fails with async policy delegates
4206         https://bugs.webkit.org/show_bug.cgi?id=183678
4207
4208         Reviewed by Alex Christensen.
4209
4210         Add API test coverage.
4211
4212         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
4213         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
4214         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
4215         (TEST):
4216
4217 2018-03-16  Zalan Bujtas  <zalan@apple.com>
4218
4219         [LayoutReloaded] Utils.computed* functions should just take node instead of box.
4220         https://bugs.webkit.org/show_bug.cgi?id=183697
4221
4222         Reviewed by Antti Koivisto.
4223
4224         This is in preparation for introducing the display tree.
4225
4226         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4227         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
4228         (BlockFormattingContext.prototype._computeFloatingWidth):
4229         (BlockFormattingContext.prototype._computeInFlowWidth):
4230         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
4231         (BlockFormattingContext.prototype._computeFloatingHeight):
4232         (BlockFormattingContext.prototype._computeInFlowHeight):
4233         (BlockFormattingContext.prototype._shrinkToFitWidth):
4234         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
4235         (BlockMarginCollapse._nonCollapsedMarginTop):
4236         (BlockMarginCollapse._nonCollapsedMarginBottom):
4237         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
4238         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
4239         * LayoutReloaded/FormattingContext/FormattingContext.js:
4240         (FormattingContext.prototype.marginTop):
4241         (FormattingContext.prototype.marginLeft):
4242         (FormattingContext.prototype.marginBottom):
4243         (FormattingContext.prototype.marginRight):
4244         * LayoutReloaded/LayoutTree/Box.js:
4245         (Layout.Box.prototype.paddingBox):
4246         (Layout.Box.prototype.contentBox):
4247         (Layout.Box):
4248         * LayoutReloaded/Utils.js:
4249         (Utils.computedMarginTop):
4250         (Utils.computedMarginLeft):
4251         (Utils.computedMarginBottom):
4252         (Utils.computedMarginRight):
4253         (Utils.computedBorderTopLeft):
4254         (Utils.computedBorderBottomRight):
4255         (Utils.computedPaddingTopLeft):
4256         (Utils.computedPaddingBottomRight):
4257         (Utils.computedBorderAndPaddingTop):
4258         (Utils.computedBorderAndPaddingLeft):
4259         (Utils.computedBorderAndPaddingBottom):
4260         (Utils.computedBorderAndPaddingRight):
4261         (Utils.computedHorizontalBorderAndPadding):
4262         (Utils.computedVerticalBorderAndPadding):
4263         (Utils.computedLineHeight):
4264         (Utils.hasClearLeft):
4265         (Utils.hasClearRight):
4266         (Utils.hasClearBoth):
4267
4268 2018-03-15  Zalan Bujtas  <zalan@apple.com>
4269
4270         [LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
4271         https://bugs.webkit.org/show_bug.cgi?id=183691
4272
4273         Reviewed by Antti Koivisto.
4274
4275         While laying out the boxes in a block formatting context, if we happen to need
4276         to get to the containing block of a box to compute geometry, it should always be a
4277         descendant of the root container (or the root container itself).
4278         Nothing outside of the formatting context should be able to impact the boxes inside.
4279
4280         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
4281         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
4282         (BlockFormattingContext.prototype._toAbsolutePosition):
4283         (BlockFormattingContext):
4284         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
4285         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
4286         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
4287         * LayoutReloaded/LayoutTree/Box.js:
4288         (Layout.Box.prototype.isRootBox):
4289         (Layout.Box.prototype.isRootElement): Deleted.
4290         * LayoutReloaded/Utils.js:
4291         (Utils.isDescendantOf):
4292         (Utils.mapStaticToAbsolute): Deleted.
4293         * LayoutReloaded/misc/headers/Box.h:
4294
4295 2018-03-15  Wenson Hsieh  <wenson_hsieh@apple.com>
4296
4297         [iOS WK2] Hit-testing fails when specifying a large top content inset
4298         https://bugs.webkit.org/show_bug.cgi?id=183648
4299         <rdar://problem/38421894>
4300
4301         Reviewed by Tim Horton.
4302
4303         Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
4304         not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
4305         as (viewHeight - inset.top) or (viewHeight - inset.bottom).
4306
4307         See WebKit ChangeLog for more details.
4308
4309         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4310         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.
4311         (TestWebKitAPI::TEST):
4312
4313 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
4314
4315         Add unit-test for NetworkTransaction URLError han