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