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