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