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