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