365c238ffbdeb9fb5373fdcbe644cc5bf7124329
[WebKit-https.git] / Tools / ChangeLog
1 2018-03-28  Chris Dumez  <cdumez@apple.com>
2
3         Unreviewed iOS build fix after r230060.
4
5         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
6
7 2018-03-28  Chris Dumez  <cdumez@apple.com>
8
9         Unreviewed, disable new window.open() API tests introduced in r230051 on iOS.
10
11         I will investigate if this is testable on iOS.
12
13         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
14
15 2018-03-28  Chris Dumez  <cdumez@apple.com>
16
17         Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
18         https://bugs.webkit.org/show_bug.cgi?id=183962
19         <rdar://problem/38817833>
20
21         Reviewed by Brady Eidson.
22
23         Add API test coverage.
24
25         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
26         (-[PSONUIDelegate initWithNavigationDelegate:]):
27         (-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
28
29 2018-03-28  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
30
31         Add Carlos Eduardo Ramalho as contributor
32         https://bugs.webkit.org/show_bug.cgi?id=184082
33
34         Reviewed by Carlos Alberto Lopez Perez.
35
36         * Scripts/webkitpy/common/config/contributors.json:
37
38 2018-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>
39
40         [Extra zoom mode] Make boosted text autosizing values switchable at runtime
41         https://bugs.webkit.org/show_bug.cgi?id=184092
42         <rdar://problem/38939917>
43
44         Reviewed by Tim Horton.
45
46         Add an API test to check that toggling the boosted text autosizing preference causes text to lay out larger than
47         it would with normal text autosizing.
48
49         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
50         * TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm: Added.
51         (TEST):
52
53 2018-03-28  Zalan Bujtas  <zalan@apple.com>
54
55         [LayoutReloaded] InlineFormattingContext::_handleText should support runs on multiple lines
56         https://bugs.webkit.org/show_bug.cgi?id=184101
57
58         Reviewed by Antti Koivisto.
59
60         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
61         (InlineFormattingContext):
62         (InlineFormattingContext.prototype.layout):
63         (InlineFormattingContext.prototype._handleText):
64         (InlineFormattingContext.prototype._createNewLine):
65         * LayoutReloaded/test/index.html:
66         * LayoutReloaded/test/simple-multiline-text.html: Added.
67
68 2018-03-28  Zalan Bujtas  <zalan@apple.com>
69
70         [LayoutReloaded] Add InlineTextBreaker::skipLeadingWhitespaceIfNeeded
71         https://bugs.webkit.org/show_bug.cgi?id=184099
72
73         Reviewed by Antti Koivisto.
74
75         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
76
77 2018-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
78
79         [GLIB] Add JSCWeakValue to JavaScriptCore GLib API
80         https://bugs.webkit.org/show_bug.cgi?id=184041
81
82         Reviewed by Michael Catanzaro.
83
84         Add test case for JSCWeakValue.
85
86         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
87         (weakValueClearedCallback):
88         (testJSCWeakValue):
89         (main):
90
91 2018-03-27  Zalan Bujtas  <zalan@apple.com>
92
93         [LayoutReloaded] Start using window.collectTextRuns() to layout text lines in inline formatting context
94         https://bugs.webkit.org/show_bug.cgi?id=184070
95
96         Reviewed by Antti Koivisto.
97
98         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
99         (InlineFormattingContext.prototype._handleText):
100         (InlineFormattingContext.prototype._commitLine):
101         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
102         (Line.prototype.addTextLineBox):
103         (Line):
104         (Line.prototype.addLineBox): Deleted.
105         * LayoutReloaded/FormattingState/BlockFormattingState.js:
106         (BlockFormattingState):
107         * LayoutReloaded/FormattingState/FormattingState.js:
108         (FormattingState.prototype.displayBox):
109         (FormattingState):
110         (FormattingState.prototype._setFormattingContext): Deleted.
111         * LayoutReloaded/FormattingState/InlineFormattingState.js:
112         (InlineFormattingState):
113         * LayoutReloaded/LayoutTree/Text.js:
114         (Text.prototype.content):
115         * LayoutReloaded/Utils.js:
116         (Utils.textRuns):
117         (Utils.textRunsForLine):
118         (Utils._dumpLines.):
119         (Utils._dumpLines):
120         * LayoutReloaded/test/simple-inline-text.html:
121
122 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
123
124         https://bugs.webkit.org/show_bug.cgi?id=183876
125         <rdar://problem/38726459>
126         
127         Unreviewed, fix for the test added in r229995 in the iOS simulator.
128
129         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
130         (TestWebKitAPI::AVFoundationPref::testWithPreference):
131
132 2018-03-27  Jiewen Tan  <jiewen_tan@apple.com>
133
134         [WebAuthN] Implement authenticatorGetAssertion
135         https://bugs.webkit.org/show_bug.cgi?id=183881
136         <rdar://problem/37258628>
137
138         Reviewed by Brent Fulgham.
139
140         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
141         (TestWebKitAPI::getTestKey):
142         (TestWebKitAPI::addTestKeyToKeychain):
143         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
144         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
145         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::LAEvaluateAccessControlFailedSwizzler):
146         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::evaluateAccessControlFailed):
147         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::LAEvaluateAccessControlPassedSwizzler):
148         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::evaluateAccessControlPassed):
149         (TestWebKitAPI::TEST):
150
151 2018-03-27  Brian Burg  <bburg@apple.com>
152
153         REGRESSION(r229937): WebDriver tests no longer run, test runner hangs when launching wpt web server
154         https://bugs.webkit.org/show_bug.cgi?id=184056
155         <rdar://problem/38925058>
156
157         Reviewed by Timothy Hatcher and Youenn Fablet.
158
159         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
160         (WebDriverW3CWebServer.start):
161         The config key used in upstream WPT has changed from 'host' to 'browser_host'.
162
163 2018-03-27  Timothy Hatcher  <timothy@hatcher.name>
164
165         Update my email address in contributors.json and scripts
166         https://bugs.webkit.org/show_bug.cgi?id=184054
167
168         * Scripts/validate-committer-lists:
169         (CommitterListFromGit):
170         * Scripts/webkitpy/common/config/contributors.json:
171
172 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
173
174         Make AVFoundationEnabled preference available on iOS
175         https://bugs.webkit.org/show_bug.cgi?id=183876
176         <rdar://problem/38726459>
177
178         Reviewed by Youenn Fablet.
179
180         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
181         * TestWebKitAPI/Tests/WebKit/video.html: Added.
182         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: Added.
183         (-[PreferenceTestMessageHandler userContentController:didReceiveScriptMessage:]):
184         (TestWebKitAPI::AVFoundationPref::SetUp):
185         (TestWebKitAPI::AVFoundationPref::testWithPreference):
186         (TestWebKitAPI::TEST_F):
187
188 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
189
190         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
191         https://bugs.webkit.org/show_bug.cgi?id=183911
192         <rdar://problem/38762306>
193
194         Reviewed by Youenn Fablet.
195
196         Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
197         should never call Cookie API directly. That should only happen in the Networking or
198         UIProcess. 
199
200         * DumpRenderTree/mac/DumpRenderTree.mm:
201         (DumpRenderTreeMain):
202         * TestWebKitAPI/TestsController.cpp:
203         (TestWebKitAPI::TestsController::TestsController):
204         * WebKitTestRunner/TestController.cpp:
205         (WTR::TestController::initialize):
206
207 2018-03-26  Zalan Bujtas  <zalan@apple.com>
208
209         [LayoutReloaded] Add InlineText DOM interface and dependencies
210         https://bugs.webkit.org/show_bug.cgi?id=184010
211
212         Reviewed by Antti Koivisto.
213
214         to help inline text layout.
215
216         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
217
218 2018-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
219
220         [GTK][WPE] Add API to convert between DOM and JSCValue
221         https://bugs.webkit.org/show_bug.cgi?id=183448
222
223         Reviewed by Michael Catanzaro.
224
225         Add unit tests for non-deprecated DOM API and switch existing tests to use non-deprecated API except for the
226         ones that test the deprecated API.
227
228         * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp: Added.
229         (DOMElementTest::create):
230         (DOMElementTest::testAutoFill):
231         (registerTests):
232         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp: Added.
233         (WebKitWebEditorTest::create):
234         (WebKitWebEditorTest::selectionChangedCallback):
235         (WebKitWebEditorTest::testSelectionchanged):
236         (registerTests):
237         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
238         (WebKitFrameTest::testJavaScriptValues):
239         (registerTests):
240         * TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
241         (testWebKitDOMElementAutoFill):
242         (beforeAll):
243         (afterAll):
244         * TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp.
245         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
246         (testWebKitFrameJavaScriptValues):
247         (beforeAll):
248         * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
249         (inputElementIsUserEdited):
250         (testWebExtensionInputElementIsUserEdited):
251         (testWebExtensionFormSubmissionSteps):
252         (beforeAll):
253         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
254         (documentLoadedCallback):
255         (serializeNode):
256         (contextMenuCallback):
257         (consoleMessageSentCallback):
258         (formControlsAssociatedCallback):
259         (willSubmitFormCallback):
260         (pageCreatedCallback):
261         (methodCallCallback):
262         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
263         (checkLeaks):
264         (webProcessTestRunnerFinalize):
265         (checkLeaksAtExit):
266         * TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
267         (AutocleanupsTest::testWebProcessAutocleanups):
268         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
269         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
270         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
271         * TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
272         * TestWebKitAPI/Tests/WebKitGtk/EditorTest.cpp: Removed.
273         * TestWebKitAPI/glib/CMakeLists.txt:
274         * TestWebKitAPI/glib/PlatformGTK.cmake:
275         * TestWebKitAPI/glib/PlatformWPE.cmake:
276
277 2018-03-24  Jonathan Bedard  <jbedard@apple.com>
278
279         webkitpy: Unrecognized mac versions always use WebKitTestRunner
280         https://bugs.webkit.org/show_bug.cgi?id=183681
281         <rdar://problem/38509162>
282
283         Reviewed by Daniel Bates.
284
285         When an unrecognized version is used, we were unconditionally adding '-wk2'
286         to the mac version name. This would mean that the port object would always
287         use WebKitTestRunner as the driver, even if DumpRenderTree was explicitly
288         requested.
289
290         * Scripts/webkitpy/port/apple.py:
291         (ApplePort.determine_full_port_name): Only add wk2 to port names if
292         WebKitTestRunner is specified.
293         * Scripts/webkitpy/port/mac.py:
294         (MacPort.__init__): Compare length of split string, and do not treat wk2 as a
295         version name.
296         * Scripts/webkitpy/port/mac_unittest.py:
297         (MacTest):
298         (MacTest.test_factory_with_future_version): Confirm that future versions correctly
299         assign the driver and have undefined version names.
300         (MacTest.test_factory_with_portname_version): Confirm that general versions correctly assign
301         the driver and have defined versions.
302         (MacTest.test_factory_with_portname_wk2): Ensure that mac ports ending in 'wk2' set
303         the driver to be WebKitTestRunner even if webkit_test_runner=False.
304
305 2018-03-23  Zan Dobersek  <zdobersek@igalia.com>
306
307         Fix the run-benchmark script, properly specifying the plan directory
308         where the Skipped file is located.
309
310         Rubber-stamped by Carlos Alberto Lopez Perez.
311
312         * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
313         (start):
314
315 2018-03-23  Tim Horton  <timothy_horton@apple.com>
316
317         Fix the build with no pasteboard
318         https://bugs.webkit.org/show_bug.cgi?id=183973
319
320         Reviewed by Dan Bernstein.
321
322         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
323
324 2018-03-23  Youenn Fablet  <youenn@apple.com>
325
326         Update WPT tools to a1ec330
327         https://bugs.webkit.org/show_bug.cgi?id=183934
328
329         Reviewed by Chris Dumez.
330
331         Update script to run WPT server  according updated WPT tools.
332
333         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
334         (main):
335         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
336         (base_http_url):
337         (base_https_url):
338
339 2018-03-23  Sihui Liu  <sihui_liu@apple.com>
340
341         Local storage getItem() for an empty string returned UNDEFINED value.
342         https://bugs.webkit.org/show_bug.cgi?id=69138
343         <rdar://problem/13410974>
344
345         Reviewed by Brady Eidson.
346
347         Add API test coverage.
348
349         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
350         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Added.
351         (-[LocalStorageMessageHandler userContentController:didReceiveScriptMessage:]):
352         (TEST):
353         * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html: Added.
354
355 2018-03-23  Chris Dumez  <cdumez@apple.com>
356
357         Promptly terminate service worker processes when they are no longer needed
358         https://bugs.webkit.org/show_bug.cgi?id=183873
359         <rdar://problem/38676995>
360
361         Reviewed by Youenn Fablet.
362
363         Add API test coverage.
364
365         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
366
367 2018-03-23  Brady Eidson  <beidson@apple.com>
368
369         Go to back/forward list items after a process-swapped navigation.
370         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
371
372         Reviewed by Andy Estes.
373
374         Add a new API test that does some process-swapping navigations (including a back navigation)
375         and verifies the state of the engine afterwards.
376
377         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
378         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
379         (-[PSONScheme initWithBytes:]):
380         (-[PSONScheme webView:startURLSchemeTask:]):
381         (log):
382         (function):
383         (TEST): Deleted.
384
385 2018-03-23  Brendan McLoughlin  <brendan@bocoup.com>
386
387         Lint web-platform-tests changes with the wpt linter before exporting
388         https://bugs.webkit.org/show_bug.cgi?id=183796
389
390         Reviewed by Youenn Fablet.
391
392         * Scripts/webkitpy/w3c/test_exporter.py:
393         (TestExporter.__init__):
394         (TestExporter.do_export):
395         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
396         (TestExporterTest.MockWPTLinter):
397         (TestExporterTest.MockWPTLinter.__init__):
398         (TestExporterTest.MockWPTLinter.lint):
399         (TestExporterTest.test_export):
400         (TestExporterTest.test_export_with_specific_branch):
401         * Scripts/webkitpy/w3c/wpt_linter.py: Added.
402         (WPTLinter):
403         (WPTLinter.__init__):
404         (WPTLinter.lint):
405
406 2018-03-23  David Kilzer  <ddkilzer@apple.com>
407
408         Stop using dispatch_set_target_queue()
409         <https://webkit.org/b/183908>
410         <rdar://problem/33553533>
411
412         Reviewed by Daniel Bates.
413
414         * Scripts/webkitpy/style/checkers/cpp.py:
415         (check_language): Add check for use of
416         dispatch_set_target_queue().
417         (CppChecker): Add 'runtime/dispatch_set_target_queue' category.
418         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
419         (CppStyleTest): Add test.
420
421 2018-03-23  Youenn Fablet  <youenn@apple.com>
422
423         Allow fully whitelisted plug-ins to match non HTTP URLs
424         https://bugs.webkit.org/show_bug.cgi?id=183938
425         rdar://problem/38534312
426
427         Reviewed by Chris Dumez.
428
429         * TestWebKitAPI/Tests/WebCore/URL.cpp:
430         (TestWebKitAPI::TEST_F):
431
432 2018-03-23  JF Bastien  <jfbastien@apple.com>
433
434         dump-class-layout is just wrong
435         https://bugs.webkit.org/show_bug.cgi?id=183939
436
437         Reviewed by Yusuke Suzuki.
438
439         Looks like r229291 contained a half-renamed variable in it, so it
440         just doesn't work.
441
442         * Scripts/dump-class-layout:
443         (verify_type):
444         (verify_type_recursive):
445
446 2018-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
447
448         Unreviewed. Run JSC GLib API tests in GTK+ and WPE bots.
449
450         The test runners were still considering the JSC tests as google tests, but they are now GLib tests.
451
452         * Scripts/run-gtk-tests:
453         (GtkTestRunner.is_glib_test):
454         (GtkTestRunner.is_google_test):
455         * Scripts/run-wpe-tests:
456         (WPETestRunner.is_glib_test):
457         (WPETestRunner.is_google_test):
458
459 2018-03-22  Daniel Bates  <dabates@apple.com>
460
461         Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
462         https://bugs.webkit.org/show_bug.cgi?id=183907
463         <rdar://problem/38759127>
464
465         Reviewed by Alex Christensen.
466
467         Adds unit tests for the modern Objective-C and C SPI to ensure we do not regress it.
468
469         We use the deprecated -[WKBrowsingContextController registerSchemeForCustomProtocol:]
470         in both the modern Objective-C API and C API tests to share code. Once we no longer
471         need to support the C API we should remove the tests and transition the modern Objective-
472         C tests to use -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:].
473
474         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
475         * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: Added.
476         (+[EchoURLProtocol canInitWithRequest:]):
477         (+[EchoURLProtocol canonicalRequestForRequest:]):
478         (+[EchoURLProtocol requestIsCacheEquivalent:toRequest:]):
479         (-[EchoURLProtocol startLoading]):
480         (-[EchoURLProtocol stopLoading]):
481         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextController:didFailProvisionalLoadWithError:]):
482         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextControllerDidFinishLoad:]):
483         (TestWebKitAPI::TEST):
484
485 2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
486
487         [WPE] Enable WOFF2 support
488         https://bugs.webkit.org/show_bug.cgi?id=178158
489
490         Reviewed by Frédéric Wang.
491
492         * wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.
493
494 2018-03-22  Brendan McLoughlin  <brendan@bocoup.com>
495
496         Do not export web-platform-test files generated by the wpt importer to assist the webkit test runner
497         https://bugs.webkit.org/show_bug.cgi?id=183916
498
499         Reviewed by Youenn Fablet.
500
501         * Scripts/webkitpy/w3c/test_exporter.py:
502         (TestExporter.create_branch_with_patch):
503         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
504         (TestExporterTest.test_export):
505         (TestExporterTest.test_export_with_specific_branch):
506
507 2018-03-22  Tim Horton  <timothy_horton@apple.com>
508
509         Improve readability of WebCore's OTHER_LDFLAGS
510         https://bugs.webkit.org/show_bug.cgi?id=183909
511         <rdar://problem/38760992>
512
513         Reviewed by Dan Bernstein.
514
515         * TestWebKitAPI/Configurations/Base.xcconfig:
516         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
517
518 2018-03-21  Fujii Hironori  <Hironori.Fujii@sony.com>
519
520         Unreviewed. Marked myself as a committer.
521
522         * Scripts/webkitpy/common/config/contributors.json:
523
524 2018-03-21  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
525
526         Unreviewed, make the email address of Yoshiaki Jitsukawa all lower case.
527
528         * Scripts/webkitpy/common/config/contributors.json:
529
530 2018-03-21  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
531
532         Unreviewed, add myself as a WebKit committer.
533
534         * Scripts/webkitpy/common/config/contributors.json:
535
536 2018-03-21  Chris Dumez  <cdumez@apple.com>
537
538         ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
539         https://bugs.webkit.org/show_bug.cgi?id=183787
540
541         Reviewed by Wenson Hsieh.
542
543         Add API test coverage.
544
545         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
546         (-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
547         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationAction:decisionHandler:]):
548         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationResponse:decisionHandler:]):
549         (-[AsyncPolicyDelegateForInsetTest webViewWebContentProcessDidTerminate:]):
550         (TestWebKitAPI::TEST):
551
552 2018-03-21  Chris Dumez  <cdumez@apple.com>
553
554         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
555         https://bugs.webkit.org/show_bug.cgi?id=183858
556
557         Reviewed by Wenson Hsieh.
558
559         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
560         instead of loadTestPageNamed because injecting script.
561
562         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
563         (TestWebKitAPI::TEST):
564
565 2018-03-21  Zalan Bujtas  <zalan@apple.com>
566
567         [LayoutReloaded] Enable formatting state for InlineFormattingContext
568         https://bugs.webkit.org/show_bug.cgi?id=183853
569
570         Reviewed by Antti Koivisto.
571
572         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
573         (BlockFormattingContext.prototype._contentHeight):
574         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
575         (InlineFormattingContext):
576         (InlineFormattingContext.prototype.layout):
577         (InlineFormattingContext.prototype._createNewLine):
578         * LayoutReloaded/LayoutState.js:
579         (LayoutState.prototype.formattingState):
580         * LayoutReloaded/README.md:
581         * LayoutReloaded/Utils.js:
582         (Utils._dumpTree):
583         * LayoutReloaded/test/index.html:
584         * LayoutReloaded/test/simple-inline-text.html: Added.
585
586 2018-03-21  Zalan Bujtas  <zalan@apple.com>
587
588         [LayoutReloaded] Move inline lines to InlineFormattingState.
589         https://bugs.webkit.org/show_bug.cgi?id=183814
590
591         Reviewed by Antti Koivisto.
592
593         InlineFormattingContext is not supposed to hold state.
594
595         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
596         (InlineFormattingContext):
597         (InlineFormattingContext.prototype._commitLine):
598         (InlineFormattingContext.prototype._createNewLine):
599         (InlineFormattingContext.prototype.lines): Deleted.
600         (InlineFormattingContext.prototype._initializeLine): Deleted.
601         * LayoutReloaded/FormattingState/InlineFormattingState.js:
602         (InlineFormattingState):
603         (InlineFormattingState.prototype.lines):
604         (InlineFormattingState.prototype.appendLine):
605
606 2018-03-21  Ms2ger  <Ms2ger@igalia.com>
607
608         [WPE] Disable most of TestWebKitFaviconDatabase.
609         https://bugs.webkit.org/show_bug.cgi?id=183813
610
611         Unreviewed test gardening.
612
613         The relevant APIs were mostly removed in r223953, making this test
614         time out consistently.
615
616         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
617
618 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
619
620         [GTK][WPE] JSC bindings not introspectable
621         https://bugs.webkit.org/show_bug.cgi?id=136989
622
623         Reviewed by Michael Catanzaro.
624
625         Use the new API instead of the deprecated one.
626
627         * MiniBrowser/gtk/main.c:
628         (aboutDataScriptMessageReceivedCallback):
629         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
630         (WebKitFrameTest::testJavaScriptContext):
631         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
632         (testWebViewRunJavaScript):
633         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
634         (consoleMessageSentCallback):
635         (echoCallback):
636         (windowObjectCleared):
637         (methodCallCallback):
638         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
639         (runTest):
640         (webProcessTestRunnerFinalize):
641         (windowObjectClearedCallback):
642         * TestWebKitAPI/glib/PlatformGTK.cmake:
643         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
644         (WebViewTest::javascriptResultToCString):
645         (WebViewTest::javascriptResultToNumber):
646         (WebViewTest::javascriptResultToBoolean):
647         (WebViewTest::javascriptResultIsNull):
648         (WebViewTest::javascriptResultIsUndefined):
649
650 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
651
652         [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
653         https://bugs.webkit.org/show_bug.cgi?id=164061
654
655         Reviewed by Michael Catanzaro.
656
657         Add unit tests for the new API and generate the API documentation with generate-gtkdoc.
658
659         * Scripts/webkitpy/style/checker.py: Ignore some style errors in public GLib API headers.
660         * TestWebKitAPI/PlatformGTK.cmake:
661         * TestWebKitAPI/PlatformWPE.cmake:
662         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: Added.
663         (LeakChecker::~LeakChecker):
664         (LeakChecker::watch):
665         (ExceptionHandler::ExceptionHandler):
666         (ExceptionHandler::~ExceptionHandler):
667         (ExceptionHandler::push):
668         (ExceptionHandler::pop):
669         (jscContextGarbageCollect):
670         (testJSCBasic):
671         (testJSCTypes):
672         (foo):
673         (callback):
674         (doubleAndSetInResult):
675         (sumFunction):
676         (testJSCFunction):
677         (testJSCObject):
678         (fooCreate):
679         (fooCreateWithFoo):
680         (fooFree):
681         (setFoo):
682         (getFoo):
683         (setSibling):
684         (getSibling):
685         (multiplyFoo):
686         (getMultiplyFoo):
687         (getMultiplyFooAsync):
688         (bazCreate):
689         (testJSCClass):
690         (barCreate):
691         (barFree):
692         (setBar):
693         (getBar):
694         (testJSCPrototypes):
695         (createError):
696         (testJSCExceptions):
697         (testJSCPromises):
698         (fooFreeAndLog):
699         (testJSCGarbageCollector):
700         (testsJSCVirtualMachine):
701         (testsJSCAutocleanups):
702         (main):
703         * gtk/generate-gtkdoc:
704         (get_generator_for_config):
705
706 2018-03-20  Tim Horton  <timothy_horton@apple.com>
707
708         Enable the minimal simulator feature flag when appropriate
709         https://bugs.webkit.org/show_bug.cgi?id=183807
710
711         Reviewed by Dan Bernstein.
712
713         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
714
715 2018-03-20  Zalan Bujtas  <zalan@apple.com>
716
717         [LayoutReloaded] Disconnect Display.Box from Layout.Box
718         https://bugs.webkit.org/show_bug.cgi?id=183805
719
720         Reviewed by Antti Koivisto.
721
722         Display.Box is only accessed through the FormattingState.
723
724         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
725         (BlockFormattingContext):
726         (BlockFormattingContext.prototype.layout):
727         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
728         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
729         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
730         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
731         * LayoutReloaded/FormattingContext/FormattingContext.js:
732         (FormattingContext):
733         (FormattingContext.prototype.formattingRoot):
734         (FormattingContext.prototype.formattingState):
735         (FormattingContext.prototype.layoutState):
736         (FormattingContext.prototype._toAbsolutePosition):
737         (FormattingContext.prototype._toRootAbsolutePosition):
738         (FormattingContext.prototype._addToLayoutQueue):
739         (FormattingContext.prototype.displayBox):
740         (FormattingContext.prototype._outOfFlowDescendants):
741         (FormattingContext.prototype.rootContainer): Deleted.
742         (FormattingContext.prototype.layoutContext): Deleted.
743         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
744         (InlineFormattingContext):
745         (InlineFormattingContext.prototype.layout):
746         (InlineFormattingContext.prototype._initializeLine):
747         * LayoutReloaded/FormattingState/BlockFormattingState.js:
748         (BlockFormattingState):
749         * LayoutReloaded/FormattingState/FormattingState.js:
750         (FormattingState):
751         (FormattingState.prototype.formattingRoot):
752         (FormattingState.prototype.layoutState):
753         (FormattingState.prototype.createDisplayBox):
754         (FormattingState.prototype.displayBoxMap):
755         (FormattingState.prototype.displayBox):
756         (FormattingState.prototype.layoutContext): Deleted.
757         * LayoutReloaded/FormattingState/InlineFormattingState.js:
758         (InlineFormattingState):
759         * LayoutReloaded/Layout.js:
760         (layout):
761         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
762         * LayoutReloaded/LayoutState.js: Renamed from Tools/LayoutReloaded/LayoutContext.js.
763         (LayoutState):
764         (LayoutState.prototype.layout):
765         (LayoutState.prototype._createFormattingState):
766         (LayoutState.prototype.formattingStates):
767         (LayoutState.prototype.initialDisplayBox):
768         * LayoutReloaded/LayoutTree/Box.js:
769         (Layout.Box.prototype.isOutOfFlowPositioned):
770         (Layout.Box.prototype.containingBlock):
771         (Layout.Box.prototype.setDisplayBox): Deleted.
772         (Layout.Box.prototype.displayBox): Deleted.
773         * LayoutReloaded/Utils.js:
774         (Utils.layoutTreeDump):
775         (Utils._findDisplayBox):
776         (Utils._dumpBox):
777         (Utils._dumpTree):
778         * LayoutReloaded/misc/headers/BlockFormattingContext.h:
779         * LayoutReloaded/misc/headers/FormattingContext.h:
780         * LayoutReloaded/misc/headers/LayoutContext.h:
781         * LayoutReloaded/test/index.html:
782
783 2018-03-19  Ryosuke Niwa  <rniwa@webkit.org>
784
785         Expose content attributes on _WKLinkIconParameters
786         https://bugs.webkit.org/show_bug.cgi?id=183768
787
788         Reviewed by Alex Christensen.
789
790         Expanded the basic test case for _WKLinkIconParameters's properties including newly added "attributes".
791
792         * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
793         (IconLoading.DefaultFavicon):
794
795 2018-03-20  Wenson Hsieh  <wenson_hsieh@apple.com>
796
797         Add AssistedNodeInformation plumbing for form control placeholder text and label text
798         https://bugs.webkit.org/show_bug.cgi?id=183802
799         <rdar://problem/38686273>
800
801         Reviewed by Tim Horton.
802
803         Adds a new API test to exercise new placeholder and label SPI on _WKFocusedFormElement.
804
805         * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
806         (-[InputDelegate _webView:focusShouldStartInputSession:]):
807         (-[InputDelegate shouldStartInputSessionHandler]):
808         (-[InputDelegate setShouldStartInputSessionHandler:]):
809         (TEST):
810         (-[FormSubmissionDelegate webView:startURLSchemeTask:]): Deleted.
811         (-[FormSubmissionDelegate webView:stopURLSchemeTask:]): Deleted.
812         (-[FormSubmissionDelegate _webView:willSubmitFormValues:userObject:submissionHandler:]): Deleted.
813
814 2018-03-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
815
816         [WinCairo] Fix to run-webkit-httpd from native Windows.
817         https://bugs.webkit.org/show_bug.cgi?id=183605
818
819         Reviewed by Daniel Bates.
820
821         This fix is to run Apache HTTP server from native Windows. The environment is different
822         from cygwin, which is used for AppleWin, in following points:
823         - A temporary file behaves differently. It cannot reopen by anybody when indicated as 
824           delete on close. To solve this situation, filesystem.mkdtemp() is used instead.
825         - It's not unix so that `tail` command is not available. Replaced with python equivalent
826           function.
827
828         * Scripts/webkitpy/common/system/filesystem.py:
829         (FileSystem.mkdtemp.TemporaryDirectory.__init__):
830         (FileSystem.mkdtemp.TemporaryDirectory.__exit__): The existing contents would be deleted.
831         (FileSystem.mkdtemp):
832         * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
833         (parse_args):
834         (run_server):
835         (run_server_with_log_file):
836         (follow_file):
837
838 2018-03-20  Brady Eidson  <beidson@apple.com>
839
840         First piece of process swapping on navigation.
841         https://bugs.webkit.org/show_bug.cgi?id=183665
842
843         Reviewed by Andy Estes.
844
845         Expose the "swaps processes on navigation" setting in MiniBrowser UI for testing:
846
847         * MiniBrowser/mac/AppDelegate.m:
848         (defaultConfiguration):
849         * MiniBrowser/mac/SettingsController.h:
850         * MiniBrowser/mac/SettingsController.m:
851         (-[SettingsController _populateMenu]):
852         (-[SettingsController validateMenuItem:]):
853         (-[SettingsController processSwapOnNavigationEnabled]):
854         (-[SettingsController toggleProcessSwapOnNavigation:]):
855
856         Makes sure the current behavior is tested:
857         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
858         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Added.
859         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
860         (-[PSONScheme webView:startURLSchemeTask:]):
861         (-[PSONScheme webView:stopURLSchemeTask:]):
862         (TEST):
863
864 2018-03-20  Chris Dumez  <cdumez@apple.com>
865
866         QuickLook.NavigationDelegate API test is failing on iOS with async policy delegates
867         https://bugs.webkit.org/show_bug.cgi?id=183791
868
869         Reviewed by Alex Christensen.
870
871         Add API test coverage.
872
873         * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
874         (-[QuickLookAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
875         (-[QuickLookAsyncNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
876         (-[QuickLookAsyncNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
877         (-[QuickLookAsyncNavigationDelegate webView:didFinishNavigation:]):
878         (TEST):
879
880 2018-03-20  Tim Horton  <timothy_horton@apple.com>
881
882         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
883         https://bugs.webkit.org/show_bug.cgi?id=183758
884         <rdar://problem/38017644>
885
886         Reviewed by Dan Bernstein.
887
888         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
889
890 2018-03-20  Chris Dumez  <cdumez@apple.com>
891
892         Unreviewed, rolling out r229726 and r229763.
893
894         Caused some API test failures on iOS
895
896         Reverted changesets:
897
898         "Make policy decisions asynchronous"
899         https://bugs.webkit.org/show_bug.cgi?id=180568
900         https://trac.webkit.org/changeset/229726
901
902         "Rebaseline three webarchive tests for WK2 after r229726."
903         https://bugs.webkit.org/show_bug.cgi?id=180568
904         https://trac.webkit.org/changeset/229763
905
906 2018-03-20  Zalan Bujtas  <zalan@apple.com>
907
908         [LayoutReloaded] Move Display.Box handling from FormattingContext to FormattingState
909         https://bugs.webkit.org/show_bug.cgi?id=183779
910
911         Reviewed by Antti Koivisto.
912
913         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
914         (BlockFormattingContext.prototype._computeStaticPosition):
915         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
916         (BlockFormattingContext.prototype._computeFloatingWidth):
917         (BlockFormattingContext.prototype._computeInFlowWidth):
918         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
919         (BlockFormattingContext.prototype._computeFloatingHeight):
920         (BlockFormattingContext.prototype._computeInFlowHeight):
921         (BlockFormattingContext.prototype._horizontalConstraint):
922         (BlockFormattingContext.prototype._contentHeight):
923         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
924         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
925         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
926         * LayoutReloaded/FormattingContext/FloatingContext.js:
927         (FloatingContext.prototype.computePosition):
928         (FloatingContext.prototype._positionForClear):
929         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
930         (FloatingContext.prototype._availableSpace):
931         (FloatingContext.prototype._adjustedFloatingPosition):
932         * LayoutReloaded/FormattingContext/FormattingContext.js:
933         (FormattingContext):
934         (FormattingContext.prototype.absoluteMarginBox):
935         (FormattingContext.prototype.absoluteBorderBox):
936         (FormattingContext.prototype.absolutePaddingBox):
937         (FormattingContext.prototype.absoluteContentBox):
938         (FormattingContext.prototype._toAbsolutePosition):
939         (FormattingContext.prototype._toRootAbsolutePosition):
940         (FormattingContext.prototype._addToLayoutQueue):
941         (FormattingContext.prototype.displayBox):
942         (FormattingContext.prototype._createDisplayBox): Deleted.
943         (FormattingContext.prototype.toDisplayBox): Deleted.
944         (FormattingContext.prototype.toLayoutBox): Deleted.
945         * LayoutReloaded/FormattingState/FormattingState.js:
946         (FormattingState):
947         (FormattingState.prototype.createDisplayBox):
948         (FormattingState.prototype.displayBox):
949
950 2018-03-20  Zalan Bujtas  <zalan@apple.com>
951
952         [LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
953         https://bugs.webkit.org/show_bug.cgi?id=183777
954
955         Reviewed by Antti Koivisto.
956
957         This is in preparation for moving out states from the formatting contexts.
958
959         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
960         (BlockFormattingContext):
961         * LayoutReloaded/FormattingContext/FormattingContext.js:
962         (FormattingContext):
963         (FormattingContext.prototype.layoutState):
964         (FormattingContext.prototype.layoutContext):
965         (FormattingContext.prototype.layout):
966         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
967         (InlineFormattingContext):
968         * LayoutReloaded/FormattingState/BlockFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
969         (BlockFormattingState):
970         * LayoutReloaded/FormattingState/FormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
971         (FormattingState):
972         (FormattingState.prototype.formattingContext):
973         (FormattingState.prototype.layoutContext):
974         (FormattingState.prototype._setFormattingContext):
975         * LayoutReloaded/FormattingState/InlineFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
976         (InlineFormattingState):
977         * LayoutReloaded/LayoutContext.js:
978         (LayoutContext):
979         (LayoutContext.prototype.layout):
980         (LayoutContext.prototype._createFormattingState):
981         (LayoutContext.prototype._createFormattingContext): Deleted.
982         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
983         * LayoutReloaded/test/index.html:
984
985 2018-03-19  Zalan Bujtas  <zalan@apple.com>
986
987         [LayoutReloaded] Layout.Box should not create the formatting context.
988         https://bugs.webkit.org/show_bug.cgi?id=183766
989
990         Reviewed by Antti Koivisto.
991
992         Since the formattingContext's lifetime is tied to the layout, the LayoutContext
993         should construct it instead.
994
995         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
996         (BlockFormattingContext):
997         (BlockFormattingContext.prototype.layout):
998         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
999         (BlockFormattingContext.prototype._contentHeight):
1000         * LayoutReloaded/FormattingContext/FormattingContext.js:
1001         (FormattingContext):
1002         (FormattingContext.prototype.layoutContext):
1003         (FormattingContext.prototype.toDisplayBox):
1004         (FormattingContext.prototype._outOfFlowDescendants):
1005         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1006         (InlineFormattingContext):
1007         (InlineFormattingContext.prototype.layout):
1008         * LayoutReloaded/Layout.js:
1009         (layout):
1010         * LayoutReloaded/LayoutContext.js:
1011         (LayoutContext.prototype.layout):
1012         (LayoutContext.prototype._createFormattingContext):
1013         (LayoutContext):
1014         (LayoutContext.prototype.layoutFormattingContext): Deleted.
1015         * LayoutReloaded/LayoutTree/Box.js:
1016         (Layout.Box):
1017         (Layout.Box.prototype.establishedFormattingContext): Deleted.
1018         * LayoutReloaded/misc/headers/Box.h:
1019
1020 2018-03-19  Chris Dumez  <cdumez@apple.com>
1021
1022         Have one service worker process per security origin
1023         https://bugs.webkit.org/show_bug.cgi?id=183600
1024         <rdar://problem/35280128>
1025
1026         Reviewed by Brady Eidson.
1027
1028         Add API test coverage.
1029
1030         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
1031
1032 2018-03-19  Zalan Bujtas  <zalan@apple.com>
1033
1034         [LayoutReloaded] Remove border/padding/contentBox() functions from Layout.Box
1035         https://bugs.webkit.org/show_bug.cgi?id=183761
1036
1037         Reviewed by Antti Koivisto.
1038
1039         Display.Box has them.
1040
1041         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1042         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1043         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1044         (BlockFormattingContext.prototype._horizontalConstraint):
1045         (BlockFormattingContext.prototype._contentHeight):
1046         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
1047         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1048         * LayoutReloaded/FormattingContext/FloatingContext.js:
1049         (FloatingContext.prototype._availableSpace):
1050         * LayoutReloaded/FormattingContext/FormattingContext.js:
1051         (FormattingContext.prototype.absoluteBorderBox):
1052         (FormattingContext.prototype.absolutePaddingBox):
1053         (FormattingContext.prototype.absoluteContentBox):
1054         * LayoutReloaded/LayoutTree/Box.js:
1055         (Layout.Box.prototype.isDescendantOf):
1056         (Layout.Box):
1057         (Layout.Box.prototype.borderBox): Deleted.
1058         (Layout.Box.prototype.paddingBox): Deleted.
1059         (Layout.Box.prototype.contentBox): Deleted.
1060
1061 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
1062
1063         Unreviewed, another quick fix for r229699
1064
1065         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
1066
1067         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1068         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
1069
1070 2018-03-19  Zalan Bujtas  <zalan@apple.com>
1071
1072         [LayoutReloaded] Move statically positioned absolute box positioning to _computeOutOfFlowPosition
1073         https://bugs.webkit.org/show_bug.cgi?id=183750
1074
1075         Reviewed by Antti Koivisto.
1076
1077         * LayoutReloaded/DisplayTree/Box.js:
1078         (Display.Box.prototype.setTop):
1079         (Display.Box.prototype.paddingBox):
1080         (Display.Box.prototype.contentBox):
1081         (Display.Box):
1082         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1083         (BlockFormattingContext.prototype._computeStaticPosition):
1084         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
1085         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1086         * LayoutReloaded/FormattingContext/FormattingContext.js:
1087         (FormattingContext.prototype.absoluteMarginBox):
1088         (FormattingContext.prototype.absoluteBorderBox):
1089         (FormattingContext.prototype.absolutePaddingBox):
1090         (FormattingContext.prototype.absoluteContentBox):
1091         (FormattingContext.prototype._toAbsolutePosition):
1092         (FormattingContext.prototype._toRootAbsolutePosition):
1093         (FormattingContext.prototype.toDisplayBox):
1094         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
1095         (Layout.InitialBlockContainer.prototype.establishesBlockFormattingContext):
1096         (Layout.InitialBlockContainer):
1097         (Layout.InitialBlockContainer.prototype.paddingBox): Deleted.
1098         (Layout.InitialBlockContainer.prototype.contentBox): Deleted.
1099         * LayoutReloaded/Utils.js:
1100         (Utils.isStaticallyPositioned):
1101
1102 2018-03-19  Chris Dumez  <cdumez@apple.com>
1103
1104         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
1105         https://bugs.webkit.org/show_bug.cgi?id=183702
1106         <rdar://problem/38566060>
1107
1108         Reviewed by Alex Christensen.
1109
1110         Add API test coverage.
1111
1112         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
1113         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
1114         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
1115         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
1116         (TEST):
1117
1118 2018-03-19  Daniel Bates  <dabates@apple.com>
1119
1120         test-webkitpy no longer runs WebKit2 tests
1121         https://bugs.webkit.org/show_bug.cgi?id=183724
1122
1123         Reviewed by Alexey Proskuryakov.
1124
1125         The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
1126
1127         * Scripts/webkitpy/test/main.py:
1128         (main):
1129
1130 2018-03-19  Daniel Bates  <dabates@apple.com>
1131
1132         Make run-webkit-app work for non-GUI apps
1133         https://bugs.webkit.org/show_bug.cgi?id=183701
1134
1135         Reviewed by Lucas Forschler.
1136
1137         Launch the app directly if it is an executable file. Otherwise, assume it is an app bundle
1138         and launch it using open(1) as we currently do.
1139
1140         Note that open(1) is meant for launching GUI apps. Standard output and standard error are
1141         not sent to the tty when using open(1) to launch a non-GUI app.
1142
1143         * Scripts/run-webkit-app: We make the assumption that 
1144         * Scripts/webkitdirs.pm:
1145             - Define and export constant DO_NOT_USE_OPEN_COMMAND.
1146
1147 2018-03-19  Daniel Bates  <dabates@apple.com>
1148
1149         run-webkit-app -g does not work
1150         https://bugs.webkit.org/show_bug.cgi?id=183699
1151
1152         Reviewed by Lucas Forschler.
1153
1154         Check for the optional command line argument -g/--guard-malloc before taking the
1155         first argument passed to be the path to the app to run.
1156
1157         * Scripts/run-webkit-app:
1158
1159 2018-03-18  Commit Queue  <commit-queue@webkit.org>
1160
1161         Unreviewed, rolling out r229689.
1162         https://bugs.webkit.org/show_bug.cgi?id=183735
1163
1164         Causes fast/loader/inner-iframe-loads-data-url-into-parent-on-
1165         unload-crash.html to fail with async delegates (Requested by
1166         cdumez_ on #webkit).
1167
1168         Reverted changeset:
1169
1170         "WebKit.WebsitePoliciesAutoplayQuirks API test times out with
1171         async policy delegates"
1172         https://bugs.webkit.org/show_bug.cgi?id=183702
1173         https://trac.webkit.org/changeset/229689
1174
1175 2018-03-18  Zalan Bujtas  <zalan@apple.com>
1176
1177         [LayoutReloaded] Remove left/right width/height getters from Layout.Box
1178         https://bugs.webkit.org/show_bug.cgi?id=183734
1179
1180         Reviewed by Antti Koivisto.
1181
1182         ...and use Display.Box instead.
1183
1184         * LayoutReloaded/DisplayTree/Box.js:
1185         (Display.Box.prototype.bottomRight):
1186         (Display.Box.prototype.size):
1187         (Display.Box.prototype.height):
1188         (Display.Box.prototype.width):
1189         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1190         (BlockFormattingContext.prototype._computeStaticPosition):
1191         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
1192         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
1193         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1194         * LayoutReloaded/FormattingContext/FloatingContext.js:
1195         (FloatingContext.prototype._positionForClear):
1196         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
1197         (FloatingContext.prototype._adjustedFloatingPosition):
1198         * LayoutReloaded/FormattingContext/FormattingContext.js:
1199         (FormattingContext.prototype.absoluteMarginBox):
1200         (FormattingContext.prototype.absoluteBorderBox):
1201         (FormattingContext.prototype.absolutePaddingBox):
1202         (FormattingContext.prototype.absoluteContentBox):
1203         (FormattingContext.prototype._toAbsolutePosition):
1204         (FormattingContext.prototype._toRootAbsolutePosition):
1205         * LayoutReloaded/LayoutTree/Box.js:
1206         (Layout.Box.prototype.rect): Deleted.
1207         (Layout.Box.prototype.topLeft): Deleted.
1208         (Layout.Box.prototype.bottomRight): Deleted.
1209         * LayoutReloaded/Utils.js:
1210         (Utils._dumpBox):
1211         (Utils.mapToContainer): Deleted.
1212
1213 2018-03-18  Zalan Bujtas  <zalan@apple.com>
1214
1215         [LayoutReloaded] Remove left/right width/height setters from Layout.Box
1216         https://bugs.webkit.org/show_bug.cgi?id=183731
1217
1218         Reviewed by Antti Koivisto.
1219
1220         ...and use Display.Box instead.
1221
1222         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1223         (BlockFormattingContext.prototype._computeStaticPosition):
1224         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1225         (BlockFormattingContext.prototype._computeFloatingWidth):
1226         (BlockFormattingContext.prototype._computeInFlowWidth):
1227         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1228         (BlockFormattingContext.prototype._computeFloatingHeight):
1229         (BlockFormattingContext.prototype._computeInFlowHeight):
1230         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
1231         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1232         * LayoutReloaded/FormattingContext/FloatingContext.js:
1233         (FloatingContext.prototype.computePosition):
1234         * LayoutReloaded/FormattingContext/FormattingContext.js:
1235         (FormattingContext.prototype._toDisplayBox):
1236         (FormattingContext.prototype._toLayoutBox):
1237         * LayoutReloaded/Layout.js:
1238         (layout):
1239         * LayoutReloaded/LayoutTree/Box.js:
1240         (Layout.Box.prototype.setTopLeft): Deleted.
1241         (Layout.Box.prototype.setSize): Deleted.
1242         (Layout.Box.prototype.setWidth): Deleted.
1243         (Layout.Box.prototype.setHeight): Deleted.
1244
1245 2018-03-18  Zalan Bujtas  <zalan@apple.com>
1246
1247         [LayoutReloaded] Collect out-of-flow positioned boxes for a given formatting context.
1248         https://bugs.webkit.org/show_bug.cgi?id=183730
1249
1250         Reviewed by Antti Koivisto.
1251
1252         Collect and layout out-of-flow positioned boxes as the final step of the formatting context layout.
1253
1254         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1255         (BlockFormattingContext.prototype.layout):
1256         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1257         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
1258         (BlockFormattingContext.prototype._placePositionedDescendants): Deleted.
1259         (BlockFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
1260         * LayoutReloaded/FormattingContext/FormattingContext.js:
1261         (FormattingContext.prototype._toAbsolutePosition):
1262         (FormattingContext.prototype._outOfFlowDescendants):
1263         (FormattingContext):
1264         * LayoutReloaded/LayoutTree/Box.js:
1265         (Layout.Box.prototype.nextInFlowOrFloatSibling):
1266         (Layout.Box.prototype.isDescendantOf):
1267         * LayoutReloaded/LayoutTree/Container.js:
1268         (Layout.Container.prototype.firstInFlowOrFloatChild):
1269         (Layout.Container.prototype.hasInFlowOrFloatChild):
1270         (Layout.Container.prototype.outOfFlowDescendants):
1271         (Layout.Container):
1272         * LayoutReloaded/Utils.js:
1273         (Utils.isDescendantOf): Deleted.
1274         (Utils.collectOutOfFlowDescendants): Deleted.
1275
1276 2018-03-17  Jiewen Tan  <jiewen_tan@apple.com>
1277
1278         [WebAuthN] Implement authenticatorMakeCredential
1279         https://bugs.webkit.org/show_bug.cgi?id=183527
1280         <rdar://problem/35275886>
1281
1282         Reviewed by Brent Fulgham.
1283
1284         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1285         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Added.
1286         (TestWebKitAPI::getTestKey):
1287         (TestWebKitAPI::cleanUpKeychain):
1288         (TestWebKitAPI::LACantEvaluatePolicySwizzler::LACantEvaluatePolicySwizzler):
1289         (TestWebKitAPI::LACantEvaluatePolicySwizzler::cantEvaluatePolicy):
1290         (TestWebKitAPI::LACanEvaluatePolicySwizzler::LACanEvaluatePolicySwizzler):
1291         (TestWebKitAPI::LACanEvaluatePolicySwizzler::canEvaluatePolicy):
1292         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::LAEvaluatePolicyFailedSwizzler):
1293         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
1294         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::LAEvaluatePolicyPassedSwizzler):
1295         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
1296         (TestWebKitAPI::TestLocalAuthenticator::setFailureFlag):
1297         (TestWebKitAPI::TEST):
1298
1299 2018-03-17  Zalan Bujtas  <zalan@apple.com>
1300
1301         [LayoutReloaded] BlockFormattingContext::placePositionedDescendants takes care of both in- and out-of-flow placement
1302         https://bugs.webkit.org/show_bug.cgi?id=183727
1303
1304         Reviewed by Antti Koivisto.
1305
1306         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1307         (BlockFormattingContext.prototype.layout):
1308         (BlockFormattingContext.prototype._placePositionedDescendants):
1309         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1310         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
1311         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
1312         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
1313         * LayoutReloaded/test/index.html:
1314         * LayoutReloaded/test/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
1315
1316 2018-03-17  Zalan Bujtas  <zalan@apple.com>
1317
1318         [LayoutReloaded] Ensure that positioning happens within the formatting context
1319         https://bugs.webkit.org/show_bug.cgi?id=183722
1320
1321         Reviewed by Antti Koivisto.
1322
1323         All sizing and positioning need to happen in the formatting context that the box lives in
1324         including the final position of in- and out-of-flow descendants.
1325
1326         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1327         (BlockFormattingContext.prototype.layout):
1328         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1329         * LayoutReloaded/LayoutTree/Box.js:
1330         (Layout.Box.prototype.establishesBlockFormattingContext):
1331         (Layout.Box.prototype.isPositioned):
1332         (Layout.Box.prototype.isRelativelyPositioned):
1333         (Layout.Box.prototype.isAbsolutelyPositioned):
1334         (Layout.Box.prototype.isOutOfFlowPositioned):
1335         (Layout.Box.prototype.containingBlock):
1336         (Layout.Box.prototype.isRelativePositioned): Deleted.
1337         (Layout.Box.prototype.isAbsolutePositioned): Deleted.
1338         * LayoutReloaded/Utils.js:
1339         (Utils.isRelativelyPositioned):
1340         (Utils.isAbsolutelyPositioned):
1341         (Utils.isRelativePositioned): Deleted.
1342         (Utils.isAbsolutePositioned): Deleted.
1343         * LayoutReloaded/misc/headers/Box.h:
1344
1345 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
1346
1347         Unreviewed, rolling out r229688.
1348
1349         There's a solution that doesn't require this SPI.
1350
1351         Reverted changeset:
1352
1353         "Add SPI to expose width and height anchors for WKWebView's
1354         content view"
1355         https://bugs.webkit.org/show_bug.cgi?id=183711
1356         https://trac.webkit.org/changeset/229688
1357
1358 2018-03-16  Zalan Bujtas  <zalan@apple.com>
1359
1360         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext
1361         https://bugs.webkit.org/show_bug.cgi?id=183719
1362
1363         Reviewed by Antti Koivisto.
1364
1365         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1366         (BlockFormattingContext):
1367         (BlockFormattingContext.prototype.layout):
1368         (BlockFormattingContext.prototype._shrinkToFitWidth):
1369         (BlockFormattingContext.prototype._toAbsolutePosition): Deleted.
1370         (BlockFormattingContext.prototype._needsLayout): Deleted.
1371         (BlockFormattingContext.prototype._addToLayoutQueue): Deleted.
1372         (BlockFormattingContext.prototype._nextInLayoutQueue): Deleted.
1373         (BlockFormattingContext.prototype._removeFromLayoutQueue): Deleted.
1374         (BlockFormattingContext.prototype._createDisplayBox): Deleted.
1375         (BlockFormattingContext.prototype._toDisplayBox): Deleted.
1376         (BlockFormattingContext.prototype._toLayoutBox): Deleted.
1377         * LayoutReloaded/FormattingContext/FormattingContext.js:
1378         (FormattingContext):
1379         (FormattingContext.prototype._toAbsolutePosition):
1380         (FormattingContext.prototype._descendantNeedsLayout):
1381         (FormattingContext.prototype._addToLayoutQueue):
1382         (FormattingContext.prototype._nextInLayoutQueue):
1383         (FormattingContext.prototype._removeFromLayoutQueue):
1384         (FormattingContext.prototype._createDisplayBox):
1385         (FormattingContext.prototype._toDisplayBox):
1386         (FormattingContext.prototype._toLayoutBox):
1387         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1388         (InlineFormattingContext.prototype.layout):
1389
1390 2018-03-16  Chris Dumez  <cdumez@apple.com>
1391
1392         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
1393         https://bugs.webkit.org/show_bug.cgi?id=183702
1394
1395         Reviewed by Alex Christensen.
1396
1397         Add API test coverage.
1398
1399         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
1400         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
1401         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
1402         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
1403         (TEST):
1404
1405 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
1406
1407         Add SPI to expose width and height anchors for WKWebView's content view
1408         https://bugs.webkit.org/show_bug.cgi?id=183711
1409         <rdar://problem/38562899>
1410
1411         Reviewed by Tim Horton.
1412
1413         Adds an API test exercising the new SPI.
1414
1415         * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
1416         (checkCGRect):
1417         (TEST):
1418
1419 2018-03-16  Chris Dumez  <cdumez@apple.com>
1420
1421         WebKit.RestoreSessionStateContainingScrollRestorationDefault API test is failing with async policy delegates
1422         https://bugs.webkit.org/show_bug.cgi?id=183679
1423
1424         Reviewed by Alex Christensen.
1425
1426         Add API test coverage.
1427
1428         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
1429         (TestWebKitAPI::decidePolicyForNavigationAction):
1430         (TestWebKitAPI::decidePolicyForResponse):
1431         (TestWebKitAPI::TEST):
1432
1433 2018-03-16  Zalan Bujtas  <zalan@apple.com>
1434
1435         [LayoutReloaded] Introduce Display.Box
1436         https://bugs.webkit.org/show_bug.cgi?id=183700
1437
1438         Reviewed by Antti Koivisto.
1439
1440         Display.Box objects will end up in the display(box) tree. Currently
1441         they are just hanging off of the Layout.Box objects.
1442
1443         * LayoutReloaded/DisplayTree/Box.js: Added.
1444         (Display.Box):
1445         (Display.Box.prototype.rect):
1446         (Display.Box.prototype.top):
1447         (Display.Box.prototype.left):
1448         (Display.Box.prototype.bottom):
1449         (Display.Box.prototype.right):
1450         (Display.Box.prototype.topLeft):
1451         (Display.Box.prototype.bottomRight):
1452         (Display.Box.prototype.setTopLeft):
1453         (Display.Box.prototype.setSize):
1454         (Display.Box.prototype.setWidth):
1455         (Display.Box.prototype.setHeight):
1456         (Display.Box.prototype.borderBox):
1457         (Display.Box.prototype.paddingBox):
1458         (Display.Box.prototype.contentBox):
1459         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1460         (BlockFormattingContext):
1461         (BlockFormattingContext.prototype.layout):
1462         (BlockFormattingContext.prototype._toAbsolutePosition):
1463         (BlockFormattingContext.prototype._needsLayout):
1464         (BlockFormattingContext.prototype._addToLayoutQueue):
1465         (BlockFormattingContext.prototype._nextInLayoutQueue):
1466         (BlockFormattingContext.prototype._removeFromLayoutQueue):
1467         (BlockFormattingContext.prototype._createDisplayBox):
1468         (BlockFormattingContext.prototype._toDisplayBox):
1469         (BlockFormattingContext.prototype._toLayoutBox):
1470         * LayoutReloaded/Layout.js:
1471         (layout):
1472         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
1473         * LayoutReloaded/LayoutTree/Box.js:
1474         (Layout.Box):
1475         (Layout.Box.prototype.setDisplayBox):
1476         (Layout.Box.prototype.displayBox):
1477         (Layout.Box.prototype.rect):
1478         (Layout.Box.prototype.setTopLeft):
1479         (Layout.Box.prototype.setSize):
1480         (Layout.Box.prototype.setWidth):
1481         (Layout.Box.prototype.setHeight):
1482         (Layout.Box.prototype.borderBox):
1483         (Layout.Box.prototype.paddingBox):
1484         (Layout.Box.prototype.contentBox):
1485         * LayoutReloaded/test/index.html:
1486
1487 2018-03-16  Chris Dumez  <cdumez@apple.com>
1488
1489         URLSchemeHandler.Basic API test fails with async policy delegates
1490         https://bugs.webkit.org/show_bug.cgi?id=183678
1491
1492         Reviewed by Alex Christensen.
1493
1494         Add API test coverage.
1495
1496         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
1497         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
1498         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
1499         (TEST):
1500
1501 2018-03-16  Zalan Bujtas  <zalan@apple.com>
1502
1503         [LayoutReloaded] Utils.computed* functions should just take node instead of box.
1504         https://bugs.webkit.org/show_bug.cgi?id=183697
1505
1506         Reviewed by Antti Koivisto.
1507
1508         This is in preparation for introducing the display tree.
1509
1510         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1511         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1512         (BlockFormattingContext.prototype._computeFloatingWidth):
1513         (BlockFormattingContext.prototype._computeInFlowWidth):
1514         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1515         (BlockFormattingContext.prototype._computeFloatingHeight):
1516         (BlockFormattingContext.prototype._computeInFlowHeight):
1517         (BlockFormattingContext.prototype._shrinkToFitWidth):
1518         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
1519         (BlockMarginCollapse._nonCollapsedMarginTop):
1520         (BlockMarginCollapse._nonCollapsedMarginBottom):
1521         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
1522         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
1523         * LayoutReloaded/FormattingContext/FormattingContext.js:
1524         (FormattingContext.prototype.marginTop):
1525         (FormattingContext.prototype.marginLeft):
1526         (FormattingContext.prototype.marginBottom):
1527         (FormattingContext.prototype.marginRight):
1528         * LayoutReloaded/LayoutTree/Box.js:
1529         (Layout.Box.prototype.paddingBox):
1530         (Layout.Box.prototype.contentBox):
1531         (Layout.Box):
1532         * LayoutReloaded/Utils.js:
1533         (Utils.computedMarginTop):
1534         (Utils.computedMarginLeft):
1535         (Utils.computedMarginBottom):
1536         (Utils.computedMarginRight):
1537         (Utils.computedBorderTopLeft):
1538         (Utils.computedBorderBottomRight):
1539         (Utils.computedPaddingTopLeft):
1540         (Utils.computedPaddingBottomRight):
1541         (Utils.computedBorderAndPaddingTop):
1542         (Utils.computedBorderAndPaddingLeft):
1543         (Utils.computedBorderAndPaddingBottom):
1544         (Utils.computedBorderAndPaddingRight):
1545         (Utils.computedHorizontalBorderAndPadding):
1546         (Utils.computedVerticalBorderAndPadding):
1547         (Utils.computedLineHeight):
1548         (Utils.hasClearLeft):
1549         (Utils.hasClearRight):
1550         (Utils.hasClearBoth):
1551
1552 2018-03-15  Zalan Bujtas  <zalan@apple.com>
1553
1554         [LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
1555         https://bugs.webkit.org/show_bug.cgi?id=183691
1556
1557         Reviewed by Antti Koivisto.
1558
1559         While laying out the boxes in a block formatting context, if we happen to need
1560         to get to the containing block of a box to compute geometry, it should always be a
1561         descendant of the root container (or the root container itself).
1562         Nothing outside of the formatting context should be able to impact the boxes inside.
1563
1564         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1565         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1566         (BlockFormattingContext.prototype._toAbsolutePosition):
1567         (BlockFormattingContext):
1568         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
1569         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
1570         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
1571         * LayoutReloaded/LayoutTree/Box.js:
1572         (Layout.Box.prototype.isRootBox):
1573         (Layout.Box.prototype.isRootElement): Deleted.
1574         * LayoutReloaded/Utils.js:
1575         (Utils.isDescendantOf):
1576         (Utils.mapStaticToAbsolute): Deleted.
1577         * LayoutReloaded/misc/headers/Box.h:
1578
1579 2018-03-15  Wenson Hsieh  <wenson_hsieh@apple.com>
1580
1581         [iOS WK2] Hit-testing fails when specifying a large top content inset
1582         https://bugs.webkit.org/show_bug.cgi?id=183648
1583         <rdar://problem/38421894>
1584
1585         Reviewed by Tim Horton.
1586
1587         Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
1588         not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
1589         as (viewHeight - inset.top) or (viewHeight - inset.bottom).
1590
1591         See WebKit ChangeLog for more details.
1592
1593         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1594         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.
1595         (TestWebKitAPI::TEST):
1596
1597 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
1598
1599         Add unit-test for NetworkTransaction URLError handling
1600         https://bugs.webkit.org/show_bug.cgi?id=183664
1601
1602         Reviewed by Alexey Proskuryakov.
1603
1604         * Scripts/webkitpy/common/net/networktransaction_unittest.py:
1605         (NetworkTransactionTest._raise_URLError): Method to raise URLError.
1606         (NetworkTransactionTest.test_retry_on_HTTPError): Renamed from test_retry.
1607         (NetworkTransactionTest.test_retry_on_URLError): unit-test for testing URLError handling.
1608
1609 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
1610
1611         EWS should print the URL in logs on URLError
1612         https://bugs.webkit.org/show_bug.cgi?id=183651
1613
1614         Reviewed by Alexey Proskuryakov.
1615
1616         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
1617         (Bugzilla.open_url): Pass the url.
1618         * Scripts/webkitpy/common/net/networktransaction.py:
1619         (NetworkTransaction.run): Accept optional url parameter and print it on URLError.
1620
1621 2018-03-15  Zalan Bujtas  <zalan@apple.com>
1622
1623         [LayoutReloaded] Introduce Layout namespace
1624         https://bugs.webkit.org/show_bug.cgi?id=183659
1625
1626         Reviewed by Antti Koivisto.
1627
1628         This is in preparation for introducing the display tree.
1629         Box -> Layout.Box
1630
1631         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1632         (BlockFormattingContext.prototype.layout):
1633         (BlockFormattingContext.prototype.computeWidth):
1634         (BlockFormattingContext.prototype.computeHeight):
1635         (BlockFormattingContext.prototype.marginTop):
1636         (BlockFormattingContext.prototype.marginBottom):
1637         (BlockFormattingContext.prototype._computeStaticPosition):
1638         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1639         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
1640         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1641         (BlockFormattingContext.prototype._computeFloatingWidth):
1642         (BlockFormattingContext.prototype._computeInFlowWidth):
1643         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1644         (BlockFormattingContext.prototype._computeFloatingHeight):
1645         (BlockFormattingContext.prototype._computeInFlowHeight):
1646         (BlockFormattingContext.prototype._horizontalConstraint):
1647         (BlockFormattingContext.prototype._contentHeight):
1648         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
1649         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
1650         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1651         (BlockFormattingContext.prototype._shrinkToFitWidth):
1652         (BlockFormattingContext):
1653         (BlockFormattingContext.prototype._computeHorizontalConstraint): Deleted.
1654         (BlockFormattingContext.prototype._computeContentHeight): Deleted.
1655         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
1656         (BlockMarginCollapse.marginTop):
1657         (BlockMarginCollapse.marginBottom):
1658         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
1659         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
1660         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
1661         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
1662         (BlockMarginCollapse._nonCollapsedMarginTop):
1663         (BlockMarginCollapse._nonCollapsedMarginBottom):
1664         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
1665         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
1666         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
1667         (BlockMarginCollapse):
1668         * LayoutReloaded/FormattingContext/FloatingContext.js:
1669         (FloatingContext.prototype.computePosition):
1670         (FloatingContext.prototype._positionForClear):
1671         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
1672         * LayoutReloaded/FormattingContext/FormattingContext.js:
1673         (FormattingContext.prototype.computeWidth):
1674         (FormattingContext.prototype.computeHeight):
1675         (FormattingContext.prototype.marginTop):
1676         (FormattingContext.prototype.marginLeft):
1677         (FormattingContext.prototype.marginBottom):
1678         (FormattingContext.prototype.marginRight):
1679         (FormattingContext.prototype.absoluteMarginBox):
1680         (FormattingContext.prototype.absoluteBorderBox):
1681         (FormattingContext.prototype.absolutePaddingBox):
1682         (FormattingContext.prototype.absoluteContentBox):
1683         (FormattingContext):
1684         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1685         (InlineFormattingContext.prototype.layout):
1686         * LayoutReloaded/LayoutTree/BlockContainer.js:
1687         (BlockContainer): Deleted.
1688         (BlockContainer.prototype.establishesInlineFormattingContext): Deleted.
1689         * LayoutReloaded/LayoutTree/Box.js:
1690         (Box): Deleted.
1691         (Box.prototype.id): Deleted.
1692         (Box.prototype.setRendererName): Deleted.
1693         (Box.prototype.name): Deleted.
1694         (Box.prototype.node): Deleted.
1695         (Box.prototype.parent): Deleted.
1696         (Box.prototype.nextSibling): Deleted.
1697         (Box.prototype.nextInFlowSibling): Deleted.
1698         (Box.prototype.previousSibling): Deleted.
1699         (Box.prototype.previousInFlowSibling): Deleted.
1700         (Box.prototype.setParent): Deleted.
1701         (Box.prototype.setNextSibling): Deleted.
1702         (Box.prototype.setPreviousSibling): Deleted.
1703         (Box.prototype.rect): Deleted.
1704         (Box.prototype.topLeft): Deleted.
1705         (Box.prototype.bottomRight): Deleted.
1706         (Box.prototype.setTopLeft): Deleted.
1707         (Box.prototype.setSize): Deleted.
1708         (Box.prototype.setWidth): Deleted.
1709         (Box.prototype.setHeight): Deleted.
1710         (Box.prototype.isContainer): Deleted.
1711         (Box.prototype.isBlockLevelBox): Deleted.
1712         (Box.prototype.isBlockContainerBox): Deleted.
1713         (Box.prototype.isInlineLevelBox): Deleted.
1714         (Box.prototype.setIsAnonymous): Deleted.
1715         (Box.prototype.isAnonymous): Deleted.
1716         (Box.prototype.establishesFormattingContext): Deleted.
1717         (Box.prototype.establishedFormattingContext): Deleted.
1718         (Box.prototype.establishesBlockFormattingContext): Deleted.
1719         (Box.prototype.establishesInlineFormattingContext): Deleted.
1720         (Box.prototype.isPositioned): Deleted.
1721         (Box.prototype.isRelativePositioned): Deleted.
1722         (Box.prototype.isAbsolutePositioned): Deleted.
1723         (Box.prototype.isFixedPositioned): Deleted.
1724         (Box.prototype.isInFlow): Deleted.
1725         (Box.prototype.isOutOfFlowPositioned): Deleted.
1726         (Box.prototype.isInFlowPositioned): Deleted.
1727         (Box.prototype.isFloatingPositioned): Deleted.
1728         (Box.prototype.isFloatingOrOutOfFlowPositioned): Deleted.
1729         (Box.prototype.isRootElement): Deleted.
1730         (Box.prototype.containingBlock): Deleted.
1731         (Box.prototype.borderBox): Deleted.
1732         (Box.prototype.paddingBox): Deleted.
1733         (Box.prototype.contentBox): Deleted.
1734         * LayoutReloaded/LayoutTree/Container.js:
1735         (Container): Deleted.
1736         (Container.prototype.isContainer): Deleted.
1737         (Container.prototype.setFirstChild): Deleted.
1738         (Container.prototype.setLastChild): Deleted.
1739         (Container.prototype.firstChild): Deleted.
1740         (Container.prototype.firstInFlowChild): Deleted.
1741         (Container.prototype.lastChild): Deleted.
1742         (Container.prototype.lastInFlowChild): Deleted.
1743         (Container.prototype.hasChild): Deleted.
1744         (Container.prototype.hasInFlowChild): Deleted.
1745         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
1746         (InitialBlockContainer): Deleted.
1747         (InitialBlockContainer.prototype.establishesBlockFormattingContext): Deleted.
1748         (InitialBlockContainer.prototype.paddingBox): Deleted.
1749         (InitialBlockContainer.prototype.contentBox): Deleted.
1750         * LayoutReloaded/LayoutTree/InlineBox.js:
1751         (InlineBox): Deleted.
1752         (InlineBox.prototype.setText): Deleted.
1753         (InlineBox.prototype.text): Deleted.
1754         * LayoutReloaded/TreeBuilder.js:
1755         (TreeBuilder.prototype.createTree):
1756         (TreeBuilder.prototype._createAndAttachBox):
1757         * LayoutReloaded/Utils.js:
1758         (Utils._dumpBox):
1759
1760 2018-03-14  Chris Fleizach  <cfleizach@apple.com>
1761
1762         AX: Implement accessible dismiss action on iOS
1763         https://bugs.webkit.org/show_bug.cgi?id=183352
1764         <rdar://problem/38161500>
1765
1766         Reviewed by Zalan Bujtas.
1767
1768         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
1769         (WTR::AccessibilityUIElement::dismiss const):
1770         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
1771         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
1772         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
1773         (WTR::AccessibilityUIElement::dismiss):
1774
1775 2018-03-14  Youenn Fablet  <youenn@apple.com>
1776
1777         Update libwebrtc up to 36af4e9614f707f733eb2340fae66d6325aaac5b
1778         https://bugs.webkit.org/show_bug.cgi?id=183481
1779
1780         Reviewed by Eric Carlson.
1781
1782         * Scripts/webkitpy/style/checker.py: Do not check style.
1783
1784 2018-03-14  Brendan McLoughlin  <brendan@bocoup.com>
1785
1786         Add label on github when exporting wpt tests to w3c/web-platform-test repo
1787         https://bugs.webkit.org/show_bug.cgi?id=183575
1788
1789         Reviewed by Youenn Fablet.
1790
1791         * Scripts/webkitpy/w3c/test_exporter.py:
1792         (TestExporter.make_pull_request):
1793         (parse_args):
1794         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
1795         (TestExporterTest.test_export):
1796
1797 2018-03-14  Zalan Bujtas  <zalan@apple.com>
1798
1799         [LayoutReloaded] Add InlineBox dump
1800         https://bugs.webkit.org/show_bug.cgi?id=183625
1801
1802         Reviewed by Antti Koivisto.
1803
1804         Right now line boxes live off of the inline formatting context but that's temporary and
1805         they will be moved over to the BoxTree.
1806
1807         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1808         (BlockFormattingContext.prototype._computeContentHeight):
1809         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1810         (InlineFormattingContext):
1811         (InlineFormattingContext.prototype.lines):
1812         (InlineFormattingContext.prototype.layout):
1813         (InlineFormattingContext.prototype._handleText):
1814         (InlineFormattingContext.prototype._commitLine):
1815         (InlineFormattingContext.prototype._initializeLine):
1816         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1817         (Line):
1818         (Line.prototype.isEmpty):
1819         (Line.prototype.rect):
1820         (Line.prototype.lineBoxes):
1821         (Line.prototype.addLineBox):
1822         (Line.prototype.appendFragment): Deleted.
1823         * LayoutReloaded/README.md:
1824         * LayoutReloaded/Utils.js:
1825         (Utils.computedLineHeight):
1826         (Utils.isBlockContainerElement):
1827         (Utils.textHeight):
1828         (Utils._dumpBox):
1829         (Utils._dumpLines.):
1830         (Utils._dumpLines):
1831         (Utils._dumpTree):
1832         (Utils.precisionRound):
1833         (Utils):
1834         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1835         * LayoutReloaded/test/index.html:
1836
1837 2018-03-14  Tim Horton  <timothy_horton@apple.com>
1838
1839         Fix the build after r229567
1840
1841         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1842
1843 2018-03-13  Jer Noble  <jer.noble@apple.com>
1844
1845         [iOS] Muted media playback can interrupt out-of-process audio
1846         https://bugs.webkit.org/show_bug.cgi?id=183606
1847         <rdar://problem/37466253>
1848
1849         Reviewed by Eric Carlson.
1850
1851         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1852         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
1853         (TestWebKitAPI::TEST):
1854         * TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.
1855
1856 2018-03-13  Ross Kirsling  <ross.kirsling@sony.com>
1857
1858         [Win] Layout Test fast/html/menuitem-element.html is failing.
1859         https://bugs.webkit.org/show_bug.cgi?id=179299
1860
1861         Reviewed by Per Arne Vollan.
1862
1863         * DumpRenderTree/win/DumpRenderTree.cpp:
1864         (setWebPreferencesForTestOptions):
1865         Recognize test option "enableMenuItemElement".
1866
1867 2018-03-12  Tim Horton  <timothy_horton@apple.com>
1868
1869         Stop using SDK conditionals to control feature definitions
1870         https://bugs.webkit.org/show_bug.cgi?id=183430
1871         <rdar://problem/38251619>
1872
1873         Reviewed by Dan Bernstein.
1874
1875         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1876         * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
1877
1878 2018-03-12  Ross Kirsling  <ross.kirsling@sony.com>
1879
1880         [DRT] TestOptions should not be ObjC.
1881         https://bugs.webkit.org/show_bug.cgi?id=183487
1882
1883         Reviewed by Per Arne Vollan.
1884
1885         * DumpRenderTree/CMakeLists.txt:
1886         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
1887         * DumpRenderTree/PlatformMac.cmake:
1888         Move TestOptions to platform-agnostic sources.
1889
1890         * DumpRenderTree/TestOptions.h:
1891         * DumpRenderTree/TestOptions.cpp: Renamed from Tools/DumpRenderTree/TestOptions.mm.
1892         * DumpRenderTree/mac/DumpRenderTree.mm:
1893         Remove NSURL dependency and align with WTR as much as possible.
1894
1895         * DumpRenderTree/win/DumpRenderTree.cpp:
1896         Consume TestOptions (recognizing just the ones that have WebPreferences defined for now).
1897
1898 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
1899
1900         Runtime flag for link prefetch and remove link subresource.
1901         https://bugs.webkit.org/show_bug.cgi?id=183540
1902
1903         Reviewed by Chris Dumez.
1904
1905         Remove the LINK_PREFETCH build time flag.
1906
1907         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1908
1909 2018-03-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1910
1911         REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
1912         https://bugs.webkit.org/show_bug.cgi?id=183549
1913         <rdar://problem/34960698>
1914
1915         Reviewed by Andy Estes.
1916
1917         Add TestWebKitAPI support for testing WKWebViews embedded within presented view controllers, and use this to
1918         check that dismissing an action sheet does not additionally cause the view controller being used to present the
1919         web view to also dismiss.
1920
1921         * TestWebKitAPI/ClassMethodSwizzler.h: Added.
1922         * TestWebKitAPI/ClassMethodSwizzler.mm: Added.
1923         (TestWebKitAPI::ClassMethodSwizzler::ClassMethodSwizzler):
1924         (TestWebKitAPI::ClassMethodSwizzler::~ClassMethodSwizzler):
1925
1926         Add ClassMethodSwizzler, an RAII which swizzles an Objective-C class method over its lifetime.
1927
1928         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1929         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
1930
1931         Add a new API test that loads a view controller which embeds a WKWebView, and verifies that presenting and then
1932         dismissing an action sheet from that web view does not cause the view controller to also dismiss.
1933
1934         (TestWebKitAPI::setOverrideViewControllerForFullscreenPresentation):
1935         (TestWebKitAPI::overrideViewControllerForFullscreenPresentation):
1936
1937         Mock +[UIViewController _viewControllerForFullScreenPresentationFromView:] to return the web view. This works
1938         around the fact that TestWebKitAPI is not a UI application, so certain pieces of UIKit API and SPI need to be
1939         stubbed or mocked to simulate being a UI application. We can remove these workarounds once
1940         https://webkit.org/b/175204 is addressed, and TestWebKitAPI becomes a UI application that can actually maintain
1941         a root view controller and key window.
1942
1943         (TestWebKitAPI::TEST):
1944         * TestWebKitAPI/cocoa/TestWKWebView.h:
1945         * TestWebKitAPI/cocoa/TestWKWebView.mm:
1946         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
1947
1948         Add a new initializer for TestWKWebView that doesn't force the view to be hosted within a UIWindow. This is used
1949         by TestWKWebViewController to create a TestWKWebView in -loadView.
1950
1951         * TestWebKitAPI/ios/TestWKWebViewController.h: Added.
1952         * TestWebKitAPI/ios/TestWKWebViewController.mm: Added.
1953         (-[TestWKWebViewControllerWindow _beginKeyWindowDeferral]):
1954         (-[TestWKWebViewControllerWindow _endKeyWindowDeferral]):
1955
1956         Stub out these methods to prevent UIKit from hitting assertions when making this UIWindow the key window. This
1957         can also be removed once TestWebKitAPI is a UI application.
1958
1959         (-[TestWKWebViewController initWithFrame:configuration:]):
1960         (-[TestWKWebViewController loadView]):
1961         (-[TestWKWebViewController webView]):
1962         (-[TestWKWebViewController dismissViewControllerAnimated:completion:]):
1963         (-[TestWKWebViewController dismissalHandler]):
1964         (-[TestWKWebViewController setDismissalHandler:]):
1965
1966         Add a UIViewController helper subclass whose -view is a WKWebView. The new API test presents this view
1967         controller. Tests may also provide a dismissalHandler, which is invoked when the view controller is being
1968         dismissed. The new API test uses this hook to verify that the view controller containing the web view isn't also
1969         dismissed after the action sheet goes away.
1970
1971         * TestWebKitAPI/ios/UIKitSPI.h:
1972
1973 2018-03-12  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1974
1975         [webkitpy] Remove openssl command dependency.
1976         https://bugs.webkit.org/show_bug.cgi?id=183494
1977
1978         Reviewed by Ryosuke Niwa.
1979
1980         Added Python implementation of PEM file perser and switched to use that
1981         from external `openssl` command.
1982
1983         * Scripts/webkitpy/common/system/pemfile.py: Added.
1984         (load):
1985         (BadFormatError):
1986         (Pem):
1987         (Pem.__init__):
1988         (Pem.get):
1989         (Pem.get_all):
1990         (Pem.certificate):
1991         (Pem.private_key):
1992         (Pem.csr):
1993         (Pem.certificate_request):
1994         (Pem.certificate_signing_request):
1995         (_parse_pem_format):
1996         (_parse_pem_format.find_begin):
1997         (_parse_pem_format.find_end):
1998         (_parse_pem_format.sections):
1999         * Scripts/webkitpy/common/system/pemfile_unittest.py: Added.
2000         (PemFileTest):
2001         (PemFileTest.test_parse):
2002         (PemFileTest.test_parse_bad_format):
2003         * Scripts/webkitpy/port/base.py:
2004         (Port.start_websocket_server):
2005         (Port._extract_certificate_from_pem): Deleted.
2006         (Port._extract_private_key_from_pem): Deleted.
2007
2008 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
2009
2010         Remove GridLayout runtime flag
2011         https://bugs.webkit.org/show_bug.cgi?id=183484
2012
2013         Reviewed by Myles C. Maxfield.
2014
2015         The Grid Layout feature has been enabled by default for almost a
2016         year, so I think it's time to remove the runtime flag and the
2017         codepath run when the feature is disabled.
2018
2019         * DumpRenderTree/mac/DumpRenderTree.mm:
2020         (enableExperimentalFeatures):
2021
2022 2018-03-12  Antoine Quint  <graouts@apple.com>
2023
2024         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
2025         https://bugs.webkit.org/show_bug.cgi?id=183504
2026         <rdar://problem/38372965>
2027
2028         Reviewed by Jon Lee.
2029
2030         Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
2031         as Web Animations runtime flag in the new tests we've created for this feature.
2032
2033         * DumpRenderTree/TestOptions.h:
2034         * DumpRenderTree/TestOptions.mm:
2035         (TestOptions::TestOptions):
2036         * DumpRenderTree/mac/DumpRenderTree.mm:
2037         (setWebPreferencesForTestOptions):
2038         * WebKitTestRunner/TestController.cpp:
2039         (WTR::TestController::resetPreferencesToConsistentValues):
2040         (WTR::updateTestOptionsFromTestHeader):
2041         * WebKitTestRunner/TestOptions.h:
2042         (WTR::TestOptions::hasSameInitializationOptions const):
2043
2044 2018-03-11  Zalan Bujtas  <zalan@apple.com>
2045
2046         [LayoutReloaded] Add Line class for InlineFormattingContext -and move files around.
2047         https://bugs.webkit.org/show_bug.cgi?id=183551
2048
2049         Reviewed by Wenson Hsieh.
2050
2051         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: Renamed from Tools/LayoutReloaded/BlockFormattingContext.js.
2052         (BlockFormattingContext):
2053         (BlockFormattingContext.prototype.layout):
2054         (BlockFormattingContext.prototype.computeWidth):
2055         (BlockFormattingContext.prototype.computeHeight):
2056         (BlockFormattingContext.prototype.marginTop):
2057         (BlockFormattingContext.prototype.marginBottom):
2058         (BlockFormattingContext.prototype._computeStaticPosition):
2059         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
2060         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
2061         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
2062         (BlockFormattingContext.prototype._computeFloatingWidth):
2063         (BlockFormattingContext.prototype._computeInFlowWidth):
2064         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
2065         (BlockFormattingContext.prototype._computeFloatingHeight):
2066         (BlockFormattingContext.prototype._computeInFlowHeight):
2067         (BlockFormattingContext.prototype._computeHorizontalConstraint):
2068         (BlockFormattingContext.prototype._computeContentHeight):
2069         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
2070         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2071         (BlockFormattingContext.prototype._shrinkToFitWidth):
2072         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: Renamed from Tools/LayoutReloaded/BlockMarginCollapse.js.
2073         (BlockMarginCollapse.marginTop):
2074         (BlockMarginCollapse.marginBottom):
2075         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
2076         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
2077         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
2078         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
2079         (BlockMarginCollapse._nonCollapsedMarginTop):
2080         (BlockMarginCollapse._nonCollapsedMarginBottom):
2081         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
2082         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
2083         (BlockMarginCollapse._marginValue):
2084         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
2085         (BlockMarginCollapse):
2086         * LayoutReloaded/FormattingContext/FloatingContext.js: Renamed from Tools/LayoutReloaded/FloatingContext.js.
2087         (FloatingContext):
2088         (FloatingContext.prototype.computePosition):
2089         (FloatingContext.prototype.bottom):
2090         (FloatingContext.prototype._positionForFloating):
2091         (FloatingContext.prototype._positionForClear):
2092         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
2093         (FloatingContext.prototype._addFloating):
2094         (FloatingContext.prototype._findInnerMostLeftAndRight):
2095         (FloatingContext.prototype._moveToNextVerticalPosition):
2096         (FloatingContext.prototype._availableSpace):
2097         (FloatingContext.prototype._findFloatingAtVerticalPosition):
2098         (FloatingContext.prototype._isEmpty):
2099         (FloatingContext.prototype._adjustedFloatingPosition):
2100         (FloatingContext.prototype._bottom):
2101         (FloatingContext.prototype._formattingContext):
2102         * LayoutReloaded/FormattingContext/FormattingContext.js: Renamed from Tools/LayoutReloaded/FormattingContext.js.
2103         (FormattingContext):
2104         (FormattingContext.prototype.rootContainer):
2105         (FormattingContext.prototype.floatingContext):
2106         (FormattingContext.prototype.layout):
2107         (FormattingContext.prototype.computeWidth):
2108         (FormattingContext.prototype.computeHeight):
2109         (FormattingContext.prototype.marginTop):
2110         (FormattingContext.prototype.marginLeft):
2111         (FormattingContext.prototype.marginBottom):
2112         (FormattingContext.prototype.marginRight):
2113         (FormattingContext.prototype.absoluteMarginBox):
2114         (FormattingContext.prototype.absoluteBorderBox):
2115         (FormattingContext.prototype.absolutePaddingBox):
2116         (FormattingContext.prototype.absoluteContentBox):
2117         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: Renamed from Tools/LayoutReloaded/InlineFormattingContext.js.
2118         (InlineFormattingContext):
2119         (InlineFormattingContext.prototype.layout):
2120         (InlineFormattingContext.prototype._handleInlineBox):
2121         (InlineFormattingContext.prototype._handleText):
2122         (InlineFormattingContext.prototype._commitLine):
2123         (InlineFormattingContext.prototype._line):
2124         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js: Copied from Tools/LayoutReloaded/InitialBlockContainer.js.
2125         (Line):
2126         (Line.prototype.isEmpty):
2127         (Line.prototype.availableWidth):
2128         (Line.prototype.appendFragment):
2129         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
2130         * LayoutReloaded/LayoutTree/BlockContainer.js: Renamed from Tools/LayoutReloaded/BlockContainer.js.
2131         (BlockContainer):
2132         (BlockContainer.prototype.establishesInlineFormattingContext):
2133         * LayoutReloaded/LayoutTree/Box.js: Renamed from Tools/LayoutReloaded/Box.js.
2134         (Box):
2135         (Box.prototype.id):
2136         (Box.prototype.setRendererName):
2137         (Box.prototype.name):
2138         (Box.prototype.node):
2139         (Box.prototype.parent):
2140         (Box.prototype.nextSibling):
2141         (Box.prototype.nextInFlowSibling):
2142         (Box.prototype.previousSibling):
2143         (Box.prototype.previousInFlowSibling):
2144         (Box.prototype.setParent):
2145         (Box.prototype.setNextSibling):
2146         (Box.prototype.setPreviousSibling):
2147         (Box.prototype.rect):
2148         (Box.prototype.topLeft):
2149         (Box.prototype.bottomRight):
2150         (Box.prototype.setTopLeft):
2151         (Box.prototype.setSize):
2152         (Box.prototype.setWidth):
2153         (Box.prototype.setHeight):
2154         (Box.prototype.isContainer):
2155         (Box.prototype.isBlockLevelBox):
2156         (Box.prototype.isBlockContainerBox):
2157         (Box.prototype.isInlineLevelBox):
2158         (Box.prototype.setIsAnonymous):
2159         (Box.prototype.isAnonymous):
2160         (Box.prototype.establishesFormattingContext):
2161         (Box.prototype.establishedFormattingContext):
2162         (Box.prototype.establishesBlockFormattingContext):
2163         (Box.prototype.establishesInlineFormattingContext):
2164         (Box.prototype.isPositioned):
2165         (Box.prototype.isRelativePositioned):
2166         (Box.prototype.isAbsolutePositioned):
2167         (Box.prototype.isFixedPositioned):
2168         (Box.prototype.isInFlow):
2169         (Box.prototype.isOutOfFlowPositioned):
2170         (Box.prototype.isInFlowPositioned):
2171         (Box.prototype.isFloatingPositioned):
2172         (Box.prototype.isFloatingOrOutOfFlowPositioned):
2173         (Box.prototype.isRootElement):
2174         (Box.prototype.containingBlock):
2175         (Box.prototype.borderBox):
2176         (Box.prototype.paddingBox):
2177         (Box.prototype.contentBox):
2178         * LayoutReloaded/LayoutTree/Container.js: Renamed from Tools/LayoutReloaded/Container.js.
2179         (Container):
2180         (Container.prototype.isContainer):
2181         (Container.prototype.setFirstChild):
2182         (Container.prototype.setLastChild):
2183         (Container.prototype.firstChild):
2184         (Container.prototype.firstInFlowChild):
2185         (Container.prototype.lastChild):
2186         (Container.prototype.lastInFlowChild):
2187         (Container.prototype.hasChild):
2188         (Container.prototype.hasInFlowChild):
2189         * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Renamed from Tools/LayoutReloaded/InitialBlockContainer.js.
2190         (InitialBlockContainer):
2191         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
2192         (InitialBlockContainer.prototype.paddingBox):
2193         (InitialBlockContainer.prototype.contentBox):
2194         * LayoutReloaded/LayoutTree/InlineBox.js: Renamed from Tools/LayoutReloaded/InlineBox.js.
2195         (InlineBox):
2196         (InlineBox.prototype.setText):
2197         (InlineBox.prototype.text):
2198         * LayoutReloaded/LayoutTree/Text.js: Renamed from Tools/LayoutReloaded/Text.js.
2199         (Text):
2200         (Text.prototype.node):
2201         (Text.prototype.content):
2202         (Text.prototype.length):
2203         * LayoutReloaded/Utils.js:
2204         (Utils.nextBreakingOpportunity):
2205         (Utils.measureText):
2206         * LayoutReloaded/misc/headers/Line.h: Copied from Tools/LayoutReloaded/misc/headers/Text.h.
2207         * LayoutReloaded/misc/headers/Text.h:
2208         * LayoutReloaded/test/border-simple.html:
2209         * LayoutReloaded/test/index.html:
2210
2211 2018-03-10  Wenson Hsieh  <wenson_hsieh@apple.com>
2212
2213         [macOS] Copying a table from the Numbers app and pasting into iCloud Numbers fails
2214         https://bugs.webkit.org/show_bug.cgi?id=183485
2215         <rdar://problem/38041984>
2216
2217         Reviewed by Ryosuke Niwa.
2218
2219         Add new API tests to cover scenarios in which we paste image data alongside text data.
2220
2221         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
2222         (TestWebKitAPI::TEST):
2223         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
2224         (TestWebKitAPI::TEST):
2225
2226 2018-03-09  Zalan Bujtas  <zalan@apple.com>
2227
2228         [LayoutReloaded] Initial commit -block formatting context.
2229         https://bugs.webkit.org/show_bug.cgi?id=183462
2230
2231         Reviewed by Antti Koivisto.
2232
2233         See README.md
2234
2235         * LayoutReloaded/BlockContainer.js: Added.
2236         (BlockContainer):
2237         (BlockContainer.prototype.establishesInlineFormattingContext):
2238         * LayoutReloaded/BlockFormattingContext.js: Added.
2239         (BlockFormattingContext):
2240         (BlockFormattingContext.prototype.layout):
2241         (BlockFormattingContext.prototype.computeWidth):
2242         (BlockFormattingContext.prototype.computeHeight):
2243         (BlockFormattingContext.prototype.marginTop):
2244         (BlockFormattingContext.prototype.marginBottom):
2245         (BlockFormattingContext.prototype._computeStaticPosition):
2246         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
2247         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
2248         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
2249         (BlockFormattingContext.prototype._computeFloatingWidth):
2250         (BlockFormattingContext.prototype._computeInFlowWidth):
2251         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
2252         (BlockFormattingContext.prototype._computeFloatingHeight):
2253         (BlockFormattingContext.prototype._computeInFlowHeight):
2254         (BlockFormattingContext.prototype._computeHorizontalConstraint):
2255         (BlockFormattingContext.prototype._computeContentHeight):
2256         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
2257         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2258         (BlockFormattingContext.prototype._shrinkToFitWidth):
2259         * LayoutReloaded/BlockMarginCollapse.js: Added.
2260         (BlockMarginCollapse.marginTop):
2261         (BlockMarginCollapse.marginBottom):
2262         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
2263         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
2264         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
2265         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
2266         (BlockMarginCollapse._nonCollapsedMarginTop):
2267         (BlockMarginCollapse._nonCollapsedMarginBottom):
2268         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
2269         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
2270         (BlockMarginCollapse._marginValue):
2271         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
2272         (BlockMarginCollapse):
2273         * LayoutReloaded/Box.js: Added.
2274         (Box):
2275         (Box.prototype.id):
2276         (Box.prototype.setRendererName):
2277         (Box.prototype.name):
2278         (Box.prototype.node):
2279         (Box.prototype.parent):
2280         (Box.prototype.nextSibling):
2281         (Box.prototype.nextInFlowSibling):
2282         (Box.prototype.previousSibling):
2283         (Box.prototype.previousInFlowSibling):
2284         (Box.prototype.setParent):
2285         (Box.prototype.setNextSibling):
2286         (Box.prototype.setPreviousSibling):
2287         (Box.prototype.rect):
2288         (Box.prototype.topLeft):
2289         (Box.prototype.bottomRight):
2290         (Box.prototype.setTopLeft):
2291         (Box.prototype.setSize):
2292         (Box.prototype.setWidth):
2293         (Box.prototype.setHeight):
2294         (Box.prototype.isContainer):
2295         (Box.prototype.isBlockLevelBox):
2296         (Box.prototype.isBlockContainerBox):
2297         (Box.prototype.isInlineLevelBox):
2298         (Box.prototype.setIsAnonymous):
2299         (Box.prototype.isAnonymous):
2300         (Box.prototype.establishesFormattingContext):
2301         (Box.prototype.establishedFormattingContext):
2302         (Box.prototype.establishesBlockFormattingContext):
2303         (Box.prototype.establishesInlineFormattingContext):
2304         (Box.prototype.isPositioned):
2305         (Box.prototype.isRelativePositioned):
2306         (Box.prototype.isAbsolutePositioned):
2307         (Box.prototype.isFixedPositioned):
2308         (Box.prototype.isInFlow):
2309         (Box.prototype.isOutOfFlowPositioned):
2310         (Box.prototype.isInFlowPositioned):
2311         (Box.prototype.isFloatingPositioned):
2312         (Box.prototype.isFloatingOrOutOfFlowPositioned):
2313         (Box.prototype.isRootElement):
2314         (Box.prototype.containingBlock):
2315         (Box.prototype.borderBox):
2316         (Box.prototype.paddingBox):
2317         (Box.prototype.contentBox):
2318         * LayoutReloaded/Container.js: Added.
2319         (Container):
2320         (Container.prototype.isContainer):
2321         (Container.prototype.setFirstChild):
2322         (Container.prototype.setLastChild):
2323         (Container.prototype.firstChild):
2324         (Container.prototype.firstInFlowChild):
2325         (Container.prototype.lastChild):
2326         (Container.prototype.lastInFlowChild):
2327         (Container.prototype.hasChild):
2328         (Container.prototype.hasInFlowChild):
2329         * LayoutReloaded/FloatingContext.js: Added.
2330         (FloatingContext):
2331         (FloatingContext.prototype.computePosition):
2332         (FloatingContext.prototype.bottom):
2333         (FloatingContext.prototype._positionForFloating):
2334         (FloatingContext.prototype._positionForClear):
2335         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
2336         (FloatingContext.prototype._addFloating):
2337         (FloatingContext.prototype._findInnerMostLeftAndRight):
2338         (FloatingContext.prototype._moveToNextVerticalPosition):
2339         (FloatingContext.prototype._availableSpace):
2340         (FloatingContext.prototype._findFloatingAtVerticalPosition):
2341         (FloatingContext.prototype._isEmpty):
2342         (FloatingContext.prototype._adjustedFloatingPosition):
2343         (FloatingContext.prototype._bottom):
2344         (FloatingContext.prototype._formattingContext):
2345         * LayoutReloaded/FormattingContext.js: Added.
2346         (FormattingContext):
2347         (FormattingContext.prototype.rootContainer):
2348         (FormattingContext.prototype.floatingContext):
2349         (FormattingContext.prototype.layout):
2350         (FormattingContext.prototype.computeWidth):
2351         (FormattingContext.prototype.computeHeight):
2352         (FormattingContext.prototype.marginTop):
2353         (FormattingContext.prototype.marginLeft):
2354         (FormattingContext.prototype.marginBottom):
2355         (FormattingContext.prototype.marginRight):
2356         (FormattingContext.prototype.absoluteMarginBox):
2357         (FormattingContext.prototype.absoluteBorderBox):
2358         (FormattingContext.prototype.absolutePaddingBox):
2359         (FormattingContext.prototype.absoluteContentBox):
2360         * LayoutReloaded/InitialBlockContainer.js: Added.
2361         (InitialBlockContainer):
2362         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
2363         (InitialBlockContainer.prototype.paddingBox):
2364         (InitialBlockContainer.prototype.contentBox):
2365         * LayoutReloaded/InlineBox.js: Added.
2366         (InlineBox):
2367         (InlineBox.prototype.setText):
2368         (InlineBox.prototype.text):
2369         * LayoutReloaded/InlineFormattingContext.js: Added.
2370         (InlineFormattingContext):
2371         (InlineFormattingContext.prototype.layout):
2372         (InlineFormattingContext.prototype._handleInlineBox):
2373         (InlineFormattingContext.prototype._handleText):
2374         * LayoutReloaded/Layout.js: Added.
2375         (layout):
2376         * LayoutReloaded/LayoutContext.js: Added.
2377         (LayoutContext):
2378         (LayoutContext.prototype.layoutFormattingContext):
2379         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata: Added.
2380         * LayoutReloaded/LayoutReloaded.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: Added.
2381         * LayoutReloaded/README.md: Added.
2382         * LayoutReloaded/Text.js: Added.
2383         (Text):
2384         * LayoutReloaded/TreeBuilder.js: Added.
2385         (TreeBuilder.prototype.createTree):
2386         (TreeBuilder.prototype._createAndAttachBox):
2387         (TreeBuilder.prototype._appendChild):
2388         (TreeBuilder.prototype._findBox):
2389         (TreeBuilder.prototype._findNode):
2390         (TreeBuilder):
2391         * LayoutReloaded/Utils.js: Added.
2392         (LayoutPoint):
2393         (LayoutPoint.prototype.setLeft):
2394         (LayoutPoint.prototype.setTop):
2395         (LayoutPoint.prototype.left):
2396         (LayoutPoint.prototype.top):
2397         (LayoutPoint.prototype.shiftLeft):
2398         (LayoutPoint.prototype.shiftTop):
2399         (LayoutPoint.prototype.moveBy):
2400         (LayoutPoint.prototype.equal):
2401         (LayoutPoint.prototype.clone):
2402         (LayoutSize):
2403         (LayoutSize.prototype.setWidth):
2404         (LayoutSize.prototype.setHeight):
2405         (LayoutSize.prototype.width):
2406         (LayoutSize.prototype.height):
2407         (LayoutSize.prototype.growBy):
2408         (LayoutSize.prototype.shrinkBy):
2409         (LayoutSize.prototype.isEmpty):
2410         (LayoutSize.prototype.equal):
2411         (LayoutSize.prototype.clone):
2412         (LayoutRect):
2413         (LayoutRect.prototype.setTop):
2414         (LayoutRect.prototype.setLeft):
2415         (LayoutRect.prototype.setBottom):
2416         (LayoutRect.prototype.setRight):
2417         (LayoutRect.prototype.left):
2418         (LayoutRect.prototype.top):
2419         (LayoutRect.prototype.bottom):
2420         (LayoutRect.prototype.right):
2421         (LayoutRect.prototype.setTopLeft):
2422         (LayoutRect.prototype.topLeft):
2423         (LayoutRect.prototype.topRight):
2424         (LayoutRect.prototype.bottomRight):
2425         (LayoutRect.prototype.setWidth):
2426         (LayoutRect.prototype.setHeight):
2427         (LayoutRect.prototype.setSize):
2428         (LayoutRect.prototype.size):
2429         (LayoutRect.prototype.width):
2430         (LayoutRect.prototype.height):
2431         (LayoutRect.prototype.growBy):
2432         (LayoutRect.prototype.shrinkBy):
2433         (LayoutRect.prototype.moveBy):
2434         (LayoutRect.prototype.isEmpty):
2435         (LayoutRect.prototype.equal):
2436         (LayoutRect.prototype.intersects):
2437         (LayoutRect.prototype.contains):
2438         (LayoutRect.prototype.clone):
2439         (ASSERT_NOT_REACHED):
2440         (ASSERT):
2441         (Utils.computedValue):
2442         (Utils.propertyIsAuto):
2443         (Utils.isWidthAuto):
2444         (Utils.isHeightAuto):
2445         (Utils.isTopAuto):
2446         (Utils.isLeftAuto):
2447         (Utils.isBottomAuto):
2448         (Utils.isRightAuto):
2449         (Utils.width):
2450         (Utils.height):
2451         (Utils.top):
2452         (Utils.bottom):
2453         (Utils.left):
2454         (Utils.right):
2455         (Utils.hasBorderTop):
2456         (Utils.hasBorderBottom):
2457         (Utils.hasPaddingTop):
2458         (Utils.hasPaddingBottom):
2459         (Utils.computedMarginTop):
2460         (Utils.computedMarginLeft):
2461         (Utils.computedMarginBottom):
2462         (Utils.computedMarginRight):
2463         (Utils.computedBorderTopLeft):
2464         (Utils.computedBorderBottomRight):
2465         (Utils.computedPaddingTopLeft):
2466         (Utils.computedPaddingBottomRight):
2467         (Utils.computedBorderAndPaddingTop):
2468         (Utils.computedBorderAndPaddingLeft):
2469         (Utils.computedBorderAndPaddingBottom):
2470         (Utils.computedBorderAndPaddingRight):
2471         (Utils.computedHorizontalBorderAndPadding):
2472         (Utils.computedVerticalBorderAndPadding):
2473         (Utils.hasClear):
2474         (Utils.hasClearLeft):
2475         (Utils.hasClearRight):
2476         (Utils.hasClearBoth):
2477         (Utils.isBlockLevelElement):
2478         (Utils.isBlockContainerElement):
2479         (Utils.isInlineLevelElement):
2480         (Utils.isTableElement):
2481         (Utils.isRelativePositioned):
2482         (Utils.isAbsolutePositioned):
2483         (Utils.isFixedPositioned):
2484         (Utils.isOverflowVisible):
2485         (Utils.isFloatingPositioned):
2486         (Utils.isFloatingLeft):
2487         (Utils.mapToContainer):
2488         (Utils.mapStaticToAbsolute):
2489         (Utils.collectOutOfFlowDescendants):
2490         (Utils.nextBreakingOpportunity):
2491         (Utils.measureText):
2492         (Utils.layoutTreeDump):
2493         (Utils._dumpBox):
2494         (Utils._dumpTree):
2495         (Utils):
2496         * LayoutReloaded/misc/LayoutReloadedWebKit.patch: Added.
2497         * LayoutReloaded/misc/headers/BlockContainer.h: Added.
2498         * LayoutReloaded/misc/headers/BlockFormattingContext.h: Added.
2499         * LayoutReloaded/misc/headers/BlockMarginCollapse.h: Added.
2500         * LayoutReloaded/misc/headers/Box.h: Added.
2501         * LayoutReloaded/misc/headers/Container.h: Added.
2502         * LayoutReloaded/misc/headers/FloatingContext.h: Added.
2503         * LayoutReloaded/misc/headers/FormattingContext.h: Added.
2504         * LayoutReloaded/misc/headers/InitialBlockContainer.h: Added.
2505         * LayoutReloaded/misc/headers/InlineBox.h: Added.
2506         * LayoutReloaded/misc/headers/LayoutContext.h: Added.
2507         * LayoutReloaded/misc/headers/Text.h: Added.
2508         * LayoutReloaded/test/TestHarness.js: Added.
2509         (verifyLayoutTreeDump):
2510         (runLayout):
2511         * LayoutReloaded/test/absolute-auto-with-sibling-margin-bottom.html: Added.
2512         * LayoutReloaded/test/absolute-bottom.html: Added.
2513         * LayoutReloaded/test/absolute-height-stretch.html: Added.
2514         * LayoutReloaded/test/absolute-left-auto.html: Added.
2515         * LayoutReloaded/test/absolute-left-right-top-bottom-auto.html: Added.
2516         * LayoutReloaded/test/absolute-nested.html: Added.
2517         * LayoutReloaded/test/absolute-nested2.html: Added.
2518         * LayoutReloaded/test/absolute-simple.html: Added.
2519         * LayoutReloaded/test/absolute-width-shrink-to-fit.html: Added.
2520         * LayoutReloaded/test/absolute-width-stretch.html: Added.
2521         * LayoutReloaded/test/absolute-with-inline-preferred-width.html: Added.
2522         * LayoutReloaded/test/absolute-with-static-block-position-nested.html: Added.
2523         * LayoutReloaded/test/almost-intruding-left-float-simple.html: Added.
2524         * LayoutReloaded/test/border-simple.html: Added.
2525         * LayoutReloaded/test/fixed-nested.html: Added.
2526         * LayoutReloaded/test/float-left-when-container-has-padding-margin.html: Added.
2527         * LayoutReloaded/test/floating-box-clear-both-simple.html: Added.
2528         * LayoutReloaded/test/floating-box-clear-right-simple.html: Added.
2529         * LayoutReloaded/test/floating-box-left-and-right-multiple-with-top-offset.html: Added.
2530         * LayoutReloaded/test/floating-box-left-and-right-multiple.html: Added.
2531         * LayoutReloaded/test/floating-box-right-simple.html: Added.
2532         * LayoutReloaded/test/floating-box-with-clear-siblings.html: Added.
2533         * LayoutReloaded/test/floating-box-with-clear-simple.html: Added.
2534         * LayoutReloaded/test/floating-box-with-new-formatting-context.html: Added.
2535         * LayoutReloaded/test/floating-box-with-relative-positioned-sibling.html: Added.
2536         * LayoutReloaded/test/floating-left-right-simple.html: Added.
2537         * LayoutReloaded/test/floating-left-right-with-all-margins.html: Added.
2538         * LayoutReloaded/test/floating-lefts-and-rights-simple.html: Added.
2539         * LayoutReloaded/test/floating-multiple-lefts-in-body.html: Added.
2540         * LayoutReloaded/test/floating-multiple-lefts-multiple-lines.html: Added.
2541         * LayoutReloaded/test/floating-multiple-lefts.html: Added.
2542         * LayoutReloaded/test/floating-sizing.html: Added.
2543         * LayoutReloaded/test/floating-sizing2.html: Added.
2544         * LayoutReloaded/test/floating-sizing3.html: Added.
2545         * LayoutReloaded/test/floating-with-new-block-formatting-context.html: Added.
2546         * LayoutReloaded/test/index.html: Added.
2547         * LayoutReloaded/test/inline-content-simple.html: Added.
2548         * LayoutReloaded/test/intruding-left-float-simple.html: Added.
2549         * LayoutReloaded/test/margin-collapse-bottom-bottom.html: Added.
2550         * LayoutReloaded/test/margin-collapse-bottom-nested.html: Added.
2551         * LayoutReloaded/test/margin-collapse-first-last-are-floating.html: Added.
2552         * LayoutReloaded/test/margin-collapse-simple.html: Added.
2553         * LayoutReloaded/test/margin-collapse-top-nested.html: Added.
2554         * LayoutReloaded/test/margin-collapse-when-child-has-padding-border.html: Added.
2555         * LayoutReloaded/test/margin-collapse-with-block-formatting-context.html: Added.
2556         * LayoutReloaded/test/margin-collapse-with-block-formatting-context2.html: Added.
2557         * LayoutReloaded/test/margin-left-right-sizing-out-of-flow.html: Added.
2558         * LayoutReloaded/test/margin-left-right-sizing.html: Added.
2559         * LayoutReloaded/test/margin-propagation-simple-content-height.html: Added.
2560         * LayoutReloaded/test/margin-sibling-collapse-propagated.html: Added.
2561         * LayoutReloaded/test/margin-simple.html: Added.
2562         * LayoutReloaded/test/negative-margin-simple.html: Added.
2563         * LayoutReloaded/test/padding-nested.html: Added.
2564         * LayoutReloaded/test/padding-simple.html: Added.
2565         * LayoutReloaded/test/relative-auto-with-parent-offset.html: Added.
2566         * LayoutReloaded/test/relative-auto.html: Added.
2567         * LayoutReloaded/test/relative-bottom.html: Added.
2568         * LayoutReloaded/test/relative-right.html: Added.
2569         * LayoutReloaded/test/relative-siblings.html: Added.
2570         * LayoutReloaded/test/relative-simple.html: Added.
2571
2572 2018-03-09  Stephan Szabo  <stephan.szabo@sony.com>
2573
2574         WebKitTestRunner: Do not build accessibility files/idl when !HAVE(ACCESSIBILITY)
2575         https://bugs.webkit.org/show_bug.cgi?id=183516
2576
2577         Reviewed by Alex Christensen.
2578
2579         * WebKitTestRunner/CMakeLists.txt:
2580
2581 2018-03-09  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2582
2583         [webkitpy, WinCairo] Launch Apache HTTPD for HTTP Tests.
2584         https://bugs.webkit.org/show_bug.cgi?id=183265
2585
2586         Reviewed by Daniel Bates.
2587
2588         Launch apache httpd server from python script for WinCairo HTTP LayoutTests. By now, AppleWin uses
2589         Cygwin to launch httpd server. This patch enables native Windows to run HTTP LayoutTests by starting
2590         and stopping httpd server from the script.
2591
2592         * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
2593         (LayoutTestApacheHttpd.__init__):
2594         (LayoutTestApacheHttpd._copy_apache_config_file):
2595         (LayoutTestApacheHttpd):
2596         (LayoutTestApacheHttpd.platform):
2597         (LayoutTestApacheHttpd._spawn_process):
2598         (LayoutTestApacheHttpd._stop_running_server):
2599         (LayoutTestApacheHttpd._run):
2600         (LayoutTestApacheHttpd._server_error):
2601         * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
2602         (HttpServerBase.aliases):
2603         (HttpServerBase):
2604         (HttpServerBase._build_alias_path_pairs):
2605         (HttpServerBase._build_alias_path_pairs._make_path):
2606         * Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py:
2607         (TestHttpServerBase.test_corrupt_pid_file):
2608         (TestHttpServerBase):
2609         (TestHttpServerBase.test_build_alias_path_pairs):
2610         * Scripts/webkitpy/port/base.py:
2611         (Port._apache_config_file_name_for_platform):
2612         * Scripts/webkitpy/port/port_testcase.py:
2613         (test_apache_config_file_name_for_platform):
2614         * Scripts/webkitpy/port/win.py:
2615         (WinPort._path_to_apache):
2616         (WinCairoPort.default_baseline_search_path):
2617         (WinCairoPort):
2618         (WinCairoPort.check_httpd):
2619
2620 2018-03-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2621
2622         [GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage::will-submit-form
2623         https://bugs.webkit.org/show_bug.cgi?id=183510
2624
2625         Reviewed by Michael Catanzaro.
2626
2627         Update the test to use WebKitDOMElement instead and fix a memory leak.
2628
2629         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
2630         (handleFormSubmissionCallback):
2631         (willSubmitFormCallback):
2632
2633 2018-03-08  Stephan Szabo  <stephan.szabo@sony.com>
2634
2635         WebKitTestRunner: Don't use accessibility controller when !HAVE(ACCESSIBILITY)
2636         https://bugs.webkit.org/show_bug.cgi?id=183475
2637
2638         Reviewed by Youenn Fablet.
2639
2640         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2641         (WTR::InjectedBundle::done):
2642         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2643         (WTR::InjectedBundlePage::didClearWindowForFrame):
2644
2645 2018-03-08  Ms2ger  <Ms2ger@igalia.com>
2646
2647         [WPE] Update expectations for API tests
2648         https://bugs.webkit.org/show_bug.cgi?id=183434
2649
2650         Unreviewed test gardening.
2651
2652         * TestWebKitAPI/glib/TestExpectations.json:
2653
2654 2018-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2655
2656         [GTK][WPE] Leak checker is not working in WebKitGLib web process tests
2657         https://bugs.webkit.org/show_bug.cgi?id=183404
2658
2659         Reviewed by Michael Catanzaro.
2660
2661         This might have regressed when we started to use the JSC garbage collector timers. The thing is that we expect
2662         that the WebProcessTester object that we expose to JavaScript is released when the web frame is destroyed, but
2663         that's no longer the case. On window object cleared a GC is scheduled, but JSC timers do the actual garbage
2664         collection later. In the case of tests that never happens because the web process finishes quickly after the
2665         test. We need to force a garbage collection at some point when the web page is destroyed. We can't use the
2666         WebKitWebPage destroy signal, since we are also checking that WebKitWebPage isn't leaked. The
2667         API::InjectedBundle::Client::willDestroyPage() always happen when the page is closed, even if WebKitWebPage is
2668         still alive, so we can force the GC at that point. The only problem is that the frame is detached right after
2669         that point, so we can't check WebKitFrame leaks. The only frame in the tests is the main one, so we can assume
2670         that if WebKitWebPage is released, the frame is too.
2671
2672         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
2673         (WebKitFrameTest::testMainFrame): Stop checking we don't leak WebKitFrame.
2674         (WebKitFrameTest::testURI): Ditto.
2675         (WebKitFrameTest::testJavaScriptContext): Ditto.
2676         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
2677         (testWebKitFrameMainFrame): Use new WebViewTest::runWebProcessTest() API.
2678         (testWebKitFrameURI): Ditto.
2679         (testWebKitFrameJavaScriptContext): Ditto.
2680         (webkitFrameTestRun): Deleted.
2681         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
2682         (runTest): We no longer need the special case for dom-cache test.
2683         (windowObjectClearedCallback): Only expose test runner object to JavaScript when loading tests.
2684         (webkit_web_extension_initialize): Call webkitWebExtensionSetGarbageCollectOnPageDestroy() to ensure a garbage
2685         collection is performed when the page is closing.
2686         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
2687         (WebKitDOMClientRectTest::testDivClientRectsPositionAndLength): Fix memory leak,
2688         webkit_dom_client_rect_list_item() returns a full reference.
2689         * TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:
2690         (testWebProcessAutocleanups):Use new WebViewTest::runWebProcessTest() API.
2691         * TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:
2692         (testWebKitDOMClientRectDivBoundingClientRectPosition): Use new WebViewTest::runWebProcessTest() API.
2693         (testWebKitDOMClientRectDivClientRectsPositionAndLength): Use new WebViewTest::runWebProcessTest() API.
2694         (prepareDOMForClientRectPositionTests): Deleted.
2695         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:
2696         (testWebKitDOMNodeHierarchyNavigation): Use new WebViewTest::runWebProcessTest() API.
2697         (testWebKitDOMNodeInsertion): Ditto.
2698         (testWebKitDOMNodeTagNamesNodeList): Ditto.
2699         (testWebKitDOMNodeTagNamesHTMLCollection): Ditto.
2700         (testWebKitDOMObjectCache): We no longer need to run the test several times, since runWebProcessTest() loads
2701         about blank after every test.
2702         (prepareDOMForTagNamesTests): Deleted.
2703         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:
2704         (testWebKitDOMNodeFilterTreeWalker): Use new WebViewTest::runWebProcessTest() API.
2705         (testWebKitDOMNodeFilterNodeIterator): Ditto.
2706         (runTest): Deleted.
2707         * TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:
2708         (testWebKitDOMXPathNSResolverNative): Use new WebViewTest::runWebProcessTest() API.
2709         (testWebKitDOMXPathNSResolverCustom): Ditto.
2710         * TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp:
2711         (testWebKitWebEditorSelectionChanged): Use new WebViewTest::runWebProcessTest() API.
2712         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
2713         (WebViewTest::runWebProcessTest): It now receives the contents, so it automatically loads the view using
2714         "webprocess://test" as base URI, used to detect tests in the web process. It also loads about:blank after every
2715         test to ensure that window object is cleared.
2716         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
2717
2718 2018-03-07  Youenn Fablet  <youenn@apple.com>
2719
2720         Match unsupported plugins based on domains and not origin
2721         https://bugs.webkit.org/show_bug.cgi?id=183384
2722
2723         Reviewed by Chris Dumez.
2724
2725         * TestWebKitAPI/Tests/WebCore/URL.cpp:
2726         (TestWebKitAPI::TEST_F):
2727         * WebKitTestRunner/TestController.cpp:
2728         (WTR::TestController::setPluginSupportedMode): Update to whitelist
2729         localhost and not http://localhost:8080
2730
2731 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
2732
2733         webkitpy: Allow apple_additions() to define additional ports
2734         https://bugs.webkit.org/show_bug.cgi?id=183412
2735         <rdar://problem/38232353>
2736
2737         Reviewed by Aakash Jain.
2738
2739         * Scripts/webkitpy/port/factory.py:
2740         (PortFactory.get): Allow apple_additions to define port classes to be used
2741         in run-webkit-tests.
2742
2743 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
2744
2745         webkitpy: Remove obsolete function from MockAppleAdditions
2746         https://bugs.webkit.org/show_bug.cgi?id=183415
2747         <rdar://problem/38236407>
2748
2749         Reviewed by Aakash Jain.
2750
2751         * Scripts/webkitpy/port/port_testcase.py:
2752         (bind_mock_apple_additions.MockAppleAdditions):
2753         (bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Deleted.
2754         (bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Deleted.
2755
2756 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
2757
2758         webkitpy: --dedicated-simulators does not boot the correct number of simulators
2759         https://bugs.webkit.org/show_bug.cgi?id=183409
2760         <rdar://problem/38224631>
2761
2762         Reviewed by Aakash Jain.
2763
2764         * Scripts/webkitpy/port/ios_simulator.py:
2765         (IOSSimulatorPort.default_child_processes): When not using dedicated simulators,
2766         we should use the number of booted simulators as our default child processes.
2767
2768 2018-03-07  Alejandro G. Castro  <alex@igalia.com>
2769
2770         Make NetworkRTCResolver port agnostic
2771         https://bugs.webkit.org/show_bug.cgi?id=178855
2772
2773         Reviewed by Youenn Fablet.
2774
2775         Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
2776         other platforms when the APIs are supported.
2777
2778         * TestWebKitAPI/PlatformGTK.cmake:
2779         * TestWebKitAPI/Tests/WebCore/DNS.cpp:
2780
2781 2018-03-06  Youenn Fablet  <youenn@apple.com>
2782
2783         didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
2784         https://bugs.webkit.org/show_bug.cgi?id=183299
2785         <rdar://problem/37547029>
2786
2787         Reviewed by Alex Christensen.
2788
2789         Add support for checking whether this callback is called.
2790         Used in the added layout test.
2791
2792         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2793         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2794         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
2795         (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
2796         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2797         * WebKitTestRunner/TestController.cpp:
2798         (WTR::TestController::createOtherPage):
2799         (WTR::TestController::resetStateToConsistentValues):
2800         (WTR::TestController::didReceiveServerRedirectForProvisionalNavigation):
2801         * WebKitTestRunner/TestController.h:
2802         (WTR::TestController::didReceiveServerRedirectForProvisionalNavigation const):
2803         (WTR::TestController::clearDidReceiveServerRedirectForProvisionalNavigation):
2804         * WebKitTestRunner/TestInvocation.cpp:
2805         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2806
2807 2018-03-06  Chris Dumez  <cdumez@apple.com>
2808
2809         fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
2810         https://bugs.webkit.org/show_bug.cgi?id=183345
2811
2812         Reviewed by Alex Christensen.
2813
2814         Add layout test infrastructure so a test can know when didCancelClientRedirectForFrame has
2815         been called. The tests used to rely on a 0-timer but this does not work when the client
2816         responds to the navigation policy asynchronously.
2817
2818         * DumpRenderTree/TestRunner.cpp:
2819         (getDidCancelClientRedirect):
2820         (TestRunner::staticValues):
2821         * DumpRenderTree/TestRunner.h:
2822         (TestRunner::didCancelClientRedirect const):
2823         (TestRunner::setDidCancelClientRedirect):
2824         * DumpRenderTree/mac/FrameLoadDelegate.mm:
2825         (-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
2826         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2827         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2828         (WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
2829         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2830         (WTR::TestRunner::didCancelClientRedirect const):
2831         (WTR::TestRunner::setDidCancelClientRedirect):
2832
2833 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
2834
2835         REGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in LLInt on WPE
2836         https://bugs.webkit.org/show_bug.cgi?id=183366
2837
2838         Reviewed by Michael Catanzaro.
2839
2840         Have the TestRunnerInjectedBundle CMake library link against libraries
2841         in the WebKitTestRunnerInjectedBundle_LIBRARIES list, and not the
2842         WebKitTestRunner_LIBRARIES list, which is used for the WebKitTestRunner
2843         executable. This allows narrowing down the libraries to only those that
2844         are necessary for the injected bundle shared object.
2845
2846         The GTK+ port already has this list specified, adding one for the WPE
2847         port.
2848
2849         * WebKitTestRunner/CMakeLists.txt:
2850         Link the TestRunnerInjectedBundle library against the libraries in the
2851         WebKitTestRunnerInjectedBundle_LIBRARIES list.
2852         * WebKitTestRunner/PlatformWPE.cmake:
2853         Specify the WebKitTestRunnerInjectedBundle_LIBRARIES list, including the
2854         basic system dependencies, WebCoreTestSupport and WebKit. This follows
2855         the GTK+ port.
2856
2857 2018-03-06  Dominik Infuehr  <dinfuehr@igalia.com>
2858
2859         [ARM] Disable tests that run out of memory
2860         https://bugs.webkit.org/show_bug.cgi?id=182699
2861
2862         Reviewed by Žan Doberšek.
2863
2864         Add run mode to allow running modules.yaml-tests without
2865         disabling LLInt for specific tests.
2866
2867         * Scripts/run-jsc-stress-tests:
2868
2869 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2870
2871         Fix std::make_unique / new[] using system malloc
2872         https://bugs.webkit.org/show_bug.cgi?id=182975
2873
2874         Reviewed by JF Bastien.
2875
2876         * TestWebKitAPI/CMakeLists.txt:
2877         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2878         * TestWebKitAPI/Tests/WTF/UniqueArray.cpp: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
2879         (TestWebKitAPI::NonTrivialDestructor::NonTrivialDestructor):
2880         (TestWebKitAPI::NonTrivialDestructor::~NonTrivialDestructor):
2881         (TestWebKitAPI::NonTrivialDestructor::setLog):
2882         (TestWebKitAPI::TEST):
2883
2884 2018-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
2885
2886         DumpRenderTree build fix
2887
2888         Unreviewed.
2889
2890         * DumpRenderTree/mac/LayoutTestHelper.m:
2891
2892 2018-03-05  Andy Estes  <aestes@apple.com>
2893
2894         [Mac] Teach WebCore::Pasteboard about file promise drags
2895         https://bugs.webkit.org/show_bug.cgi?id=183314
2896         <rdar://problem/38105493>
2897
2898         Reviewed by Darin Adler.
2899
2900         * DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
2901         * DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
2902         (-[DumpRenderTreeFileDraggingSource initWithPromisedFileURLs:]):
2903         (-[DumpRenderTreeFileDraggingSource dealloc]):
2904
2905         Taught DumpRenderTreeFileDraggingSource to store the promised file URLs.
2906
2907         * DumpRenderTree/mac/DumpRenderTree.mm:
2908         (runTest):
2909
2910         Called +[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers] after running a test.
2911
2912         * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
2913         * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
2914         (-[DumpRenderTreeFilePromiseReceiver initWithPromisedUTIs:]):
2915         (-[DumpRenderTreeFilePromiseReceiver fileTypes]):
2916         (-[DumpRenderTreeFilePromiseReceiver fileNames]):
2917         (-[DumpRenderTreeFilePromiseReceiver dealloc]):
2918         (copyFile):
2919         (-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
2920
2921         We can't instantiate real NSFilePromiseReceivers in DumpRenderTree. They rely on the
2922         pasteboard server to generate unique file URLs, which is incompatible with our swizzled
2923         NSPasteboard.
2924
2925         Instead, create a subclass of NSFilePromiseReceiver that implements its own promise resolution.
2926         -receivePromisedFilesAtDestination:... asks its DumpRenderTreeFileDraggingSource for the
2927         array of file URLs, then copies each to the destination directory on the specified operation
2928         queue. It emulates how NSPasteboard tries to find a unique destination name by appending
2929         numbers to the file name.
2930
2931         All receivers are collected in a global array that is cleared when each test finishes.
2932         DumpRenderTreeFilePromiseReceiver will delete the files it copied in -dealloc.
2933
2934         (+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]):
2935         (-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2936         
2937         If NSFilesPromisePboardType is on the pasteboard and classArray contains
2938         NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of
2939         all file promise receivers, then wrap it in an NSDraggingItem and call block.
2940
2941         * DumpRenderTree/mac/EventSendingController.mm:
2942         (+[EventSendingController isSelectorExcludedFromWebScript:]):
2943         (+[EventSendingController webScriptNameForSelector:]):
2944         (-[EventSendingController beginDragWithFilePromises:]):
2945
2946         Implement eventSender.beginDragWithFilePromises() by placing file UTIs on the pasteboard
2947         with type NSFilesPromisePboardType, creating a DumpRenderTreeFileDraggingSource with the
2948         file URLs, and creating a new DumpRenderTreeDraggingInfo and passing it to
2949         -[WebView draggingEntered:].
2950
2951 2018-03-05  Aakash Jain  <aakash_jain@apple.com>
2952
2953         [webkitpy] Bugzilla class should use NetworkTransaction for network operations
2954         https://bugs.webkit.org/show_bug.cgi?id=183222
2955
2956         Reviewed by Alexey Proskuryakov.
2957
2958         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
2959         (Bugzilla.open_url): Method which uses NetworkTransaction for opening url.
2960         (Bugzilla.fetch_user): Used self.open_url instead of directly calling browser.open().
2961         (Bugzilla.add_user_to_groups): Ditto.
2962         (Bugzilla._fetch_bug_page): Ditto.
2963         (Bugzilla.fetch_attachment_contents): Ditto.
2964         (Bugzilla.get_bug_id_for_attachment_id): Ditto.
2965         (Bugzilla.authenticate): Ditto.
2966         (Bugzilla.add_attachment_to_bug): Ditto.
2967         (Bugzilla.add_patch_to_bug): Ditto.
2968         (Bugzilla.create_bug): Ditto.
2969         (Bugzilla.clear_attachment_flags): Ditto.
2970         (Bugzilla.set_flag_on_attachment): Ditto.
2971         (Bugzilla.obsolete_attachment): Ditto.
2972         (Bugzilla.add_cc_to_bug): Ditto.
2973         (Bugzilla.post_comment_to_bug): Ditto.
2974         (Bugzilla.close_bug_as_fixed): Ditto.
2975         (Bugzilla.reassign_bug): Ditto.
2976         (Bugzilla.reopen_bug): Ditto.
2977         (Bugzilla._fetch_bug_page_by_url): Deleted, not required anymore.
2978         * Scripts/webkitpy/common/net/networktransaction.py:
2979         (NetworkTransaction.run): Added a FIXME.
2980
2981 2018-03-05  Joseph Pecoraro  <pecoraro@apple.com>
2982
2983         dump-class-layout mishandles duplicates base classes and miscomputes padding
2984         https://bugs.webkit.org/show_bug.cgi?id=183311
2985
2986         Reviewed by Simon Fraser.
2987
2988         * Scripts/dump-class-layout:
2989         (verify_type):
2990         (verify_type_recursive):
2991         Keep a list of seen (offset, type) that we have output and don't re-output them.
2992         The Python types list the base classes as members multiple times as you iterate
2993         through the members, so just ignore them if we have seem them already at a
2994         specific offset.
2995
2996 2018-03-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2997
2998         [GTK][Wayland] The GTK Wayland bot exits early because of assertions related with libsecret since r221925
2999         https://bugs.webkit.org/show_bug.cgi?id=183330
3000
3001         Reviewed by Michael Catanzaro.
3002
3003         Add libsecret to the JHBuild and build it only when the system version is
3004         less than 0.18.6 (unreleased as of writing this) in order to cherry pick
3005         a fix for a bug that causes crashes with layout tests.
3006
3007         * gtk/jhbuild.modules:
3008         * gtk/patches/libsecret-secret-methods-Don-t-unref-NULL-when-search-fails.patch: Added.
3009
3010 2018-03-05  Claudio Saavedra  <csaavedra@igalia.com>
3011
3012         [GTK] Implement WTR's PlatformWebView::setWindowIsKey()
3013         https://bugs.webkit.org/show_bug.cgi?id=183143
3014
3015         Reviewed by Carlos Garcia Campos.
3016
3017         Implement ::setWindowIsKey() by keeping a second window to be
3018         presented when the webview's window is to lose its key status.
3019
3020         * WebKitTestRunner/PlatformWebView.h:
3021         * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
3022         (WTR::PlatformWebView::PlatformWebView):
3023         (WTR::PlatformWebView::~PlatformWebView):
3024         (WTR::PlatformWebView::setWindowIsKey):
3025
3026 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
3027
3028         Unreviewed, attempt to fix Apple port build
3029
3030         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3031
3032 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
3033
3034         Unreviewed, attempt to fix WPE build
3035
3036         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
3037         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
3038         * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
3039         (WTR::PlatformWebView::windowSnapshotImage):
3040         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
3041         (WTR::TestController::platformRunUntil):
3042
3043 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
3044
3045         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
3046         https://bugs.webkit.org/show_bug.cgi?id=183312
3047
3048         Reviewed by Mark Lam.
3049
3050         Remove wtf/CurrentTime.h include pragma.
3051
3052         * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
3053         * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
3054         * DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
3055         * DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
3056         * TestWebKitAPI/Tests/WTF/Condition.cpp:
3057         * TestWebKitAPI/Tests/WTF/Signals.cpp:
3058         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
3059         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
3060         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3061         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
3062         * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
3063         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3064
3065 2018-03-04  Tim Horton  <timothy_horton@apple.com>
3066
3067         Make !ENABLE(DATA_DETECTION) iOS build actually succeed
3068         https://bugs.webkit.org/show_bug.cgi?id=183283
3069         <rdar://problem/38062148>
3070
3071         Reviewed by Sam Weinig.
3072
3073         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3074
3075 2018-03-02  Chris Dumez  <cdumez@apple.com>
3076
3077         Converting a load to a download does not work with async policy delegates
3078         https://bugs.webkit.org/show_bug.cgi?id=183254
3079         <rdar://problem/38035334>
3080
3081         Reviewed by Youenn Fablet.
3082
3083         Add layout test infrastructure for responding to the decidePolicyForNavigationResponse
3084         delegate asynchronously.
3085
3086         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3087         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
3088         (WTR::InjectedBundlePage::decidePolicyForResponse):
3089         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3090         (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay):
3091         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3092         (WTR::TestRunner::shouldDecideResponsePolicyAfterDelay const):
3093         * WebKitTestRunner/TestController.cpp:
3094         (WTR::TestController::resetStateToConsistentValues):
3095         (WTR::TestController::decidePolicyForNavigationResponse):
3096         * WebKitTestRunner/TestController.h:
3097         (WTR::TestController::setShouldDecideResponsePolicyAfterDelay):
3098         * WebKitTestRunner/TestInvocation.cpp:
3099         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
3100
3101 2018-03-01  Youenn Fablet  <youenn@apple.com>
3102
3103         Add API test to validate setting of service worker and cache storage directories
3104         https://bugs.webkit.org/show_bug.cgi?id=182543
3105
3106         Reviewed by Chris Dumez.
3107
3108         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3109
3110 2018-03-01  Ross Kirsling  <ross.kirsling@sony.com>
3111
3112         [Win][DRT] Implement setSpatialNavigationEnabled.
3113         https://bugs.webkit.org/show_bug.cgi?id=183166
3114
3115         Reviewed by Per Arne Vollan.
3116
3117         * DumpRenderTree/TestRunner.cpp:
3118         (setSpatialNavigationEnabledCallback):
3119         * DumpRenderTree/win/DumpRenderTree.cpp:
3120         (resetWebPreferencesToConsistentValues):
3121         * DumpRenderTree/win/TestRunnerWin.cpp:
3122         (TestRunner::setSpatialNavigationEnabled):
3123
3124 2018-03-01  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3125
3126         [webkitpy] Use shell=False to launch apache http server.
3127         https://bugs.webkit.org/show_bug.cgi?id=183191
3128
3129         Reviewed by Aakash Jain.
3130
3131         * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
3132         (LayoutTestApacheHttpd.__init__):
3133         (LayoutTestApacheHttpd._run):
3134
3135 2018-03-01  Chris Dumez  <cdumez@apple.com>
3136
3137         Unreviewed, update WebKit.CustomHeaderFields API test after r229133.
3138
3139         We no longer do policy checks for 'about:blank'.
3140
3141         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3142         (-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]):
3143         (TEST):
3144
3145 2018-02-28  Jonathan Bedard  <jbedard@apple.com>
3146
3147         [webkitpy] Remove concept of 'future' versions (Follow-up fix 2)
3148         https://bugs.webkit.org/show_bug.cgi?id=183184
3149         <rdar://problem/37958594>
3150
3151         Reviewed by Aakash Jain.
3152
3153         Unlisted Apple versions can't run webkitpy tests because they don't
3154         have specified port names.
3155
3156         * Scripts/webkitpy/port/apple.py:
3157         (ApplePort.determine_full_port_name): Return valid port name for unnamed
3158         versions.
3159         * Scripts/webkitpy/port/base.py:
3160         (Port.version_name): Check both public and internal version mapping
3161         when returning a version name.
3162         * Scripts/webkitpy/port/mac.py:
3163         (MacPort.__init__): If no os version is defined, use the current version.
3164
3165 2018-02-28  John Wilander  <wilander@apple.com>
3166
3167         Add a second tier of prevalence to facilitate telemetry on very prevalent domains
3168         https://bugs.webkit.org/show_bug.cgi?id=183218
3169         <rdar://problem/37992388>
3170
3171         Reviewed by Brent Fulgham.
3172
3173         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3174             Added two new testRunner functions:
3175             - setStatisticsVeryPrevalentResource()
3176             - isStatisticsVeryPrevalentResource()
3177         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3178         (WTR::TestRunner::setStatisticsVeryPrevalentResource):
3179         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
3180         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3181         * WebKitTestRunner/TestController.cpp:
3182         (WTR::TestController::setStatisticsVeryPrevalentResource):
3183         (WTR::TestController::isStatisticsVeryPrevalentResource):
3184         * WebKitTestRunner/TestController.h:
3185         * WebKitTestRunner/TestInvocation.cpp:
3186         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3187
3188 2018-02-28  Jonathan Bedard  <jbedard@apple.com>
3189
3190         [webkitpy] Remove concept of 'future' versions (Follow-up fix)
3191         https://bugs.webkit.org/show_bug.cgi?id=183184
3192         <rdar://problem/37958594>
3193
3194         Reviewed by David Kilzer.
3195
3196         The factory also relies on future in a non-obvious way.
3197
3198         * Scripts/webkitpy/common/system/platforminfo.py:
3199         (PlatformInfo.os_version_name): Check both public and internal version mapping
3200         when returning a version name.
3201         * Scripts/webkitpy/common/system/platforminfo_mock.py:
3202         (MockPlatformInfo.os_version_name): Ditto.
3203
3204 2018-02-28  Zan Dobersek  <zdobersek@igalia.com>
3205
3206         Unreviewed WPE fixup after r229080.
3207
3208         Add empty definitions for two AccessibilityUIElement methods,
3209         avoiding undefined symbols in the WKTR injected bundle.
3210
3211         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
3212         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
3213         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3214
3215 2018-02-27  Jonathan Bedard  <jbedard@apple.com>
3216
3217         Remove concept of 'future'
3218         https://bugs.webkit.org/show_bug.cgi?id=183184
3219         <rdar://problem/37958594>
3220
3221         Reviewed by Aakash Jain.
3222
3223         Remove concept of 'future' from expectations and instead
3224         use a system of inheritance centered around the current version
3225         of an OS for Mac and iOS.
3226
3227         Inheritance works like so:
3228
3229         | ....
3230         V Future
3231         > High Sierra (mac)
3232         ^ mac-sierra
3233         | mac-elcapitan
3234         | ....
3235
3236         This does not change expectation inheritance for any currently running
3237         configurations, it generalizes the logic already used.
3238
3239         * Scripts/webkitpy/common/version_name_map.py:
3240         (VersionNameMap.__init__): Remove all future versions.
3241         (VersionNameMap.mapping_for_platform): Return empty dicts instead of
3242         asserting.
3243         * Scripts/webkitpy/port/apple.py:
3244         (ApplePort):
3245         (ApplePort._allowed_versions): Return all available versions.
3246         (ApplePort._generate_all_test_configurations): Instead of picking from a set
3247         of allowed versions, assume that every specified version is allowed.
3248         (ApplePort._port_name_with_version): Deleted.
3249         * Scripts/webkitpy/port/darwin.py: Add CURRENT_VERSION overridden by subclasses.
3250         (DarwinPort):
3251         * Scripts/webkitpy/port/ios.py:
3252         (IOSPort):
3253         (IOSPort.default_baseline_search_path): Use system of inheritance centered around
3254         the current version.
3255         * Scripts/webkitpy/port/mac.py:
3256         (MacPort):
3257         (MacPort.__init__): Use current version by default.
3258         (MacPort.default_baseline_search_path): Use system of inheritance centered around
3259         the current version.
3260         (MacPort.configuration_specifier_macros): Use the same set of version names
3261         supported in default_baseline_search_path.
3262         * Scripts/webkitpy/port/mac_unittest.py:
3263         (MacTest.test_versions): Remove 'future' tests.
3264
3265 2018-02-27  Michael Catanzaro  <mcatanzaro@igalia.com>
3266
3267         Unreviewed GTK test gardening
3268
3269         * TestWebKitAPI/glib/TestExpectations.json:
3270
3271 2018-02-27  Doug Russell  <doug@getitdownonpaper.com>
3272
3273         AX: Spell check and style attributes should be optional when fetching attributed string
3274         https://bugs.webkit.org/show_bug.cgi?id=160744
3275
3276         Reviewed by Chris Fleizach.
3277
3278         The overhead of fetching a spell checked attributed string via AX API is substantial. 
3279         In some cases on the order of 7/8 of the total time spent fetching the string.
3280
3281         This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).
3282
3283         AXAttributedStringForTextMarkerRange will remain unchanged.
3284
3285         * DumpRenderTree/AccessibilityUIElement.cpp:
3286         (attributedStringForTextMarkerRangeCallback):
3287         (attributedStringForTextMarkerRangeWithOptionsCallback):
3288         (AccessibilityUIElement::attributedStringForTextMarkerRange):
3289         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3290         (AccessibilityUIElement::getJSClass):
3291         * DumpRenderTree/AccessibilityUIElement.h:
3292         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
3293         (AccessibilityUIElement::attributedStringForTextMarkerRange):
3294         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3295         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
3296         (createJSStringRef):
3297         (AccessibilityUIElement::attributedStringForTextMarkerRange):
3298         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3299         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
3300         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
3301         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
3302         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
3303         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3304         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
3305         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
3306         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3307         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
3308         (WTR::createJSStringRef):
3309         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
3310         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
3311
3312 2018-02-27  Daniel Bates  <dabates@apple.com>
3313
3314         Standardize terminology for marked text
3315         https://bugs.webkit.org/show_bug.cgi?id=180999
3316
3317         Reviewed by Zalan Bujtas.
3318
3319         The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
3320         and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
3321         marker. For instance, selected text is represented using a MarkerSubrange that does not have a
3322         corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
3323         describe these tagged text subranges.
3324
3325         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3326         * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: Added.
3327         (WebCore::operator<<):
3328         (TestWebKitAPI::TEST):
3329         * TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Removed.
3330
3331 2018-02-27  Aakash Jain  <aakash_jain@apple.com>
3332
3333         webkitpy Bugzilla transactions should retry on URLError
3334         https://bugs.webkit.org/show_bug.cgi?id=183156
3335
3336         Reviewed by Alexey Proskuryakov.
3337
3338         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
3339         (Bugzilla): Use NetworkTransaction.
3340         (Bugzilla._fetch_bug_page_by_url):
3341         (Bugzilla.bug_id_for_attachment_id):
3342         (Bugzilla.get_bug_id_for_attachment_id):
3343
3344 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3345
3346         [Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
3347         https://bugs.webkit.org/show_bug.cgi?id=183100
3348         <rdar://problem/37840987>
3349
3350         Reviewed by Tim Horton.
3351
3352         Add API tests that exercise -_setMinimumAllowedLayoutWidth: and -_setForceHorizontalViewportShrinkToFit:. See
3353         WebKit ChangeLog for more detail.
3354
3355         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3356         * TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Added.
3357         (TestWebKitAPI::while):
3358         (viewportTestPageMarkup):
3359         (TestWebKitAPI::TEST):
3360
3361 2018-02-27  Yusuke Suzuki  <utatane.tea@gmail.com>
3362
3363         Unreviewed, skip FTL tests if FTL is disabled
3364         https://bugs.webkit.org/show_bug.cgi?id=183071
3365
3366         * Scripts/run-jsc-stress-tests:
3367
3368 2018-02-26  Don Olmstead  <don.olmstead@sony.com>
3369
3370         Fix WebCore includes within WebKitLegacy
3371         https://bugs.webkit.org/show_bug.cgi?id=183147
3372
3373         Reviewed by Tim Horton.
3374
3375         * MiniBrowser/win/ResourceLoadDelegate.cpp:
3376
3377 2018-02-26  Yousuke Kimoto  <yousuke.kimoto@sony.com>
3378
3379         [WinCairo] WebKit2_C.h should be included for TestWebKit
3380         https://bugs.webkit.org/show_bug.cgi?id=182682
3381
3382         Reviewed by Yusuke Suzuki.
3383
3384         * TestWebKitAPI/config.h:
3385
3386 2018-02-25  Fujii Hironori  <Hironori.Fujii@sony.com>
3387
3388         [WK2] http/tests/navigation/new-window-redirect-history.html crashes
3389         https://bugs.webkit.org/show_bug.cgi?id=127683
3390
3391         Reviewed by Dan Bernstein.
3392
3393         m_previousTestBackForwardListItem was null for the new window.
3394         m_previousTestBackForwardListItem is initialized only for the main
3395         window in InjectedBundlePage::prepare.
3396
3397         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
3398         (WTR::InjectedBundlePage::dumpBackForwardList):
3399         Do null-check of m_previousTestBackForwardListItem.
3400
3401 2018-02-25  Alexey Proskuryakov  <ap@apple.com>
3402
3403         Various crashes in WebKitTestRunner, especially when system is under heavy load
3404         https://bugs.webkit.org/show_bug.cgi?id=183109
3405
3406         Reviewed by Tim Horton.
3407
3408         WebKitTestRunner had many places where it sent messages to WebContent with a timeout,
3409         but it didn't handle the timeout when it did occur. Nearly all of those would result
3410         in logic errors and failing tests, and most would even result in stack corruption,
3411         as the response handler modified local variables.
3412
3413         There is only one timeout scenario that we actually mean to handle in WKTR. That's
3414         when a test freezes after it is done (e.g. an infinite loop in beforeunload) - we don't
3415         want to blame the next test for freezing, so we silently relaunch WebContent.
3416         Everything else is cargo cult code that never worked.
3417
3418         This patch addresses the crashes, and actually makes tests pass a lot more on an
3419         overloaded system.
3420
3421         * WebKitTestRunner/TestController.cpp:
3422         (WTR::TestController::resetStateToConsistentValues): Moved m_doneResetting assignment
3423         to where it's actually needed, for clarity.
3424         (WTR::TestController::reattachPageToWebProcess): This function used to always hit
3425         and ignore message timeout, as m_doneResetting is only updated by navigation callback
3426         when the state is Resetting. This change makes it faster.
3427         (WTR::TestController::platformResetStateToConsistentValues): Style fix.
3428         (WTR::TestController::clearServiceWorkerRegistrations): Timing out here wasn't
3429         handled in a meaningful manner, and would even corrupt the stack.
3430         (WTR::TestController::clearDOMCache): Ditto.
3431         (WTR::TestController::clearDOMCaches): Ditto.
3432         (WTR::TestController::hasDOMCache): Ditto.
3433         (WTR::TestController::domCacheSize): Ditto.
3434         (WTR::TestController::isStatisticsPrevalentResource): Ditto.
3435         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Ditto.
3436         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Ditto.
3437         (WTR::TestController::isStatisticsHasHadUserInteraction): Ditto.
3438         (WTR::TestController::isStatisticsGrandfathered): Ditto.
3439         (WTR::TestController::statisticsUpdateCookiePartitioning): Ditto.
3440         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Ditto.
3441         (WTR::TestController::statisticsClearInMemoryAndPersistentStore): Ditto.
3442         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
3443         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Ditto.
3444
3445         * WebKitTestRunner/TestInvocation.cpp:
3446         (WTR::TestInvocation::shortTimeout const): Made shortTimeout shorter (on a hunch).
3447         (WTR::TestInvocation::invoke): Removed a timeout waiting for initial response. There
3448         is never a logical reason for such a timeout, as we always have a new or responsive
3449         WebContent process here.
3450         (WTR::TestInvocation::dumpResults): Removed another timeout that we don't know how to
3451         properly handle.
3452         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Removed assignment to
3453         m_errorMessage, which had no effect in this context.
3454
3455         * WebKitTestRunner/TestInvocation.h: Removed no longer used code.
3456
3457         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
3458         (WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for
3459         no timeout.
3460         
3461         * WebKitTestRunner/ios/TestControllerIOS.mm:
3462         (WTR::TestController::platformConfigureViewForTest): Removed a useless timeout.
3463         Not sure if timing out here would corrupt the stack or not, but there is no reason
3464         to impose arbitrary limits on individual steps of a test.
3465
3466         * WebKitTestRunner/mac/TestControllerMac.mm:
3467         (WTR::TestController::platformConfigureViewForTest): Use a named constant for
3468         no timeout.
3469
3470 2018-02-25  Ali Juma  <ajuma@chromium.org>
3471
3472         Unreviewed. Change my status to committer.
3473
3474         * Scripts/webkitpy/common/config/contributors.json:
3475
3476 2018-02-25  Chris Dumez  <cdumez@apple.com>
3477
3478         Service workers do not work well inside Web.app
3479         https://bugs.webkit.org/show_bug.cgi?id=183105
3480         <rdar://problem/37864140>
3481
3482         Reviewed by Youenn Fablet.
3483
3484         Add API test coverage.
3485
3486         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3487
3488 2018-02-25  Aakash Jain  <aakash_jain@apple.com>
3489
3490         [build.webkit.org] unit-tests fail if buildbot 0.8.6p1 is not installed locally
3491         https://bugs.webkit.org/show_bug.cgi?id=183103
3492
3493         Reviewed by Alexey Proskuryakov.
3494
3495         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed extra imports.
3496
3497 2018-02-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3498
3499         Unreviewed, fix the TestWebKitAPI build after r228825.
3500
3501         I removed a `>= iOS 11` check in r228825, but forgot that this was also neeed to guard against tvOS and watchOS
3502         builds. This fixes the build by restoring the compile-time guard and also makes it explicit for these platforms.
3503
3504         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
3505
3506 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
3507
3508         Remove currentTime() / currentTimeMS()
3509         https://bugs.webkit.org/show_bug.cgi?id=183052
3510
3511         Reviewed by Mark Lam.
3512
3513         * DumpRenderTree/TestRunner.cpp:
3514         (preciseTimeCallback):
3515         * DumpRenderTree/mac/TestRunnerMac.mm:
3516         (TestRunner::setMockGeolocationPosition):
3517         * TestWebKitAPI/Tests/WTF/Condition.cpp:
3518         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
3519         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
3520         * WebKitTestRunner/GeolocationProviderMock.cpp:
3521         (WTR::GeolocationProviderMock::setPosition):
3522         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3523         (WTR::TestRunner::preciseTime):
3524
3525 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
3526
3527         Remove sleep(double) and sleepMS(double) interfaces
3528         https://bugs.webkit.org/show_bug.cgi?id=183038
3529
3530         Reviewed by Mark Lam.
3531
3532         * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
3533         (PluginTest::indicateTestFailure):
3534         * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
3535         (EvaluteJSWithinNPP_New::NPP_New):
3536         * DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
3537         (InvokeDestroysPluginWithinNPP_New::NPP_New):
3538         * DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
3539         * TestWebKitAPI/Tests/WTF/Signals.cpp:
3540         (TEST):
3541         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
3542         (TestWebKitAPI::testThreadGroup):
3543         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
3544         (TestWebKitAPI::TEST):
3545         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3546         (TestWebKitAPI::TEST):
3547         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
3548         (TestWebKitAPI::TEST):
3549         * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
3550         (TestWebKitAPI::Util::sleep):
3551
3552 2018-02-21  Don Olmstead  <don.olmstead@sony.com>
3553
3554         [CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
3555         https://bugs.webkit.org/show_bug.cgi?id=182883
3556
3557         Reviewed by Per Arne Vollan.
3558
3559         * DumpRenderTree/config.h:
3560         * TestWebKitAPI/config.h:
3561
3562 2018-02-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3563
3564         [GTK] Unsafe g_setenv use in MiniBrowser main
3565         https://bugs.webkit.org/show_bug.cgi?id=182978
3566
3567         Reviewed by Carlos Garcia Campos.
3568
3569         setenv (and g_setenv) will randomly crash if called too late.
3570
3571         * MiniBrowser/gtk/main.c:
3572         (main):
3573
3574 2018-02-21  Aakash Jain  <aakash_jain@apple.com>
3575
3576         webkitpy NetworkTransaction should retry on URLError
3577         https://bugs.webkit.org/show_bug.cgi?id=182987
3578
3579         Reviewed by Alexey Proskuryakov.
3580
3581         * Scripts/webkitpy/common/net/networktransaction.py:
3582         (NetworkTransaction.run): Retry on urllib2.URLError.
3583
3584 2018-02-21  Ms2ger  <Ms2ger@igalia.com>
3585
3586         [WTR][WPE] Correct the process names in TestController.
3587         https://bugs.webkit.org/show_bug.cgi?id=178700
3588
3589         Reviewed by Michael Catanzaro.
3590
3591         Similar to r228731 for GTK.
3592
3593         * Scripts/webkitpy/port/wpe.py:
3594         (WPEPort._get_crash_log): removed the code to convert WebProcess name.
3595         * WebKitTestRunner/TestController.cpp: return the correct process names for WPE.
3596         (WTR::TestController::webProcessName):
3597         (WTR::TestController::networkProcessName):
3598         (WTR::TestController::databaseProcessName):
3599
3600 2018-02-21  Ms2ger  <Ms2ger@igalia.com>
3601
3602         [ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRange().
3603         https://bugs.webkit.org/show_bug.cgi?id=183000
3604
3605         Reviewed by Joanmarie Diggs.
3606
3607         It is never initialized, but is passed to atk_attribute_set_free.
3608         This caused a crash in accessibility/content-editable-as-textarea.html on the debug bots.
3609
3610         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
3611         (WTR::AccessibilityUIElement::attributedStringForRange):
3612
3613 2018-02-21  Myles C. Maxfield  <mmaxfield@apple.com>
3614
3615         [Cocoa] Make system-ui obey the user-installed-font policy
3616         https://bugs.webkit.org/show_bug.cgi?id=182860
3617         <rdar://problem/36158249>
3618
3619         Reviewed by Antti Koivisto.
3620
3621         Create a font, FakeHelvetica-ArmenianCharacter.ttf, which supports a particular Armenian
3622         character which isn't isn't supported by any other font on the system.
3623
3624         * WebKitTestRunner/FakeHelvetica-ArmenianCharacter.ttf:
3625         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3626
3627 2018-02-20  Timothy Horton  <timothy_horton@apple.com>
3628
3629         Try to fix the 32-bit build after r228857
3630
3631         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
3632         (WTR::UIScriptController::firstResponderSuppressionForWebView):
3633
3634 2018-02-20  Nan Wang  <n_wang@apple.com>
3635
3636         AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
3637         https://bugs.webkit.org/show_bug.cgi?id=182752
3638         <rdar://problem/37518233>
3639
3640         Reviewed by Ryosuke Niwa.
3641
3642         * DumpRenderTree/mac/UIScriptControllerMac.mm:
3643         (WTR::UIScriptController::firstResponderSuppressionForWebView):
3644         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
3645         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
3646         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3647         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3648         (WTR::UIScriptController::firstResponderSuppressionForWebView):
3649         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
3650         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
3651         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3652         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
3653         (WTR::UIScriptController::firstResponderSuppressionForWebView):
3654         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
3655         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
3656
3657 2018-02-20  Fujii Hironori  <Hironori.Fujii@sony.com>
3658
3659         [GTK] jhbuild: Remove gtk-doc
3660         https://bugs.webkit.org/show_bug.cgi?id=182956
3661
3662         Reviewed by Michael Catanzaro.
3663
3664         jhbuild doesn't need to build gtk-doc because major LTS Linux
3665         distributions have gtk-doc v1.25, and
3666         Tools/gtk/install-dependencies installs gtk-doc.
3667
3668         * gtk/jhbuild.modules: Removed gtk-doc.
3669
3670 2018-02-20  Tim Horton  <timothy_horton@apple.com>
3671
3672         Introduce HAVE(IOSURFACE_ACCELERATOR)
3673         https://bugs.webkit.org/show_bug.cgi?id=182955
3674         <rdar://problem/37699510>
3675
3676         Reviewed by Sam Weinig.
3677
3678         * DumpRenderTree/ios/PixelDumpSupportIOS.mm:
3679         (createBitmapContextFromWebView):
3680         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
3681         (WTR::PlatformWebView::windowSnapshotImage):
3682
3683 2018-02-20  Chris Dumez  <cdumez@apple.com>
3684
3685         Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
3686         https://bugs.webkit.org/show_bug.cgi?id=182720
3687         <rdar://problem/37515204>
3688
3689         Reviewed by Alex Christensen.
3690
3691         Add API test coverage.
3692
3693         * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:
3694         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
3695         (TestWebKitAPI::TEST):
3696
3697 2018-02-20  Nan Wang  <n_wang@apple.com>
3698
3699         AX: AOM: Dispatch accessibleclick event
3700         https://bugs.webkit.org/show_bug.cgi?id=180898
3701         <rdar://problem/36086710>
3702
3703         Reviewed by Ryosuke Niwa.
3704
3705         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
3706         (WTR::AccessibilityUIElement::syncPress):
3707         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
3708         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
3709         (WTR::AccessibilityUIElement::syncPress):
3710
3711 2018-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3712
3713         [iOS 11.3 Beta] Can't copy a URL from Safari and paste it into the Gmail app
3714         https://bugs.webkit.org/show_bug.cgi?id=182952
3715         <rdar://problem/37636190>
3716
3717         Reviewed by Tim Horton.
3718
3719         Adds a new iOS copy/paste test that copies an anchor element via action sheet, and checks that upon pasting,
3720         both "text/plain" and "text/uri-list" are provided. Additionally tweaks an existing iOS drag and drop test to
3721         check for the same behavior.
3722
3723         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
3724         (TestWebKitAPI::TEST):
3725         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
3726         (TestWebKitAPI::TEST):
3727
3728 2018-02-20  Philippe Normand  <pnormand@igalia.com>
3729
3730         [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
3731         https://bugs.webkit.org/show_bug.cgi?id=173655
3732
3733         Reviewed by Xabier Rodriguez-Calvar.
3734
3735         The FIXME in GStreamerUtilities.cpp asks to pass the command line
3736         parameters to the GStreamer initialization function.
3737
3738         Based on initial patch by: Vanessa Chipirrás Navalón  <vchipirras@igalia.com>
3739
3740         * MiniBrowser/gtk/main.c:
3741         (main): Add the group containing the Gstreamer options that the console displays.
3742
3743 2018-02-19  Fujii Hironori  <Hironori.Fujii@sony.com>
3744
3745         [WTR][GTK] crash log backtrace doesn't show symbol names for DatabaseProcess and NetworkProcess
3746         https://bugs.webkit.org/show_bug.cgi?id=182953
3747
3748         Reviewed by Carlos Garcia Campos.
3749
3750         * Scripts/webkitpy/port/gtk.py:
3751         (GtkPort._get_crash_log): Removed the code to convert WebProcess name.
3752         * WebKitTestRunner/TestController.cpp:
3753         (WTR::TestController::webProcessName): Return the correct program name for GTK+ port.
3754         (WTR::TestController::networkProcessName): Ditto.
3755         (WTR::TestController::databaseProcessName): Ditto.
3756
3757 2018-02-19  Ryan Haddad  <ryanhaddad@apple.com>
3758
3759         Unreviewed, rolling out r228696.
3760
3761         The API test added with this change is timing out on macOS.
3762
3763         Reverted changeset:
3764
3765         "Null pointer dereference in
3766         WebPageProxy::urlSchemeHandlerForScheme()"
3767         https://bugs.webkit.org/show_bug.cgi?id=182905
3768         https://trac.webkit.org/changeset/228696
3769
3770 2018-02-16  Ryosuke Niwa  <rniwa@webkit.org>
3771
3772         Add an entitlement check for service worker on iOS
3773         https://bugs.webkit.org/show_bug.cgi?id=182865
3774         <rdar://problem/37505903>
3775
3776         Reviewed by Brady Eidson.
3777
3778         Added the service worker entitlements to WebKitTestRunner and TestWebKitAPI on iOS.
3779
3780         * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
3781         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
3782         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
3783         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3784
3785 2018-02-16  Youenn Fablet  <youenn@apple.com>
3786
3787         Allow specifying which plug-ins are supported
3788         https://bugs.webkit.org/show_bug.cgi?id=182748
3789
3790         Reviewed by Chris Dumez.
3791
3792         Add support for a test runner API to specificy supported plug-ins.
3793
3794         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3795         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3796         (WTR::TestRunner::setPluginsAsUnsupported):
3797         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3798         * WebKitTestRunner/TestController.cpp:
3799         (WTR::TestController::resetStateToConsistentValues):
3800         (WTR::TestController::setPluginsAsUnsupported):
3801         * WebKitTestRunner/TestController.h:
3802         * WebKitTestRunner/TestInvocation.cpp:
3803         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
3804
3805 2018-02-16  Per Arne Vollan  <pvollan@apple.com>
3806
3807         Implement stopping of run loop in the WebContent process when using NSRunLoop.
3808         https://bugs.webkit.org/show_bug.cgi?id=182499
3809         <rdar://problem/37247424>
3810
3811         Reviewed by Brent Fulgham.
3812
3813         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3814         * TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: Added.
3815         (TEST):
3816
3817 2018-02-15  Alexey Proskuryakov  <ap@apple.com>
3818
3819         Speed up dSYM generation on build.webkit.org with -gline-tables-only
3820         https://bugs.webkit.org/show_bug.cgi?id=182841
3821         rdar://problem/34579649
3822
3823         Reviewed by Aakash Jain.
3824
3825         Build speed and binary size improvements are so substantial that I'm willing to make
3826         CI builds less suitable for debugging, which is not a common scenario anyway.
3827         Crash logs will still have line numbers in them.
3828
3829         * BuildSlaveSupport/build.webkit.org-config/steps.py: (CompileWebKit.start):
3830
3831 2018-02-15  Don Olmstead  <don.olmstead@sony.com>
3832
3833         WebCore headers should not be included relatively within dependent projects
3834         https://bugs.webkit.org/show_bug.cgi?id=182805
3835
3836         Reviewed by Chris Dumez.
3837
3838         * TestWebKitAPI/win/TestWebCoreStubs.cpp:
3839         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
3840         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
3841         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
3842         * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
3843         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
3844
3845 2018-02-15  Tomas Popela  <tpopela@redhat.com>
3846
3847         run-jsc-stress-tests - skip a test if any of the run commands evals to skip
3848         https://bugs.webkit.org/show_bug.cgi?id=182729
3849
3850         If multiple run commands are specified and one of them evals to skip,
3851         then the test is not skipped, because the run is scheduled while
3852         evaluating other commands.
3853
3854         Remember if the test is going to be skipped - if yes, just stop
3855         evaluating the other run commands.
3856
3857         Reviewed by Saam Barati.
3858
3859         * Scripts/run-jsc-stress-tests:
3860
3861 2018-02-14  Charlie Turner  <cturner@igalia.com>
3862
3863         Get Garden-O-Matic running again.
3864         https://bugs.webkit.org/show_bug.cgi?id=179089
3865
3866         Reviewed by Carlos Alberto Lopez Perez.
3867
3868         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Trac.js:
3869         (parseCommitData): Author field is not always spelled 'author' these days.
3870         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
3871         No longer have a 32-bit builder.
3872         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/perf.js:
3873         (ui.perf.View.base.init): createElement has a required parameter these days.
3874         * Scripts/webkitpy/tool/commands/gardenomatic.py:
3875         (GardenOMatic): Override use_globs so that platform lookup in config.js works.
3876
3877 2018-02-14  Don Olmstead  <don.olmstead@sony.com>
3878
3879         Remove unused ForwardingHeaders directories from Tools
3880         https://bugs.webkit.org/show_bug.cgi?id=182813
3881
3882         Reviewed by Konstantin Tokarev.
3883
3884         * DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h: Removed.
3885         * DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h: Removed.
3886         * DumpRenderTree/ForwardingHeaders/runtime/JSExportMacros.h: Removed.
3887         * DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h: Removed.
3888         * TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h: Removed.
3889
3890 2018-02-14  Daniel Bates  <dabates@apple.com>
3891
3892         Disallow cross-origin subresources from asking for credentials
3893         https://bugs.webkit.org/show_bug.cgi?id=182579
3894         <rdar://problem/36162271>
3895
3896         Reviewed by Andy Estes.
3897
3898         Add test option allowCrossOriginSubresourcesToAskForCredential (defaults to false)
3899         so that tests can toggle between the old behavior and new behavior.
3900
3901         * DumpRenderTree/TestOptions.h:
3902         * DumpRenderTree/TestOptions.mm:
3903         (TestOptions::TestOptions):
3904         * DumpRenderTree/mac/DumpRenderTree.mm:
3905         (setWebPreferencesForTestOptions):
3906         * WebKitTestRunner/TestController.cpp:
3907         (WTR::TestController::resetPreferencesToConsistentValues):
3908         (WTR::updateTestOptionsFromTestHeader):
3909         * WebKitTestRunner/TestOptions.h:
3910         (WTR::TestOptions::hasSameInitializationOptions const):
3911
3912 2018-02-12  Ryosuke Niwa  <rniwa@webkit.org>
3913
3914         REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
3915         https://bugs.webkit.org/show_bug.cgi?id=182564
3916
3917         Reviewed by Wenson Hsieh.
3918
3919         Updated assertions to make sure the trailing "}" of @list rules is includd in the style, the "style" element
3920         is wrapped by "head" element (not present in the pasted markup since the fragment parsing algorithm strips away),
3921         and the style content is enclosed in "<!--" and "-->".
3922
3923         Also use execCommand('insertHTML', ~) to insert the HTML obtained via dataTransfer.getData instead of innerHTML
3924         to make sure our pasting code preserves the special style element for MSO list quirks.
3925
3926         Finally, added two more test cases for pasting content from Microsoft Word's compatibility mode.
3927
3928         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
3929         (TEST):
3930         * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
3931         (TEST):
3932
3933 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
3934
3935         [Tools] --wincairo should imply --64-bit by default.
3936         https://bugs.webkit.org/show_bug.cgi?id=182753
3937
3938         Reviewed by Daniel Bates.
3939
3940         WinCairo does not currently support 32-bit and `--wincairo` itself should refer to a working platform.
3941         This patch ensures x64 is determined correctly for `build-webkit --no-ninja` and `run-webkit-tests`.
3942
3943         * Scripts/webkitdirs.pm:
3944         (determinePassedArchitecture):
3945         (shouldBuild32Bit):
3946         (determineShouldBuild32Bit):
3947         (determineIsWin64):
3948         * Scripts/webkitpy/common/config/ports.py:
3949         (WinCairoPort.build_webkit_command):
3950         * Scripts/webkitpy/common/config/ports_unittest.py:
3951         (DeprecatedPortTest.test_wincairo_port):
3952         * Scripts/webkitpy/port/win.py:
3953         (WinCairoPort):
3954
3955 2018-02-13  Commit Queue  <commit-queue@webkit.org>
3956
3957         Unreviewed, rolling out r228431.
3958         https://bugs.webkit.org/show_bug.cgi?id=182766
3959
3960         Regressed CMake build stability (Requested by dolmstead on
3961         #webkit).
3962
3963         Reverted changeset:
3964
3965         "[CMake] Make WebCore headers copies"
3966         https://bugs.webkit.org/show_bug.cgi?id=182512
3967         https://trac.webkit.org/changeset/228431
3968
3969 2018-02-13  Don Olmstead  <don.olmstead@sony.com>
3970
3971         [CMake] Make WebCore headers copies
3972         https://bugs.webkit.org/show_bug.cgi?id=182512
3973
3974         Reviewed by Keith Miller.
3975
3976         * DumpRenderTree/CMakeLists.txt:
3977         * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
3978         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h:
3979         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h:
3980         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h:
3981         * TestWebKitAPI/PlatformGTK.cmake:
3982         * TestWebKitAPI/PlatformWPE.cmake:
3983         * TestWebKitAPI/PlatformWin.cmake:
3984         * TestWebKitAPI/win/TestWebCoreStubs.cpp:
3985         (loadResourceIntoBuffer):
3986         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
3987         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
3988         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
3989         * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
3990         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
3991
3992 2018-02-13  Chris Dumez  <cdumez@apple.com>
3993
3994         REGRESSION (r228299): Broke reader mode in Safari
3995         https://bugs.webkit.org/show_bug.cgi?id=182697
3996         <rdar://problem/37399012>
3997
3998         Reviewed by Ryosuke Niwa.
3999
4000         Add API test coverage for responding asynchronously to the decidePolicyForNavigationResponse
4001         delegate.
4002
4003         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4004         * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: Added.
4005         (-[TestAsyncNavigationDelegate webView:didFinishNavigation:]):
4006         (-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]):
4007         (-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
4008         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
4009         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
4010         (TestWebKitAPI::TEST):
4011
4012 2018-02-12  John Wilander  <wilander@apple.com>
4013
4014         Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
4015         https://bugs.webkit.org/show_bug.cgi?id=182664
4016         <rdar://problem/37372572>
4017
4018         Reviewed by Brent Fulgham.
4019
4020         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
4021         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
4022         (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom):
4023         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo):
4024         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom):
4025         * WebKitTestRunner/InjectedBundle/TestRunner.h:
4026         * WebKitTestRunner/TestController.cpp:
4027         (WTR::TestController::setStatisticsSubresourceUniqueRedirectFrom):
4028         (WTR::TestController::setStatisticsTopFrameUniqueRedirectTo):
4029         (WTR::TestController::setStatisticsTopFrameUniqueRedirectFrom):
4030         * WebKitTestRunner/TestController.h:
4031         * WebKitTestRunner/TestInvocation.cpp:
4032         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
4033
4034 2018-02-12  Ross Kirsling  <ross.kirsling@sony.com>
4035
4036         download-latest-github-release .py should not use "browser download URL".
4037         https://bugs.webkit.org/show_bug.cgi?id=182646
4038
4039         Reviewed by Per Arne Vollan.
4040
4041         * Scripts/download-latest-github-release.py:
4042         Download request should be a proper GitHub API call and should actually include the token when applicable.
4043         (Also clean up usage of args and print while we're in here.)
4044
4045 2018-02-12  Per Arne Vollan  <pvollan@apple.com>
4046
4047         EWS should run Windows tests.
4048         https://bugs.webkit.org/show_bug.cgi?id=177967
4049
4050         Reviewed by Lucas Forschler.
4051
4052         This will help catch regressions at an early stage.
4053
4054         * Scripts/webkitpy/common/config/ews.json:
4055
4056 2018-02-08  Ryosuke Niwa  <rniwa@webkit.org>
4057
4058         REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
4059         https://bugs.webkit.org/show_bug.cgi?id=182564
4060
4061         Reviewed by Wenson Hsieh.
4062
4063         Added tests for pasting HTML with list items generated by Microsoft Word as well as HTML which looks like
4064         the one generated by Microsoft Word but missing a proper "html" element at the beginning.
4065
4066         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4067         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: Added test cases.
4068         * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: Added test cases.
4069         (msoListMarkupWithoutProperHTMLElement): Added.
4070         * TestWebKitAPI/Tests/WebKitCocoa/mso-list.html: Added.
4071
4072 2018-02-09  Don Olmstead  <don.olmstead@sony.com>
4073
4074         [CMake] Make PAL headers copies
4075         https://bugs.webkit.org/show_bug.cgi?id=182645
4076
4077         Reviewed by Alex Christensen.
4078
4079         * TestWebKitAPI/CMakeLists.txt:
4080
4081 2018-02-08  Wenson Hsieh  <wenson_hsieh@apple.com>
4082
4083         Pasting from Excel no longer provides text/html data
4084         https://bugs.webkit.org/show_bug.cgi?id=182636
4085         <rdar://problem/37087060>
4086
4087         Reviewed by Ryosuke Niwa.
4088
4089         Add new API tests to exercise pasting images with various other content types on macOS, and when dropping images
4090         and HTML markup on iOS. See the WebCore ChangeLog for more detail.
4091
4092         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4093         * TestWebKitAPI/Tests/WebKitCocoa/DataTransfer.html: Added.
4094
4095         Add a new API test harness that dumps various bits of information about a DataTransfer upon paste and drop.
4096         While somewhat similar to some existing harnesses, this makes a distinction between the raw HTML data on the
4097         pasteboard and the actual result of inserting said HTML into the DOM. This allows us to check that the HTML has
4098         been sanitized, while making checks for the actual content of the HTML robust against inline style changes.
4099
4100         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
4101         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: Added.
4102
4103         Add a new test suite to exercise pasting mixed content types. In these test cases, the pasteboard contains a
4104         file, with some combination of plain text, rich text, and URLs.
4105
4106         (imagePath):
4107         (writeTypesAndDataToPasteboard):
4108
4109         Add a helper to write a var-arg list of content types and data to the general NSPasteboard.
4110
4111         (setUpWebView):
4112         (markupString):
4113         (TestWebKitAPI::TEST):
4114         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
4115         (TestWebKitAPI::testIconImageData):
4116         (TestWebKitAPI::TEST):
4117         * TestWebKitAPI/cocoa/TestWKWebView.h:
4118
4119         Move a private declaration of -[WKWebView paste:] out to TestWKWebView.h, so that it can be shared across
4120         multiple tests. Currently, it only resides in PasteImage.mm, but I need it in PasteMixedContent.mm as well.
4121
4122 2018-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
4123
4124         Add a way to check if a host is an IP address
4125         https://bugs.webkit.org/show_bug.cgi?id=182427
4126
4127         Reviewed by Alex Christensen.
4128
4129         Add unit test for URL::hostIsIPAddress().
4130
4131         * TestWebKitAPI/Tests/WebCore/URL.cpp:
4132         (TestWebKitAPI::TEST_F):
4133
4134 2018-02-09  Philippe Normand  <pnormand@igalia.com>
4135
4136         [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
4137         https://bugs.webkit.org/show_bug.cgi?id=176802
4138
4139         Reviewed by Xabier Rodriguez-Calvar.
4140
4141         * gstreamer/jhbuild.modules:
4142         * gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Added.
4143
4144 2018-02-09  Philippe Normand  <pnormand@igalia.com>
4145
4146         [JHBuild] Update Mesa to version 17
4147         https://bugs.webkit.org/show_bug.cgi?id=182599
4148
4149         Reviewed by Carlos Alberto Lopez Perez.
4150
4151         * gtk/jhbuild.modules: Update Mesa (and its dependencies, hopefully) to version 17.3.3.
4152
4153 2018-02-08  Chris Dumez  <cdumez@apple.com>
4154
4155         There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
4156         https://bugs.webkit.org/show_bug.cgi?id=182524
4157         <rdar://problem/9057327>
4158
4159         Reviewed by Ryosuke Niwa.
4160
4161         Add API test coverage.
4162
4163         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4164         * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: Added.
4165         (TestWebKitAPI::runJavaScriptAlert):
4166         (TestWebKitAPI::TEST):
4167         * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: Added.
4168         (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::InjectedBundleDisableOverrideBuiltinsBehaviorTest):
4169         (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize):
4170         * TestWebKitAPI/Tests/WebKit/override-builtins-test.html: Added.
4171
4172 2018-02-08  Michael Catanzaro  <mcatanzaro@igalia.com>
4173
4174         TestController should not exercise cocoa-specific resource load statistics APIs
4175         https://bugs.webkit.org/show_bug.cgi?id=182355
4176
4177         Reviewed by Alex Christensen.
4178
4179         Remove unnecessary use of platform-specific APIs in the TestController, since there are
4180         cross-platform APIs to do the same thing.
4181
4182         Also, ensure callbacks execute before returning from TestController's functions, since
4183         otherwise the tests are guaranteed to be flaky at best, and also since there's nothing to
4184         prevent the TestController from being destroyed before the callbacks execute.
4185
4186         * WebKitTestRunner/TestController.cpp:
4187         (WTR::resourceStatisticsVoidResultCallback):
4188         (WTR::resourceStatisticsBooleanResultCallback):
4189         (WTR::TestController::isStatisticsPrevalentResource):
4190         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
4191         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
4192         (WTR::TestController::isStatisticsHasHadUserInteraction):
4193         (WTR::TestController::isStatisticsGrandfathered):
4194         (WTR::TestController::statisticsUpdateCookiePartitioning):
4195         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
4196         (WTR::TestController::statisticsClearInMemoryAndPersistentStore):
4197         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
4198         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
4199         (WTR::resourceStatisticsCallback): Deleted.
4200         (WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback): Deleted.
4201         * WebKitTestRunner/TestController.h:
4202         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
4203         (WTR::toNSString): Deleted.
4204         (WTR::TestController::setStatisticsLastSeen): Deleted.
4205         (WTR::TestController::setStatisticsPrevalentResource): Deleted.
4206         (WTR::TestController::isStatisticsPrevalentResource): Deleted.
4207         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Deleted.
4208         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Deleted.
4209         (WTR::TestController::setStatisticsHasHadUserInteraction): Deleted.
4210         (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
4211         (WTR::TestController::isStatisticsHasHadUserInteraction): Deleted.
4212         (WTR::TestController::setStatisticsGrandfathered): Deleted.
4213         (WTR::TestController::isStatisticsGrandfathered): Deleted.
4214         (WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin): Deleted.
4215         (WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin): Deleted.
4216         (WTR::TestController::setStatisticsSubresourceUniqueRedirectTo): Deleted.
4217         (WTR::TestController::setStatisticsTimeToLiveUserInteraction): Deleted.
4218         (WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
4219         (WTR::TestController::statisticsProcessStatisticsAndDataRecords): Deleted.
4220         (WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
4221         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
4222         (WTR::TestController::statisticsSubmitTelemetry): Deleted.
4223         (WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Deleted.
4224         (WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted.
4225         (WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured): Deleted.
4226         (WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Deleted.
4227         (WTR::TestController::setStatisticsGrandfatheringTime): Deleted.
4228         (WTR::TestController::setStatisticsMaxStatisticsEntries): Deleted.
4229         (WTR::TestController::setStatisticsPruneEntriesDownTo): Deleted.
4230         (WTR::TestController::statisticsClearInMemoryAndPersistentStore): Deleted.
4231         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Deleted.
4232         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Deleted.
4233         (WTR::TestController::statisticsResetToConsistentState): Deleted.
4234
4235 2018-02-08  Jonathan Bedard  <jbedard@apple.com>
4236
4237         webkit-patch suggest-reviewers dies with AttributeError: 'NoneType' object has no attribute 'revision'
4238         https://bugs.webkit.org/show_bug.cgi?id=182584
4239
4240         Reviewed by Daniel Bates.
4241
4242         It is possible that a specific revision has an empty ChangeLog. In this case, Checkout.commit_info_for_revision
4243         will return 'None'. Checkout.recent_commit_infos_for_files should never return a set with 'None' in it.
4244
4245         * Scripts/webkitpy/common/checkout/checkout.py:
4246         (Checkout.recent_commit_infos_for_files): Remove any empty commit information from the set.
4247         * Scripts/webkitpy/common/checkout/checkout_unittest.py: Add a file which references an empty ChangeLog.
4248
4249 2018-02-08  Matt Lewis  <jlewis3@apple.com>
4250
4251         Unreviewed, rolling out r228261.
4252
4253         This broke an internal build
4254
4255         Reverted changeset:
4256
4257         "Add a way to check if a host is an IP address"
4258         https://bugs.webkit.org/show_bug.cgi?id=182427
4259         https://trac.webkit.org/changeset/228261
4260
4261 2018-02-08  Commit Queue  <commit-queue@webkit.org>
4262