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