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