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