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