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