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