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