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