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