[LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
[WebKit-https.git] / Tools / ChangeLog
1 2018-03-20  Zalan Bujtas  <zalan@apple.com>
2
3         [LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
4         https://bugs.webkit.org/show_bug.cgi?id=183777
5
6         Reviewed by Antti Koivisto.
7
8         This is in preparation for moving out states from the formatting contexts.
9
10         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
11         (BlockFormattingContext):
12         * LayoutReloaded/FormattingContext/FormattingContext.js:
13         (FormattingContext):
14         (FormattingContext.prototype.layoutState):
15         (FormattingContext.prototype.layoutContext):
16         (FormattingContext.prototype.layout):
17         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
18         (InlineFormattingContext):
19         * LayoutReloaded/FormattingState/BlockFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
20         (BlockFormattingState):
21         * LayoutReloaded/FormattingState/FormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
22         (FormattingState):
23         (FormattingState.prototype.formattingContext):
24         (FormattingState.prototype.layoutContext):
25         (FormattingState.prototype._setFormattingContext):
26         * LayoutReloaded/FormattingState/InlineFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
27         (InlineFormattingState):
28         * LayoutReloaded/LayoutContext.js:
29         (LayoutContext):
30         (LayoutContext.prototype.layout):
31         (LayoutContext.prototype._createFormattingState):
32         (LayoutContext.prototype._createFormattingContext): Deleted.
33         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
34         * LayoutReloaded/test/index.html:
35
36 2018-03-19  Zalan Bujtas  <zalan@apple.com>
37
38         [LayoutReloaded] Layout.Box should not create the formatting context.
39         https://bugs.webkit.org/show_bug.cgi?id=183766
40
41         Reviewed by Antti Koivisto.
42
43         Since the formattingContext's lifetime is tied to the layout, the LayoutContext
44         should construct it instead.
45
46         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
47         (BlockFormattingContext):
48         (BlockFormattingContext.prototype.layout):
49         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
50         (BlockFormattingContext.prototype._contentHeight):
51         * LayoutReloaded/FormattingContext/FormattingContext.js:
52         (FormattingContext):
53         (FormattingContext.prototype.layoutContext):
54         (FormattingContext.prototype.toDisplayBox):
55         (FormattingContext.prototype._outOfFlowDescendants):
56         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
57         (InlineFormattingContext):
58         (InlineFormattingContext.prototype.layout):
59         * LayoutReloaded/Layout.js:
60         (layout):
61         * LayoutReloaded/LayoutContext.js:
62         (LayoutContext.prototype.layout):
63         (LayoutContext.prototype._createFormattingContext):
64         (LayoutContext):
65         (LayoutContext.prototype.layoutFormattingContext): Deleted.
66         * LayoutReloaded/LayoutTree/Box.js:
67         (Layout.Box):
68         (Layout.Box.prototype.establishedFormattingContext): Deleted.
69         * LayoutReloaded/misc/headers/Box.h:
70
71 2018-03-19  Chris Dumez  <cdumez@apple.com>
72
73         Have one service worker process per security origin
74         https://bugs.webkit.org/show_bug.cgi?id=183600
75         <rdar://problem/35280128>
76
77         Reviewed by Brady Eidson.
78
79         Add API test coverage.
80
81         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
82
83 2018-03-19  Zalan Bujtas  <zalan@apple.com>
84
85         [LayoutReloaded] Remove border/padding/contentBox() functions from Layout.Box
86         https://bugs.webkit.org/show_bug.cgi?id=183761
87
88         Reviewed by Antti Koivisto.
89
90         Display.Box has them.
91
92         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
93         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
94         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
95         (BlockFormattingContext.prototype._horizontalConstraint):
96         (BlockFormattingContext.prototype._contentHeight):
97         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
98         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
99         * LayoutReloaded/FormattingContext/FloatingContext.js:
100         (FloatingContext.prototype._availableSpace):
101         * LayoutReloaded/FormattingContext/FormattingContext.js:
102         (FormattingContext.prototype.absoluteBorderBox):
103         (FormattingContext.prototype.absolutePaddingBox):
104         (FormattingContext.prototype.absoluteContentBox):
105         * LayoutReloaded/LayoutTree/Box.js:
106         (Layout.Box.prototype.isDescendantOf):
107         (Layout.Box):
108         (Layout.Box.prototype.borderBox): Deleted.
109         (Layout.Box.prototype.paddingBox): Deleted.
110         (Layout.Box.prototype.contentBox): Deleted.
111
112 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
113
114         Unreviewed, another quick fix for r229699
115
116         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
117
118         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
119         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
120
121 2018-03-19  Zalan Bujtas  <zalan@apple.com>
122
123         [LayoutReloaded] Move statically positioned absolute box positioning to _computeOutOfFlowPosition
124         https://bugs.webkit.org/show_bug.cgi?id=183750
125
126         Reviewed by Antti Koivisto.
127
128         * LayoutReloaded/DisplayTree/Box.js:
129         (Display.Box.prototype.setTop):
130         (Display.Box.prototype.paddingBox):
131         (Display.Box.prototype.contentBox):
132         (Display.Box):
133         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
134         (BlockFormattingContext.prototype._computeStaticPosition):
135         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
136         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
137         * LayoutReloaded/FormattingContext/FormattingContext.js:
138         (FormattingContext.prototype.absoluteMarginBox):
139         (FormattingContext.prototype.absoluteBorderBox):
140         (FormattingContext.prototype.absolutePaddingBox):
141         (FormattingContext.prototype.absoluteContentBox):
142         (FormattingContext.prototype._toAbsolutePosition):
143         (FormattingContext.prototype._toRootAbsolutePosition):
144         (FormattingContext.prototype.toDisplayBox):
145         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
146         (Layout.InitialBlockContainer.prototype.establishesBlockFormattingContext):
147         (Layout.InitialBlockContainer):
148         (Layout.InitialBlockContainer.prototype.paddingBox): Deleted.
149         (Layout.InitialBlockContainer.prototype.contentBox): Deleted.
150         * LayoutReloaded/Utils.js:
151         (Utils.isStaticallyPositioned):
152
153 2018-03-19  Chris Dumez  <cdumez@apple.com>
154
155         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
156         https://bugs.webkit.org/show_bug.cgi?id=183702
157         <rdar://problem/38566060>
158
159         Reviewed by Alex Christensen.
160
161         Add API test coverage.
162
163         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
164         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
165         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
166         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
167         (TEST):
168
169 2018-03-19  Daniel Bates  <dabates@apple.com>
170
171         test-webkitpy no longer runs WebKit2 tests
172         https://bugs.webkit.org/show_bug.cgi?id=183724
173
174         Reviewed by Alexey Proskuryakov.
175
176         The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
177
178         * Scripts/webkitpy/test/main.py:
179         (main):
180
181 2018-03-19  Daniel Bates  <dabates@apple.com>
182
183         Make run-webkit-app work for non-GUI apps
184         https://bugs.webkit.org/show_bug.cgi?id=183701
185
186         Reviewed by Lucas Forschler.
187
188         Launch the app directly if it is an executable file. Otherwise, assume it is an app bundle
189         and launch it using open(1) as we currently do.
190
191         Note that open(1) is meant for launching GUI apps. Standard output and standard error are
192         not sent to the tty when using open(1) to launch a non-GUI app.
193
194         * Scripts/run-webkit-app: We make the assumption that 
195         * Scripts/webkitdirs.pm:
196             - Define and export constant DO_NOT_USE_OPEN_COMMAND.
197
198 2018-03-19  Daniel Bates  <dabates@apple.com>
199
200         run-webkit-app -g does not work
201         https://bugs.webkit.org/show_bug.cgi?id=183699
202
203         Reviewed by Lucas Forschler.
204
205         Check for the optional command line argument -g/--guard-malloc before taking the
206         first argument passed to be the path to the app to run.
207
208         * Scripts/run-webkit-app:
209
210 2018-03-18  Commit Queue  <commit-queue@webkit.org>
211
212         Unreviewed, rolling out r229689.
213         https://bugs.webkit.org/show_bug.cgi?id=183735
214
215         Causes fast/loader/inner-iframe-loads-data-url-into-parent-on-
216         unload-crash.html to fail with async delegates (Requested by
217         cdumez_ on #webkit).
218
219         Reverted changeset:
220
221         "WebKit.WebsitePoliciesAutoplayQuirks API test times out with
222         async policy delegates"
223         https://bugs.webkit.org/show_bug.cgi?id=183702
224         https://trac.webkit.org/changeset/229689
225
226 2018-03-18  Zalan Bujtas  <zalan@apple.com>
227
228         [LayoutReloaded] Remove left/right width/height getters from Layout.Box
229         https://bugs.webkit.org/show_bug.cgi?id=183734
230
231         Reviewed by Antti Koivisto.
232
233         ...and use Display.Box instead.
234
235         * LayoutReloaded/DisplayTree/Box.js:
236         (Display.Box.prototype.bottomRight):
237         (Display.Box.prototype.size):
238         (Display.Box.prototype.height):
239         (Display.Box.prototype.width):
240         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
241         (BlockFormattingContext.prototype._computeStaticPosition):
242         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
243         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
244         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
245         * LayoutReloaded/FormattingContext/FloatingContext.js:
246         (FloatingContext.prototype._positionForClear):
247         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
248         (FloatingContext.prototype._adjustedFloatingPosition):
249         * LayoutReloaded/FormattingContext/FormattingContext.js:
250         (FormattingContext.prototype.absoluteMarginBox):
251         (FormattingContext.prototype.absoluteBorderBox):
252         (FormattingContext.prototype.absolutePaddingBox):
253         (FormattingContext.prototype.absoluteContentBox):
254         (FormattingContext.prototype._toAbsolutePosition):
255         (FormattingContext.prototype._toRootAbsolutePosition):
256         * LayoutReloaded/LayoutTree/Box.js:
257         (Layout.Box.prototype.rect): Deleted.
258         (Layout.Box.prototype.topLeft): Deleted.
259         (Layout.Box.prototype.bottomRight): Deleted.
260         * LayoutReloaded/Utils.js:
261         (Utils._dumpBox):
262         (Utils.mapToContainer): Deleted.
263
264 2018-03-18  Zalan Bujtas  <zalan@apple.com>
265
266         [LayoutReloaded] Remove left/right width/height setters from Layout.Box
267         https://bugs.webkit.org/show_bug.cgi?id=183731
268
269         Reviewed by Antti Koivisto.
270
271         ...and use Display.Box instead.
272
273         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
274         (BlockFormattingContext.prototype._computeStaticPosition):
275         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
276         (BlockFormattingContext.prototype._computeFloatingWidth):
277         (BlockFormattingContext.prototype._computeInFlowWidth):
278         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
279         (BlockFormattingContext.prototype._computeFloatingHeight):
280         (BlockFormattingContext.prototype._computeInFlowHeight):
281         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
282         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
283         * LayoutReloaded/FormattingContext/FloatingContext.js:
284         (FloatingContext.prototype.computePosition):
285         * LayoutReloaded/FormattingContext/FormattingContext.js:
286         (FormattingContext.prototype._toDisplayBox):
287         (FormattingContext.prototype._toLayoutBox):
288         * LayoutReloaded/Layout.js:
289         (layout):
290         * LayoutReloaded/LayoutTree/Box.js:
291         (Layout.Box.prototype.setTopLeft): Deleted.
292         (Layout.Box.prototype.setSize): Deleted.
293         (Layout.Box.prototype.setWidth): Deleted.
294         (Layout.Box.prototype.setHeight): Deleted.
295
296 2018-03-18  Zalan Bujtas  <zalan@apple.com>
297
298         [LayoutReloaded] Collect out-of-flow positioned boxes for a given formatting context.
299         https://bugs.webkit.org/show_bug.cgi?id=183730
300
301         Reviewed by Antti Koivisto.
302
303         Collect and layout out-of-flow positioned boxes as the final step of the formatting context layout.
304
305         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
306         (BlockFormattingContext.prototype.layout):
307         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
308         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
309         (BlockFormattingContext.prototype._placePositionedDescendants): Deleted.
310         (BlockFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
311         * LayoutReloaded/FormattingContext/FormattingContext.js:
312         (FormattingContext.prototype._toAbsolutePosition):
313         (FormattingContext.prototype._outOfFlowDescendants):
314         (FormattingContext):
315         * LayoutReloaded/LayoutTree/Box.js:
316         (Layout.Box.prototype.nextInFlowOrFloatSibling):
317         (Layout.Box.prototype.isDescendantOf):
318         * LayoutReloaded/LayoutTree/Container.js:
319         (Layout.Container.prototype.firstInFlowOrFloatChild):
320         (Layout.Container.prototype.hasInFlowOrFloatChild):
321         (Layout.Container.prototype.outOfFlowDescendants):
322         (Layout.Container):
323         * LayoutReloaded/Utils.js:
324         (Utils.isDescendantOf): Deleted.
325         (Utils.collectOutOfFlowDescendants): Deleted.
326
327 2018-03-17  Jiewen Tan  <jiewen_tan@apple.com>
328
329         [WebAuthN] Implement authenticatorMakeCredential
330         https://bugs.webkit.org/show_bug.cgi?id=183527
331         <rdar://problem/35275886>
332
333         Reviewed by Brent Fulgham.
334
335         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
336         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Added.
337         (TestWebKitAPI::getTestKey):
338         (TestWebKitAPI::cleanUpKeychain):
339         (TestWebKitAPI::LACantEvaluatePolicySwizzler::LACantEvaluatePolicySwizzler):
340         (TestWebKitAPI::LACantEvaluatePolicySwizzler::cantEvaluatePolicy):
341         (TestWebKitAPI::LACanEvaluatePolicySwizzler::LACanEvaluatePolicySwizzler):
342         (TestWebKitAPI::LACanEvaluatePolicySwizzler::canEvaluatePolicy):
343         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::LAEvaluatePolicyFailedSwizzler):
344         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
345         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::LAEvaluatePolicyPassedSwizzler):
346         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
347         (TestWebKitAPI::TestLocalAuthenticator::setFailureFlag):
348         (TestWebKitAPI::TEST):
349
350 2018-03-17  Zalan Bujtas  <zalan@apple.com>
351
352         [LayoutReloaded] BlockFormattingContext::placePositionedDescendants takes care of both in- and out-of-flow placement
353         https://bugs.webkit.org/show_bug.cgi?id=183727
354
355         Reviewed by Antti Koivisto.
356
357         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
358         (BlockFormattingContext.prototype.layout):
359         (BlockFormattingContext.prototype._placePositionedDescendants):
360         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
361         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
362         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
363         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
364         * LayoutReloaded/test/index.html:
365         * LayoutReloaded/test/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
366
367 2018-03-17  Zalan Bujtas  <zalan@apple.com>
368
369         [LayoutReloaded] Ensure that positioning happens within the formatting context
370         https://bugs.webkit.org/show_bug.cgi?id=183722
371
372         Reviewed by Antti Koivisto.
373
374         All sizing and positioning need to happen in the formatting context that the box lives in
375         including the final position of in- and out-of-flow descendants.
376
377         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
378         (BlockFormattingContext.prototype.layout):
379         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
380         * LayoutReloaded/LayoutTree/Box.js:
381         (Layout.Box.prototype.establishesBlockFormattingContext):
382         (Layout.Box.prototype.isPositioned):
383         (Layout.Box.prototype.isRelativelyPositioned):
384         (Layout.Box.prototype.isAbsolutelyPositioned):
385         (Layout.Box.prototype.isOutOfFlowPositioned):
386         (Layout.Box.prototype.containingBlock):
387         (Layout.Box.prototype.isRelativePositioned): Deleted.
388         (Layout.Box.prototype.isAbsolutePositioned): Deleted.
389         * LayoutReloaded/Utils.js:
390         (Utils.isRelativelyPositioned):
391         (Utils.isAbsolutelyPositioned):
392         (Utils.isRelativePositioned): Deleted.
393         (Utils.isAbsolutePositioned): Deleted.
394         * LayoutReloaded/misc/headers/Box.h:
395
396 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
397
398         Unreviewed, rolling out r229688.
399
400         There's a solution that doesn't require this SPI.
401
402         Reverted changeset:
403
404         "Add SPI to expose width and height anchors for WKWebView's
405         content view"
406         https://bugs.webkit.org/show_bug.cgi?id=183711
407         https://trac.webkit.org/changeset/229688
408
409 2018-03-16  Zalan Bujtas  <zalan@apple.com>
410
411         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext
412         https://bugs.webkit.org/show_bug.cgi?id=183719
413
414         Reviewed by Antti Koivisto.
415
416         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
417         (BlockFormattingContext):
418         (BlockFormattingContext.prototype.layout):
419         (BlockFormattingContext.prototype._shrinkToFitWidth):
420         (BlockFormattingContext.prototype._toAbsolutePosition): Deleted.
421         (BlockFormattingContext.prototype._needsLayout): Deleted.
422         (BlockFormattingContext.prototype._addToLayoutQueue): Deleted.
423         (BlockFormattingContext.prototype._nextInLayoutQueue): Deleted.
424         (BlockFormattingContext.prototype._removeFromLayoutQueue): Deleted.
425         (BlockFormattingContext.prototype._createDisplayBox): Deleted.
426         (BlockFormattingContext.prototype._toDisplayBox): Deleted.
427         (BlockFormattingContext.prototype._toLayoutBox): Deleted.
428         * LayoutReloaded/FormattingContext/FormattingContext.js:
429         (FormattingContext):
430         (FormattingContext.prototype._toAbsolutePosition):
431         (FormattingContext.prototype._descendantNeedsLayout):
432         (FormattingContext.prototype._addToLayoutQueue):
433         (FormattingContext.prototype._nextInLayoutQueue):
434         (FormattingContext.prototype._removeFromLayoutQueue):
435         (FormattingContext.prototype._createDisplayBox):
436         (FormattingContext.prototype._toDisplayBox):
437         (FormattingContext.prototype._toLayoutBox):
438         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
439         (InlineFormattingContext.prototype.layout):
440
441 2018-03-16  Chris Dumez  <cdumez@apple.com>
442
443         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
444         https://bugs.webkit.org/show_bug.cgi?id=183702
445
446         Reviewed by Alex Christensen.
447
448         Add API test coverage.
449
450         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
451         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
452         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
453         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
454         (TEST):
455
456 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
457
458         Add SPI to expose width and height anchors for WKWebView's content view
459         https://bugs.webkit.org/show_bug.cgi?id=183711
460         <rdar://problem/38562899>
461
462         Reviewed by Tim Horton.
463
464         Adds an API test exercising the new SPI.
465
466         * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
467         (checkCGRect):
468         (TEST):
469
470 2018-03-16  Chris Dumez  <cdumez@apple.com>
471
472         WebKit.RestoreSessionStateContainingScrollRestorationDefault API test is failing with async policy delegates
473         https://bugs.webkit.org/show_bug.cgi?id=183679
474
475         Reviewed by Alex Christensen.
476
477         Add API test coverage.
478
479         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
480         (TestWebKitAPI::decidePolicyForNavigationAction):
481         (TestWebKitAPI::decidePolicyForResponse):
482         (TestWebKitAPI::TEST):
483
484 2018-03-16  Zalan Bujtas  <zalan@apple.com>
485
486         [LayoutReloaded] Introduce Display.Box
487         https://bugs.webkit.org/show_bug.cgi?id=183700
488
489         Reviewed by Antti Koivisto.
490
491         Display.Box objects will end up in the display(box) tree. Currently
492         they are just hanging off of the Layout.Box objects.
493
494         * LayoutReloaded/DisplayTree/Box.js: Added.
495         (Display.Box):
496         (Display.Box.prototype.rect):
497         (Display.Box.prototype.top):
498         (Display.Box.prototype.left):
499         (Display.Box.prototype.bottom):
500         (Display.Box.prototype.right):
501         (Display.Box.prototype.topLeft):
502         (Display.Box.prototype.bottomRight):
503         (Display.Box.prototype.setTopLeft):
504         (Display.Box.prototype.setSize):
505         (Display.Box.prototype.setWidth):
506         (Display.Box.prototype.setHeight):
507         (Display.Box.prototype.borderBox):
508         (Display.Box.prototype.paddingBox):
509         (Display.Box.prototype.contentBox):
510         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
511         (BlockFormattingContext):
512         (BlockFormattingContext.prototype.layout):
513         (BlockFormattingContext.prototype._toAbsolutePosition):
514         (BlockFormattingContext.prototype._needsLayout):
515         (BlockFormattingContext.prototype._addToLayoutQueue):
516         (BlockFormattingContext.prototype._nextInLayoutQueue):
517         (BlockFormattingContext.prototype._removeFromLayoutQueue):
518         (BlockFormattingContext.prototype._createDisplayBox):
519         (BlockFormattingContext.prototype._toDisplayBox):
520         (BlockFormattingContext.prototype._toLayoutBox):
521         * LayoutReloaded/Layout.js:
522         (layout):
523         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
524         * LayoutReloaded/LayoutTree/Box.js:
525         (Layout.Box):
526         (Layout.Box.prototype.setDisplayBox):
527         (Layout.Box.prototype.displayBox):
528         (Layout.Box.prototype.rect):
529         (Layout.Box.prototype.setTopLeft):
530         (Layout.Box.prototype.setSize):
531         (Layout.Box.prototype.setWidth):
532         (Layout.Box.prototype.setHeight):
533         (Layout.Box.prototype.borderBox):
534         (Layout.Box.prototype.paddingBox):
535         (Layout.Box.prototype.contentBox):
536         * LayoutReloaded/test/index.html:
537
538 2018-03-16  Chris Dumez  <cdumez@apple.com>
539
540         URLSchemeHandler.Basic API test fails with async policy delegates
541         https://bugs.webkit.org/show_bug.cgi?id=183678
542
543         Reviewed by Alex Christensen.
544
545         Add API test coverage.
546
547         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
548         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
549         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
550         (TEST):
551
552 2018-03-16  Zalan Bujtas  <zalan@apple.com>
553
554         [LayoutReloaded] Utils.computed* functions should just take node instead of box.
555         https://bugs.webkit.org/show_bug.cgi?id=183697
556
557         Reviewed by Antti Koivisto.
558
559         This is in preparation for introducing the display tree.
560
561         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
562         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
563         (BlockFormattingContext.prototype._computeFloatingWidth):
564         (BlockFormattingContext.prototype._computeInFlowWidth):
565         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
566         (BlockFormattingContext.prototype._computeFloatingHeight):
567         (BlockFormattingContext.prototype._computeInFlowHeight):
568         (BlockFormattingContext.prototype._shrinkToFitWidth):
569         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
570         (BlockMarginCollapse._nonCollapsedMarginTop):
571         (BlockMarginCollapse._nonCollapsedMarginBottom):
572         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
573         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
574         * LayoutReloaded/FormattingContext/FormattingContext.js:
575         (FormattingContext.prototype.marginTop):
576         (FormattingContext.prototype.marginLeft):
577         (FormattingContext.prototype.marginBottom):
578         (FormattingContext.prototype.marginRight):
579         * LayoutReloaded/LayoutTree/Box.js:
580         (Layout.Box.prototype.paddingBox):
581         (Layout.Box.prototype.contentBox):
582         (Layout.Box):
583         * LayoutReloaded/Utils.js:
584         (Utils.computedMarginTop):
585         (Utils.computedMarginLeft):
586         (Utils.computedMarginBottom):
587         (Utils.computedMarginRight):
588         (Utils.computedBorderTopLeft):
589         (Utils.computedBorderBottomRight):
590         (Utils.computedPaddingTopLeft):
591         (Utils.computedPaddingBottomRight):
592         (Utils.computedBorderAndPaddingTop):
593         (Utils.computedBorderAndPaddingLeft):
594         (Utils.computedBorderAndPaddingBottom):
595         (Utils.computedBorderAndPaddingRight):
596         (Utils.computedHorizontalBorderAndPadding):
597         (Utils.computedVerticalBorderAndPadding):
598         (Utils.computedLineHeight):
599         (Utils.hasClearLeft):
600         (Utils.hasClearRight):
601         (Utils.hasClearBoth):
602
603 2018-03-15  Zalan Bujtas  <zalan@apple.com>
604
605         [LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
606         https://bugs.webkit.org/show_bug.cgi?id=183691
607
608         Reviewed by Antti Koivisto.
609
610         While laying out the boxes in a block formatting context, if we happen to need
611         to get to the containing block of a box to compute geometry, it should always be a
612         descendant of the root container (or the root container itself).
613         Nothing outside of the formatting context should be able to impact the boxes inside.
614
615         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
616         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
617         (BlockFormattingContext.prototype._toAbsolutePosition):
618         (BlockFormattingContext):
619         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
620         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
621         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
622         * LayoutReloaded/LayoutTree/Box.js:
623         (Layout.Box.prototype.isRootBox):
624         (Layout.Box.prototype.isRootElement): Deleted.
625         * LayoutReloaded/Utils.js:
626         (Utils.isDescendantOf):
627         (Utils.mapStaticToAbsolute): Deleted.
628         * LayoutReloaded/misc/headers/Box.h:
629
630 2018-03-15  Wenson Hsieh  <wenson_hsieh@apple.com>
631
632         [iOS WK2] Hit-testing fails when specifying a large top content inset
633         https://bugs.webkit.org/show_bug.cgi?id=183648
634         <rdar://problem/38421894>
635
636         Reviewed by Tim Horton.
637
638         Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
639         not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
640         as (viewHeight - inset.top) or (viewHeight - inset.bottom).
641
642         See WebKit ChangeLog for more details.
643
644         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
645         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.
646         (TestWebKitAPI::TEST):
647
648 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
649
650         Add unit-test for NetworkTransaction URLError handling
651         https://bugs.webkit.org/show_bug.cgi?id=183664
652
653         Reviewed by Alexey Proskuryakov.
654
655         * Scripts/webkitpy/common/net/networktransaction_unittest.py:
656         (NetworkTransactionTest._raise_URLError): Method to raise URLError.
657         (NetworkTransactionTest.test_retry_on_HTTPError): Renamed from test_retry.
658         (NetworkTransactionTest.test_retry_on_URLError): unit-test for testing URLError handling.
659
660 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
661
662         EWS should print the URL in logs on URLError
663         https://bugs.webkit.org/show_bug.cgi?id=183651
664
665         Reviewed by Alexey Proskuryakov.
666
667         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
668         (Bugzilla.open_url): Pass the url.
669         * Scripts/webkitpy/common/net/networktransaction.py:
670         (NetworkTransaction.run): Accept optional url parameter and print it on URLError.
671
672 2018-03-15  Zalan Bujtas  <zalan@apple.com>
673
674         [LayoutReloaded] Introduce Layout namespace
675         https://bugs.webkit.org/show_bug.cgi?id=183659
676
677         Reviewed by Antti Koivisto.
678
679         This is in preparation for introducing the display tree.
680         Box -> Layout.Box
681
682         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
683         (BlockFormattingContext.prototype.layout):
684         (BlockFormattingContext.prototype.computeWidth):
685         (BlockFormattingContext.prototype.computeHeight):
686         (BlockFormattingContext.prototype.marginTop):
687         (BlockFormattingContext.prototype.marginBottom):
688         (BlockFormattingContext.prototype._computeStaticPosition):
689         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
690         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
691         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
692         (BlockFormattingContext.prototype._computeFloatingWidth):
693         (BlockFormattingContext.prototype._computeInFlowWidth):
694         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
695         (BlockFormattingContext.prototype._computeFloatingHeight):
696         (BlockFormattingContext.prototype._computeInFlowHeight):
697         (BlockFormattingContext.prototype._horizontalConstraint):
698         (BlockFormattingContext.prototype._contentHeight):
699         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
700         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
701         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
702         (BlockFormattingContext.prototype._shrinkToFitWidth):
703         (BlockFormattingContext):
704         (BlockFormattingContext.prototype._computeHorizontalConstraint): Deleted.
705         (BlockFormattingContext.prototype._computeContentHeight): Deleted.
706         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
707         (BlockMarginCollapse.marginTop):
708         (BlockMarginCollapse.marginBottom):
709         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
710         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
711         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
712         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
713         (BlockMarginCollapse._nonCollapsedMarginTop):
714         (BlockMarginCollapse._nonCollapsedMarginBottom):
715         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
716         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
717         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
718         (BlockMarginCollapse):
719         * LayoutReloaded/FormattingContext/FloatingContext.js:
720         (FloatingContext.prototype.computePosition):
721         (FloatingContext.prototype._positionForClear):
722         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
723         * LayoutReloaded/FormattingContext/FormattingContext.js:
724         (FormattingContext.prototype.computeWidth):
725         (FormattingContext.prototype.computeHeight):
726         (FormattingContext.prototype.marginTop):
727         (FormattingContext.prototype.marginLeft):
728         (FormattingContext.prototype.marginBottom):
729         (FormattingContext.prototype.marginRight):
730         (FormattingContext.prototype.absoluteMarginBox):
731         (FormattingContext.prototype.absoluteBorderBox):
732         (FormattingContext.prototype.absolutePaddingBox):
733         (FormattingContext.prototype.absoluteContentBox):
734         (FormattingContext):
735         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
736         (InlineFormattingContext.prototype.layout):
737         * LayoutReloaded/LayoutTree/BlockContainer.js:
738         (BlockContainer): Deleted.
739         (BlockContainer.prototype.establishesInlineFormattingContext): Deleted.
740         * LayoutReloaded/LayoutTree/Box.js:
741         (Box): Deleted.
742         (Box.prototype.id): Deleted.
743         (Box.prototype.setRendererName): Deleted.
744         (Box.prototype.name): Deleted.
745         (Box.prototype.node): Deleted.
746         (Box.prototype.parent): Deleted.
747         (Box.prototype.nextSibling): Deleted.
748         (Box.prototype.nextInFlowSibling): Deleted.
749         (Box.prototype.previousSibling): Deleted.
750         (Box.prototype.previousInFlowSibling): Deleted.
751         (Box.prototype.setParent): Deleted.
752         (Box.prototype.setNextSibling): Deleted.
753         (Box.prototype.setPreviousSibling): Deleted.
754         (Box.prototype.rect): Deleted.
755         (Box.prototype.topLeft): Deleted.
756         (Box.prototype.bottomRight): Deleted.
757         (Box.prototype.setTopLeft): Deleted.
758         (Box.prototype.setSize): Deleted.
759         (Box.prototype.setWidth): Deleted.
760         (Box.prototype.setHeight): Deleted.
761         (Box.prototype.isContainer): Deleted.
762         (Box.prototype.isBlockLevelBox): Deleted.
763         (Box.prototype.isBlockContainerBox): Deleted.
764         (Box.prototype.isInlineLevelBox): Deleted.
765         (Box.prototype.setIsAnonymous): Deleted.
766         (Box.prototype.isAnonymous): Deleted.
767         (Box.prototype.establishesFormattingContext): Deleted.
768         (Box.prototype.establishedFormattingContext): Deleted.
769         (Box.prototype.establishesBlockFormattingContext): Deleted.
770         (Box.prototype.establishesInlineFormattingContext): Deleted.
771         (Box.prototype.isPositioned): Deleted.
772         (Box.prototype.isRelativePositioned): Deleted.
773         (Box.prototype.isAbsolutePositioned): Deleted.
774         (Box.prototype.isFixedPositioned): Deleted.
775         (Box.prototype.isInFlow): Deleted.
776         (Box.prototype.isOutOfFlowPositioned): Deleted.
777         (Box.prototype.isInFlowPositioned): Deleted.
778         (Box.prototype.isFloatingPositioned): Deleted.
779         (Box.prototype.isFloatingOrOutOfFlowPositioned): Deleted.
780         (Box.prototype.isRootElement): Deleted.
781         (Box.prototype.containingBlock): Deleted.
782         (Box.prototype.borderBox): Deleted.
783         (Box.prototype.paddingBox): Deleted.
784         (Box.prototype.contentBox): Deleted.
785         * LayoutReloaded/LayoutTree/Container.js:
786         (Container): Deleted.
787         (Container.prototype.isContainer): Deleted.
788         (Container.prototype.setFirstChild): Deleted.
789         (Container.prototype.setLastChild): Deleted.
790         (Container.prototype.firstChild): Deleted.
791         (Container.prototype.firstInFlowChild): Deleted.
792         (Container.prototype.lastChild): Deleted.
793         (Container.prototype.lastInFlowChild): Deleted.
794         (Container.prototype.hasChild): Deleted.
795         (Container.prototype.hasInFlowChild): Deleted.
796         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
797         (InitialBlockContainer): Deleted.
798         (InitialBlockContainer.prototype.establishesBlockFormattingContext): Deleted.
799         (InitialBlockContainer.prototype.paddingBox): Deleted.
800         (InitialBlockContainer.prototype.contentBox): Deleted.
801         * LayoutReloaded/LayoutTree/InlineBox.js:
802         (InlineBox): Deleted.
803         (InlineBox.prototype.setText): Deleted.
804         (InlineBox.prototype.text): Deleted.
805         * LayoutReloaded/TreeBuilder.js:
806         (TreeBuilder.prototype.createTree):
807         (TreeBuilder.prototype._createAndAttachBox):
808         * LayoutReloaded/Utils.js:
809         (Utils._dumpBox):
810
811 2018-03-14  Chris Fleizach  <cfleizach@apple.com>
812
813         AX: Implement accessible dismiss action on iOS
814         https://bugs.webkit.org/show_bug.cgi?id=183352
815         <rdar://problem/38161500>
816
817         Reviewed by Zalan Bujtas.
818
819         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
820         (WTR::AccessibilityUIElement::dismiss const):
821         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
822         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
823         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
824         (WTR::AccessibilityUIElement::dismiss):
825
826 2018-03-14  Youenn Fablet  <youenn@apple.com>
827
828         Update libwebrtc up to 36af4e9614f707f733eb2340fae66d6325aaac5b
829         https://bugs.webkit.org/show_bug.cgi?id=183481
830
831         Reviewed by Eric Carlson.
832
833         * Scripts/webkitpy/style/checker.py: Do not check style.
834
835 2018-03-14  Brendan McLoughlin  <brendan@bocoup.com>
836
837         Add label on github when exporting wpt tests to w3c/web-platform-test repo
838         https://bugs.webkit.org/show_bug.cgi?id=183575
839
840         Reviewed by Youenn Fablet.
841
842         * Scripts/webkitpy/w3c/test_exporter.py:
843         (TestExporter.make_pull_request):
844         (parse_args):
845         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
846         (TestExporterTest.test_export):
847
848 2018-03-14  Zalan Bujtas  <zalan@apple.com>
849
850         [LayoutReloaded] Add InlineBox dump
851         https://bugs.webkit.org/show_bug.cgi?id=183625
852
853         Reviewed by Antti Koivisto.
854
855         Right now line boxes live off of the inline formatting context but that's temporary and
856         they will be moved over to the BoxTree.
857
858         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
859         (BlockFormattingContext.prototype._computeContentHeight):
860         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
861         (InlineFormattingContext):
862         (InlineFormattingContext.prototype.lines):
863         (InlineFormattingContext.prototype.layout):
864         (InlineFormattingContext.prototype._handleText):
865         (InlineFormattingContext.prototype._commitLine):
866         (InlineFormattingContext.prototype._initializeLine):
867         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
868         (Line):
869         (Line.prototype.isEmpty):
870         (Line.prototype.rect):
871         (Line.prototype.lineBoxes):
872         (Line.prototype.addLineBox):
873         (Line.prototype.appendFragment): Deleted.
874         * LayoutReloaded/README.md:
875         * LayoutReloaded/Utils.js:
876         (Utils.computedLineHeight):
877         (Utils.isBlockContainerElement):
878         (Utils.textHeight):
879         (Utils._dumpBox):
880         (Utils._dumpLines.):
881         (Utils._dumpLines):
882         (Utils._dumpTree):
883         (Utils.precisionRound):
884         (Utils):
885         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
886         * LayoutReloaded/test/index.html:
887
888 2018-03-14  Tim Horton  <timothy_horton@apple.com>
889
890         Fix the build after r229567
891
892         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
893
894 2018-03-13  Jer Noble  <jer.noble@apple.com>
895
896         [iOS] Muted media playback can interrupt out-of-process audio
897         https://bugs.webkit.org/show_bug.cgi?id=183606
898         <rdar://problem/37466253>
899
900         Reviewed by Eric Carlson.
901
902         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
903         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
904         (TestWebKitAPI::TEST):
905         * TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.
906
907 2018-03-13  Ross Kirsling  <ross.kirsling@sony.com>
908
909         [Win] Layout Test fast/html/menuitem-element.html is failing.
910         https://bugs.webkit.org/show_bug.cgi?id=179299
911
912         Reviewed by Per Arne Vollan.
913
914         * DumpRenderTree/win/DumpRenderTree.cpp:
915         (setWebPreferencesForTestOptions):
916         Recognize test option "enableMenuItemElement".
917
918 2018-03-12  Tim Horton  <timothy_horton@apple.com>
919
920         Stop using SDK conditionals to control feature definitions
921         https://bugs.webkit.org/show_bug.cgi?id=183430
922         <rdar://problem/38251619>
923
924         Reviewed by Dan Bernstein.
925
926         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
927         * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
928
929 2018-03-12  Ross Kirsling  <ross.kirsling@sony.com>
930
931         [DRT] TestOptions should not be ObjC.
932         https://bugs.webkit.org/show_bug.cgi?id=183487
933
934         Reviewed by Per Arne Vollan.
935
936         * DumpRenderTree/CMakeLists.txt:
937         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
938         * DumpRenderTree/PlatformMac.cmake:
939         Move TestOptions to platform-agnostic sources.
940
941         * DumpRenderTree/TestOptions.h:
942         * DumpRenderTree/TestOptions.cpp: Renamed from Tools/DumpRenderTree/TestOptions.mm.
943         * DumpRenderTree/mac/DumpRenderTree.mm:
944         Remove NSURL dependency and align with WTR as much as possible.
945
946         * DumpRenderTree/win/DumpRenderTree.cpp:
947         Consume TestOptions (recognizing just the ones that have WebPreferences defined for now).
948
949 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
950
951         Runtime flag for link prefetch and remove link subresource.
952         https://bugs.webkit.org/show_bug.cgi?id=183540
953
954         Reviewed by Chris Dumez.
955
956         Remove the LINK_PREFETCH build time flag.
957
958         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
959
960 2018-03-12  Wenson Hsieh  <wenson_hsieh@apple.com>
961
962         REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
963         https://bugs.webkit.org/show_bug.cgi?id=183549
964         <rdar://problem/34960698>
965
966         Reviewed by Andy Estes.
967
968         Add TestWebKitAPI support for testing WKWebViews embedded within presented view controllers, and use this to
969         check that dismissing an action sheet does not additionally cause the view controller being used to present the
970         web view to also dismiss.
971
972         * TestWebKitAPI/ClassMethodSwizzler.h: Added.
973         * TestWebKitAPI/ClassMethodSwizzler.mm: Added.
974         (TestWebKitAPI::ClassMethodSwizzler::ClassMethodSwizzler):
975         (TestWebKitAPI::ClassMethodSwizzler::~ClassMethodSwizzler):
976
977         Add ClassMethodSwizzler, an RAII which swizzles an Objective-C class method over its lifetime.
978
979         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
980         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
981
982         Add a new API test that loads a view controller which embeds a WKWebView, and verifies that presenting and then
983         dismissing an action sheet from that web view does not cause the view controller to also dismiss.
984
985         (TestWebKitAPI::setOverrideViewControllerForFullscreenPresentation):
986         (TestWebKitAPI::overrideViewControllerForFullscreenPresentation):
987
988         Mock +[UIViewController _viewControllerForFullScreenPresentationFromView:] to return the web view. This works
989         around the fact that TestWebKitAPI is not a UI application, so certain pieces of UIKit API and SPI need to be
990         stubbed or mocked to simulate being a UI application. We can remove these workarounds once
991         https://webkit.org/b/175204 is addressed, and TestWebKitAPI becomes a UI application that can actually maintain
992         a root view controller and key window.
993
994         (TestWebKitAPI::TEST):
995         * TestWebKitAPI/cocoa/TestWKWebView.h:
996         * TestWebKitAPI/cocoa/TestWKWebView.mm:
997         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
998
999         Add a new initializer for TestWKWebView that doesn't force the view to be hosted within a UIWindow. This is used
1000         by TestWKWebViewController to create a TestWKWebView in -loadView.
1001
1002         * TestWebKitAPI/ios/TestWKWebViewController.h: Added.
1003         * TestWebKitAPI/ios/TestWKWebViewController.mm: Added.
1004         (-[TestWKWebViewControllerWindow _beginKeyWindowDeferral]):
1005         (-[TestWKWebViewControllerWindow _endKeyWindowDeferral]):
1006
1007         Stub out these methods to prevent UIKit from hitting assertions when making this UIWindow the key window. This
1008         can also be removed once TestWebKitAPI is a UI application.
1009
1010         (-[TestWKWebViewController initWithFrame:configuration:]):
1011         (-[TestWKWebViewController loadView]):
1012         (-[TestWKWebViewController webView]):
1013         (-[TestWKWebViewController dismissViewControllerAnimated:completion:]):
1014         (-[TestWKWebViewController dismissalHandler]):
1015         (-[TestWKWebViewController setDismissalHandler:]):
1016
1017         Add a UIViewController helper subclass whose -view is a WKWebView. The new API test presents this view
1018         controller. Tests may also provide a dismissalHandler, which is invoked when the view controller is being
1019         dismissed. The new API test uses this hook to verify that the view controller containing the web view isn't also
1020         dismissed after the action sheet goes away.
1021
1022         * TestWebKitAPI/ios/UIKitSPI.h:
1023
1024 2018-03-12  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1025
1026         [webkitpy] Remove openssl command dependency.
1027         https://bugs.webkit.org/show_bug.cgi?id=183494
1028
1029         Reviewed by Ryosuke Niwa.
1030
1031         Added Python implementation of PEM file perser and switched to use that
1032         from external `openssl` command.
1033
1034         * Scripts/webkitpy/common/system/pemfile.py: Added.
1035         (load):
1036         (BadFormatError):
1037         (Pem):
1038         (Pem.__init__):
1039         (Pem.get):
1040         (Pem.get_all):
1041         (Pem.certificate):
1042         (Pem.private_key):
1043         (Pem.csr):
1044         (Pem.certificate_request):
1045         (Pem.certificate_signing_request):
1046         (_parse_pem_format):
1047         (_parse_pem_format.find_begin):
1048         (_parse_pem_format.find_end):
1049         (_parse_pem_format.sections):
1050         * Scripts/webkitpy/common/system/pemfile_unittest.py: Added.
1051         (PemFileTest):
1052         (PemFileTest.test_parse):
1053         (PemFileTest.test_parse_bad_format):
1054         * Scripts/webkitpy/port/base.py:
1055         (Port.start_websocket_server):
1056         (Port._extract_certificate_from_pem): Deleted.
1057         (Port._extract_private_key_from_pem): Deleted.
1058
1059 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
1060
1061         Remove GridLayout runtime flag
1062         https://bugs.webkit.org/show_bug.cgi?id=183484
1063
1064         Reviewed by Myles C. Maxfield.
1065
1066         The Grid Layout feature has been enabled by default for almost a
1067         year, so I think it's time to remove the runtime flag and the
1068         codepath run when the feature is disabled.
1069
1070         * DumpRenderTree/mac/DumpRenderTree.mm:
1071         (enableExperimentalFeatures):
1072
1073 2018-03-12  Antoine Quint  <graouts@apple.com>
1074
1075         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
1076         https://bugs.webkit.org/show_bug.cgi?id=183504
1077         <rdar://problem/38372965>
1078
1079         Reviewed by Jon Lee.
1080
1081         Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
1082         as Web Animations runtime flag in the new tests we've created for this feature.
1083
1084         * DumpRenderTree/TestOptions.h:
1085         * DumpRenderTree/TestOptions.mm:
1086         (TestOptions::TestOptions):
1087         * DumpRenderTree/mac/DumpRenderTree.mm:
1088         (setWebPreferencesForTestOptions):
1089         * WebKitTestRunner/TestController.cpp:
1090         (WTR::TestController::resetPreferencesToConsistentValues):
1091         (WTR::updateTestOptionsFromTestHeader):
1092         * WebKitTestRunner/TestOptions.h:
1093         (WTR::TestOptions::hasSameInitializationOptions const):
1094
1095 2018-03-11  Zalan Bujtas  <zalan@apple.com>
1096
1097         [LayoutReloaded] Add Line class for InlineFormattingContext -and move files around.
1098         https://bugs.webkit.org/show_bug.cgi?id=183551
1099
1100         Reviewed by Wenson Hsieh.
1101
1102         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: Renamed from Tools/LayoutReloaded/BlockFormattingContext.js.
1103         (BlockFormattingContext):
1104         (BlockFormattingContext.prototype.layout):
1105         (BlockFormattingContext.prototype.computeWidth):
1106         (BlockFormattingContext.prototype.computeHeight):
1107         (BlockFormattingContext.prototype.marginTop):
1108         (BlockFormattingContext.prototype.marginBottom):
1109         (BlockFormattingContext.prototype._computeStaticPosition):
1110         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1111         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
1112         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1113         (BlockFormattingContext.prototype._computeFloatingWidth):
1114         (BlockFormattingContext.prototype._computeInFlowWidth):
1115         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1116         (BlockFormattingContext.prototype._computeFloatingHeight):
1117         (BlockFormattingContext.prototype._computeInFlowHeight):
1118         (BlockFormattingContext.prototype._computeHorizontalConstraint):
1119         (BlockFormattingContext.prototype._computeContentHeight):
1120         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
1121         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1122         (BlockFormattingContext.prototype._shrinkToFitWidth):
1123         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: Renamed from Tools/LayoutReloaded/BlockMarginCollapse.js.
1124         (BlockMarginCollapse.marginTop):
1125         (BlockMarginCollapse.marginBottom):
1126         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
1127         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
1128         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
1129         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
1130         (BlockMarginCollapse._nonCollapsedMarginTop):
1131         (BlockMarginCollapse._nonCollapsedMarginBottom):
1132         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
1133         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
1134         (BlockMarginCollapse._marginValue):
1135         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
1136         (BlockMarginCollapse):
1137         * LayoutReloaded/FormattingContext/FloatingContext.js: Renamed from Tools/LayoutReloaded/FloatingContext.js.
1138         (FloatingContext):
1139         (FloatingContext.prototype.computePosition):
1140         (FloatingContext.prototype.bottom):
1141         (FloatingContext.prototype._positionForFloating):
1142         (FloatingContext.prototype._positionForClear):
1143         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
1144         (FloatingContext.prototype._addFloating):
1145         (FloatingContext.prototype._findInnerMostLeftAndRight):
1146         (FloatingContext.prototype._moveToNextVerticalPosition):
1147         (FloatingContext.prototype._availableSpace):
1148         (FloatingContext.prototype._findFloatingAtVerticalPosition):
1149         (FloatingContext.prototype._isEmpty):
1150         (FloatingContext.prototype._adjustedFloatingPosition):
1151         (FloatingContext.prototype._bottom):
1152         (FloatingContext.prototype._formattingContext):
1153         * LayoutReloaded/FormattingContext/FormattingContext.js: Renamed from Tools/LayoutReloaded/FormattingContext.js.
1154         (FormattingContext):
1155         (FormattingContext.prototype.rootContainer):
1156         (FormattingContext.prototype.floatingContext):
1157         (FormattingContext.prototype.layout):
1158         (FormattingContext.prototype.computeWidth):
1159         (FormattingContext.prototype.computeHeight):
1160         (FormattingContext.prototype.marginTop):
1161         (FormattingContext.prototype.marginLeft):
1162         (FormattingContext.prototype.marginBottom):
1163         (FormattingContext.prototype.marginRight):
1164         (FormattingContext.prototype.absoluteMarginBox):
1165         (FormattingContext.prototype.absoluteBorderBox):
1166         (FormattingContext.prototype.absolutePaddingBox):
1167         (FormattingContext.prototype.absoluteContentBox):
1168         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: Renamed from Tools/LayoutReloaded/InlineFormattingContext.js.
1169         (InlineFormattingContext):
1170         (InlineFormattingContext.prototype.layout):
1171         (InlineFormattingContext.prototype._handleInlineBox):
1172         (InlineFormattingContext.prototype._handleText):
1173         (InlineFormattingContext.prototype._commitLine):
1174         (InlineFormattingContext.prototype._line):
1175         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js: Copied from Tools/LayoutReloaded/InitialBlockContainer.js.
1176         (Line):
1177         (Line.prototype.isEmpty):
1178         (Line.prototype.availableWidth):
1179         (Line.prototype.appendFragment):
1180         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
1181         * LayoutReloaded/LayoutTree/BlockContainer.js: Renamed from Tools/LayoutReloaded/BlockContainer.js.
1182         (BlockContainer):
1183         (BlockContainer.prototype.establishesInlineFormattingContext):
1184         * LayoutReloaded/LayoutTree/Box.js: Renamed from Tools/LayoutReloaded/Box.js.
1185         (Box):
1186         (Box.prototype.id):
1187         (Box.prototype.setRendererName):
1188         (Box.prototype.name):
1189         (Box.prototype.node):
1190         (Box.prototype.parent):
1191         (Box.prototype.nextSibling):
1192         (Box.prototype.nextInFlowSibling):
1193         (Box.prototype.previousSibling):
1194         (Box.prototype.previousInFlowSibling):
1195         (Box.prototype.setParent):
1196         (Box.prototype.setNextSibling):
1197         (Box.prototype.setPreviousSibling):
1198         (Box.prototype.rect):
1199         (Box.prototype.topLeft):
1200         (Box.prototype.bottomRight):
1201         (Box.prototype.setTopLeft):
1202         (Box.prototype.setSize):
1203         (Box.prototype.setWidth):
1204         (Box.prototype.setHeight):
1205         (Box.prototype.isContainer):
1206         (Box.prototype.isBlockLevelBox):
1207         (Box.prototype.isBlockContainerBox):
1208         (Box.prototype.isInlineLevelBox):
1209         (Box.prototype.setIsAnonymous):
1210         (Box.prototype.isAnonymous):
1211         (Box.prototype.establishesFormattingContext):
1212         (Box.prototype.establishedFormattingContext):
1213         (Box.prototype.establishesBlockFormattingContext):
1214         (Box.prototype.establishesInlineFormattingContext):
1215         (Box.prototype.isPositioned):
1216         (Box.prototype.isRelativePositioned):
1217         (Box.prototype.isAbsolutePositioned):
1218         (Box.prototype.isFixedPositioned):
1219         (Box.prototype.isInFlow):
1220         (Box.prototype.isOutOfFlowPositioned):
1221         (Box.prototype.isInFlowPositioned):
1222         (Box.prototype.isFloatingPositioned):
1223         (Box.prototype.isFloatingOrOutOfFlowPositioned):
1224         (Box.prototype.isRootElement):
1225         (Box.prototype.containingBlock):
1226         (Box.prototype.borderBox):
1227         (Box.prototype.paddingBox):
1228         (Box.prototype.contentBox):
1229         * LayoutReloaded/LayoutTree/Container.js: Renamed from Tools/LayoutReloaded/Container.js.
1230         (Container):
1231         (Container.prototype.isContainer):
1232         (Container.prototype.setFirstChild):
1233         (Container.prototype.setLastChild):
1234         (Container.prototype.firstChild):
1235         (Container.prototype.firstInFlowChild):
1236         (Container.prototype.lastChild):
1237         (Container.prototype.lastInFlowChild):
1238         (Container.prototype.hasChild):
1239         (Container.prototype.hasInFlowChild):
1240         * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Renamed from Tools/LayoutReloaded/InitialBlockContainer.js.
1241         (InitialBlockContainer):
1242         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
1243         (InitialBlockContainer.prototype.paddingBox):
1244         (InitialBlockContainer.prototype.contentBox):
1245         * LayoutReloaded/LayoutTree/InlineBox.js: Renamed from Tools/LayoutReloaded/InlineBox.js.
1246         (InlineBox):
1247         (InlineBox.prototype.setText):
1248         (InlineBox.prototype.text):
1249         * LayoutReloaded/LayoutTree/Text.js: Renamed from Tools/LayoutReloaded/Text.js.
1250         (Text):
1251         (Text.prototype.node):
1252         (Text.prototype.content):
1253         (Text.prototype.length):
1254         * LayoutReloaded/Utils.js:
1255         (Utils.nextBreakingOpportunity):
1256         (Utils.measureText):
1257         * LayoutReloaded/misc/headers/Line.h: Copied from Tools/LayoutReloaded/misc/headers/Text.h.
1258         * LayoutReloaded/misc/headers/Text.h:
1259         * LayoutReloaded/test/border-simple.html:
1260         * LayoutReloaded/test/index.html:
1261
1262 2018-03-10  Wenson Hsieh  <wenson_hsieh@apple.com>
1263
1264         [macOS] Copying a table from the Numbers app and pasting into iCloud Numbers fails
1265         https://bugs.webkit.org/show_bug.cgi?id=183485
1266         <rdar://problem/38041984>
1267
1268         Reviewed by Ryosuke Niwa.
1269
1270         Add new API tests to cover scenarios in which we paste image data alongside text data.
1271
1272         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
1273         (TestWebKitAPI::TEST):
1274         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
1275         (TestWebKitAPI::TEST):
1276
1277 2018-03-09  Zalan Bujtas  <zalan@apple.com>
1278
1279         [LayoutReloaded] Initial commit -block formatting context.
1280         https://bugs.webkit.org/show_bug.cgi?id=183462
1281
1282         Reviewed by Antti Koivisto.
1283
1284         See README.md
1285
1286         * LayoutReloaded/BlockContainer.js: Added.
1287         (BlockContainer):
1288         (BlockContainer.prototype.establishesInlineFormattingContext):
1289         * LayoutReloaded/BlockFormattingContext.js: Added.
1290         (BlockFormattingContext):
1291         (BlockFormattingContext.prototype.layout):
1292         (BlockFormattingContext.prototype.computeWidth):
1293         (BlockFormattingContext.prototype.computeHeight):
1294         (BlockFormattingContext.prototype.marginTop):
1295         (BlockFormattingContext.prototype.marginBottom):
1296         (BlockFormattingContext.prototype._computeStaticPosition):
1297         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
1298         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
1299         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
1300         (BlockFormattingContext.prototype._computeFloatingWidth):
1301         (BlockFormattingContext.prototype._computeInFlowWidth):
1302         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
1303         (BlockFormattingContext.prototype._computeFloatingHeight):
1304         (BlockFormattingContext.prototype._computeInFlowHeight):
1305         (BlockFormattingContext.prototype._computeHorizontalConstraint):
1306         (BlockFormattingContext.prototype._computeContentHeight):
1307         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
1308         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1309         (BlockFormattingContext.prototype._shrinkToFitWidth):
1310         * LayoutReloaded/BlockMarginCollapse.js: Added.
1311         (BlockMarginCollapse.marginTop):
1312         (BlockMarginCollapse.marginBottom):
1313         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
1314         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
1315         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
1316         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
1317         (BlockMarginCollapse._nonCollapsedMarginTop):
1318         (BlockMarginCollapse._nonCollapsedMarginBottom):
1319         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
1320         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
1321         (BlockMarginCollapse._marginValue):
1322         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
1323         (BlockMarginCollapse):
1324         * LayoutReloaded/Box.js: Added.
1325         (Box):
1326         (Box.prototype.id):
1327         (Box.prototype.setRendererName):
1328         (Box.prototype.name):
1329         (Box.prototype.node):
1330         (Box.prototype.parent):
1331         (Box.prototype.nextSibling):
1332         (Box.prototype.nextInFlowSibling):
1333         (Box.prototype.previousSibling):
1334         (Box.prototype.previousInFlowSibling):
1335         (Box.prototype.setParent):
1336         (Box.prototype.setNextSibling):
1337         (Box.prototype.setPreviousSibling):
1338         (Box.prototype.rect):
1339         (Box.prototype.topLeft):
1340         (Box.prototype.bottomRight):
1341         (Box.prototype.setTopLeft):
1342         (Box.prototype.setSize):
1343         (Box.prototype.setWidth):
1344         (Box.prototype.setHeight):
1345         (Box.prototype.isContainer):
1346         (Box.prototype.isBlockLevelBox):
1347         (Box.prototype.isBlockContainerBox):
1348         (Box.prototype.isInlineLevelBox):
1349         (Box.prototype.setIsAnonymous):
1350         (Box.prototype.isAnonymous):
1351         (Box.prototype.establishesFormattingContext):
1352         (Box.prototype.establishedFormattingContext):
1353         (Box.prototype.establishesBlockFormattingContext):
1354         (Box.prototype.establishesInlineFormattingContext):
1355         (Box.prototype.isPositioned):
1356         (Box.prototype.isRelativePositioned):
1357         (Box.prototype.isAbsolutePositioned):
1358         (Box.prototype.isFixedPositioned):
1359         (Box.prototype.isInFlow):
1360         (Box.prototype.isOutOfFlowPositioned):
1361         (Box.prototype.isInFlowPositioned):
1362         (Box.prototype.isFloatingPositioned):
1363         (Box.prototype.isFloatingOrOutOfFlowPositioned):
1364         (Box.prototype.isRootElement):
1365         (Box.prototype.containingBlock):
1366         (Box.prototype.borderBox):
1367         (Box.prototype.paddingBox):
1368         (Box.prototype.contentBox):
1369         * LayoutReloaded/Container.js: Added.
1370         (Container):
1371         (Container.prototype.isContainer):
1372         (Container.prototype.setFirstChild):
1373         (Container.prototype.setLastChild):
1374         (Container.prototype.firstChild):
1375         (Container.prototype.firstInFlowChild):
1376         (Container.prototype.lastChild):
1377         (Container.prototype.lastInFlowChild):
1378         (Container.prototype.hasChild):
1379         (Container.prototype.hasInFlowChild):
1380         * LayoutReloaded/FloatingContext.js: Added.
1381         (FloatingContext):
1382         (FloatingContext.prototype.computePosition):
1383         (FloatingContext.prototype.bottom):
1384         (FloatingContext.prototype._positionForFloating):
1385         (FloatingContext.prototype._positionForClear):
1386         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
1387         (FloatingContext.prototype._addFloating):
1388         (FloatingContext.prototype._findInnerMostLeftAndRight):
1389         (FloatingContext.prototype._moveToNextVerticalPosition):
1390         (FloatingContext.prototype._availableSpace):
1391         (FloatingContext.prototype._findFloatingAtVerticalPosition):
1392         (FloatingContext.prototype._isEmpty):
1393         (FloatingContext.prototype._adjustedFloatingPosition):
1394         (FloatingContext.prototype._bottom):
1395         (FloatingContext.prototype._formattingContext):
1396         * LayoutReloaded/FormattingContext.js: Added.
1397         (FormattingContext):
1398         (FormattingContext.prototype.rootContainer):
1399         (FormattingContext.prototype.floatingContext):
1400         (FormattingContext.prototype.layout):
1401         (FormattingContext.prototype.computeWidth):
1402         (FormattingContext.prototype.computeHeight):
1403         (FormattingContext.prototype.marginTop):
1404         (FormattingContext.prototype.marginLeft):
1405         (FormattingContext.prototype.marginBottom):
1406         (FormattingContext.prototype.marginRight):
1407         (FormattingContext.prototype.absoluteMarginBox):
1408         (FormattingContext.prototype.absoluteBorderBox):
1409         (FormattingContext.prototype.absolutePaddingBox):
1410         (FormattingContext.prototype.absoluteContentBox):
1411         * LayoutReloaded/InitialBlockContainer.js: Added.
1412         (InitialBlockContainer):
1413         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
1414         (InitialBlockContainer.prototype.paddingBox):
1415         (InitialBlockContainer.prototype.contentBox):
1416         * LayoutReloaded/InlineBox.js: Added.
1417         (InlineBox):
1418         (InlineBox.prototype.setText):
1419         (InlineBox.prototype.text):
1420         * LayoutReloaded/InlineFormattingContext.js: Added.
1421         (InlineFormattingContext):
1422         (InlineFormattingContext.prototype.layout):
1423         (InlineFormattingContext.prototype._handleInlineBox):
1424         (InlineFormattingContext.prototype._handleText):
1425         * LayoutReloaded/Layout.js: Added.
1426         (layout):
1427         * LayoutReloaded/LayoutContext.js: Added.
1428         (LayoutContext):
1429         (LayoutContext.prototype.layoutFormattingContext):
1430         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata: Added.
1431         * LayoutReloaded/LayoutReloaded.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: Added.
1432         * LayoutReloaded/README.md: Added.
1433         * LayoutReloaded/Text.js: Added.
1434         (Text):
1435         * LayoutReloaded/TreeBuilder.js: Added.
1436         (TreeBuilder.prototype.createTree):
1437         (TreeBuilder.prototype._createAndAttachBox):
1438         (TreeBuilder.prototype._appendChild):
1439         (TreeBuilder.prototype._findBox):
1440         (TreeBuilder.prototype._findNode):
1441         (TreeBuilder):
1442         * LayoutReloaded/Utils.js: Added.
1443         (LayoutPoint):
1444         (LayoutPoint.prototype.setLeft):
1445         (LayoutPoint.prototype.setTop):
1446         (LayoutPoint.prototype.left):
1447         (LayoutPoint.prototype.top):
1448         (LayoutPoint.prototype.shiftLeft):
1449         (LayoutPoint.prototype.shiftTop):
1450         (LayoutPoint.prototype.moveBy):
1451         (LayoutPoint.prototype.equal):
1452         (LayoutPoint.prototype.clone):
1453         (LayoutSize):
1454         (LayoutSize.prototype.setWidth):
1455         (LayoutSize.prototype.setHeight):
1456         (LayoutSize.prototype.width):
1457         (LayoutSize.prototype.height):
1458         (LayoutSize.prototype.growBy):
1459         (LayoutSize.prototype.shrinkBy):
1460         (LayoutSize.prototype.isEmpty):
1461         (LayoutSize.prototype.equal):
1462         (LayoutSize.prototype.clone):
1463         (LayoutRect):
1464         (LayoutRect.prototype.setTop):
1465         (LayoutRect.prototype.setLeft):
1466         (LayoutRect.prototype.setBottom):
1467         (LayoutRect.prototype.setRight):
1468         (LayoutRect.prototype.left):
1469         (LayoutRect.prototype.top):
1470         (LayoutRect.prototype.bottom):
1471         (LayoutRect.prototype.right):
1472         (LayoutRect.prototype.setTopLeft):
1473         (LayoutRect.prototype.topLeft):
1474         (LayoutRect.prototype.topRight):
1475         (LayoutRect.prototype.bottomRight):
1476         (LayoutRect.prototype.setWidth):
1477         (LayoutRect.prototype.setHeight):
1478         (LayoutRect.prototype.setSize):
1479         (LayoutRect.prototype.size):
1480         (LayoutRect.prototype.width):
1481         (LayoutRect.prototype.height):
1482         (LayoutRect.prototype.growBy):
1483         (LayoutRect.prototype.shrinkBy):
1484         (LayoutRect.prototype.moveBy):
1485         (LayoutRect.prototype.isEmpty):
1486         (LayoutRect.prototype.equal):
1487         (LayoutRect.prototype.intersects):
1488         (LayoutRect.prototype.contains):
1489         (LayoutRect.prototype.clone):
1490         (ASSERT_NOT_REACHED):
1491         (ASSERT):
1492         (Utils.computedValue):
1493         (Utils.propertyIsAuto):
1494         (Utils.isWidthAuto):
1495         (Utils.isHeightAuto):
1496         (Utils.isTopAuto):
1497         (Utils.isLeftAuto):
1498         (Utils.isBottomAuto):
1499         (Utils.isRightAuto):
1500         (Utils.width):
1501         (Utils.height):
1502         (Utils.top):
1503         (Utils.bottom):
1504         (Utils.left):
1505         (Utils.right):
1506         (Utils.hasBorderTop):
1507         (Utils.hasBorderBottom):
1508         (Utils.hasPaddingTop):
1509         (Utils.hasPaddingBottom):
1510         (Utils.computedMarginTop):
1511         (Utils.computedMarginLeft):
1512         (Utils.computedMarginBottom):
1513         (Utils.computedMarginRight):
1514         (Utils.computedBorderTopLeft):
1515         (Utils.computedBorderBottomRight):
1516         (Utils.computedPaddingTopLeft):
1517         (Utils.computedPaddingBottomRight):
1518         (Utils.computedBorderAndPaddingTop):
1519         (Utils.computedBorderAndPaddingLeft):
1520         (Utils.computedBorderAndPaddingBottom):
1521         (Utils.computedBorderAndPaddingRight):
1522         (Utils.computedHorizontalBorderAndPadding):
1523         (Utils.computedVerticalBorderAndPadding):
1524         (Utils.hasClear):
1525         (Utils.hasClearLeft):
1526         (Utils.hasClearRight):
1527         (Utils.hasClearBoth):
1528         (Utils.isBlockLevelElement):
1529         (Utils.isBlockContainerElement):
1530         (Utils.isInlineLevelElement):
1531         (Utils.isTableElement):
1532         (Utils.isRelativePositioned):
1533         (Utils.isAbsolutePositioned):
1534         (Utils.isFixedPositioned):
1535         (Utils.isOverflowVisible):
1536         (Utils.isFloatingPositioned):
1537         (Utils.isFloatingLeft):
1538         (Utils.mapToContainer):
1539         (Utils.mapStaticToAbsolute):
1540         (Utils.collectOutOfFlowDescendants):
1541         (Utils.nextBreakingOpportunity):
1542         (Utils.measureText):
1543         (Utils.layoutTreeDump):
1544         (Utils._dumpBox):
1545         (Utils._dumpTree):
1546         (Utils):
1547         * LayoutReloaded/misc/LayoutReloadedWebKit.patch: Added.
1548         * LayoutReloaded/misc/headers/BlockContainer.h: Added.
1549         * LayoutReloaded/misc/headers/BlockFormattingContext.h: Added.
1550         * LayoutReloaded/misc/headers/BlockMarginCollapse.h: Added.
1551         * LayoutReloaded/misc/headers/Box.h: Added.
1552         * LayoutReloaded/misc/headers/Container.h: Added.
1553         * LayoutReloaded/misc/headers/FloatingContext.h: Added.
1554         * LayoutReloaded/misc/headers/FormattingContext.h: Added.
1555         * LayoutReloaded/misc/headers/InitialBlockContainer.h: Added.
1556         * LayoutReloaded/misc/headers/InlineBox.h: Added.
1557         * LayoutReloaded/misc/headers/LayoutContext.h: Added.
1558         * LayoutReloaded/misc/headers/Text.h: Added.
1559         * LayoutReloaded/test/TestHarness.js: Added.
1560         (verifyLayoutTreeDump):
1561         (runLayout):
1562         * LayoutReloaded/test/absolute-auto-with-sibling-margin-bottom.html: Added.
1563         * LayoutReloaded/test/absolute-bottom.html: Added.
1564         * LayoutReloaded/test/absolute-height-stretch.html: Added.
1565         * LayoutReloaded/test/absolute-left-auto.html: Added.
1566         * LayoutReloaded/test/absolute-left-right-top-bottom-auto.html: Added.
1567         * LayoutReloaded/test/absolute-nested.html: Added.
1568         * LayoutReloaded/test/absolute-nested2.html: Added.
1569         * LayoutReloaded/test/absolute-simple.html: Added.
1570         * LayoutReloaded/test/absolute-width-shrink-to-fit.html: Added.
1571         * LayoutReloaded/test/absolute-width-stretch.html: Added.
1572         * LayoutReloaded/test/absolute-with-inline-preferred-width.html: Added.
1573         * LayoutReloaded/test/absolute-with-static-block-position-nested.html: Added.
1574         * LayoutReloaded/test/almost-intruding-left-float-simple.html: Added.
1575         * LayoutReloaded/test/border-simple.html: Added.
1576         * LayoutReloaded/test/fixed-nested.html: Added.
1577         * LayoutReloaded/test/float-left-when-container-has-padding-margin.html: Added.
1578         * LayoutReloaded/test/floating-box-clear-both-simple.html: Added.
1579         * LayoutReloaded/test/floating-box-clear-right-simple.html: Added.
1580         * LayoutReloaded/test/floating-box-left-and-right-multiple-with-top-offset.html: Added.
1581         * LayoutReloaded/test/floating-box-left-and-right-multiple.html: Added.
1582         * LayoutReloaded/test/floating-box-right-simple.html: Added.
1583         * LayoutReloaded/test/floating-box-with-clear-siblings.html: Added.
1584         * LayoutReloaded/test/floating-box-with-clear-simple.html: Added.
1585         * LayoutReloaded/test/floating-box-with-new-formatting-context.html: Added.
1586         * LayoutReloaded/test/floating-box-with-relative-positioned-sibling.html: Added.
1587         * LayoutReloaded/test/floating-left-right-simple.html: Added.
1588         * LayoutReloaded/test/floating-left-right-with-all-margins.html: Added.
1589         * LayoutReloaded/test/floating-lefts-and-rights-simple.html: Added.
1590         * LayoutReloaded/test/floating-multiple-lefts-in-body.html: Added.
1591         * LayoutReloaded/test/floating-multiple-lefts-multiple-lines.html: Added.
1592         * LayoutReloaded/test/floating-multiple-lefts.html: Added.
1593         * LayoutReloaded/test/floating-sizing.html: Added.
1594         * LayoutReloaded/test/floating-sizing2.html: Added.
1595         * LayoutReloaded/test/floating-sizing3.html: Added.
1596         * LayoutReloaded/test/floating-with-new-block-formatting-context.html: Added.
1597         * LayoutReloaded/test/index.html: Added.
1598         * LayoutReloaded/test/inline-content-simple.html: Added.
1599         * LayoutReloaded/test/intruding-left-float-simple.html: Added.
1600         * LayoutReloaded/test/margin-collapse-bottom-bottom.html: Added.
1601         * LayoutReloaded/test/margin-collapse-bottom-nested.html: Added.
1602         * LayoutReloaded/test/margin-collapse-first-last-are-floating.html: Added.
1603         * LayoutReloaded/test/margin-collapse-simple.html: Added.
1604         * LayoutReloaded/test/margin-collapse-top-nested.html: Added.
1605         * LayoutReloaded/test/margin-collapse-when-child-has-padding-border.html: Added.
1606         * LayoutReloaded/test/margin-collapse-with-block-formatting-context.html: Added.
1607         * LayoutReloaded/test/margin-collapse-with-block-formatting-context2.html: Added.
1608         * LayoutReloaded/test/margin-left-right-sizing-out-of-flow.html: Added.
1609         * LayoutReloaded/test/margin-left-right-sizing.html: Added.
1610         * LayoutReloaded/test/margin-propagation-simple-content-height.html: Added.
1611         * LayoutReloaded/test/margin-sibling-collapse-propagated.html: Added.
1612         * LayoutReloaded/test/margin-simple.html: Added.
1613         * LayoutReloaded/test/negative-margin-simple.html: Added.
1614         * LayoutReloaded/test/padding-nested.html: Added.
1615         * LayoutReloaded/test/padding-simple.html: Added.
1616         * LayoutReloaded/test/relative-auto-with-parent-offset.html: Added.
1617         * LayoutReloaded/test/relative-auto.html: Added.
1618         * LayoutReloaded/test/relative-bottom.html: Added.
1619         * LayoutReloaded/test/relative-right.html: Added.
1620         * LayoutReloaded/test/relative-siblings.html: Added.
1621         * LayoutReloaded/test/relative-simple.html: Added.
1622
1623 2018-03-09  Stephan Szabo  <stephan.szabo@sony.com>
1624
1625         WebKitTestRunner: Do not build accessibility files/idl when !HAVE(ACCESSIBILITY)
1626         https://bugs.webkit.org/show_bug.cgi?id=183516
1627
1628         Reviewed by Alex Christensen.
1629
1630         * WebKitTestRunner/CMakeLists.txt:
1631
1632 2018-03-09  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1633
1634         [webkitpy, WinCairo] Launch Apache HTTPD for HTTP Tests.
1635         https://bugs.webkit.org/show_bug.cgi?id=183265
1636
1637         Reviewed by Daniel Bates.
1638
1639         Launch apache httpd server from python script for WinCairo HTTP LayoutTests. By now, AppleWin uses
1640         Cygwin to launch httpd server. This patch enables native Windows to run HTTP LayoutTests by starting
1641         and stopping httpd server from the script.
1642
1643         * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
1644         (LayoutTestApacheHttpd.__init__):
1645         (LayoutTestApacheHttpd._copy_apache_config_file):
1646         (LayoutTestApacheHttpd):
1647         (LayoutTestApacheHttpd.platform):
1648         (LayoutTestApacheHttpd._spawn_process):
1649         (LayoutTestApacheHttpd._stop_running_server):
1650         (LayoutTestApacheHttpd._run):
1651         (LayoutTestApacheHttpd._server_error):
1652         * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
1653         (HttpServerBase.aliases):
1654         (HttpServerBase):
1655         (HttpServerBase._build_alias_path_pairs):
1656         (HttpServerBase._build_alias_path_pairs._make_path):
1657         * Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py:
1658         (TestHttpServerBase.test_corrupt_pid_file):
1659         (TestHttpServerBase):
1660         (TestHttpServerBase.test_build_alias_path_pairs):
1661         * Scripts/webkitpy/port/base.py:
1662         (Port._apache_config_file_name_for_platform):
1663         * Scripts/webkitpy/port/port_testcase.py:
1664         (test_apache_config_file_name_for_platform):
1665         * Scripts/webkitpy/port/win.py:
1666         (WinPort._path_to_apache):
1667         (WinCairoPort.default_baseline_search_path):
1668         (WinCairoPort):
1669         (WinCairoPort.check_httpd):
1670
1671 2018-03-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1672
1673         [GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage::will-submit-form
1674         https://bugs.webkit.org/show_bug.cgi?id=183510
1675
1676         Reviewed by Michael Catanzaro.
1677
1678         Update the test to use WebKitDOMElement instead and fix a memory leak.
1679
1680         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
1681         (handleFormSubmissionCallback):
1682         (willSubmitFormCallback):
1683
1684 2018-03-08  Stephan Szabo  <stephan.szabo@sony.com>
1685
1686         WebKitTestRunner: Don't use accessibility controller when !HAVE(ACCESSIBILITY)
1687         https://bugs.webkit.org/show_bug.cgi?id=183475
1688
1689         Reviewed by Youenn Fablet.
1690
1691         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1692         (WTR::InjectedBundle::done):
1693         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
1694         (WTR::InjectedBundlePage::didClearWindowForFrame):
1695
1696 2018-03-08  Ms2ger  <Ms2ger@igalia.com>
1697
1698         [WPE] Update expectations for API tests
1699         https://bugs.webkit.org/show_bug.cgi?id=183434
1700
1701         Unreviewed test gardening.
1702
1703         * TestWebKitAPI/glib/TestExpectations.json:
1704
1705 2018-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1706
1707         [GTK][WPE] Leak checker is not working in WebKitGLib web process tests
1708         https://bugs.webkit.org/show_bug.cgi?id=183404
1709
1710         Reviewed by Michael Catanzaro.
1711
1712         This might have regressed when we started to use the JSC garbage collector timers. The thing is that we expect
1713         that the WebProcessTester object that we expose to JavaScript is released when the web frame is destroyed, but
1714         that's no longer the case. On window object cleared a GC is scheduled, but JSC timers do the actual garbage
1715         collection later. In the case of tests that never happens because the web process finishes quickly after the
1716         test. We need to force a garbage collection at some point when the web page is destroyed. We can't use the
1717         WebKitWebPage destroy signal, since we are also checking that WebKitWebPage isn't leaked. The
1718         API::InjectedBundle::Client::willDestroyPage() always happen when the page is closed, even if WebKitWebPage is
1719         still alive, so we can force the GC at that point. The only problem is that the frame is detached right after
1720         that point, so we can't check WebKitFrame leaks. The only frame in the tests is the main one, so we can assume
1721         that if WebKitWebPage is released, the frame is too.
1722
1723         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
1724         (WebKitFrameTest::testMainFrame): Stop checking we don't leak WebKitFrame.
1725         (WebKitFrameTest::testURI): Ditto.
1726         (WebKitFrameTest::testJavaScriptContext): Ditto.
1727         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
1728         (testWebKitFrameMainFrame): Use new WebViewTest::runWebProcessTest() API.
1729         (testWebKitFrameURI): Ditto.
1730         (testWebKitFrameJavaScriptContext): Ditto.
1731         (webkitFrameTestRun): Deleted.
1732         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
1733         (runTest): We no longer need the special case for dom-cache test.
1734         (windowObjectClearedCallback): Only expose test runner object to JavaScript when loading tests.
1735         (webkit_web_extension_initialize): Call webkitWebExtensionSetGarbageCollectOnPageDestroy() to ensure a garbage
1736         collection is performed when the page is closing.
1737         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
1738         (WebKitDOMClientRectTest::testDivClientRectsPositionAndLength): Fix memory leak,
1739         webkit_dom_client_rect_list_item() returns a full reference.
1740         * TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:
1741         (testWebProcessAutocleanups):Use new WebViewTest::runWebProcessTest() API.
1742         * TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:
1743         (testWebKitDOMClientRectDivBoundingClientRectPosition): Use new WebViewTest::runWebProcessTest() API.
1744         (testWebKitDOMClientRectDivClientRectsPositionAndLength): Use new WebViewTest::runWebProcessTest() API.
1745         (prepareDOMForClientRectPositionTests): Deleted.
1746         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:
1747         (testWebKitDOMNodeHierarchyNavigation): Use new WebViewTest::runWebProcessTest() API.
1748         (testWebKitDOMNodeInsertion): Ditto.
1749         (testWebKitDOMNodeTagNamesNodeList): Ditto.
1750         (testWebKitDOMNodeTagNamesHTMLCollection): Ditto.
1751         (testWebKitDOMObjectCache): We no longer need to run the test several times, since runWebProcessTest() loads
1752         about blank after every test.
1753         (prepareDOMForTagNamesTests): Deleted.
1754         * TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:
1755         (testWebKitDOMNodeFilterTreeWalker): Use new WebViewTest::runWebProcessTest() API.
1756         (testWebKitDOMNodeFilterNodeIterator): Ditto.
1757         (runTest): Deleted.
1758         * TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:
1759         (testWebKitDOMXPathNSResolverNative): Use new WebViewTest::runWebProcessTest() API.
1760         (testWebKitDOMXPathNSResolverCustom): Ditto.
1761         * TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp:
1762         (testWebKitWebEditorSelectionChanged): Use new WebViewTest::runWebProcessTest() API.
1763         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
1764         (WebViewTest::runWebProcessTest): It now receives the contents, so it automatically loads the view using
1765         "webprocess://test" as base URI, used to detect tests in the web process. It also loads about:blank after every
1766         test to ensure that window object is cleared.
1767         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
1768
1769 2018-03-07  Youenn Fablet  <youenn@apple.com>
1770
1771         Match unsupported plugins based on domains and not origin
1772         https://bugs.webkit.org/show_bug.cgi?id=183384
1773
1774         Reviewed by Chris Dumez.
1775
1776         * TestWebKitAPI/Tests/WebCore/URL.cpp:
1777         (TestWebKitAPI::TEST_F):
1778         * WebKitTestRunner/TestController.cpp:
1779         (WTR::TestController::setPluginSupportedMode): Update to whitelist
1780         localhost and not http://localhost:8080
1781
1782 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
1783
1784         webkitpy: Allow apple_additions() to define additional ports
1785         https://bugs.webkit.org/show_bug.cgi?id=183412
1786         <rdar://problem/38232353>
1787
1788         Reviewed by Aakash Jain.
1789
1790         * Scripts/webkitpy/port/factory.py:
1791         (PortFactory.get): Allow apple_additions to define port classes to be used
1792         in run-webkit-tests.
1793
1794 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
1795
1796         webkitpy: Remove obsolete function from MockAppleAdditions
1797         https://bugs.webkit.org/show_bug.cgi?id=183415
1798         <rdar://problem/38236407>
1799
1800         Reviewed by Aakash Jain.
1801
1802         * Scripts/webkitpy/port/port_testcase.py:
1803         (bind_mock_apple_additions.MockAppleAdditions):
1804         (bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Deleted.
1805         (bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Deleted.
1806
1807 2018-03-07  Jonathan Bedard  <jbedard@apple.com>
1808
1809         webkitpy: --dedicated-simulators does not boot the correct number of simulators
1810         https://bugs.webkit.org/show_bug.cgi?id=183409
1811         <rdar://problem/38224631>
1812
1813         Reviewed by Aakash Jain.
1814
1815         * Scripts/webkitpy/port/ios_simulator.py:
1816         (IOSSimulatorPort.default_child_processes): When not using dedicated simulators,
1817         we should use the number of booted simulators as our default child processes.
1818
1819 2018-03-07  Alejandro G. Castro  <alex@igalia.com>
1820
1821         Make NetworkRTCResolver port agnostic
1822         https://bugs.webkit.org/show_bug.cgi?id=178855
1823
1824         Reviewed by Youenn Fablet.
1825
1826         Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
1827         other platforms when the APIs are supported.
1828
1829         * TestWebKitAPI/PlatformGTK.cmake:
1830         * TestWebKitAPI/Tests/WebCore/DNS.cpp:
1831
1832 2018-03-06  Youenn Fablet  <youenn@apple.com>
1833
1834         didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
1835         https://bugs.webkit.org/show_bug.cgi?id=183299
1836         <rdar://problem/37547029>
1837
1838         Reviewed by Alex Christensen.
1839
1840         Add support for checking whether this callback is called.
1841         Used in the added layout test.
1842
1843         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1844         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1845         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
1846         (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
1847         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1848         * WebKitTestRunner/TestController.cpp:
1849         (WTR::TestController::createOtherPage):
1850         (WTR::TestController::resetStateToConsistentValues):
1851         (WTR::TestController::didReceiveServerRedirectForProvisionalNavigation):
1852         * WebKitTestRunner/TestController.h:
1853         (WTR::TestController::didReceiveServerRedirectForProvisionalNavigation const):
1854         (WTR::TestController::clearDidReceiveServerRedirectForProvisionalNavigation):
1855         * WebKitTestRunner/TestInvocation.cpp:
1856         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1857
1858 2018-03-06  Chris Dumez  <cdumez@apple.com>
1859
1860         fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
1861         https://bugs.webkit.org/show_bug.cgi?id=183345
1862
1863         Reviewed by Alex Christensen.
1864
1865         Add layout test infrastructure so a test can know when didCancelClientRedirectForFrame has
1866         been called. The tests used to rely on a 0-timer but this does not work when the client
1867         responds to the navigation policy asynchronously.
1868
1869         * DumpRenderTree/TestRunner.cpp:
1870         (getDidCancelClientRedirect):
1871         (TestRunner::staticValues):
1872         * DumpRenderTree/TestRunner.h:
1873         (TestRunner::didCancelClientRedirect const):
1874         (TestRunner::setDidCancelClientRedirect):
1875         * DumpRenderTree/mac/FrameLoadDelegate.mm:
1876         (-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
1877         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1878         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
1879         (WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
1880         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1881         (WTR::TestRunner::didCancelClientRedirect const):
1882         (WTR::TestRunner::setDidCancelClientRedirect):
1883
1884 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
1885
1886         REGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in LLInt on WPE
1887         https://bugs.webkit.org/show_bug.cgi?id=183366
1888
1889         Reviewed by Michael Catanzaro.
1890
1891         Have the TestRunnerInjectedBundle CMake library link against libraries
1892         in the WebKitTestRunnerInjectedBundle_LIBRARIES list, and not the
1893         WebKitTestRunner_LIBRARIES list, which is used for the WebKitTestRunner
1894         executable. This allows narrowing down the libraries to only those that
1895         are necessary for the injected bundle shared object.
1896
1897         The GTK+ port already has this list specified, adding one for the WPE
1898         port.
1899
1900         * WebKitTestRunner/CMakeLists.txt:
1901         Link the TestRunnerInjectedBundle library against the libraries in the
1902         WebKitTestRunnerInjectedBundle_LIBRARIES list.
1903         * WebKitTestRunner/PlatformWPE.cmake:
1904         Specify the WebKitTestRunnerInjectedBundle_LIBRARIES list, including the
1905         basic system dependencies, WebCoreTestSupport and WebKit. This follows
1906         the GTK+ port.
1907
1908 2018-03-06  Dominik Infuehr  <dinfuehr@igalia.com>
1909
1910         [ARM] Disable tests that run out of memory
1911         https://bugs.webkit.org/show_bug.cgi?id=182699
1912
1913         Reviewed by Žan Doberšek.
1914
1915         Add run mode to allow running modules.yaml-tests without
1916         disabling LLInt for specific tests.
1917
1918         * Scripts/run-jsc-stress-tests:
1919
1920 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1921
1922         Fix std::make_unique / new[] using system malloc
1923         https://bugs.webkit.org/show_bug.cgi?id=182975
1924
1925         Reviewed by JF Bastien.
1926
1927         * TestWebKitAPI/CMakeLists.txt:
1928         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1929         * TestWebKitAPI/Tests/WTF/UniqueArray.cpp: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
1930         (TestWebKitAPI::NonTrivialDestructor::NonTrivialDestructor):
1931         (TestWebKitAPI::NonTrivialDestructor::~NonTrivialDestructor):
1932         (TestWebKitAPI::NonTrivialDestructor::setLog):
1933         (TestWebKitAPI::TEST):
1934
1935 2018-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
1936
1937         DumpRenderTree build fix
1938
1939         Unreviewed.
1940
1941         * DumpRenderTree/mac/LayoutTestHelper.m:
1942
1943 2018-03-05  Andy Estes  <aestes@apple.com>
1944
1945         [Mac] Teach WebCore::Pasteboard about file promise drags
1946         https://bugs.webkit.org/show_bug.cgi?id=183314
1947         <rdar://problem/38105493>
1948
1949         Reviewed by Darin Adler.
1950
1951         * DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
1952         * DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
1953         (-[DumpRenderTreeFileDraggingSource initWithPromisedFileURLs:]):
1954         (-[DumpRenderTreeFileDraggingSource dealloc]):
1955
1956         Taught DumpRenderTreeFileDraggingSource to store the promised file URLs.
1957
1958         * DumpRenderTree/mac/DumpRenderTree.mm:
1959         (runTest):
1960
1961         Called +[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers] after running a test.
1962
1963         * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
1964         * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
1965         (-[DumpRenderTreeFilePromiseReceiver initWithPromisedUTIs:]):
1966         (-[DumpRenderTreeFilePromiseReceiver fileTypes]):
1967         (-[DumpRenderTreeFilePromiseReceiver fileNames]):
1968         (-[DumpRenderTreeFilePromiseReceiver dealloc]):
1969         (copyFile):
1970         (-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
1971
1972         We can't instantiate real NSFilePromiseReceivers in DumpRenderTree. They rely on the
1973         pasteboard server to generate unique file URLs, which is incompatible with our swizzled
1974         NSPasteboard.
1975
1976         Instead, create a subclass of NSFilePromiseReceiver that implements its own promise resolution.
1977         -receivePromisedFilesAtDestination:... asks its DumpRenderTreeFileDraggingSource for the
1978         array of file URLs, then copies each to the destination directory on the specified operation
1979         queue. It emulates how NSPasteboard tries to find a unique destination name by appending
1980         numbers to the file name.
1981
1982         All receivers are collected in a global array that is cleared when each test finishes.
1983         DumpRenderTreeFilePromiseReceiver will delete the files it copied in -dealloc.
1984
1985         (+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]):
1986         (-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
1987         
1988         If NSFilesPromisePboardType is on the pasteboard and classArray contains
1989         NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of
1990         all file promise receivers, then wrap it in an NSDraggingItem and call block.
1991
1992         * DumpRenderTree/mac/EventSendingController.mm:
1993         (+[EventSendingController isSelectorExcludedFromWebScript:]):
1994         (+[EventSendingController webScriptNameForSelector:]):
1995         (-[EventSendingController beginDragWithFilePromises:]):
1996
1997         Implement eventSender.beginDragWithFilePromises() by placing file UTIs on the pasteboard
1998         with type NSFilesPromisePboardType, creating a DumpRenderTreeFileDraggingSource with the
1999         file URLs, and creating a new DumpRenderTreeDraggingInfo and passing it to
2000         -[WebView draggingEntered:].
2001
2002 2018-03-05  Aakash Jain  <aakash_jain@apple.com>
2003
2004         [webkitpy] Bugzilla class should use NetworkTransaction for network operations
2005         https://bugs.webkit.org/show_bug.cgi?id=183222
2006
2007         Reviewed by Alexey Proskuryakov.
2008
2009         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
2010         (Bugzilla.open_url): Method which uses NetworkTransaction for opening url.
2011         (Bugzilla.fetch_user): Used self.open_url instead of directly calling browser.open().
2012         (Bugzilla.add_user_to_groups): Ditto.
2013         (Bugzilla._fetch_bug_page): Ditto.
2014         (Bugzilla.fetch_attachment_contents): Ditto.
2015         (Bugzilla.get_bug_id_for_attachment_id): Ditto.
2016         (Bugzilla.authenticate): Ditto.
2017         (Bugzilla.add_attachment_to_bug): Ditto.
2018         (Bugzilla.add_patch_to_bug): Ditto.
2019         (Bugzilla.create_bug): Ditto.
2020         (Bugzilla.clear_attachment_flags): Ditto.
2021         (Bugzilla.set_flag_on_attachment): Ditto.
2022         (Bugzilla.obsolete_attachment): Ditto.
2023         (Bugzilla.add_cc_to_bug): Ditto.
2024         (Bugzilla.post_comment_to_bug): Ditto.
2025         (Bugzilla.close_bug_as_fixed): Ditto.
2026         (Bugzilla.reassign_bug): Ditto.
2027         (Bugzilla.reopen_bug): Ditto.
2028         (Bugzilla._fetch_bug_page_by_url): Deleted, not required anymore.
2029         * Scripts/webkitpy/common/net/networktransaction.py:
2030         (NetworkTransaction.run): Added a FIXME.
2031
2032 2018-03-05  Joseph Pecoraro  <pecoraro@apple.com>
2033
2034         dump-class-layout mishandles duplicates base classes and miscomputes padding
2035         https://bugs.webkit.org/show_bug.cgi?id=183311
2036
2037         Reviewed by Simon Fraser.
2038
2039         * Scripts/dump-class-layout:
2040         (verify_type):
2041         (verify_type_recursive):
2042         Keep a list of seen (offset, type) that we have output and don't re-output them.
2043         The Python types list the base classes as members multiple times as you iterate
2044         through the members, so just ignore them if we have seem them already at a
2045         specific offset.
2046
2047 2018-03-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2048
2049         [GTK][Wayland] The GTK Wayland bot exits early because of assertions related with libsecret since r221925
2050         https://bugs.webkit.org/show_bug.cgi?id=183330
2051
2052         Reviewed by Michael Catanzaro.
2053
2054         Add libsecret to the JHBuild and build it only when the system version is
2055         less than 0.18.6 (unreleased as of writing this) in order to cherry pick
2056         a fix for a bug that causes crashes with layout tests.
2057
2058         * gtk/jhbuild.modules:
2059         * gtk/patches/libsecret-secret-methods-Don-t-unref-NULL-when-search-fails.patch: Added.
2060
2061 2018-03-05  Claudio Saavedra  <csaavedra@igalia.com>
2062
2063         [GTK] Implement WTR's PlatformWebView::setWindowIsKey()
2064         https://bugs.webkit.org/show_bug.cgi?id=183143
2065
2066         Reviewed by Carlos Garcia Campos.
2067
2068         Implement ::setWindowIsKey() by keeping a second window to be
2069         presented when the webview's window is to lose its key status.
2070
2071         * WebKitTestRunner/PlatformWebView.h:
2072         * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
2073         (WTR::PlatformWebView::PlatformWebView):
2074         (WTR::PlatformWebView::~PlatformWebView):
2075         (WTR::PlatformWebView::setWindowIsKey):
2076
2077 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2078
2079         Unreviewed, attempt to fix Apple port build
2080
2081         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2082
2083 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2084
2085         Unreviewed, attempt to fix WPE build
2086
2087         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
2088         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2089         * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
2090         (WTR::PlatformWebView::windowSnapshotImage):
2091         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2092         (WTR::TestController::platformRunUntil):
2093
2094 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
2095
2096         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
2097         https://bugs.webkit.org/show_bug.cgi?id=183312
2098
2099         Reviewed by Mark Lam.
2100
2101         Remove wtf/CurrentTime.h include pragma.
2102
2103         * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
2104         * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
2105         * DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
2106         * DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
2107         * TestWebKitAPI/Tests/WTF/Condition.cpp:
2108         * TestWebKitAPI/Tests/WTF/Signals.cpp:
2109         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
2110         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
2111         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2112         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2113         * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
2114         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2115
2116 2018-03-04  Tim Horton  <timothy_horton@apple.com>
2117
2118         Make !ENABLE(DATA_DETECTION) iOS build actually succeed
2119         https://bugs.webkit.org/show_bug.cgi?id=183283
2120         <rdar://problem/38062148>
2121
2122         Reviewed by Sam Weinig.
2123
2124         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2125
2126 2018-03-02  Chris Dumez  <cdumez@apple.com>
2127
2128         Converting a load to a download does not work with async policy delegates
2129         https://bugs.webkit.org/show_bug.cgi?id=183254
2130         <rdar://problem/38035334>
2131
2132         Reviewed by Youenn Fablet.
2133
2134         Add layout test infrastructure for responding to the decidePolicyForNavigationResponse
2135         delegate asynchronously.
2136
2137         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2138         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2139         (WTR::InjectedBundlePage::decidePolicyForResponse):
2140         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2141         (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay):
2142         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2143         (WTR::TestRunner::shouldDecideResponsePolicyAfterDelay const):
2144         * WebKitTestRunner/TestController.cpp:
2145         (WTR::TestController::resetStateToConsistentValues):
2146         (WTR::TestController::decidePolicyForNavigationResponse):
2147         * WebKitTestRunner/TestController.h:
2148         (WTR::TestController::setShouldDecideResponsePolicyAfterDelay):
2149         * WebKitTestRunner/TestInvocation.cpp:
2150         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2151
2152 2018-03-01  Youenn Fablet  <youenn@apple.com>
2153
2154         Add API test to validate setting of service worker and cache storage directories
2155         https://bugs.webkit.org/show_bug.cgi?id=182543
2156
2157         Reviewed by Chris Dumez.
2158
2159         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2160
2161 2018-03-01  Ross Kirsling  <ross.kirsling@sony.com>
2162
2163         [Win][DRT] Implement setSpatialNavigationEnabled.
2164         https://bugs.webkit.org/show_bug.cgi?id=183166
2165
2166         Reviewed by Per Arne Vollan.
2167
2168         * DumpRenderTree/TestRunner.cpp:
2169         (setSpatialNavigationEnabledCallback):
2170         * DumpRenderTree/win/DumpRenderTree.cpp:
2171         (resetWebPreferencesToConsistentValues):
2172         * DumpRenderTree/win/TestRunnerWin.cpp:
2173         (TestRunner::setSpatialNavigationEnabled):
2174
2175 2018-03-01  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2176
2177         [webkitpy] Use shell=False to launch apache http server.
2178         https://bugs.webkit.org/show_bug.cgi?id=183191
2179
2180         Reviewed by Aakash Jain.
2181
2182         * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
2183         (LayoutTestApacheHttpd.__init__):
2184         (LayoutTestApacheHttpd._run):
2185
2186 2018-03-01  Chris Dumez  <cdumez@apple.com>
2187
2188         Unreviewed, update WebKit.CustomHeaderFields API test after r229133.
2189
2190         We no longer do policy checks for 'about:blank'.
2191
2192         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2193         (-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]):
2194         (TEST):
2195
2196 2018-02-28  Jonathan Bedard  <jbedard@apple.com>
2197
2198         [webkitpy] Remove concept of 'future' versions (Follow-up fix 2)
2199         https://bugs.webkit.org/show_bug.cgi?id=183184
2200         <rdar://problem/37958594>
2201
2202         Reviewed by Aakash Jain.
2203
2204         Unlisted Apple versions can't run webkitpy tests because they don't
2205         have specified port names.
2206
2207         * Scripts/webkitpy/port/apple.py:
2208         (ApplePort.determine_full_port_name): Return valid port name for unnamed
2209         versions.
2210         * Scripts/webkitpy/port/base.py:
2211         (Port.version_name): Check both public and internal version mapping
2212         when returning a version name.
2213         * Scripts/webkitpy/port/mac.py:
2214         (MacPort.__init__): If no os version is defined, use the current version.
2215
2216 2018-02-28  John Wilander  <wilander@apple.com>
2217
2218         Add a second tier of prevalence to facilitate telemetry on very prevalent domains
2219         https://bugs.webkit.org/show_bug.cgi?id=183218
2220         <rdar://problem/37992388>
2221
2222         Reviewed by Brent Fulgham.
2223
2224         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2225             Added two new testRunner functions:
2226             - setStatisticsVeryPrevalentResource()
2227             - isStatisticsVeryPrevalentResource()
2228         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2229         (WTR::TestRunner::setStatisticsVeryPrevalentResource):
2230         (WTR::TestRunner::isStatisticsVeryPrevalentResource):
2231         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2232         * WebKitTestRunner/TestController.cpp:
2233         (WTR::TestController::setStatisticsVeryPrevalentResource):
2234         (WTR::TestController::isStatisticsVeryPrevalentResource):
2235         * WebKitTestRunner/TestController.h:
2236         * WebKitTestRunner/TestInvocation.cpp:
2237         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2238
2239 2018-02-28  Jonathan Bedard  <jbedard@apple.com>
2240
2241         [webkitpy] Remove concept of 'future' versions (Follow-up fix)
2242         https://bugs.webkit.org/show_bug.cgi?id=183184
2243         <rdar://problem/37958594>
2244
2245         Reviewed by David Kilzer.
2246
2247         The factory also relies on future in a non-obvious way.
2248
2249         * Scripts/webkitpy/common/system/platforminfo.py:
2250         (PlatformInfo.os_version_name): Check both public and internal version mapping
2251         when returning a version name.
2252         * Scripts/webkitpy/common/system/platforminfo_mock.py:
2253         (MockPlatformInfo.os_version_name): Ditto.
2254
2255 2018-02-28  Zan Dobersek  <zdobersek@igalia.com>
2256
2257         Unreviewed WPE fixup after r229080.
2258
2259         Add empty definitions for two AccessibilityUIElement methods,
2260         avoiding undefined symbols in the WKTR injected bundle.
2261
2262         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
2263         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
2264         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2265
2266 2018-02-27  Jonathan Bedard  <jbedard@apple.com>
2267
2268         Remove concept of 'future'
2269         https://bugs.webkit.org/show_bug.cgi?id=183184
2270         <rdar://problem/37958594>
2271
2272         Reviewed by Aakash Jain.
2273
2274         Remove concept of 'future' from expectations and instead
2275         use a system of inheritance centered around the current version
2276         of an OS for Mac and iOS.
2277
2278         Inheritance works like so:
2279
2280         | ....
2281         V Future
2282         > High Sierra (mac)
2283         ^ mac-sierra
2284         | mac-elcapitan
2285         | ....
2286
2287         This does not change expectation inheritance for any currently running
2288         configurations, it generalizes the logic already used.
2289
2290         * Scripts/webkitpy/common/version_name_map.py:
2291         (VersionNameMap.__init__): Remove all future versions.
2292         (VersionNameMap.mapping_for_platform): Return empty dicts instead of
2293         asserting.
2294         * Scripts/webkitpy/port/apple.py:
2295         (ApplePort):
2296         (ApplePort._allowed_versions): Return all available versions.
2297         (ApplePort._generate_all_test_configurations): Instead of picking from a set
2298         of allowed versions, assume that every specified version is allowed.
2299         (ApplePort._port_name_with_version): Deleted.
2300         * Scripts/webkitpy/port/darwin.py: Add CURRENT_VERSION overridden by subclasses.
2301         (DarwinPort):
2302         * Scripts/webkitpy/port/ios.py:
2303         (IOSPort):
2304         (IOSPort.default_baseline_search_path): Use system of inheritance centered around
2305         the current version.
2306         * Scripts/webkitpy/port/mac.py:
2307         (MacPort):
2308         (MacPort.__init__): Use current version by default.
2309         (MacPort.default_baseline_search_path): Use system of inheritance centered around
2310         the current version.
2311         (MacPort.configuration_specifier_macros): Use the same set of version names
2312         supported in default_baseline_search_path.
2313         * Scripts/webkitpy/port/mac_unittest.py:
2314         (MacTest.test_versions): Remove 'future' tests.
2315
2316 2018-02-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2317
2318         Unreviewed GTK test gardening
2319
2320         * TestWebKitAPI/glib/TestExpectations.json:
2321
2322 2018-02-27  Doug Russell  <doug@getitdownonpaper.com>
2323
2324         AX: Spell check and style attributes should be optional when fetching attributed string
2325         https://bugs.webkit.org/show_bug.cgi?id=160744
2326
2327         Reviewed by Chris Fleizach.
2328
2329         The overhead of fetching a spell checked attributed string via AX API is substantial. 
2330         In some cases on the order of 7/8 of the total time spent fetching the string.
2331
2332         This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).
2333
2334         AXAttributedStringForTextMarkerRange will remain unchanged.
2335
2336         * DumpRenderTree/AccessibilityUIElement.cpp:
2337         (attributedStringForTextMarkerRangeCallback):
2338         (attributedStringForTextMarkerRangeWithOptionsCallback):
2339         (AccessibilityUIElement::attributedStringForTextMarkerRange):
2340         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2341         (AccessibilityUIElement::getJSClass):
2342         * DumpRenderTree/AccessibilityUIElement.h:
2343         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
2344         (AccessibilityUIElement::attributedStringForTextMarkerRange):
2345         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2346         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
2347         (createJSStringRef):
2348         (AccessibilityUIElement::attributedStringForTextMarkerRange):
2349         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2350         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
2351         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
2352         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
2353         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
2354         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2355         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
2356         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
2357         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2358         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
2359         (WTR::createJSStringRef):
2360         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
2361         (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2362
2363 2018-02-27  Daniel Bates  <dabates@apple.com>
2364
2365         Standardize terminology for marked text
2366         https://bugs.webkit.org/show_bug.cgi?id=180999
2367
2368         Reviewed by Zalan Bujtas.
2369
2370         The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
2371         and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
2372         marker. For instance, selected text is represented using a MarkerSubrange that does not have a
2373         corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
2374         describe these tagged text subranges.
2375
2376         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2377         * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: Added.
2378         (WebCore::operator<<):
2379         (TestWebKitAPI::TEST):
2380         * TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Removed.
2381
2382 2018-02-27  Aakash Jain  <aakash_jain@apple.com>
2383
2384         webkitpy Bugzilla transactions should retry on URLError
2385         https://bugs.webkit.org/show_bug.cgi?id=183156
2386
2387         Reviewed by Alexey Proskuryakov.
2388
2389         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
2390         (Bugzilla): Use NetworkTransaction.
2391         (Bugzilla._fetch_bug_page_by_url):
2392         (Bugzilla.bug_id_for_attachment_id):
2393         (Bugzilla.get_bug_id_for_attachment_id):
2394
2395 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2396
2397         [Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
2398         https://bugs.webkit.org/show_bug.cgi?id=183100
2399         <rdar://problem/37840987>
2400
2401         Reviewed by Tim Horton.
2402
2403         Add API tests that exercise -_setMinimumAllowedLayoutWidth: and -_setForceHorizontalViewportShrinkToFit:. See
2404         WebKit ChangeLog for more detail.
2405
2406         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2407         * TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Added.
2408         (TestWebKitAPI::while):
2409         (viewportTestPageMarkup):
2410         (TestWebKitAPI::TEST):
2411
2412 2018-02-27  Yusuke Suzuki  <utatane.tea@gmail.com>
2413
2414         Unreviewed, skip FTL tests if FTL is disabled
2415         https://bugs.webkit.org/show_bug.cgi?id=183071
2416
2417         * Scripts/run-jsc-stress-tests:
2418
2419 2018-02-26  Don Olmstead  <don.olmstead@sony.com>
2420
2421         Fix WebCore includes within WebKitLegacy
2422         https://bugs.webkit.org/show_bug.cgi?id=183147
2423
2424         Reviewed by Tim Horton.
2425
2426         * MiniBrowser/win/ResourceLoadDelegate.cpp:
2427
2428 2018-02-26  Yousuke Kimoto  <yousuke.kimoto@sony.com>
2429
2430         [WinCairo] WebKit2_C.h should be included for TestWebKit
2431         https://bugs.webkit.org/show_bug.cgi?id=182682
2432
2433         Reviewed by Yusuke Suzuki.
2434
2435         * TestWebKitAPI/config.h:
2436
2437 2018-02-25  Fujii Hironori  <Hironori.Fujii@sony.com>
2438
2439         [WK2] http/tests/navigation/new-window-redirect-history.html crashes
2440         https://bugs.webkit.org/show_bug.cgi?id=127683
2441
2442         Reviewed by Dan Bernstein.
2443
2444         m_previousTestBackForwardListItem was null for the new window.
2445         m_previousTestBackForwardListItem is initialized only for the main
2446         window in InjectedBundlePage::prepare.
2447
2448         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
2449         (WTR::InjectedBundlePage::dumpBackForwardList):
2450         Do null-check of m_previousTestBackForwardListItem.
2451
2452 2018-02-25  Alexey Proskuryakov  <ap@apple.com>
2453
2454         Various crashes in WebKitTestRunner, especially when system is under heavy load
2455         https://bugs.webkit.org/show_bug.cgi?id=183109
2456
2457         Reviewed by Tim Horton.
2458
2459         WebKitTestRunner had many places where it sent messages to WebContent with a timeout,
2460         but it didn't handle the timeout when it did occur. Nearly all of those would result
2461         in logic errors and failing tests, and most would even result in stack corruption,
2462         as the response handler modified local variables.
2463
2464         There is only one timeout scenario that we actually mean to handle in WKTR. That's
2465         when a test freezes after it is done (e.g. an infinite loop in beforeunload) - we don't
2466         want to blame the next test for freezing, so we silently relaunch WebContent.
2467         Everything else is cargo cult code that never worked.
2468
2469         This patch addresses the crashes, and actually makes tests pass a lot more on an
2470         overloaded system.
2471
2472         * WebKitTestRunner/TestController.cpp:
2473         (WTR::TestController::resetStateToConsistentValues): Moved m_doneResetting assignment
2474         to where it's actually needed, for clarity.
2475         (WTR::TestController::reattachPageToWebProcess): This function used to always hit
2476         and ignore message timeout, as m_doneResetting is only updated by navigation callback
2477         when the state is Resetting. This change makes it faster.
2478         (WTR::TestController::platformResetStateToConsistentValues): Style fix.
2479         (WTR::TestController::clearServiceWorkerRegistrations): Timing out here wasn't
2480         handled in a meaningful manner, and would even corrupt the stack.
2481         (WTR::TestController::clearDOMCache): Ditto.
2482         (WTR::TestController::clearDOMCaches): Ditto.
2483         (WTR::TestController::hasDOMCache): Ditto.
2484         (WTR::TestController::domCacheSize): Ditto.
2485         (WTR::TestController::isStatisticsPrevalentResource): Ditto.
2486         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Ditto.
2487         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Ditto.
2488         (WTR::TestController::isStatisticsHasHadUserInteraction): Ditto.
2489         (WTR::TestController::isStatisticsGrandfathered): Ditto.
2490         (WTR::TestController::statisticsUpdateCookiePartitioning): Ditto.
2491         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Ditto.
2492         (WTR::TestController::statisticsClearInMemoryAndPersistentStore): Ditto.
2493         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
2494         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Ditto.
2495
2496         * WebKitTestRunner/TestInvocation.cpp:
2497         (WTR::TestInvocation::shortTimeout const): Made shortTimeout shorter (on a hunch).
2498         (WTR::TestInvocation::invoke): Removed a timeout waiting for initial response. There
2499         is never a logical reason for such a timeout, as we always have a new or responsive
2500         WebContent process here.
2501         (WTR::TestInvocation::dumpResults): Removed another timeout that we don't know how to
2502         properly handle.
2503         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Removed assignment to
2504         m_errorMessage, which had no effect in this context.
2505
2506         * WebKitTestRunner/TestInvocation.h: Removed no longer used code.
2507
2508         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2509         (WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for
2510         no timeout.
2511         
2512         * WebKitTestRunner/ios/TestControllerIOS.mm:
2513         (WTR::TestController::platformConfigureViewForTest): Removed a useless timeout.
2514         Not sure if timing out here would corrupt the stack or not, but there is no reason
2515         to impose arbitrary limits on individual steps of a test.
2516
2517         * WebKitTestRunner/mac/TestControllerMac.mm:
2518         (WTR::TestController::platformConfigureViewForTest): Use a named constant for
2519         no timeout.
2520
2521 2018-02-25  Ali Juma  <ajuma@chromium.org>
2522
2523         Unreviewed. Change my status to committer.
2524
2525         * Scripts/webkitpy/common/config/contributors.json:
2526
2527 2018-02-25  Chris Dumez  <cdumez@apple.com>
2528
2529         Service workers do not work well inside Web.app
2530         https://bugs.webkit.org/show_bug.cgi?id=183105
2531         <rdar://problem/37864140>
2532
2533         Reviewed by Youenn Fablet.
2534
2535         Add API test coverage.
2536
2537         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2538
2539 2018-02-25  Aakash Jain  <aakash_jain@apple.com>
2540
2541         [build.webkit.org] unit-tests fail if buildbot 0.8.6p1 is not installed locally
2542         https://bugs.webkit.org/show_bug.cgi?id=183103
2543
2544         Reviewed by Alexey Proskuryakov.
2545
2546         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed extra imports.
2547
2548 2018-02-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2549
2550         Unreviewed, fix the TestWebKitAPI build after r228825.
2551
2552         I removed a `>= iOS 11` check in r228825, but forgot that this was also neeed to guard against tvOS and watchOS
2553         builds. This fixes the build by restoring the compile-time guard and also makes it explicit for these platforms.
2554
2555         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
2556
2557 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2558
2559         Remove currentTime() / currentTimeMS()
2560         https://bugs.webkit.org/show_bug.cgi?id=183052
2561
2562         Reviewed by Mark Lam.
2563
2564         * DumpRenderTree/TestRunner.cpp:
2565         (preciseTimeCallback):
2566         * DumpRenderTree/mac/TestRunnerMac.mm:
2567         (TestRunner::setMockGeolocationPosition):
2568         * TestWebKitAPI/Tests/WTF/Condition.cpp:
2569         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
2570         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
2571         * WebKitTestRunner/GeolocationProviderMock.cpp:
2572         (WTR::GeolocationProviderMock::setPosition):
2573         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2574         (WTR::TestRunner::preciseTime):
2575
2576 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2577
2578         Remove sleep(double) and sleepMS(double) interfaces
2579         https://bugs.webkit.org/show_bug.cgi?id=183038
2580
2581         Reviewed by Mark Lam.
2582
2583         * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
2584         (PluginTest::indicateTestFailure):
2585         * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
2586         (EvaluteJSWithinNPP_New::NPP_New):
2587         * DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
2588         (InvokeDestroysPluginWithinNPP_New::NPP_New):
2589         * DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
2590         * TestWebKitAPI/Tests/WTF/Signals.cpp:
2591         (TEST):
2592         * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
2593         (TestWebKitAPI::testThreadGroup):
2594         * TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
2595         (TestWebKitAPI::TEST):
2596         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2597         (TestWebKitAPI::TEST):
2598         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2599         (TestWebKitAPI::TEST):
2600         * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
2601         (TestWebKitAPI::Util::sleep):
2602
2603 2018-02-21  Don Olmstead  <don.olmstead@sony.com>
2604
2605         [CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
2606         https://bugs.webkit.org/show_bug.cgi?id=182883
2607
2608         Reviewed by Per Arne Vollan.
2609
2610         * DumpRenderTree/config.h:
2611         * TestWebKitAPI/config.h:
2612
2613 2018-02-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2614
2615         [GTK] Unsafe g_setenv use in MiniBrowser main
2616         https://bugs.webkit.org/show_bug.cgi?id=182978
2617
2618         Reviewed by Carlos Garcia Campos.
2619
2620         setenv (and g_setenv) will randomly crash if called too late.
2621
2622         * MiniBrowser/gtk/main.c:
2623         (main):
2624
2625 2018-02-21  Aakash Jain  <aakash_jain@apple.com>
2626
2627         webkitpy NetworkTransaction should retry on URLError
2628         https://bugs.webkit.org/show_bug.cgi?id=182987
2629
2630         Reviewed by Alexey Proskuryakov.
2631
2632         * Scripts/webkitpy/common/net/networktransaction.py:
2633         (NetworkTransaction.run): Retry on urllib2.URLError.
2634
2635 2018-02-21  Ms2ger  <Ms2ger@igalia.com>
2636
2637         [WTR][WPE] Correct the process names in TestController.
2638         https://bugs.webkit.org/show_bug.cgi?id=178700
2639
2640         Reviewed by Michael Catanzaro.
2641
2642         Similar to r228731 for GTK.
2643
2644         * Scripts/webkitpy/port/wpe.py:
2645         (WPEPort._get_crash_log): removed the code to convert WebProcess name.
2646         * WebKitTestRunner/TestController.cpp: return the correct process names for WPE.
2647         (WTR::TestController::webProcessName):
2648         (WTR::TestController::networkProcessName):
2649         (WTR::TestController::databaseProcessName):
2650
2651 2018-02-21  Ms2ger  <Ms2ger@igalia.com>
2652
2653         [ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRange().
2654         https://bugs.webkit.org/show_bug.cgi?id=183000
2655
2656         Reviewed by Joanmarie Diggs.
2657
2658         It is never initialized, but is passed to atk_attribute_set_free.
2659         This caused a crash in accessibility/content-editable-as-textarea.html on the debug bots.
2660
2661         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
2662         (WTR::AccessibilityUIElement::attributedStringForRange):
2663
2664 2018-02-21  Myles C. Maxfield  <mmaxfield@apple.com>
2665
2666         [Cocoa] Make system-ui obey the user-installed-font policy
2667         https://bugs.webkit.org/show_bug.cgi?id=182860
2668         <rdar://problem/36158249>
2669
2670         Reviewed by Antti Koivisto.
2671
2672         Create a font, FakeHelvetica-ArmenianCharacter.ttf, which supports a particular Armenian
2673         character which isn't isn't supported by any other font on the system.
2674
2675         * WebKitTestRunner/FakeHelvetica-ArmenianCharacter.ttf:
2676         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2677
2678 2018-02-20  Timothy Horton  <timothy_horton@apple.com>
2679
2680         Try to fix the 32-bit build after r228857
2681
2682         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
2683         (WTR::UIScriptController::firstResponderSuppressionForWebView):
2684
2685 2018-02-20  Nan Wang  <n_wang@apple.com>
2686
2687         AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
2688         https://bugs.webkit.org/show_bug.cgi?id=182752
2689         <rdar://problem/37518233>
2690
2691         Reviewed by Ryosuke Niwa.
2692
2693         * DumpRenderTree/mac/UIScriptControllerMac.mm:
2694         (WTR::UIScriptController::firstResponderSuppressionForWebView):
2695         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
2696         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
2697         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
2698         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
2699         (WTR::UIScriptController::firstResponderSuppressionForWebView):
2700         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
2701         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
2702         * TestRunnerShared/UIScriptContext/UIScriptController.h:
2703         * WebKitTestRunner/mac/UIScriptControllerMac.mm:
2704         (WTR::UIScriptController::firstResponderSuppressionForWebView):
2705         (WTR::UIScriptController::makeWindowContentViewFirstResponder):
2706         (WTR::UIScriptController::isWindowContentViewFirstResponder const):
2707
2708 2018-02-20  Fujii Hironori  <Hironori.Fujii@sony.com>
2709
2710         [GTK] jhbuild: Remove gtk-doc
2711         https://bugs.webkit.org/show_bug.cgi?id=182956
2712
2713         Reviewed by Michael Catanzaro.
2714
2715         jhbuild doesn't need to build gtk-doc because major LTS Linux
2716         distributions have gtk-doc v1.25, and
2717         Tools/gtk/install-dependencies installs gtk-doc.
2718
2719         * gtk/jhbuild.modules: Removed gtk-doc.
2720
2721 2018-02-20  Tim Horton  <timothy_horton@apple.com>
2722
2723         Introduce HAVE(IOSURFACE_ACCELERATOR)
2724         https://bugs.webkit.org/show_bug.cgi?id=182955
2725         <rdar://problem/37699510>
2726
2727         Reviewed by Sam Weinig.
2728
2729         * DumpRenderTree/ios/PixelDumpSupportIOS.mm:
2730         (createBitmapContextFromWebView):
2731         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
2732         (WTR::PlatformWebView::windowSnapshotImage):
2733
2734 2018-02-20  Chris Dumez  <cdumez@apple.com>
2735
2736         Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
2737         https://bugs.webkit.org/show_bug.cgi?id=182720
2738         <rdar://problem/37515204>
2739
2740         Reviewed by Alex Christensen.
2741
2742         Add API test coverage.
2743
2744         * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:
2745         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
2746         (TestWebKitAPI::TEST):
2747
2748 2018-02-20  Nan Wang  <n_wang@apple.com>
2749
2750         AX: AOM: Dispatch accessibleclick event
2751         https://bugs.webkit.org/show_bug.cgi?id=180898
2752         <rdar://problem/36086710>
2753
2754         Reviewed by Ryosuke Niwa.
2755
2756         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
2757         (WTR::AccessibilityUIElement::syncPress):
2758         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
2759         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
2760         (WTR::AccessibilityUIElement::syncPress):
2761
2762 2018-02-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2763
2764         [iOS 11.3 Beta] Can't copy a URL from Safari and paste it into the Gmail app
2765         https://bugs.webkit.org/show_bug.cgi?id=182952
2766         <rdar://problem/37636190>
2767
2768         Reviewed by Tim Horton.
2769
2770         Adds a new iOS copy/paste test that copies an anchor element via action sheet, and checks that upon pasting,
2771         both "text/plain" and "text/uri-list" are provided. Additionally tweaks an existing iOS drag and drop test to
2772         check for the same behavior.
2773
2774         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
2775         (TestWebKitAPI::TEST):
2776         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2777         (TestWebKitAPI::TEST):
2778
2779 2018-02-20  Philippe Normand  <pnormand@igalia.com>
2780
2781         [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
2782         https://bugs.webkit.org/show_bug.cgi?id=173655
2783
2784         Reviewed by Xabier Rodriguez-Calvar.
2785
2786         The FIXME in GStreamerUtilities.cpp asks to pass the command line
2787         parameters to the GStreamer initialization function.
2788
2789         Based on initial patch by: Vanessa Chipirrás Navalón  <vchipirras@igalia.com>
2790
2791         * MiniBrowser/gtk/main.c:
2792         (main): Add the group containing the Gstreamer options that the console displays.
2793
2794 2018-02-19  Fujii Hironori  <Hironori.Fujii@sony.com>
2795
2796         [WTR][GTK] crash log backtrace doesn't show symbol names for DatabaseProcess and NetworkProcess
2797         https://bugs.webkit.org/show_bug.cgi?id=182953
2798
2799         Reviewed by Carlos Garcia Campos.
2800
2801         * Scripts/webkitpy/port/gtk.py:
2802         (GtkPort._get_crash_log): Removed the code to convert WebProcess name.
2803         * WebKitTestRunner/TestController.cpp:
2804         (WTR::TestController::webProcessName): Return the correct program name for GTK+ port.
2805         (WTR::TestController::networkProcessName): Ditto.
2806         (WTR::TestController::databaseProcessName): Ditto.
2807
2808 2018-02-19  Ryan Haddad  <ryanhaddad@apple.com>
2809
2810         Unreviewed, rolling out r228696.
2811
2812         The API test added with this change is timing out on macOS.
2813
2814         Reverted changeset:
2815
2816         "Null pointer dereference in
2817         WebPageProxy::urlSchemeHandlerForScheme()"
2818         https://bugs.webkit.org/show_bug.cgi?id=182905
2819         https://trac.webkit.org/changeset/228696
2820
2821 2018-02-16  Ryosuke Niwa  <rniwa@webkit.org>
2822
2823         Add an entitlement check for service worker on iOS
2824         https://bugs.webkit.org/show_bug.cgi?id=182865
2825         <rdar://problem/37505903>
2826
2827         Reviewed by Brady Eidson.
2828
2829         Added the service worker entitlements to WebKitTestRunner and TestWebKitAPI on iOS.
2830
2831         * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
2832         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
2833         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
2834         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2835
2836 2018-02-16  Youenn Fablet  <youenn@apple.com>
2837
2838         Allow specifying which plug-ins are supported
2839         https://bugs.webkit.org/show_bug.cgi?id=182748
2840
2841         Reviewed by Chris Dumez.
2842
2843         Add support for a test runner API to specificy supported plug-ins.
2844
2845         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2846         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2847         (WTR::TestRunner::setPluginsAsUnsupported):
2848         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2849         * WebKitTestRunner/TestController.cpp:
2850         (WTR::TestController::resetStateToConsistentValues):
2851         (WTR::TestController::setPluginsAsUnsupported):
2852         * WebKitTestRunner/TestController.h:
2853         * WebKitTestRunner/TestInvocation.cpp:
2854         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2855
2856 2018-02-16  Per Arne Vollan  <pvollan@apple.com>
2857
2858         Implement stopping of run loop in the WebContent process when using NSRunLoop.
2859         https://bugs.webkit.org/show_bug.cgi?id=182499
2860         <rdar://problem/37247424>
2861
2862         Reviewed by Brent Fulgham.
2863
2864         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2865         * TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: Added.
2866         (TEST):
2867
2868 2018-02-15  Alexey Proskuryakov  <ap@apple.com>
2869
2870         Speed up dSYM generation on build.webkit.org with -gline-tables-only
2871         https://bugs.webkit.org/show_bug.cgi?id=182841
2872         rdar://problem/34579649
2873
2874         Reviewed by Aakash Jain.
2875
2876         Build speed and binary size improvements are so substantial that I'm willing to make
2877         CI builds less suitable for debugging, which is not a common scenario anyway.
2878         Crash logs will still have line numbers in them.
2879
2880         * BuildSlaveSupport/build.webkit.org-config/steps.py: (CompileWebKit.start):
2881
2882 2018-02-15  Don Olmstead  <don.olmstead@sony.com>
2883
2884         WebCore headers should not be included relatively within dependent projects
2885         https://bugs.webkit.org/show_bug.cgi?id=182805
2886
2887         Reviewed by Chris Dumez.
2888
2889         * TestWebKitAPI/win/TestWebCoreStubs.cpp:
2890         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
2891         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
2892         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
2893         * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
2894         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
2895
2896 2018-02-15  Tomas Popela  <tpopela@redhat.com>
2897
2898         run-jsc-stress-tests - skip a test if any of the run commands evals to skip
2899         https://bugs.webkit.org/show_bug.cgi?id=182729
2900
2901         If multiple run commands are specified and one of them evals to skip,
2902         then the test is not skipped, because the run is scheduled while
2903         evaluating other commands.
2904
2905         Remember if the test is going to be skipped - if yes, just stop
2906         evaluating the other run commands.
2907
2908         Reviewed by Saam Barati.
2909
2910         * Scripts/run-jsc-stress-tests:
2911
2912 2018-02-14  Charlie Turner  <cturner@igalia.com>
2913
2914         Get Garden-O-Matic running again.
2915         https://bugs.webkit.org/show_bug.cgi?id=179089
2916
2917         Reviewed by Carlos Alberto Lopez Perez.
2918
2919         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Trac.js:
2920         (parseCommitData): Author field is not always spelled 'author' these days.
2921         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
2922         No longer have a 32-bit builder.
2923         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/perf.js:
2924         (ui.perf.View.base.init): createElement has a required parameter these days.
2925         * Scripts/webkitpy/tool/commands/gardenomatic.py:
2926         (GardenOMatic): Override use_globs so that platform lookup in config.js works.
2927
2928 2018-02-14  Don Olmstead  <don.olmstead@sony.com>
2929
2930         Remove unused ForwardingHeaders directories from Tools
2931         https://bugs.webkit.org/show_bug.cgi?id=182813
2932
2933         Reviewed by Konstantin Tokarev.
2934
2935         * DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h: Removed.
2936         * DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h: Removed.
2937         * DumpRenderTree/ForwardingHeaders/runtime/JSExportMacros.h: Removed.
2938         * DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h: Removed.
2939         * TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h: Removed.
2940
2941 2018-02-14  Daniel Bates  <dabates@apple.com>
2942
2943         Disallow cross-origin subresources from asking for credentials
2944         https://bugs.webkit.org/show_bug.cgi?id=182579
2945         <rdar://problem/36162271>
2946
2947         Reviewed by Andy Estes.
2948
2949         Add test option allowCrossOriginSubresourcesToAskForCredential (defaults to false)
2950         so that tests can toggle between the old behavior and new behavior.
2951
2952         * DumpRenderTree/TestOptions.h:
2953         * DumpRenderTree/TestOptions.mm:
2954         (TestOptions::TestOptions):
2955         * DumpRenderTree/mac/DumpRenderTree.mm:
2956         (setWebPreferencesForTestOptions):
2957         * WebKitTestRunner/TestController.cpp:
2958         (WTR::TestController::resetPreferencesToConsistentValues):
2959         (WTR::updateTestOptionsFromTestHeader):
2960         * WebKitTestRunner/TestOptions.h:
2961         (WTR::TestOptions::hasSameInitializationOptions const):
2962
2963 2018-02-12  Ryosuke Niwa  <rniwa@webkit.org>
2964
2965         REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
2966         https://bugs.webkit.org/show_bug.cgi?id=182564
2967
2968         Reviewed by Wenson Hsieh.
2969
2970         Updated assertions to make sure the trailing "}" of @list rules is includd in the style, the "style" element
2971         is wrapped by "head" element (not present in the pasted markup since the fragment parsing algorithm strips away),
2972         and the style content is enclosed in "<!--" and "-->".
2973
2974         Also use execCommand('insertHTML', ~) to insert the HTML obtained via dataTransfer.getData instead of innerHTML
2975         to make sure our pasting code preserves the special style element for MSO list quirks.
2976
2977         Finally, added two more test cases for pasting content from Microsoft Word's compatibility mode.
2978
2979         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
2980         (TEST):
2981         * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
2982         (TEST):
2983
2984 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
2985
2986         [Tools] --wincairo should imply --64-bit by default.
2987         https://bugs.webkit.org/show_bug.cgi?id=182753
2988
2989         Reviewed by Daniel Bates.
2990
2991         WinCairo does not currently support 32-bit and `--wincairo` itself should refer to a working platform.
2992         This patch ensures x64 is determined correctly for `build-webkit --no-ninja` and `run-webkit-tests`.
2993
2994         * Scripts/webkitdirs.pm:
2995         (determinePassedArchitecture):
2996         (shouldBuild32Bit):
2997         (determineShouldBuild32Bit):
2998         (determineIsWin64):
2999         * Scripts/webkitpy/common/config/ports.py:
3000         (WinCairoPort.build_webkit_command):
3001         * Scripts/webkitpy/common/config/ports_unittest.py:
3002         (DeprecatedPortTest.test_wincairo_port):
3003         * Scripts/webkitpy/port/win.py:
3004         (WinCairoPort):
3005
3006 2018-02-13  Commit Queue  <commit-queue@webkit.org>
3007
3008         Unreviewed, rolling out r228431.
3009         https://bugs.webkit.org/show_bug.cgi?id=182766
3010
3011         Regressed CMake build stability (Requested by dolmstead on
3012         #webkit).
3013
3014         Reverted changeset:
3015
3016         "[CMake] Make WebCore headers copies"
3017         https://bugs.webkit.org/show_bug.cgi?id=182512
3018         https://trac.webkit.org/changeset/228431
3019
3020 2018-02-13  Don Olmstead  <don.olmstead@sony.com>
3021
3022         [CMake] Make WebCore headers copies
3023         https://bugs.webkit.org/show_bug.cgi?id=182512
3024
3025         Reviewed by Keith Miller.
3026
3027         * DumpRenderTree/CMakeLists.txt:
3028         * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
3029         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h:
3030         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h:
3031         * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h:
3032         * TestWebKitAPI/PlatformGTK.cmake:
3033         * TestWebKitAPI/PlatformWPE.cmake:
3034         * TestWebKitAPI/PlatformWin.cmake:
3035         * TestWebKitAPI/win/TestWebCoreStubs.cpp:
3036         (loadResourceIntoBuffer):
3037         * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
3038         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
3039         * WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
3040         * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
3041         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
3042
3043 2018-02-13  Chris Dumez  <cdumez@apple.com>
3044
3045         REGRESSION (r228299): Broke reader mode in Safari
3046         https://bugs.webkit.org/show_bug.cgi?id=182697
3047         <rdar://problem/37399012>
3048
3049         Reviewed by Ryosuke Niwa.
3050
3051         Add API test coverage for responding asynchronously to the decidePolicyForNavigationResponse
3052         delegate.
3053
3054         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3055         * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: Added.
3056         (-[TestAsyncNavigationDelegate webView:didFinishNavigation:]):
3057         (-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]):
3058         (-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
3059         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3060         (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
3061         (TestWebKitAPI::TEST):
3062
3063 2018-02-12  John Wilander  <wilander@apple.com>
3064
3065         Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
3066         https://bugs.webkit.org/show_bug.cgi?id=182664
3067         <rdar://problem/37372572>
3068
3069         Reviewed by Brent Fulgham.
3070
3071         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3072         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3073         (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom):
3074         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo):
3075         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom):
3076         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3077         * WebKitTestRunner/TestController.cpp:
3078         (WTR::TestController::setStatisticsSubresourceUniqueRedirectFrom):
3079         (WTR::TestController::setStatisticsTopFrameUniqueRedirectTo):
3080         (WTR::TestController::setStatisticsTopFrameUniqueRedirectFrom):
3081         * WebKitTestRunner/TestController.h:
3082         * WebKitTestRunner/TestInvocation.cpp:
3083         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3084
3085 2018-02-12  Ross Kirsling  <ross.kirsling@sony.com>
3086
3087         download-latest-github-release .py should not use "browser download URL".
3088         https://bugs.webkit.org/show_bug.cgi?id=182646
3089
3090         Reviewed by Per Arne Vollan.
3091
3092         * Scripts/download-latest-github-release.py:
3093         Download request should be a proper GitHub API call and should actually include the token when applicable.
3094         (Also clean up usage of args and print while we're in here.)
3095
3096 2018-02-12  Per Arne Vollan  <pvollan@apple.com>
3097
3098         EWS should run Windows tests.
3099         https://bugs.webkit.org/show_bug.cgi?id=177967
3100
3101         Reviewed by Lucas Forschler.
3102
3103         This will help catch regressions at an early stage.
3104
3105         * Scripts/webkitpy/common/config/ews.json:
3106
3107 2018-02-08  Ryosuke Niwa  <rniwa@webkit.org>
3108
3109         REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
3110         https://bugs.webkit.org/show_bug.cgi?id=182564
3111
3112         Reviewed by Wenson Hsieh.
3113
3114         Added tests for pasting HTML with list items generated by Microsoft Word as well as HTML which looks like
3115         the one generated by Microsoft Word but missing a proper "html" element at the beginning.
3116
3117         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3118         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: Added test cases.
3119         * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: Added test cases.
3120         (msoListMarkupWithoutProperHTMLElement): Added.
3121         * TestWebKitAPI/Tests/WebKitCocoa/mso-list.html: Added.
3122
3123 2018-02-09  Don Olmstead  <don.olmstead@sony.com>
3124
3125         [CMake] Make PAL headers copies
3126         https://bugs.webkit.org/show_bug.cgi?id=182645
3127
3128         Reviewed by Alex Christensen.
3129
3130         * TestWebKitAPI/CMakeLists.txt:
3131
3132 2018-02-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3133
3134         Pasting from Excel no longer provides text/html data
3135         https://bugs.webkit.org/show_bug.cgi?id=182636
3136         <rdar://problem/37087060>
3137
3138         Reviewed by Ryosuke Niwa.
3139
3140         Add new API tests to exercise pasting images with various other content types on macOS, and when dropping images
3141         and HTML markup on iOS. See the WebCore ChangeLog for more detail.
3142
3143         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3144         * TestWebKitAPI/Tests/WebKitCocoa/DataTransfer.html: Added.
3145
3146         Add a new API test harness that dumps various bits of information about a DataTransfer upon paste and drop.
3147         While somewhat similar to some existing harnesses, this makes a distinction between the raw HTML data on the
3148         pasteboard and the actual result of inserting said HTML into the DOM. This allows us to check that the HTML has
3149         been sanitized, while making checks for the actual content of the HTML robust against inline style changes.
3150
3151         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
3152         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: Added.
3153
3154         Add a new test suite to exercise pasting mixed content types. In these test cases, the pasteboard contains a
3155         file, with some combination of plain text, rich text, and URLs.
3156
3157         (imagePath):
3158         (writeTypesAndDataToPasteboard):
3159
3160         Add a helper to write a var-arg list of content types and data to the general NSPasteboard.
3161
3162         (setUpWebView):
3163         (markupString):
3164         (TestWebKitAPI::TEST):
3165         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
3166         (TestWebKitAPI::testIconImageData):
3167         (TestWebKitAPI::TEST):
3168         * TestWebKitAPI/cocoa/TestWKWebView.h:
3169
3170         Move a private declaration of -[WKWebView paste:] out to TestWKWebView.h, so that it can be shared across
3171         multiple tests. Currently, it only resides in PasteImage.mm, but I need it in PasteMixedContent.mm as well.
3172
3173 2018-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3174
3175         Add a way to check if a host is an IP address
3176         https://bugs.webkit.org/show_bug.cgi?id=182427
3177
3178         Reviewed by Alex Christensen.
3179
3180         Add unit test for URL::hostIsIPAddress().
3181
3182         * TestWebKitAPI/Tests/WebCore/URL.cpp:
3183         (TestWebKitAPI::TEST_F):
3184
3185 2018-02-09  Philippe Normand  <pnormand@igalia.com>
3186
3187         [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
3188         https://bugs.webkit.org/show_bug.cgi?id=176802
3189
3190         Reviewed by Xabier Rodriguez-Calvar.
3191
3192         * gstreamer/jhbuild.modules:
3193         * gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Added.
3194
3195 2018-02-09  Philippe Normand  <pnormand@igalia.com>
3196
3197         [JHBuild] Update Mesa to version 17
3198         https://bugs.webkit.org/show_bug.cgi?id=182599
3199
3200         Reviewed by Carlos Alberto Lopez Perez.
3201
3202         * gtk/jhbuild.modules: Update Mesa (and its dependencies, hopefully) to version 17.3.3.
3203
3204 2018-02-08  Chris Dumez  <cdumez@apple.com>
3205
3206         There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
3207         https://bugs.webkit.org/show_bug.cgi?id=182524
3208         <rdar://problem/9057327>
3209
3210         Reviewed by Ryosuke Niwa.
3211
3212         Add API test coverage.
3213
3214         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3215         * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: Added.
3216         (TestWebKitAPI::runJavaScriptAlert):
3217         (TestWebKitAPI::TEST):
3218         * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: Added.
3219         (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::InjectedBundleDisableOverrideBuiltinsBehaviorTest):
3220         (TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize):
3221         * TestWebKitAPI/Tests/WebKit/override-builtins-test.html: Added.
3222
3223 2018-02-08  Michael Catanzaro  <mcatanzaro@igalia.com>
3224
3225         TestController should not exercise cocoa-specific resource load statistics APIs
3226         https://bugs.webkit.org/show_bug.cgi?id=182355
3227
3228         Reviewed by Alex Christensen.
3229
3230         Remove unnecessary use of platform-specific APIs in the TestController, since there are
3231         cross-platform APIs to do the same thing.
3232
3233         Also, ensure callbacks execute before returning from TestController's functions, since
3234         otherwise the tests are guaranteed to be flaky at best, and also since there's nothing to
3235         prevent the TestController from being destroyed before the callbacks execute.
3236
3237         * WebKitTestRunner/TestController.cpp:
3238         (WTR::resourceStatisticsVoidResultCallback):
3239         (WTR::resourceStatisticsBooleanResultCallback):
3240         (WTR::TestController::isStatisticsPrevalentResource):
3241         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
3242         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
3243         (WTR::TestController::isStatisticsHasHadUserInteraction):
3244         (WTR::TestController::isStatisticsGrandfathered):
3245         (WTR::TestController::statisticsUpdateCookiePartitioning):
3246         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
3247         (WTR::TestController::statisticsClearInMemoryAndPersistentStore):
3248         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
3249         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
3250         (WTR::resourceStatisticsCallback): Deleted.
3251         (WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback): Deleted.
3252         * WebKitTestRunner/TestController.h:
3253         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
3254         (WTR::toNSString): Deleted.
3255         (WTR::TestController::setStatisticsLastSeen): Deleted.
3256         (WTR::TestController::setStatisticsPrevalentResource): Deleted.
3257         (WTR::TestController::isStatisticsPrevalentResource): Deleted.
3258         (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Deleted.
3259         (WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Deleted.
3260         (WTR::TestController::setStatisticsHasHadUserInteraction): Deleted.
3261         (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
3262         (WTR::TestController::isStatisticsHasHadUserInteraction): Deleted.
3263         (WTR::TestController::setStatisticsGrandfathered): Deleted.
3264         (WTR::TestController::isStatisticsGrandfathered): Deleted.
3265         (WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin): Deleted.
3266         (WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin): Deleted.
3267         (WTR::TestController::setStatisticsSubresourceUniqueRedirectTo): Deleted.
3268         (WTR::TestController::setStatisticsTimeToLiveUserInteraction): Deleted.
3269         (WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
3270         (WTR::TestController::statisticsProcessStatisticsAndDataRecords): Deleted.
3271         (WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
3272         (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
3273         (WTR::TestController::statisticsSubmitTelemetry): Deleted.
3274         (WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Deleted.
3275         (WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted.
3276         (WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured): Deleted.
3277         (WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Deleted.
3278         (WTR::TestController::setStatisticsGrandfatheringTime): Deleted.
3279         (WTR::TestController::setStatisticsMaxStatisticsEntries): Deleted.
3280         (WTR::TestController::setStatisticsPruneEntriesDownTo): Deleted.
3281         (WTR::TestController::statisticsClearInMemoryAndPersistentStore): Deleted.
3282         (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Deleted.
3283         (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Deleted.
3284         (WTR::TestController::statisticsResetToConsistentState): Deleted.
3285
3286 2018-02-08  Jonathan Bedard  <jbedard@apple.com>
3287
3288         webkit-patch suggest-reviewers dies with AttributeError: 'NoneType' object has no attribute 'revision'
3289         https://bugs.webkit.org/show_bug.cgi?id=182584
3290
3291         Reviewed by Daniel Bates.
3292
3293         It is possible that a specific revision has an empty ChangeLog. In this case, Checkout.commit_info_for_revision
3294         will return 'None'. Checkout.recent_commit_infos_for_files should never return a set with 'None' in it.
3295
3296         * Scripts/webkitpy/common/checkout/checkout.py:
3297         (Checkout.recent_commit_infos_for_files): Remove any empty commit information from the set.
3298         * Scripts/webkitpy/common/checkout/checkout_unittest.py: Add a file which references an empty ChangeLog.
3299
3300 2018-02-08  Matt Lewis  <jlewis3@apple.com>
3301
3302         Unreviewed, rolling out r228261.
3303
3304         This broke an internal build
3305
3306         Reverted changeset:
3307
3308         "Add a way to check if a host is an IP address"
3309         https://bugs.webkit.org/show_bug.cgi?id=182427
3310         https://trac.webkit.org/changeset/228261
3311
3312 2018-02-08  Commit Queue  <commit-queue@webkit.org>
3313
3314         Unreviewed, rolling out r228267, r228268, and r228269.
3315         https://bugs.webkit.org/show_bug.cgi?id=182601
3316
3317         jhbuild socks (Requested by philn on #webkit).
3318
3319         Reverted changesets:
3320
3321         "[JHBuild] Update Mesa to version 17"
3322         https://bugs.webkit.org/show_bug.cgi?id=182599
3323         https://trac.webkit.org/changeset/228267
3324
3325         "Unreviewed, GTK build fix attempt after r228267."
3326         https://trac.webkit.org/changeset/228268
3327
3328         "Unreviewed, final GTK build fix attempt after r228267."
3329         https://trac.webkit.org/changeset/228269
3330
3331 2018-02-08  Philippe Normand  <pnormand@igalia.com>
3332
3333         Unreviewed, final GTK build fix attempt after r228267.
3334
3335         * gtk/jhbuild.modules: sha256sum for libdrm was for the tar.gz archive. Oops.
3336
3337 2018-02-08  Philippe Normand  <pnormand@igalia.com>
3338
3339         Unreviewed, GTK build fix attempt after r228267.
3340
3341         * gtk/jhbuild.modules: Update to libdrm version 2.4.89, Mesa 17 requires at least version 2.4.75.
3342
3343 2018-02-08  Philippe Normand  <pnormand@igalia.com>
3344
3345         [JHBuild] Update Mesa to version 17
3346         https://bugs.webkit.org/show_bug.cgi?id=182599
3347
3348         Reviewed by Carlos Alberto Lopez Perez.
3349
3350         * gtk/jhbuild.modules: Update Mesa to version 17.3.3.
3351
3352 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3353
3354         Add a way to check if a host is an IP address
3355         https://bugs.webkit.org/show_bug.cgi?id=182427
3356
3357         Reviewed by Alex Christensen.
3358
3359         Add unit test for URL::hostIsIPAddress().
3360
3361         * TestWebKitAPI/Tests/WebCore/URL.cpp:
3362         (TestWebKitAPI::TEST_F):
3363
3364 2018-02-07  Tim Horton  <timothy_horton@apple.com>
3365
3366         Evernote device management web view sometimes displays at the wrong scale
3367         https://bugs.webkit.org/show_bug.cgi?id=182590
3368         <rdar://problem/36633687>
3369
3370         Reviewed by Simon Fraser.
3371
3372         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3373         * TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegateCrash.mm.
3374         (-[TestDelegateForScrollView dealloc]):
3375         (TestWebKitAPI::TEST):
3376         (-[WKScrollViewDelegateWithViewForZoomingOverridden viewForZoomingInScrollView:]):
3377         Add a test that failed before the change that ensures that we don't
3378         consult the external delegate for viewForZoomingInScrollView:, and that
3379         we succesfully update the scale even if it matches that of the view
3380         the external delegate returns for viewForZoomingInScrollView:.
3381
3382 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
3383
3384         REGRESSION(r226396): File paths are inserted when dropping image files
3385         https://bugs.webkit.org/show_bug.cgi?id=182557
3386         <rdar://problem/37294120>
3387
3388         Reviewed by Ryosuke Niwa.
3389
3390         Tweak some image pasting API tests to ensure that file paths are not inserted when pasting images backed by
3391         file paths on disk.
3392
3393         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
3394         (TEST):
3395
3396 2018-02-07  Ms2ger  <Ms2ger@igalia.com>
3397
3398         [GTK] Enable WebKit.GeolocationTransitionTo{High,Low}Accuracy tests
3399         https://bugs.webkit.org/show_bug.cgi?id=125068
3400
3401         Unreviewed test gardening.
3402
3403         They do not appear to have failed since we started running them again in r226944.
3404
3405         * TestWebKitAPI/glib/TestExpectations.json:
3406
3407 2018-02-07  Ms2ger  <Ms2ger@igalia.com>
3408
3409         [GTK] Enable WebKit.InjectedBundleFrameHitTest test
3410         https://bugs.webkit.org/show_bug.cgi?id=120303
3411
3412         Unreviewed test gardening.
3413
3414         It does not appear to have failed since we started running it again in r226944.
3415
3416         * TestWebKitAPI/glib/TestExpectations.json:
3417
3418 2018-02-07  Ms2ger  <Ms2ger@igalia.com>
3419
3420         [GTK] Enable WebKit.ForceRepaint test
3421         https://bugs.webkit.org/show_bug.cgi?id=105532
3422
3423         Unreviewed test gardening.
3424
3425         It does not appear to have failed since we started running it again in r226944.
3426
3427         * TestWebKitAPI/glib/TestExpectations.json:
3428
3429 2018-02-07  Philippe Normand  <pnormand@igalia.com>
3430
3431         [JHBuild] Add libva in moduleset
3432         https://bugs.webkit.org/show_bug.cgi?id=182384
3433
3434         Reviewed by Xabier Rodriguez-Calvar.
3435
3436         * gstreamer/jhbuild.modules: Add libva and disable spurious message output.
3437         * gtk/install-dependencies: Remove libva from dependencies.
3438         * wpe/install-dependencies: Ditto.
3439
3440 2018-02-07  Ms2ger  <Ms2ger@igalia.com>
3441
3442         [GTK] Enable WebKit.NewFirstVisuallyNonEmptyLayoutFrames test
3443         https://bugs.webkit.org/show_bug.cgi?id=85037
3444
3445         Unreviewed test gardening.
3446
3447         It does not appear to have failed since we started running it again in r226944.
3448
3449         * TestWebKitAPI/glib/TestExpectations.json:
3450
3451 2018-02-06  Leo Balter  <leonardo.balter@gmail.com>
3452
3453         Nit fix for ruby script called through Perl
3454         https://bugs.webkit.org/show_bug.cgi?id=182552
3455
3456         Reviewed by Yusuke Suzuki.
3457
3458         * BuildSlaveSupport/build.webkit.org-config/steps.py:
3459         (RunTest262Tests):
3460
3461 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
3462
3463         Remove WebCore/ForwardingHeaders directory
3464         https://bugs.webkit.org/show_bug.cgi?id=182347
3465
3466         Reviewed by Keith Miller.
3467
3468         * WebKitTestRunner/TestController.cpp:
3469
3470 2018-02-06  Ross Kirsling  <ross.kirsling@sony.com>
3471
3472         webkit-patch upload should ask for confirmation before creating a new bug
3473         https://bugs.webkit.org/show_bug.cgi?id=182551
3474
3475         Reviewed by Daniel Bates.
3476
3477         It is quite easy to paste unintended text into the bug number prompt. This creates a junk bug with an uneditable
3478         first comment, which could result in embarrassment or potentially even a proprietary information leak.
3479
3480         * Scripts/webkitpy/tool/commands/upload_unittest.py:
3481         (test_prepare):
3482         * Scripts/webkitpy/tool/steps/promptforbugortitle.py:
3483         (PromptForBugOrTitle):
3484         (PromptForBugOrTitle.options):
3485         (PromptForBugOrTitle.run):
3486
3487 2018-02-06  Youenn Fablet  <youenn@apple.com>
3488
3489         HasServiceWorkerRegistration bit should be sent when creating a new page
3490         https://bugs.webkit.org/show_bug.cgi?id=182410
3491
3492         Reviewed by Chris Dumez.
3493
3494         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3495
3496 2018-02-06  Andres Gomez  <agomez@igalia.com>
3497
3498         [GTK][WPE] Add dependencies watching lists for WKGTK+ and WPE
3499         https://bugs.webkit.org/show_bug.cgi?id=182346
3500
3501         Reviewed by Michael Catanzaro.
3502
3503         Loren, Carlos and Andres are interested on the WKGTK+ dependencies
3504         watchlist since they are running WKGTK+ EWS.
3505
3506         Similarly, Adrian and Carlos are running a WPE EWS.
3507
3508         * Scripts/webkitpy/common/config/watchlist: Added WPEDependencies
3509           and WebKitGTKDependencies watchlists with the proper people.
3510
3511 2018-02-06  Andres Gomez  <agomez@igalia.com>
3512
3513         Unreviewed, canonicalize contributors.json
3514
3515         After Thibault's addition, automatic checks complain about
3516         contributors.json with:
3517
3518         "[...] Use "validate-committer-lists --canonicalize" to reformat
3519         it. [...]"
3520
3521         * Scripts/webkitpy/common/config/contributors.json: Canonicalize.
3522
3523 2018-02-06  Andres Gomez  <agomez@igalia.com>
3524
3525         Unreviewed, add Lorenzo Tilve to contributors.json
3526
3527         We need to add Loren to the contributors list in order to CC him
3528         in Bugzilla.
3529
3530         * Scripts/webkitpy/common/config/contributors.json: Added Lorenzo
3531           Tilve.
3532
3533 2018-02-05  Yousuke Kimoto  <yousuke.kimoto@sony.com>
3534
3535         [WinCairo] Refine WebKitLegacy and WebKit build for wincairo
3536         https://bugs.webkit.org/show_bug.cgi?id=182478
3537
3538         Reviewed by Alex Christensen.
3539
3540         For TestWebKitAPI, sources related to WebKitLegacy are built
3541         at WebKit build. Those files should be reffered for WebKitLegacy build.
3542
3543         * TestWebKitAPI/PlatformWin.cmake:
3544
3545 2018-02-05  Daniel Bates  <dabates@apple.com>
3546
3547         REGRESSION (r217572): run-webkit-tests exits without emitting newline character
3548         https://bugs.webkit.org/show_bug.cgi?id=182360
3549
3550         Rubber-stamped by Aakash Jain.
3551
3552         Fixes an annoyance where run-webkit-tests always exits without printing a newline character.
3553         In the terminal this looks like:
3554
3555             $ Tools/Scripts/run-webkit-tests
3556             Expected to fail, but passed: (7)
3557             ...
3558             Stopping WebSocket server ...$
3559
3560         This bug was caused by code added in r217572 to stop all run-webkit-tests started servers (e.g. an HTTP
3561         server) from an at-exit handler. When run-webkit-tests runs successfully (i.e. without error or
3562         control-C interruption) we would stop all such servers twice: once as part of ending the test
3563         run and once from the at-exit handler. The latter never prints a trailing newline character hence
3564         the state of the terminal (as depicted above). Instead LayoutTestRunner.stop_servers() should only
3565         stop servers that it started in LayoutTestRunner.start_servers().
3566
3567         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
3568         (LayoutTestRunner.__init__):
3569         (LayoutTestRunner.start_servers):
3570         (LayoutTestRunner.stop_servers):
3571         Only start servers that run-webkit-tests has not already started and only stop servers that
3572         run-webkit-tests started.
3573
3574         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
3575         (LayoutTestRunnerTests.test_servers_started.is_websocket_server_running):
3576         (LayoutTestRunnerTests.test_servers_started):
3577         (LayoutTestRunnerTests.test_servers_started.is_websocket_servers_running): Deleted.
3578         Update due to rename below.
3579
3580         * Scripts/webkitpy/layout_tests/servers/websocket_server.py:
3581         (is_web_socket_server_running): Added.
3582         (PyWebSocket.is_running): Deleted.
3583
3584         * Scripts/webkitpy/port/base.py:
3585         (Port.is_http_server_running): Check if we already started the server ourself.
3586         (Port.is_websocket_server_running): Formerly named is_websocket_servers_running. Modified
3587         to check if we already started the server ourself. Take a similar approach as the other
3588         Port.is_*_running methods and only check if an existing WebSocket server is running on the
3589         non-secure server port. This is a simple heuristic and should be sufficient in practice.
3590         (Port.is_wpt_server_running): Check if we already started the server ourself.
3591         (Port.is_websocket_servers_running): Deleted; renamed to is_websocket_server_running().
3592
3593 2018-02-05  Daniel Bates  <dabates@apple.com>
3594
3595         prepare-ChangeLog gets confused about Python docstrings that contain the word "class" or "def"
3596         https://bugs.webkit.org/show_bug.cgi?id=182405