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