[iOS] Make WKWebView become the first responder to support testing key presses to...
[WebKit-https.git] / Tools / ChangeLog
1 2018-09-10  Daniel Bates  <dabates@apple.com>
2
3         [iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements
4         https://bugs.webkit.org/show_bug.cgi?id=189432
5
6         Reviewed by Simon Fraser.
7
8         Make the WKWebView become the first responder immediately without the need to focus an editable
9         element. This allows us to test that DOM keyboard events are dispatched to non-editable elements.
10
11         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
12         (WTR::PlatformWebView::PlatformWebView):
13
14 2018-09-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
15
16         [WTF] Add Markable<T, Traits>
17         https://bugs.webkit.org/show_bug.cgi?id=189231
18
19         Reviewed by Sam Weinig.
20
21         Add tests for Markable.
22
23         * TestWebKitAPI/CMakeLists.txt:
24         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
25         * TestWebKitAPI/Tests/WTF/Markable.cpp: Added.
26         (TestWebKitAPI::TEST):
27
28 2018-09-10  Simon Fraser  <simon.fraser@apple.com>
29
30         Before tracking Document leaks, clear all caches
31         https://bugs.webkit.org/show_bug.cgi?id=189459
32
33         Reviewed by Sam Weinig.
34
35         It's not enough to clear the page and memory caches; font caches can reference Documents (for SVG fonts),
36         so just call WebCore::releaseMemory(), which empties caches including the page and memory caches, and
37         does the GC that we need to happen.
38
39         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
40         (WTR::InjectedBundle::didReceiveMessageToPage):
41
42 2018-09-07  Matt Rajca  <mrajca@apple.com>
43
44         https://bugs.webkit.org/show_bug.cgi?id=189433
45         <rdar://problem/44186498> Touch Bar displays an active PIP button for audio elements (and it doesn't do anything)
46
47         Reviewed by Eric Carlson.
48
49         An API test has been added that checks the value of the canTogglePictureInPicture and ensures it
50         is NO when audio elements are playing.
51
52         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
53         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.html:
54         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
55         (TestWebKitAPI::TEST):
56         * TestWebKitAPI/Tests/WebKitCocoa/audio-with-controls.html: Added.
57
58 2018-09-09  Commit Queue  <commit-queue@webkit.org>
59
60         Unreviewed, rolling out r235832.
61         https://bugs.webkit.org/show_bug.cgi?id=189464
62
63         Broke WebKit2 tests (Requested by ap on #webkit).
64
65         Reverted changeset:
66
67         "[Cocoa] Turn on ARC for WebKitTestRunner"
68         https://bugs.webkit.org/show_bug.cgi?id=189228
69         https://trac.webkit.org/changeset/235832
70
71 2018-09-08  Simon Fraser  <simon.fraser@apple.com>
72
73         accessibility/notification-listeners.html abandons a document
74         https://bugs.webkit.org/show_bug.cgi?id=188724
75
76         Reviewed by Darin Adler.
77         
78         AccessibilityControllerMac leaked m_globalNotificationHandler, which leaks a JSValueProtect'd function,
79         which leaks a Document. Fix by using adoptNS().
80
81         * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
82         (WTR::AccessibilityController::addNotificationListener):
83
84 2018-09-08  Wenson Hsieh  <wenson_hsieh@apple.com>
85
86         [Cocoa] Use more bridging casts in TestWebKitAPI
87         https://bugs.webkit.org/show_bug.cgi?id=189457
88
89         Reviewed by Darin Adler.
90
91         Adds some bridging casts to TestWebKitAPI, when converting betweeen several common types of objects, including:
92         CFStringRef <=> NSString
93         CFURLRef <=> NSURL
94         WKPreferences <=> WKPreferencesRef
95         CFDataRef <=> NSData
96
97         * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
98         (TestWebKitAPI::TEST_F):
99         * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
100         (readHTMLFromPasteboard):
101         (createWebViewWithCustomPasteboardDataEnabled):
102         * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
103         (createWebViewWithCustomPasteboardDataEnabled):
104         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
105         (TEST):
106         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
107         (writeHTMLToPasteboard):
108         (createWebViewWithCustomPasteboardDataSetting):
109         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
110         (TEST):
111         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
112         (TestWebKitAPI::setUpWebView):
113         (TestWebKitAPI::TEST):
114         * TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
115         (writeRTFToPasteboard):
116         (writeRTFDToPasteboard):
117         (createWebViewWithCustomPasteboardDataEnabled):
118         (TEST):
119         * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
120         (createWebViewWithCustomPasteboardDataEnabled):
121         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
122         (TestWebKitAPI::TEST):
123         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
124         (webViewForTestingAttachments):
125         * TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
126         (writeRTFDToPasteboard):
127         (TestWebKitAPI::TEST):
128         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
129         (TestWebKitAPI::TEST):
130         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
131         (checkRichTextTypePrecedesPlainTextType):
132         (TestWebKitAPI::TEST):
133         (TestWebKitAPI::setUpTestWebViewForDataTransferItems):
134         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
135         (TestWebKitAPI::TEST):
136         * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
137         (TestWebKitAPI::Util::createInjectedBundlePath):
138         (TestWebKitAPI::Util::createURLForResource):
139         (TestWebKitAPI::Util::URLForNonExistentResource):
140         (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
141         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
142         (TestWebKitAPI::WebKitAgnosticTest::loadURL):
143
144 2018-09-02  Darin Adler  <darin@apple.com>
145
146         [Cocoa] Turn on ARC for WebKitTestRunner
147         https://bugs.webkit.org/show_bug.cgi?id=189228
148
149         Reviewed by Sam Weinig.
150
151         * TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
152         (+[EventSerializer dictionaryForEvent:relativeToTime:]): Removed autorelease.
153
154         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
155         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Removed autorelease.
156
157         * WebKitTestRunner/Configurations/Base.xcconfig: Added CLANG_ENABLE_OBJC_ARC.
158
159         * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
160         (WTR::AccessibilityController::accessibleElementById): Use a __bridge cast.
161         * WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm:
162         (WTR::AccessibilityTextMarker::isEqual): Ditto.
163
164         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
165         (WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
166         (WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
167         (WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
168         (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use a __bridge cast.
169         (WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
170         (WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto.
171         (WTR::AccessibilityUIElement::previousTextMarker): Ditto.
172         (WTR::AccessibilityUIElement::nextTextMarker): Ditto.
173         (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto.
174         (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
175         (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
176         (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
177         (WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
178         (WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Ditto.
179         (WTR::_CGPathEnumerationIteration): Ditto.
180         (WTR::AccessibilityUIElement::pathDescription const): Ditto.
181
182         * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
183         (-[AccessibilityNotificationHandler dealloc]): Removed [super dealloc].
184
185         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
186         (WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
187         (WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
188         (WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
189         (WTR::createJSStringRef): Removed autorelease.
190
191         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
192         (WTR::initializeWebViewConfiguration): Removed release.
193         (WTR::TestController::cocoaPlatformInitialize): Removed release.
194         (WTR::TestController::platformCreateOtherPage): Removed autorelease.
195
196         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
197         (-[TestRunnerWKWebView dealloc]): Removed [super dealloc] and also many
198         cases of setting properties to nil that were only present for memory
199         management reasons.
200
201         * WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm:
202         (-[GeneratedTouchesDebugWindow dealloc]): Removed release and [super dealloc].
203
204         * WebKitTestRunner/ios/HIDEventGenerator.mm:
205         (-[HIDEventGenerator dealloc]): Deleted.
206         (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Removed
207         Block_copy.
208         (-[HIDEventGenerator markerEventReceived:]): Removed Block_release.
209         (-[HIDEventGenerator interpolatedEvents:]): Removed release.
210         (-[HIDEventGenerator sendEventStream:completionBlock:]): Removed autorelease.
211
212         * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
213         (-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].
214         (WTR::PlatformWebView::PlatformWebView): Removed release.
215         (WTR::PlatformWebView::~PlatformWebView): Removed release.
216         (WTR::PlatformWebView::addChromeInputField): Removed release.
217         (WTR::PlatformWebView::removeChromeInputField): Removed release.
218
219         * WebKitTestRunner/ios/TestControllerIOS.mm:
220         (WTR::TestController::initializeInjectedBundlePath): Use __bridge cast.
221         (WTR::TestController::initializeTestPluginDirectory): Ditto.
222
223         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
224         (WTR::UIScriptController::accessibilitySpeakSelectionContent const):
225         Use __bridge cast.
226         (WTR::UIScriptController::enterText): Ditto.
227         (WTR::UIScriptController::selectFormPopoverTitle const): Ditto.
228         (WTR::UIScriptController::textContentType const): Ditto.
229         (WTR::UIScriptController::formInputLabel const): Ditto.
230         (WTR::UIScriptController::scrollingTreeAsText const): Ditto.
231
232         * WebKitTestRunner/mac/PlatformWebViewMac.mm:
233         (WTR::PlatformWebView::~PlatformWebView): Removed release.
234         (WTR::PlatformWebView::addChromeInputField): Removed release.
235
236         * WebKitTestRunner/mac/TestControllerMac.mm:
237         (WTR::allowedFontFamilySet): Removed retain.
238         (WTR::systemHiddenFontFamilySet): Removed retain.
239
240         * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:
241         (-[WebKitTestRunnerDraggingInfo draggingDestinationWindow]): Removed retain.
242         (-[WebKitTestRunnerDraggingInfo dealloc]): Deleted.
243
244         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
245         (+[WebKitTestRunnerPasteboard _pasteboardWithName:]): Removed release.
246         (+[WebKitTestRunnerPasteboard releaseLocalPasteboards]): Removed release.
247         Method name is still OK because setting localPasteboards to nil will
248         still release them.
249         (+[NSPasteboard superAlloc]): Added. Helper so that LocalPasteboard can
250         bypass +[NSPasteboard alloc].
251         (+[NSPasteboard superAllocWithZone:]): Ditto.
252         (+[LocalPasteboard alloc]): Call superAlloc instead of class_createInstance.
253         This is a different way to achieve the "bypass NSPasteboard" behavior we need.
254         (+[LocalPasteboard allocWithZone:]): Added. Calls superAllocWithZone: for the
255         same reason as above. Needed because, at least at this time, +[NSObject alloc]
256         calls +allocWithZone: so we have to override both.
257         (-[LocalPasteboard dealloc]): Deleted.
258         (-[LocalPasteboard addTypes:owner:]): Removed release.
259
260         * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm:
261         (-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].
262
263         * WebKitTestRunner/mac/main.mm:
264         (disableAppNapInUIProcess): Removed retain.
265
266 2018-09-07  Fujii Hironori  <Hironori.Fujii@sony.com>
267
268         [WinCairo][MiniBrowser][WebKit] REGRESSION(r235398): ASSERTION FAILED: !m_client.didReceiveTitleForFrame
269         https://bugs.webkit.org/show_bug.cgi?id=189336
270
271         Reviewed by Alex Christensen.
272
273         WKPageSetPageLoaderClient is deprecated. Replaced it with
274         WKPageSetPageNavigationClient.
275
276         * MiniBrowser/win/WebKitBrowserWindow.cpp:
277         (WebKitBrowserWindow::WebKitBrowserWindow):
278         Call WKPageSetPageNavigationClient instead of WKPageSetPageLoaderClient.
279         (WebKitBrowserWindow::didFinishNavigation):
280         Copied from didReceiveTitleForFrame. Use WKPageCopyTitle to get the title.
281         (WebKitBrowserWindow::didCommitNavigation):
282         Copied from didCommitLoadForFrame. Use WKPageCopyCommittedURL to get the URL.
283         (WebKitBrowserWindow::didReceiveTitleForFrame): Deleted.
284         (WebKitBrowserWindow::didCommitLoadForFrame): Deleted.
285         * MiniBrowser/win/WebKitBrowserWindow.h: Renamed the class methods.
286
287 2018-09-07  Daniel Bates  <dabates@apple.com>
288
289         [iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
290         https://bugs.webkit.org/show_bug.cgi?id=189325
291
292         Reviewed by Wenson Hsieh.
293
294         Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed
295         by a ` key press (i.e. type '~') when instructed to simulate typing a grave accent (`). Typing a
296         grave accent does not require holding the shift key.
297
298         * WebKitTestRunner/ios/HIDEventGenerator.mm:
299         (shouldWrapWithShiftKeyEventForCharacter):
300
301 2018-09-07  Frederic Wang  <fwang@igalia.com>
302
303         [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
304         https://bugs.webkit.org/show_bug.cgi?id=182230
305
306         Reviewed by Simon Fraser.
307
308         This patch enables CSSOMViewScrollingAPI during test execution.
309
310         * DumpRenderTree/mac/DumpRenderTree.mm:
311         (enableExperimentalFeatures):
312         (resetWebPreferencesToConsistentValues):
313         * DumpRenderTree/win/DumpRenderTree.cpp:
314         (enableExperimentalFeatures):
315         * WebKitTestRunner/TestController.cpp:
316         (WTR::TestController::resetPreferencesToConsistentValues):
317
318 2018-09-07  Simon Fraser  <simon.fraser@apple.com>
319
320         resultsjsonparser needs to handle leak failures
321         https://bugs.webkit.org/show_bug.cgi?id=189430
322
323         Reviewed by Alexey Proskuryakov.
324         
325         Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak
326         with a list of the leaked URLs.
327
328         * Scripts/webkitpy/common/net/resultsjsonparser.py:
329         (JSONTestResult._failure_types_from_actual_result):
330         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
331         (ParsedJSONResultsTest):
332         (test_basic):
333
334 2018-09-07  Aakash Jain  <aakash_jain@apple.com>
335
336         [ews-build] API tests should output result summary in json
337         https://bugs.webkit.org/show_bug.cgi?id=189417
338
339         Reviewed by Lucas Forschler.
340
341         * BuildSlaveSupport/ews-build/steps.py:
342         (RunAPITests): Passed --json-output parameter to run-api-tests.
343         * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
344
345 2018-09-07  Commit Queue  <commit-queue@webkit.org>
346
347         Unreviewed, rolling out r235784.
348         https://bugs.webkit.org/show_bug.cgi?id=189421
349
350         RunLoopCF does not agree to the fix (Requested by yusukesuzuki
351         on #webkit).
352
353         Reverted changeset:
354
355         "[RunLoopGeneric] OneShotTimer should be inactive when fired."
356         https://bugs.webkit.org/show_bug.cgi?id=189335
357         https://trac.webkit.org/changeset/235784
358
359 2018-09-07  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
360
361         [RunLoopGeneric] OneShotTimer should be inactive when fired.
362         https://bugs.webkit.org/show_bug.cgi?id=189335
363
364         Reviewed by Yusuke Suzuki.
365
366         * TestWebKitAPI/Tests/WTF/RunLoop.cpp:
367         (TestWebKitAPI::TEST):
368
369         Add test expectations about timer's active state.
370
371         Add a new test to restart a one-shot timer within
372         its fired callback.
373
374 2018-09-06  Zalan Bujtas  <zalan@apple.com>
375
376         [LFC] Add support for min/max-height percentage values.
377         https://bugs.webkit.org/show_bug.cgi?id=189391
378
379         Reviewed by Antti Koivisto.
380
381         * LayoutReloaded/misc/LFC-passing-tests.txt:
382
383 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
384
385         Log when leak detection changes the test result
386         https://bugs.webkit.org/show_bug.cgi?id=189293
387
388         Reviewed by Jon Lee.
389         
390         When you have an "Leak" expectation in TestExpectations, it's confusing to see a test unexpectedly pass,
391         but then show up as an expected fail at the end (because leak detection happens at the end of a shard).
392         So log when leak detection changes a test result.
393
394         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
395         (LayoutTestRunner._annotate_results_with_additional_failures):
396         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
397         (TestExpectations):
398
399 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
400
401         [macOS] [WK2] Support changing attributes for selected text (text shadow, underline, strike-through)
402         https://bugs.webkit.org/show_bug.cgi?id=189356
403         <rdar://problem/44185674>
404
405         Reviewed by Tim Horton.
406
407         Adds a new API test to verify that some font attributes (text shadow, underline, and strike-through) can be
408         added and removed using NSFontPanel.
409
410         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
411         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
412
413         Add the new API test.
414
415         (TestWebKitAPI::TEST):
416         * TestWebKitAPI/cocoa/TestWKWebView.h:
417         * TestWebKitAPI/mac/NSFontPanelTesting.h: Added.
418         * TestWebKitAPI/mac/NSFontPanelTesting.mm: Added.
419
420         Introduce a new file that extends NSFontPanel with some additional testing functionality. This includes the
421         ability to interact with the text shadow toggle button, choose the text shadow blur radius and opacity, and
422         change underline and strike-through styles.
423
424         (findSubviewOfClass):
425         (findMenuItemWithTitle):
426         (-[NSFontPanel fontEffectsBox]):
427
428         NSFontEffectsBox (an internal AppKit class) is the sender in the case where -changeAttributes: is invoked
429         through interaction with the font panel. To simulate this for testing, grab this font effects box and pass it
430         directory to -changeAttributes:.
431
432         (-[NSFontPanel chooseUnderlineMenuItemWithTitle:]):
433         (-[NSFontPanel chooseStrikeThroughMenuItemWithTitle:]):
434
435         The supported values for these menu items are "none" and "single", which adds a single underline or
436         strike-through to selected text. We grab these menu items by asking for the font panel's NSToolbar, and finding
437         the relevant menu items via toolbar item identifiers.
438
439         (-[NSFontPanel _didChangeAttributes]):
440         (-[NSFontPanel shadowBlurSlider]):
441         (-[NSFontPanel shadowOpacitySlider]):
442         (-[NSFontPanel shadowToggleButton]):
443         (-[NSFontPanel toggleShadow]):
444         (-[NSFontPanel shadowOpacity]):
445         (-[NSFontPanel setShadowOpacity:]):
446         (-[NSFontPanel shadowBlur]):
447         (-[NSFontPanel setShadowBlur:]):
448         (-[NSFontPanel _toolbarItemWithIdentifier:]):
449
450 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
451
452         run-webkit-tests prints confusing messages when test expectations list results that are not compatible with the run options
453         https://bugs.webkit.org/show_bug.cgi?id=189219
454
455         Reviewed by Jon Lee.
456         
457         If you call run-webkit-tests without --pixel-tests, and a non-ref test is marked as ImageOnlyFailure,
458         it will be reported as unexpectedly passing. This is more confusing if you run without --world-leaks, yet
459         tests are marked as [ Leak ] in TestExpectations.
460         
461         Fix by filtering out expectations that don't apply given the run options. So without --pixel-tests,
462         a non-ref ImageOnlyFailure becomes a Pass, and without --world-leaks, a Leak becomes a Pass.
463         
464         Add various unit tests to test the various combinations.
465
466         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
467         (LayoutTestRunner._update_summary_with_result):
468         (LayoutTestRunner._annotate_results_with_additional_failures):
469         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
470         (LayoutTestRunnerTests.test_update_summary_with_result):
471         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
472         (TestExpectationsModel.get_expectations_or_pass):
473         (TestExpectationsModel):
474         (TestExpectationsModel.expectations_to_string):
475         (TestExpectationsModel.get_expectations_string):
476         (TestExpectations.filtered_expectations_for_test):
477         (TestExpectations):
478         (TestExpectations.matches_an_expected_result):
479         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
480         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
481         (summarize_results):
482         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
483         (summarized_results):
484         (SummarizedResultsTest.setUp):
485         (SummarizedResultsTest.test_summarized_results_include_passes):
486         (SummarizedResultsTest):
487         (SummarizedResultsTest.test_summarized_results_world_leaks_disabled):
488         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
489         * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
490         (BuildBotPrinterTests.test_print_unexpected_results):
491         (BuildBotPrinterTests.test_print_unexpected_results_with_options):
492         (BuildBotPrinterTests.test_print_results):
493         * Scripts/webkitpy/port/test.py:
494         (unit_test_list):
495
496 2018-09-06  Zalan Bujtas  <zalan@apple.com>
497
498         [LFC][BFC] Add support for min(max)-height
499         https://bugs.webkit.org/show_bug.cgi?id=189377
500
501         Reviewed by Antti Koivisto.
502
503         * LayoutReloaded/misc/LFC-passing-tests.txt:
504
505 2018-09-06  Dewei Zhu  <dewei_zhu@apple.com>
506
507         BenchmarkResults.format should support specifying depth of tests to show.
508         https://bugs.webkit.org/show_bug.cgi?id=189135
509
510         Reviewed by Ryosuke Niwa.
511
512         Added the option to specify the depth of tests to show.
513
514         * Scripts/webkitpy/benchmark_runner/benchmark_results.py:
515         (BenchmarkResults):
516         (BenchmarkResults.format): Added 'max_depth' option.
517         (BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
518
519
520 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
521
522         An EWS run that has leak test failures does not correctly add bugzilla comments showing the failures
523         https://bugs.webkit.org/show_bug.cgi?id=189368
524
525         Reviewed by Alexey Proskuryakov.
526         
527         Include FailureDocumentLeak in ALL_FAILURE_CLASSES (with a fairly redundant test),
528         which should fix EWS showing leaks in Bugzilla.
529
530         * Scripts/webkitpy/layout_tests/models/test_failures.py:
531         (FailureDocumentLeak.__init__):
532         * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
533         (TestFailuresTest.test_all_failure_classes):
534
535 2018-09-06  Commit Queue  <commit-queue@webkit.org>
536
537         Unreviewed, rolling out r235755.
538         https://bugs.webkit.org/show_bug.cgi?id=189367
539
540         Didn't address the review comment (Requested by rniwa on
541         #webkit).
542
543         Reverted changeset:
544
545         "BenchmarkResults.format should support specifying depth of
546         tests to show."
547         https://bugs.webkit.org/show_bug.cgi?id=189135
548         https://trac.webkit.org/changeset/235755
549
550 2018-08-29  Dewei Zhu  <dewei_zhu@apple.com>
551
552         BenchmarkResults.format should support specifying depth of tests to show.
553         https://bugs.webkit.org/show_bug.cgi?id=189135
554
555         Reviewed by Ryosuke Niwa.
556
557         Added the option to specify the depth of tests to show.
558
559         * Scripts/webkitpy/benchmark_runner/benchmark_results.py:
560         (BenchmarkResults):
561         (BenchmarkResults.format): Added 'max_depth' option.
562         (BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
563
564 2018-09-06  Thomas Denney  <tdenney@apple.com>
565
566         [WHLSL] Call arguments should be copied as soon as they are evaluated
567         https://bugs.webkit.org/show_bug.cgi?id=189360
568
569         Reviewed by Myles C. Maxfield.
570
571         Previously all call arguments were evaluated and then their results were
572         copied into new buffers for the call. However, the results are not
573         necessarily independent, so the result should be copied immediately
574         after evaluation.
575
576         * WebGPUShadingLanguageRI/Evaluator.js:
577         (Evaluator.prototype.visitCallExpression): Move location of copy.
578         (Evaluator):
579         * WebGPUShadingLanguageRI/Test.js: Add new test to verify correct
580         behavior.
581
582 2018-09-06  Thomas Denney  <tdenney@apple.com>
583
584         [WHLSL] The test suite should log the compile time for the standard library
585         https://bugs.webkit.org/show_bug.cgi?id=189354
586
587         Reviewed by Myles C. Maxfield.
588
589         The test suite previously only logged the time for test execution, and
590         not the compile time for the standard library.
591
592         * WebGPUShadingLanguageRI/Test.js:
593
594 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
595
596         [macOS] Cannot change font size at selection until font panel is shown
597         https://bugs.webkit.org/show_bug.cgi?id=189295
598         <rdar://problem/35593389>
599
600         Reviewed by Ryosuke Niwa.
601
602         Add API tests to simulate using menu items to increase or decrease font size, and also simulate using
603         NSFontPanel to specify the font family, font size, and other traits.
604
605         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
606         * TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added.
607         (-[TestWKWebView selectedText]):
608         (-[TestWKWebView selectNextWord]):
609         (-[TestWKWebView stylePropertyAtSelectionStart:]):
610         (-[TestWKWebView stylePropertyAtSelectionEnd:]):
611         (webViewForFontManagerTesting):
612         (menuItemCellForFontAction):
613         (TestWebKitAPI::TEST):
614
615 2018-09-06  Zalan Bujtas  <zalan@apple.com>
616
617         [LFC][BFC] Add support for min(max)-width
618         https://bugs.webkit.org/show_bug.cgi?id=189358
619
620         Reviewed by Antti Koivisto.
621
622         * LayoutReloaded/misc/LFC-passing-tests.txt:
623
624 2018-09-06  Myles C. Maxfield  <mmaxfield@apple.com>
625
626         [WHLSL] The parser is too slow
627         https://bugs.webkit.org/show_bug.cgi?id=189014
628
629         Reviewed by Filip Pizlo.
630
631         This patch includes three changes:
632         1. Migrate from using try/catch to simply returning the WSyntaxError. This means that
633            each parser call has to check for this sentinel value. The lexer still can throw if
634            it encounters an unknown token or an unmatched "/*" token (which is rare).
635         2. After removing try/catch, making the sentinel values not inherit from Error (the
636            Error constructor was taking lots of time)
637         3. Previously, every time the parser failed (which is many times per expression) it was
638            running a regex over the entire source text to figure out where the error occurred.
639            Instead, we can preprocess the text string to find these line numbers ahead of time.
640
641         Together, these make the parser 75x faster. Parsing the standard library goes from 2.5
642         hours down to 2 minutes. Because it's now a reasonable length, this patch uncomments
643         the bulk of the standard library.
644
645         * WebGPUShadingLanguageRI/All.js:
646         * WebGPUShadingLanguageRI/Lexer.js:
647         (Lexer):
648         (Lexer.prototype.lineNumberForIndex):
649         * WebGPUShadingLanguageRI/Parse.js:
650         (fail):
651         (backtrackingScope):
652         (testScope):
653         (genericConsume):
654         (consumeEndOfTypeArgs):
655         (parseTerm):
656         (parseConstexpr):
657         (parseTypeArguments):
658         (parseType.getAddressSpace):
659         (parseType):
660         (parseTypeDef):
661         (genericParseLeft):
662         (parseCallExpression.let.parseArguments):
663         (isCallExpression):
664         (parseSuffixOperator):
665         (parsePossibleSuffix):
666         (parsePreIncrement):
667         (parsePossiblePrefix):
668         (parsePossibleTernaryConditional):
669         (parsePossibleAssignment):
670         (parsePostIncrement):
671         (parseEffectfulExpression):
672         (genericParseCommaExpression):
673         (parseEffectfulStatement):
674         (parseReturn):
675         (parseBreak):
676         (parseContinue):
677         (parseIfStatement):
678         (parseWhile):
679         (parseFor):
680         (parseDo):
681         (parseVariableDecls):
682         (parseSwitchCase):
683         (parseSwitchStatement):
684         (parseStatement):
685         (parseBlockBody):
686         (parseBlock):
687         (parseParameter):
688         (parseFuncName):
689         (parseFuncDecl):
690         (parseFuncDef):
691         (parseField):
692         (parseStructType):
693         (parseNativeFunc):
694         (parseNative):
695         (parseRestrictedFuncDef):
696         (parseEnumMember):
697         (parseEnumType):
698         (parse):
699         * WebGPUShadingLanguageRI/SPIRV.html:
700         * WebGPUShadingLanguageRI/StandardLibrary.js:
701         (let.standardLibrary):
702         * WebGPUShadingLanguageRI/Test.html:
703         * WebGPUShadingLanguageRI/Test.js:
704         (checkFail.doPrep): Deleted.
705         * WebGPUShadingLanguageRI/WLexicalError.js: Added.
706         (WLexicalError):
707         * WebGPUShadingLanguageRI/index.html:
708
709 2018-09-06  Xan Lopez  <xan@igalia.com>
710
711         [test262] Do not call keys on a reference
712         https://bugs.webkit.org/show_bug.cgi?id=189301
713
714         Reviewed by Keith Miller.
715
716         * Scripts/test262/Runner.pm:
717         (UpdateResults):
718
719 2018-09-06  David Kilzer  <ddkilzer@apple.com>
720
721         svn-create-patch fails when svn mv is used on directory trees
722         <https://webkit.org/b/14590>
723
724         Reviewed by Daniel Bates.
725
726         * Scripts/VCSUtils.pm: Export parseSvnDiffStartLine() for
727         svn-create-patch.
728         (parseDiffStartLine): Use parseSvnDiffStartLine().
729         (parseGitDiffStartLine): Document a prerequisite.  Fix a bug
730         when parsing Git patches using `git diff --no-prefix` that have
731         non-native line endings.  Found by new tests written for
732         Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl.
733         (parseSvnDiffStartLine): Add.  Extract logic from
734         parseDiffStartLine() for use with svn-create-patch.
735
736         * Scripts/svn-create-patch: Update copyright and license.
737         (generateDiff): Return early for moved directories since
738         individual files within the directory are handled separately.
739         (generateFileList): Keep track of moved directories in the
740         @additionWithHistoryDirectories array, then process this array
741         in reverse order to create delete/add patches for each file in
742         a moved directory.  This also prevents duplicate patches.
743         (manufacturePatchForAdditionWithHistory): Fix a long-standing
744         bug where the path used to describe property changes contained
745         the original (moved-from) path instead of the new (moved-to)
746         path. This could cause svn-apply to fail mysteriously when
747         trying to apply an empty patch created by the property change
748         containing the moved-from path.
749
750         * Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl: Add.
751         Tests for parseDiffStartLine(), parseGitDiffStartLine() and
752         parseSvnDiffStartLine().
753
754 2018-09-05  Don Olmstead  <don.olmstead@sony.com>
755
756         [CMake] Allow port specific options on gtest
757         https://bugs.webkit.org/show_bug.cgi?id=189313
758
759         Reviewed by Alex Christensen.
760
761         Use the global property set by the gtest CMake file to add to the
762         compilation definitions for TestWebKitAPI rather than repeating the
763         logic.
764
765         * TestWebKitAPI/CMakeLists.txt:
766
767 2018-09-05  Woodrow Wang  <woodrow_wang@apple.com>
768
769         Add infrastructure to dump resource load statistics
770         https://bugs.webkit.org/show_bug.cgi?id=189213
771
772         Reviewed by Daniel Bates.
773
774         The dumping functionality is not currently used, but will be included in tests for
775         <https://bugs.webkit.org/show_bug.cgi?id=187773>.
776
777         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
778         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
779         (WTR::TestRunner::setDumpResourceLoadStatistics):
780         * WebKitTestRunner/InjectedBundle/TestRunner.h:
781         * WebKitTestRunner/TestController.cpp:
782         (WTR::resourceStatisticsStringResultCallback):
783         (WTR::TestController::dumpResourceLoadStatistics):
784         * WebKitTestRunner/TestController.h:
785         * WebKitTestRunner/TestInvocation.cpp:
786         (WTR::TestInvocation::dumpResults):
787         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
788         (WTR::TestInvocation::setDumpResourceLoadStatistics):
789         * WebKitTestRunner/TestInvocation.h:
790
791 2018-09-05  Wenson Hsieh  <wenson_hsieh@apple.com>
792
793         [macOS] DragAndDropTests.ExposeMultipleURLsInDataTransfer fails on macOS versions prior to Mojave
794         https://bugs.webkit.org/show_bug.cgi?id=189315
795
796         Reviewed by Tim Horton.
797
798         Fix the test failure by explicitly enabling custom pasteboard data.
799
800         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
801         (TEST):
802
803 2018-09-05  Woodrow Wang  <woodrow_wang@apple.com>
804
805         Added runtime feature flag for web API statistics
806         https://bugs.webkit.org/show_bug.cgi?id=189211
807
808         Reviewed by Daniel Bates.
809
810         Added functionality to set the runtime flag with a JavaScript exposed function
811         for testing.
812
813         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
814         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
815         (WTR::TestRunner::setWebAPIStatisticsEnabled):
816         * WebKitTestRunner/InjectedBundle/TestRunner.h:
817
818 2018-09-05  Ross Kirsling  <ross.kirsling@sony.com>
819
820         Add WinCairo to bot watcher's dashboard.
821         https://bugs.webkit.org/show_bug.cgi?id=189273
822
823         Reviewed by Aakash Jain.
824
825         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10.png: Added.
826         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10@2x.png: Added.
827
828         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
829         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
830         (table.queue-grid tr.platform.windows-10 img.logo): Added.
831         (table.queue-grid tr.platform.windows-8 img.logo): Deleted.
832         (table.queue-grid tr.platform.windows-xp img.logo): Deleted.
833         Add Win10 section to dashboard. Remove unused WinXP and Win8 sections.
834
835         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
836         (BubbleQueueServer):
837         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
838         (WebKitBuildbot):
839         Add WinCairo build, test, and EWS bots to Win10 section of dashboard.
840
841 2018-09-05  David Kilzer  <ddkilzer@apple.com>
842
843         REGRESSION (r209470): EditingHistory folder is missing in EditingHistory Xcode project
844
845         Found using `tidy-Xcode-project-file --missing` (see Bug
846         188754).  Fixes were made manually.
847
848         * EditingHistory/EditingHistory.xcodeproj/project.pbxproj:
849         (EditingHistory): Change the path of the folder to
850         "EditingHistory", then remove the now-redundant name.
851         (EditingHistory/Resources/DumpEditingHistory.js): Remove
852         redundant file reference since another file reference exists at
853         the top of the project file list, and that file reference is the
854         one used in the "Copy Bundle Resources" build phase.
855         (EditingHistory/Resources/EditingHistoryUtil.js): Ditto.
856
857 2018-09-05  David Kilzer  <ddkilzer@apple.com>
858
859         REGRESSION (r160736): Bundle folder is missing in MiniBrowser Xcode project
860
861         Found using `tidy-Xcode-project-file --missing` (see Bug
862         188754).  Folder fix was made manually.
863
864         * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
865         (Bundle): Change the path of the folder to "mac/Bundle", and set
866         the name back to "Bundle".
867         (Bundle/Info.plist): Change file reference to be relative to its
868         group.  Accomplished using Xcode after fixing the folder path.
869         (Bundle/MiniBrowserBundle_Prefix.pch): Ditto.
870
871 2018-09-05  David Kilzer  <ddkilzer@apple.com>
872
873         REGRESSION (r184033): ContentExtensionTester folder is missing in ContentExtensionTester Xcode project
874
875         Found using `tidy-Xcode-project-file --missing` (see Bug
876         188754).  Fixes were made manually.
877
878         * ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj:
879         (ContentExtensionTester): Change the path of the folder to map
880         to "." (which exists and is where main.m is located), and then
881         set the folder's name back to "ContentExtensionTester".
882         (main.m): Change file reference to be relative to its group now
883         that the group's path is fixed.
884
885 2018-09-04  Don Olmstead  <don.olmstead@sony.com>
886
887         Add generic entrypoint and run loop in TestWebKitAPI
888         https://bugs.webkit.org/show_bug.cgi?id=189287
889
890         Reviewed by Michael Catanzaro.
891
892         The implementations in jsconly are platform agnostic.
893
894         * TestWebKitAPI/PlatformJSCOnly.cmake:
895         Use the glib implementation of Utilities when using that as a run loop
896         otherwise use the generic implementation.
897
898         * TestWebKitAPI/PlatformUtilities.h:
899         Remove repeated entries from Utilities.h.
900
901         * TestWebKitAPI/PlatformWPE.cmake:
902         Use the generic main.cpp.
903         
904         * TestWebKitAPI/generic/UtilitiesGeneric.cpp: Renamed from Tools/TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp.
905         (TestWebKitAPI::Util::run):
906         (TestWebKitAPI::Util::spinRunLoop):
907         Moved to a generic implementation and added spinRunLoop.
908
909         * TestWebKitAPI/generic/main.cpp: Renamed from Tools/TestWebKitAPI/jsconly/main.cpp.
910         Share between JSCOnly and WPE
911
912         * TestWebKitAPI/wpe/main.cpp: Removed.
913
914 2018-09-04  Don Olmstead  <don.olmstead@sony.com>
915
916         [CMake] Make TestWebKitAPI dependencies explicit
917         https://bugs.webkit.org/show_bug.cgi?id=189282
918
919         Reviewed by Fujii Hironori.
920
921         The config.h file includes files from JSC, WebCore and WebKit which
922         places a dependency on those headers even when just building TestWTF.
923         This makes the depedencies explicit for all CMake ports and shoud
924         remove any race conditions that can be encountered when building tests.
925
926         * TestWebKitAPI/CMakeLists.txt:
927         * TestWebKitAPI/PlatformGTK.cmake:
928         * TestWebKitAPI/PlatformWPE.cmake:
929         * TestWebKitAPI/PlatformWin.cmake:
930
931 2018-09-04  Wenson Hsieh  <wenson_hsieh@apple.com>
932
933         Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs
934         https://bugs.webkit.org/show_bug.cgi?id=188890
935         <rdar://problem/43648605>
936
937         Reviewed by Tim Horton.
938
939         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
940         (-[LocalPasteboard pasteboardItems]):
941
942         Implement this method to avoid crashing when running layout tests that access the pasteboard.
943
944         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
945
946         Add a test to verify that on macOS and iOS, multiple URLs dropped onto the page are accessible via
947         "text/uri-list".
948
949         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
950
951         Add a test that exercises 5 different ways to write one or more URLs to the pasteboard on macOS; in all cases,
952         the URLs written to the pasteboard should be exposed to the page via "text/uri-list". In all of these different
953         cases, the results of using `-[NSPasteboardItem stringForType:]`, `-[NSURL URLFromPasteboard:]` and
954         `-[NSPasteboard stringForType:]` will yield different results, so the purpose of this API test is to ensure that
955         our logic for grabbing a list of URLs from the pasteboard on macOS is robust enough to handle all of these
956         different behaviors.
957
958         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
959
960         Add a test to verify that on iOS, using `-[UIPasteboard setURLs:]` to write to multiple URLs to the pasteboard
961         and then pasting results in "text/uri-list" exposing a list of all the URLs written to the pasteboard.
962
963         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
964         (-[LocalPasteboard pasteboardItems]):
965
966         Implement this method to avoid crashing when running layout tests that access the pasteboard.
967
968 2018-09-04  Simon Fraser  <simon.fraser@apple.com>
969
970         REGRESSION(r235408): GTK bots exiting early
971         https://bugs.webkit.org/show_bug.cgi?id=189063
972
973         Reviewed by Michael Catanzaro.
974         
975         WebKitTestRunner was running the world leak checks even when run without --world-leaks,
976         causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks()
977         and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in
978         TestController::handleControlCommand() print a message if the control script sends the
979         "#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks.
980         
981         I tested that running with --world-leaks still works.
982
983         * WebKitTestRunner/TestController.cpp:
984         (WTR::TestController::resetStateToConsistentValues):
985         (WTR::TestController::updateLiveDocumentsAfterTest):
986         (WTR::TestController::checkForWorldLeaks):
987         (WTR::TestController::findAndDumpWorldLeaks):
988         (WTR::TestController::handleControlCommand):
989         (WTR::TestController::run):
990
991 2018-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
992
993         Unreviewed follow-up to r235635
994         https://bugs.webkit.org/show_bug.cgi?id=188940
995
996         Use "let" variables instead of "var" variables.
997
998         * WebGPUShadingLanguageRI/StandardLibrary.js:
999         (let.standardLibrary):
1000
1001 2018-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
1002
1003         [WHLSL] Implement texture types
1004         https://bugs.webkit.org/show_bug.cgi?id=188940
1005
1006         Rubber-stamped by Dean Jackson.
1007
1008         Implement the texture types and operations. This includes Sample(), Load(), Store(), Gather(), and GetDimensions().
1009         These functions were implemented according to section 15 of the Vulkan 1.1.83 spec, which lists each operation
1010         and how to compute its results.
1011
1012         * WebGPUShadingLanguageRI/All.js:
1013         * WebGPUShadingLanguageRI/Casts.js: Moved from Intrinsics. The texture operations need to cast too, so these are
1014         moved into a common location.
1015         (cast):
1016         (bitwiseCast):
1017         (castToUchar):
1018         (castToUshort):
1019         (castToUint):
1020         (castToChar):
1021         (castToShort):
1022         (castToInt):
1023         (castToHalf):
1024         (castToFloat):
1025         * WebGPUShadingLanguageRI/Intrinsics.js: Use Casts.js and call into TextureOperations.js.
1026         (Intrinsics.):
1027         (Intrinsics.checkFalse):
1028         (Intrinsics.boxVector):
1029         (Intrinsics.unboxVector):
1030         (Intrinsics):
1031         (Intrinsics.cast): Deleted.
1032         (Intrinsics.bitwiseCast): Deleted.
1033         (Intrinsics.castToHalf): Deleted.
1034         * WebGPUShadingLanguageRI/SPIRV.html:
1035         * WebGPUShadingLanguageRI/Sampler.js: Added. Represent the Sampler type. 
1036         (Sampler):
1037         (Sampler.prototype.get rAddressMode):
1038         (Sampler.prototype.get sAddressMode):
1039         (Sampler.prototype.get tAddressMode):
1040         (Sampler.prototype.get minFilter):
1041         (Sampler.prototype.get magFilter):
1042         (Sampler.prototype.get mipmapFilter):
1043         (Sampler.prototype.get lodMinClamp):
1044         (Sampler.prototype.get lodMaxClamp):
1045         (Sampler.prototype.get maxAnisotropy):
1046         (Sampler.prototype.get compareFunction):
1047         (Sampler.prototype.get borderColor):
1048         (Sampler.prototype.calculateBorderColor.computeValues):
1049         (Sampler.prototype.calculateBorderColor):
1050         * WebGPUShadingLanguageRI/StandardLibrary.js: Update the standard library. Some of the functions were
1051         either missing or wrong.
1052         (let.standardLibrary):
1053         * WebGPUShadingLanguageRI/Test.html:
1054         * WebGPUShadingLanguageRI/Test.js: Test many, many combinations of the texture operations.
1055         (makeSampler):
1056         (make1DTexture):
1057         (make1DTextureArray):
1058         (make2DTexture):
1059         (make2DTextureArray):
1060         (make3DTexture):
1061         (makeTextureCube):
1062         (makeRW1DTexture):
1063         (makeRW1DTextureArray):
1064         (makeRW2DTexture):
1065         (makeRW2DTextureArray):
1066         (makeRW3DTexture):
1067         (make2DDepthTexture):
1068         (make2DDepthTextureArray):
1069         (makeDepthTextureCube):
1070         (makeRW2DDepthTexture):
1071         (makeRW2DDepthTextureArray):
1072         (checkFloat4):
1073         * WebGPUShadingLanguageRI/Texture.js: Added. Represents each of the texture types.
1074         (Texture):
1075         (Texture.prototype.get dimension):
1076         (Texture.prototype.get width):
1077         (Texture.prototype.get height):
1078         (Texture.prototype.get depth):
1079         (Texture.prototype.get levelCount):
1080         (Texture.prototype.get layerCount):
1081         (Texture.prototype.get innerType):
1082         (Texture.prototype.get data):
1083         (Texture.prototype.elementChecked):
1084         (Texture.prototype.setElementChecked):
1085         (Texture1D):
1086         (Texture1D.prototype.widthAtLevel):
1087         (Texture1D.prototype.heightAtLevel):
1088         (Texture1D.prototype.depthAtLevel):
1089         (Texture1D.prototype.element):
1090         (Texture1D.prototype.setElement):
1091         (Texture1DArray):
1092         (Texture1DArray.prototype.widthAtLevel):
1093         (Texture1DArray.prototype.heightAtLevel):
1094         (Texture1DArray.prototype.depthAtLevel):
1095         (Texture1DArray.prototype.element):
1096         (Texture1DArray.prototype.setElement):
1097         (Texture2D):
1098         (Texture2D.prototype.widthAtLevel):
1099         (Texture2D.prototype.heightAtLevel):
1100         (Texture2D.prototype.depthAtLevel):
1101         (Texture2D.prototype.element):
1102         (Texture2D.prototype.setElement):
1103         (Texture2DArray):
1104         (Texture2DArray.prototype.widthAtLevel):
1105         (Texture2DArray.prototype.heightAtLevel):
1106         (Texture2DArray.prototype.depthAtLevel):
1107         (Texture2DArray.prototype.element):
1108         (Texture2DArray.prototype.setElement):
1109         (Texture3D):
1110         (Texture3D.prototype.widthAtLevel):
1111         (Texture3D.prototype.heightAtLevel):
1112         (Texture3D.prototype.depthAtLevel):
1113         (Texture3D.prototype.element):
1114         (Texture3D.prototype.setElement):
1115         (TextureCube):
1116         (TextureCube.prototype.widthAtLevel):
1117         (TextureCube.prototype.heightAtLevel):
1118         (TextureCube.prototype.depthAtLevel):
1119         (TextureCube.prototype.element):
1120         (TextureCube.prototype.setElement):
1121         (Texture1DRW):
1122         (Texture1DRW.prototype.widthAtLevel):
1123         (Texture1DRW.prototype.heightAtLevel):
1124         (Texture1DRW.prototype.depthAtLevel):
1125         (Texture1DRW.prototype.element):
1126         (Texture1DRW.prototype.setElement):
1127         (Texture1DArrayRW):
1128         (Texture1DArrayRW.prototype.widthAtLevel):
1129         (Texture1DArrayRW.prototype.heightAtLevel):
1130         (Texture1DArrayRW.prototype.depthAtLevel):
1131         (Texture1DArrayRW.prototype.element):
1132         (Texture1DArrayRW.prototype.setElement):
1133         (Texture2DRW):
1134         (Texture2DRW.prototype.widthAtLevel):
1135         (Texture2DRW.prototype.heightAtLevel):
1136         (Texture2DRW.prototype.depthAtLevel):
1137         (Texture2DRW.prototype.element):
1138         (Texture2DRW.prototype.setElement):
1139         (Texture2DArrayRW):
1140         (Texture2DArrayRW.prototype.widthAtLevel):
1141         (Texture2DArrayRW.prototype.heightAtLevel):
1142         (Texture2DArrayRW.prototype.depthAtLevel):
1143         (Texture2DArrayRW.prototype.element):
1144         (Texture2DArrayRW.prototype.setElement):
1145         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW):
1146         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.widthAtLevel):
1147         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.heightAtLevel):
1148         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.depthAtLevel):
1149         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.element):
1150         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.setElement):
1151         * WebGPUShadingLanguageRI/TextureOperations.js: Added. This implements the texture operations
1152         as described in section 15 of the Vulkan 1.1.83 spec.
1153         (depthCompareOperation):
1154         (conversionToRGBA):
1155         (projectionOperation):
1156         (cubeMapFaceSelection):
1157         (cubeMapCoordinateTransformation):
1158         (cubeMapDerivativeTransformation):
1159         (scaleFactorOperation):
1160         (levelOfDetailOperation):
1161         (nearest):
1162         (imageLevelSelection):
1163         (strqaToUVWATransformation):
1164         (rne):
1165         (uvwaToIJKLNTransformationAndArrayLayerSelection):
1166         (integerTexelCoordinateOperations):
1167         (mirror):
1168         (transform):
1169         (wrappingOperation):
1170         (calculateLambda):
1171         (shouldBeBorder):
1172         (accessColor):
1173         (computeTau):
1174         (reduce):
1175         (texelGathering):
1176         (computeColorFromLevel):
1177         (texelFiltering):
1178         (castToInnerTypeForGather):
1179         (gatherTexture):
1180         (castToInnerType):
1181         (sampleTexture):
1182         * WebGPUShadingLanguageRI/index.html:
1183
1184 2018-09-04  Alexey Proskuryakov  <ap@apple.com>
1185
1186         Removing an accidentally committed debugging print.
1187
1188         * Scripts/run-leaks: (runLeaks)
1189
1190 2018-09-04  Alexey Proskuryakov  <ap@apple.com>
1191
1192         run-leaks should run leaks with --list (on Mojave)
1193         https://bugs.webkit.org/show_bug.cgi?id=187716
1194         <rdar://problem/42261676>
1195
1196         Reviewed by Lucas Forschler.
1197
1198         Also enabled dumping memgraphs. We'll be pruning these aggressively, as they take
1199         significant space.
1200
1201         * Scripts/run-leaks:
1202         (main): Added an option to store memgraphs.
1203         (runLeaks): As there is no way to test whether the new format is supported in advance,
1204         we have to try with --list first, and retry if that fails. Also, made leaks operate
1205         on a memgraph file if we are saving it anyway.
1206
1207         * Scripts/webkitpy/port/leakdetector.py:
1208         (LeakDetector._leaks_args): Pass --memgraph-file to run-leaks.
1209         (LeakDetector.leaks_file_name): Removed an incorrect comment.
1210         (LeakDetector.memgraph_file_name): Added.
1211         (LeakDetector.check_for_leaks): Changed how arguments are passed to _leaks_args.
1212         It is a bit ugly that leaks path ends up being computed twice, but this is the least
1213         ugly approach that I could find.
1214
1215         * Scripts/webkitpy/port/leakdetector_unittest.py: Updated for _leaks_args changes.
1216
1217 2018-09-04  Chris Dumez  <cdumez@apple.com>
1218
1219         Add process pool configuration flag to turn on automatic process pre-warming
1220         https://bugs.webkit.org/show_bug.cgi?id=189263
1221         <rdar://problem/44101941>
1222
1223         Reviewed by Antti Koivisto.
1224
1225         Add API test coverage.
1226
1227         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1228         * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm.
1229         (TEST):
1230         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1231         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Removed.
1232
1233 2018-09-04  Keith Miller  <keith_miller@apple.com>
1234
1235         Perl doesn't like calling keys on a reference
1236         https://bugs.webkit.org/show_bug.cgi?id=189261
1237
1238         Reviewed by Michael Saboff.
1239
1240         * Scripts/test262/Runner.pm:
1241         (UpdateResults):
1242
1243 2018-09-04  Jer Noble  <jer.noble@apple.com>
1244
1245         REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioElementFollowingUserInteraction is a flaky timeout
1246         https://bugs.webkit.org/show_bug.cgi?id=187972
1247         <rdar://problem/42667737>
1248
1249         Reviewed by Darin Adler.
1250
1251         Ensure that listeners are added in time to catch messages broadcast at them.
1252
1253         * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
1254         (TestWebKitAPI::TEST):
1255
1256 2018-09-04  Ross Kirsling  <ross.kirsling@sony.com>
1257
1258         Update googletest
1259         https://bugs.webkit.org/show_bug.cgi?id=175722
1260
1261         Reviewed by Brent Fulgham.
1262
1263         * TestWebKitAPI/config.h:
1264         Instead of modifying the gtest source, add the necessary WTF includes here.
1265
1266         * TestWebKitAPI/Configurations/Base.xcconfig
1267         Remove obsoleted definitions GTEST_HAS_TR1_TUPLE=0 and GTEST_HAS_RTTI=0.
1268
1269 2018-09-03  Pablo Saavedra  <psaavedra@igalia.com>
1270
1271         [WPE] Add more WPE bots to dashboard
1272         https://bugs.webkit.org/show_bug.cgi?id=189245
1273
1274         Reviewed by Daniel Bates.
1275
1276         There are two missing bots which are not listed in the dashboard for
1277         a while: WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests)
1278
1279         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
1280         (WebKitBuildbot):
1281
1282 2018-09-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1283
1284         [WPE] 2.21.91 fails to build with ENABLE_MINIBROWSER
1285         https://bugs.webkit.org/show_bug.cgi?id=189006
1286
1287         Reviewed by Darin Adler.
1288
1289         The MiniBrowser source code is missing from the tarball. Oops! Add it.
1290
1291         * wpe/manifest.txt.in:
1292
1293 2018-09-01  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
1294
1295         [WinCairo] Add CryptoDigestOpenSSL
1296         https://bugs.webkit.org/show_bug.cgi?id=188978
1297
1298         Reviewed by Darin Adler.
1299
1300         Add API tests for the PAL::CryptoDigest class.
1301
1302         * TestWebKitAPI/PlatformWin.cmake:
1303         Add CryptoDigest.cpp to TestWebCoreLib_Sources.
1304
1305         Define -DSTATICALLY_LINKED_WITH_PAL=1 to avoid warnings since
1306         without the definition the functions marked with PAL_EXPORT are supposed to be
1307         imported from another shared library, but as it is, TestWebCoreLib
1308         links PAL statically.
1309
1310         * TestWebKitAPI/Tests/WebCore/CryptoDigest.cpp: Added.
1311         (TestWebKitAPI::toHex):
1312         (TestWebKitAPI::expect):
1313         (TestWebKitAPI::expectSHA1):
1314         (TestWebKitAPI::expectSHA224):
1315         (TestWebKitAPI::expectSHA256):
1316         (TestWebKitAPI::expectSHA384):
1317         (TestWebKitAPI::expectSHA512):
1318         (TestWebKitAPI::TEST):
1319
1320 2018-09-01  Dan Bernstein  <mitz@apple.com>
1321
1322         [Cocoa] Crash using KVO for 'serverTrust' property of WKWebView - "this class is not key value coding-compliant for the key serverTrust"
1323         https://bugs.webkit.org/show_bug.cgi?id=189222
1324         <rdar://problem/33283179>
1325
1326         Reviewed by Sam Weinig.
1327
1328         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1329         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewServerTrustKVC.mm: Added.
1330         (TEST):
1331
1332 2018-08-31  Aditya Keerthi  <akeerthi@apple.com>
1333
1334         Unreviewed, add an alternate email for Aditya Keerthi.
1335
1336         * Scripts/webkitpy/common/config/contributors.json:
1337
1338 2018-08-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1339
1340         [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
1341         https://bugs.webkit.org/show_bug.cgi?id=189054
1342         <rdar://problem/43819779>
1343
1344         Reviewed by Tim Horton.
1345
1346         See WebCore/ChangeLog for more detail.
1347
1348         * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
1349         (createWebViewWithCustomPasteboardDataEnabled):
1350
1351 2018-08-31  Commit Queue  <commit-queue@webkit.org>
1352
1353         Unreviewed, rolling out r235565.
1354         https://bugs.webkit.org/show_bug.cgi?id=189212
1355
1356         Broke the WHLSL build (Requested by litherum on #webkit).
1357
1358         Reverted changeset:
1359
1360         "[WHLSL] Remove useless code in NameResolver"
1361         https://bugs.webkit.org/show_bug.cgi?id=189176
1362         https://trac.webkit.org/changeset/235565
1363
1364 2018-08-31  Myles C. Maxfield  <mmaxfield@apple.com>
1365
1366         [WHLSL] Remove useless code in NameResolver
1367         https://bugs.webkit.org/show_bug.cgi?id=189176
1368
1369         Reviewed by Dean Jackson and Thomas Denney.
1370
1371         The check will always pass becase the standard library contains at least one function with the correct name.
1372
1373         * WebGPUShadingLanguageRI/NameResolver.js:
1374         (NameResolver.prototype.visitDotExpression):
1375         (NameResolver.prototype._handlePropertyAccess): Deleted.
1376         (NameResolver.prototype.visitIndexExpression): Deleted.
1377
1378 2018-08-31  Simon Fraser  <simon.fraser@apple.com>
1379
1380         Make it possible to mark tests as leaks in TestExpectations
1381         https://bugs.webkit.org/show_bug.cgi?id=189088
1382
1383         Reviewed by Jon Lee.
1384         
1385         Have webkitpy parse out "Leak" expectations in TestExpectations, and do the right
1386         thing if the test run did not use --world-leaks. Add unit tests for leaks combined
1387         with various other result combinations.
1388
1389         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
1390         (LayoutTestRunner._update_summary_with_result):
1391         (LayoutTestRunner._annotate_results_with_additional_failures):
1392         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
1393         (TestExpectationParser):
1394         (TestExpectations): The 'Leak' line was duplicated here, so remove a copy.
1395         (TestExpectations.remove_leak_failures):
1396         (TestExpectations.matches_an_expected_result):
1397         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
1398         (Base.get_basic_tests):
1399         * Scripts/webkitpy/port/test.py:
1400         (TestList.add_reftest):
1401         (unit_test_list):
1402
1403 2018-08-31  Zalan Bujtas  <zalan@apple.com>
1404
1405         [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin.
1406         https://bugs.webkit.org/show_bug.cgi?id=189193
1407
1408         Reviewed by Antti Koivisto.
1409
1410         * LayoutReloaded/misc/LFC-passing-tests.txt:
1411
1412 2018-08-31  Antti Koivisto  <antti@apple.com>
1413
1414         Replace OptionSet |= and -= operators with add() and remove() functions
1415         https://bugs.webkit.org/show_bug.cgi?id=189169
1416
1417         Reviewed by Anders Carlsson.
1418
1419         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
1420         (TestWebKitAPI::TEST):
1421
1422 2018-08-31  Daniel Bates  <dabates@apple.com>
1423
1424         lldb-webkit: KeyError thrown for OptionSet with invalid value
1425         https://bugs.webkit.org/show_bug.cgi?id=189070
1426
1427         Update comment to explain that we return early and do not compute the set of enumerators in the
1428         OptionSet when the underlying value of the set is an invalid value.
1429
1430         Additionally, update the change log entry for r235482 to reflect the updated title for the bug
1431         and to better describe the change that was made.
1432
1433         * lldb/lldb_webkit.py:
1434         (WTFOptionSetProvider.update):
1435
1436 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1437
1438         WebKitLauncher: Move WebKitLauncher.entitlements into Configurations directory
1439
1440         This makes the Configurations folder in the Xcode project match
1441         what's in the Configurations directory on disk.  Found by
1442         tidy-Xcode-project-file (see Bug 188754).
1443
1444         * WebKitLauncher/Configurations/WebKitLauncher.entitlements: Rename from Tools/WebKitLauncher/WebKitLauncher.entitlements.
1445         * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
1446         - Update project for file move.
1447
1448 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1449
1450         WebKitLauncher: Fix build failures
1451
1452         * WebKitLauncher/Configurations/Base.xcconfig:
1453         (ARCHS): Use $(ARCHS_STANDARD_32_64_BIT).
1454         (MACOSX_DEPLOYMENT_TARGET): Update from Snow Leopard to Sierra.
1455
1456         * WebKitLauncher/WebKitNightlyEnabler.m:
1457         (myApplicationWillFinishLaunching):
1458         * WebKitLauncher/main.m:
1459         (displayErrorAndQuit):
1460         (locateSafariBundle):
1461         - Use pragma to ignore deprecation warnings.
1462
1463 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1464
1465         MobileMiniBrowser: Move test2s.mp4 into Resources directory
1466
1467         This makes the Resources folder in the Xcode project match
1468         what's in the Resources directory on disk.  Found by
1469         tidy-Xcode-project-file (see Bug 188754).
1470
1471         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
1472         - Update project for file move.
1473         * MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test2s.mp4: Rename from Tools/MobileMiniBrowser/MobileMiniBrowserFramework/test2s.mp4.
1474
1475 2018-08-31  Frederic Wang  <fwang@igalia.com>
1476
1477         Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
1478         https://bugs.webkit.org/show_bug.cgi?id=182053
1479
1480         Reviewed by Simon Fraser.
1481
1482         Add FIXMEs comments to add the new developer flag in the future and  disable it for now.
1483
1484         * DumpRenderTree/mac/DumpRenderTree.mm:
1485         (enableExperimentalFeatures):
1486         (resetWebPreferencesToConsistentValues):
1487         * DumpRenderTree/win/DumpRenderTree.cpp:
1488         (enableExperimentalFeatures):
1489         * WebKitTestRunner/TestController.cpp:
1490         (WTR::TestController::resetPreferencesToConsistentValues):
1491
1492 2018-08-30  Thomas Denney  <tdenney@apple.com>
1493
1494         [WHLSL] Fix array indexing behavior
1495         https://bugs.webkit.org/show_bug.cgi?id=189175
1496
1497         Array, pointer, and array ref types are now parsed and then constructed
1498         in reverse so that the declaration order matches the indexing order, as
1499         in C/C++.
1500
1501         Reviewed by Myles C. Maxfield.
1502
1503         * WebGPUShadingLanguageRI/Parse.js:
1504         (parseType):
1505         * WebGPUShadingLanguageRI/Test.js:
1506
1507 2018-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1508
1509         Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures
1510         https://bugs.webkit.org/show_bug.cgi?id=185965
1511
1512         Reviewed by Andy Estes.
1513
1514         The first attempt to fix these flaky tests on iOS caused timeouts on macOS while waiting for a "loaded" message
1515         from the page. To (hopefully) fix this across both platforms, make sure that we first register our script
1516         message handlers in the UI process *before* evaluating script that could propagate the script message.
1517
1518         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
1519         (-[TestWKWebView waitForMessage:afterEvaluatingScript:]):
1520         (TEST):
1521
1522 2018-08-30  Thomas Denney  <tdenney@apple.com>
1523
1524         [WHLSL] Implement tests to verify array indexing order matches our desires
1525         https://bugs.webkit.org/show_bug.cgi?id=189099
1526
1527         Reviewed by Myles C. Maxfield.
1528
1529         * WebGPUShadingLanguageRI/Test.js: Add new test for array indexing order
1530         and the option to explicitly disable tests (this test is disabled by
1531         default).
1532         * WebGPUShadingLanguageRI/TypeRef.js:
1533         (TypeRef.wrap): Fixes  typo.
1534
1535 2018-08-30  Sihui Liu  <sihui_liu@apple.com>
1536
1537         WKNavigation.ProcessCrashDuringCallback is failing on iOS
1538         https://bugs.webkit.org/show_bug.cgi?id=189148
1539
1540         Reviewed by Chris Dumez.
1541
1542         We should not deference WebView or we may get WKErrorWebViewInvalidated error, because 
1543         WebView could be destroyed before Web Process termination is noticed.
1544
1545         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
1546         (TEST):
1547
1548 2018-08-30  Zalan Bujtas  <zalan@apple.com>
1549
1550         [LFC][Floating] Formatting context roots avoid floats.
1551         https://bugs.webkit.org/show_bug.cgi?id=189150
1552
1553         Reviewed by Antti Koivisto.
1554
1555         * LayoutReloaded/misc/LFC-passing-tests.txt:
1556
1557 2018-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1558
1559         [iOS] TestWebKitAPI.PasteImage tests are flaky failures
1560         https://bugs.webkit.org/show_bug.cgi?id=185965
1561
1562         Reviewed by Andy Estes.
1563
1564         These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
1565         element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
1566         because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
1567         this by waiting for the "load" event (which is also done in some of the other tests in this file).
1568
1569         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
1570         (TEST):
1571
1572 2018-08-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1573
1574         Unreviewed, rolling out r235114.
1575
1576         ostree server deleted our commits?
1577
1578         Reverted changeset:
1579
1580         "[Flatpak] Update to GNOME master runtime"
1581         https://bugs.webkit.org/show_bug.cgi?id=188731
1582         https://trac.webkit.org/changeset/235114
1583
1584 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
1585
1586         [WHLSL] Test row-majorness of matrices
1587         https://bugs.webkit.org/show_bug.cgi?id=189101
1588
1589         The matrix multiplication functions are temporarily commented out of the standard library,
1590         so I've temporarily copy/pasted them into the test. Matrix multiplication is not
1591         commutative, so it requires the right indexing order.
1592
1593         Reviewed by Dean Jackson and Thomas Denney.
1594
1595         * WebGPUShadingLanguageRI/Intrinsics.js:
1596         * WebGPUShadingLanguageRI/StandardLibrary.js:
1597         (let.standardLibrary):
1598         * WebGPUShadingLanguageRI/Test.js:
1599
1600 2018-08-29  Jer Noble  <jer.noble@apple.com>
1601
1602         Unreviewed test gardening; NowPlayingTest API tests require High Sierra.
1603
1604         * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
1605
1606 2018-08-29  Youenn Fablet  <youenn@apple.com>
1607
1608         Remove WebRTC legacy API implementation
1609         https://bugs.webkit.org/show_bug.cgi?id=189040
1610
1611         Reviewed by Eric Carlson.
1612
1613         * DumpRenderTree/mac/DumpRenderTree.mm:
1614         (enableExperimentalFeatures):
1615         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1616         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1617         (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted.
1618         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1619         * WebKitTestRunner/TestController.cpp:
1620         (WTR::TestController::resetPreferencesToConsistentValues):
1621
1622 2018-08-29  Daniel Bates  <dabates@apple.com>
1623
1624         lldb-webkit: KeyError thrown for OptionSet with invalid value
1625         https://bugs.webkit.org/show_bug.cgi?id=189070
1626
1627         Reviewed by Simon Fraser.
1628
1629         Do not compute what enumerators are in an OptionSet with an invalid value. A local OptionSet
1630         variable is only considered valid when execution passes over its assignment/constructor.
1631
1632         The LLDB Python API does not provide a way to determine whether a variable has a valid
1633         value (SBValue.IsValid() does not seem to check if the actual bit pattern in memory for
1634         a variable represents a valid value). So, we use a simple heuristic: when the value of
1635         the OptionSet is greater than the value of the bitmask with all enumerators set then we
1636         consider the OptionSet to be invalid. When the variable obtains a valid value then LLDB
1637         will notify us to update our state.
1638
1639         * lldb/lldb_webkit.py:
1640         (WTFOptionSetProvider.update):
1641
1642 2018-08-29  Chris Dumez  <cdumez@apple.com>
1643
1644         [PSON] We should only process-swap when eTLD+1 changes on navigation
1645         https://bugs.webkit.org/show_bug.cgi?id=189090
1646         <rdar://problem/43799225>
1647
1648         Reviewed by Geoffrey Garen.
1649
1650         Update existing PSON API tests to use different registrable domains instead of different
1651         protocols, as we now only process-swap when the eTLD+1 (aka "registrable domain") changes.
1652
1653         Add test coverage to make sure that we do not process swap when eTLD+1 does not change.
1654
1655         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1656
1657 2018-08-29  Youenn Fablet  <youenn@apple.com>
1658
1659         Add a runtime flag for WebRTC unified plan
1660         https://bugs.webkit.org/show_bug.cgi?id=189068
1661
1662         Reviewed by Eric Carlson.
1663
1664         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1665         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1666         (WTR::TestRunner::setWebRTCUnifiedPlanEnabled):
1667         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1668
1669 2018-08-29  Don Olmstead  <don.olmstead@sony.com>
1670
1671         [CMake] Split Tools/CMakeLists.txt into platform files
1672         https://bugs.webkit.org/show_bug.cgi?id=189093
1673
1674         Reviewed by Michael Catanzaro.
1675
1676         * CMakeLists.txt:
1677         * PlatformGTK.cmake: Added.
1678         * PlatformMac.cmake: Added.
1679         * PlatformWPE.cmake: Added.
1680         * PlatformWin.cmake: Added.
1681
1682 2018-08-29  Jer Noble  <jer.noble@apple.com>
1683
1684         Muted elements do not have their Now Playing status updated when unmuted.
1685         https://bugs.webkit.org/show_bug.cgi?id=189069
1686
1687         Reviewed by Eric Carlson.
1688
1689         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1690         * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added.
1691         (userInfoHasNowPlayingApplicationPID):
1692         (getNowPlayingClient):
1693         (getNowPlayingClientPid):
1694         (NowPlayingTest::webView):
1695         (NowPlayingTest::configuration):
1696         (NowPlayingTest::webViewPid):
1697         (NowPlayingTest::loadPage):
1698         (NowPlayingTest::runScriptWithUserGesture):
1699         (NowPlayingTest::runScriptWithoutUserGesture):
1700         (NowPlayingTest::executeAndWaitForPlaying):
1701         (NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying):
1702         (NowPlayingTest::observers):
1703         (NowPlayingTest::addObserver):
1704         (NowPlayingTest::removeObserver):
1705         (NowPlayingTest::notificationCallback):
1706         (NowPlayingTest::receivedNotification):
1707         (NowPlayingTest::performAfterReceivingNotification):
1708         (TEST_F):
1709         * TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added.
1710
1711 2018-08-29  Thomas Denney  <tdenney@apple.com>
1712
1713         [WHLSL] Ensure that isLValue is copied by the rewriter
1714         https://bugs.webkit.org/show_bug.cgi?id=189083
1715
1716         The value of isLValue was not propagated when new TernaryExpressions are
1717         created in Rewriter.
1718
1719         Reviewed by Myles C. Maxfield.
1720
1721         * WebGPUShadingLanguageRI/Rewriter.js:
1722         (Rewriter.prototype.visitTernaryExpression):
1723         * WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is
1724         propagated.
1725
1726 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
1727
1728         [WHLSL] Add more functions to the standard library
1729         https://bugs.webkit.org/show_bug.cgi?id=188873
1730
1731         Reviewed by Filip Pizlo.
1732
1733         This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it.
1734
1735         There are a few major pieces:
1736         1. Swizzle operators are now implemented in the language, instead of as native functions
1737         2. Vector constructors are now implemented in the language, instead of as native functions
1738         3. The matrix type is implemented
1739         4. Vector operator&[] is illegal, and is removed from the compiler
1740         5. Vector index setters & index getters are now implemented in the language, instead of as native functions
1741         6. Vector and matrix equality operators are implemented in the language, instead of as native functions
1742         7. Casting a scalar to a boolean is implemented in the language, instead of as native functions
1743         8. Casting a vector to a boolean is not part of the language, and is removed from the compiler
1744         9. Half-precision floating point types are implemented
1745
1746         * WebGPUShadingLanguageRI/All.js:
1747         * WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
1748         (BuiltinMatrixGetter):
1749         (BuiltinMatrixGetter.prototype.get height):
1750         (BuiltinMatrixGetter.prototype.get width):
1751         (BuiltinMatrixGetter.prototype.toString):
1752         (BuiltinMatrixGetter.functions):
1753         (BuiltinMatrixGetter.prototype.instantiateImplementation):
1754         * WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
1755         (BuiltinMatrixSetter):
1756         (BuiltinMatrixSetter.prototype.get height):
1757         (BuiltinMatrixSetter.prototype.get width):
1758         (BuiltinMatrixSetter.prototype.toString):
1759         (BuiltinMatrixSetter.functions):
1760         (BuiltinMatrixSetter.prototype.instantiateImplementation):
1761         * WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed.
1762         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed.
1763         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js:
1764         (BuiltinVectorGetter.prototype.instantiateImplementation):
1765         (BuiltinVectorGetter):
1766         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js:
1767         (BuiltinVectorSetter.functions):
1768         (BuiltinVectorSetter.prototype.instantiateImplementation):
1769         (BuiltinVectorSetter):
1770         * WebGPUShadingLanguageRI/CallExpression.js:
1771         (CallExpression.prototype.resolve):
1772         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js:
1773         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
1774         (checkTypesWithArguments.TypeWithArgumentsChecker):
1775         (checkTypesWithArguments):
1776         * WebGPUShadingLanguageRI/Checker.js:
1777         (Checker.prototype.visitVectorType):
1778         (Checker.prototype.visitMatrixType):
1779         * WebGPUShadingLanguageRI/ConstexprFolder.js:
1780         (ConstexprFolder.prototype.visitCallExpression):
1781         (ConstexprFolder):
1782         * WebGPUShadingLanguageRI/Evaluator.js:
1783         (Evaluator.prototype.visitTernaryExpression):
1784         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
1785         (FlattenedStructOffsetGatherer.prototype.visitMatrixType):
1786         (FlattenedStructOffsetGatherer):
1787         * WebGPUShadingLanguageRI/Intrinsics.js:
1788         (Intrinsics.):
1789         (Intrinsics):
1790         * WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js.
1791         (MatrixType):
1792         (MatrixType.prototype.get elementType):
1793         (MatrixType.prototype.get numRows):
1794         (MatrixType.prototype.get numColumns):
1795         (MatrixType.prototype.get numRowsValue):
1796         (MatrixType.prototype.get numColumnsValue):
1797         (MatrixType.prototype.get size):
1798         (MatrixType.prototype.unifyImpl):
1799         (MatrixType.prototype.populateDefaultValue):
1800         (MatrixType.prototype.toString):
1801         * WebGPUShadingLanguageRI/NameContext.js:
1802         (NameContext.prototype.add):
1803         * WebGPUShadingLanguageRI/NativeType.js:
1804         (NativeType.create):
1805         (NativeType):
1806         * WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js.
1807         (OperatorAnderIndexer):
1808         * WebGPUShadingLanguageRI/OperatorBool.js: Removed.
1809         * WebGPUShadingLanguageRI/Prepare.js:
1810         (let.prepare):
1811         * WebGPUShadingLanguageRI/Program.js:
1812         (Program.prototype.add):
1813         * WebGPUShadingLanguageRI/Rewriter.js:
1814         (Rewriter.prototype.visitMatrixType):
1815         (Rewriter):
1816         * WebGPUShadingLanguageRI/SPIRV.html:
1817         * WebGPUShadingLanguageRI/StandardLibrary.js:
1818         (operator.bool):
1819         (bool.operator):
1820         (uchar.operator):
1821         (ushort.operator):
1822         (char.operator):
1823         (short.operator):
1824         (uint.operator):
1825         (int.operator):
1826         (half.operator):
1827         (float.operator):
1828         (uchar2.operator):
1829         (uchar3.operator):
1830         (uchar4.operator):
1831         (ushort2.operator):
1832         (ushort3.operator):
1833         (ushort4.operator):
1834         (uint2.operator):
1835         (uint3.operator):
1836         (uint4.operator):
1837         (char2.operator):
1838         (char3.operator):
1839         (char4.operator):
1840         (short2.operator):
1841         (short3.operator):
1842         (short4.operator):
1843         (int2.operator):
1844         (int3.operator):
1845         (int4.operator):
1846         (half2.operator):
1847         (half3.operator):
1848         (half4.operator):
1849         (float2.operator):
1850         (float3.operator):
1851         (float4.operator):
1852         (half2x2.operator):
1853         (half2x3.operator):
1854         (half2x4.operator):
1855         (half3x2.operator):
1856         (half3x3.operator):
1857         (half3x4.operator):
1858         (half4x2.operator):
1859         (half4x3.operator):
1860         (half4x4.operator):
1861         (float2x2.operator):
1862         (float2x3.operator):
1863         (float2x4.operator):
1864         (float3x2.operator):
1865         (float3x3.operator):
1866         (float3x4.operator):
1867         (float4x2.operator):
1868         (float4x3.operator):
1869         (float4x4.operator):
1870         (operator.bool2):
1871         (operator.bool3):
1872         (operator.bool4):
1873         (uint.operator.length):
1874         (operator.uchar2):
1875         (operator.uchar3):
1876         (operator.uchar4):
1877         (operator.ushort2):
1878         (operator.ushort3):
1879         (operator.ushort4):
1880         (operator.uint2):
1881         (operator.uint3):
1882         (operator.uint4):
1883         (operator.char2):
1884         (operator.char3):
1885         (operator.char4):
1886         (operator.short2):
1887         (operator.short3):
1888         (operator.short4):
1889         (operator.int2):
1890         (operator.int3):
1891         (operator.int4):
1892         (operator.half2):
1893         (operator.half3):
1894         (operator.half4):
1895         (operator.float2):
1896         (operator.float3):
1897         (operator.float4):
1898         (bool2.operator):
1899         (bool3.operator):
1900         (bool4.operator):
1901         (allVectorTypeNames):
1902         * WebGPUShadingLanguageRI/SwizzleOp.js: Removed.
1903         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
1904         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType):
1905         (synthesizeDefaultConstructorOperator.FindAllTypes):
1906         (synthesizeDefaultConstructorOperator):
1907         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed.
1908         * WebGPUShadingLanguageRI/Test.html:
1909         * WebGPUShadingLanguageRI/Test.js:
1910         (makeHalf):
1911         (checkHalf):
1912         * WebGPUShadingLanguageRI/Visitor.js:
1913         (Visitor.prototype.visitMatrixType):
1914         (Visitor):
1915         * WebGPUShadingLanguageRI/index.html:
1916
1917 2018-08-29  Simon Fraser  <simon.fraser@apple.com>
1918
1919         Teach webkitpy how to check leaks and treat leaks as test failures
1920         https://bugs.webkit.org/show_bug.cgi?id=189067
1921
1922         Reviewed by Darin Adler.
1923         
1924         Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched
1925         with a --world-leaks argument (which is renamed in this patch for consistency). This enables the
1926         behavior added in r235408, namely that they check for leaked documents after each test, and at
1927         the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the
1928         "#CHECK FOR WORLD LEAKS" command to get still-live documents.
1929         
1930         LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(),
1931         and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block.
1932         If this results block includes leaks, we convert an existing TestResult into a LEAK failure
1933         in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html
1934
1935         Unit tests are updated with some leak examples.
1936
1937         * DumpRenderTree/mac/DumpRenderTree.mm:
1938         (initializeGlobalsFromCommandLineOptions):
1939         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
1940         (ParsedJSONResultsTest):
1941         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
1942         (LayoutTestRunner._annotate_results_with_additional_failures):
1943         (LayoutTestRunner._handle_finished_test_group):
1944         (Worker.handle):
1945         (Worker._run_test):
1946         (Worker._do_post_tests_work):
1947         (Worker._finished_test_group):
1948         (Worker._run_test_in_another_thread):
1949         * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
1950         (JSONLayoutResultsGenerator):
1951         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
1952         (TestExpectationParser):
1953         (TestExpectations):
1954         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
1955         (Base.get_basic_tests):
1956         * Scripts/webkitpy/layout_tests/models/test_failures.py:
1957         (determine_result_type):
1958         (FailureLeak):
1959         (FailureLeak.__init__):
1960         (FailureLeak.message):
1961         (FailureDocumentLeak):
1962         (FailureDocumentLeak.__init__):
1963         (FailureDocumentLeak.message):
1964         * Scripts/webkitpy/layout_tests/models/test_results.py:
1965         (TestResult.convert_to_failure):
1966         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
1967         (TestRunResults.change_result_to_failure):
1968         (_interpret_test_failures):
1969         (summarize_results):
1970         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
1971         (get_result):
1972         (run_results):
1973         (summarized_results):
1974         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
1975         (parse_args):
1976         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
1977         (parse_args):
1978         (RunTest.test_check_for_world_leaks):
1979         * Scripts/webkitpy/port/driver.py:
1980         (DriverPostTestOutput):
1981         (DriverPostTestOutput.__init__):
1982         (Driver.do_post_tests_work):
1983         (Driver._parse_world_leaks_output):
1984         (Driver.cmd_line):
1985         (DriverProxy.do_post_tests_work):
1986         * Scripts/webkitpy/port/test.py:
1987         (unit_test_list):
1988         * WebKitTestRunner/Options.cpp:
1989         (WTR::OptionsHandler::OptionsHandler):
1990         * WebKitTestRunner/TestController.cpp:
1991         (WTR::TestController::checkForWorldLeaks):
1992
1993 2018-08-29  David Kilzer  <ddkilzer@apple.com>
1994
1995         Remove empty directories from from svn.webkit.org repository
1996         <https://webkit.org/b/189081>
1997
1998         * DumpRenderTree/TestNetscapePlugIn/unix: Removed.
1999         * WebKitTestRunner/UIScriptContext: Removed.
2000
2001 2018-08-29  Pablo Saavedra  <psaavedra@igalia.com>
2002
2003         [GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP
2004         https://bugs.webkit.org/show_bug.cgi?id=189077
2005
2006         Reviewed by Michael Catanzaro.
2007
2008         Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP
2009         This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly
2010         Linux ARMv7 Thumb2 SoftFP Release' buildjob.
2011
2012         * BuildSlaveSupport/build.webkit.org-config/config.json:
2013         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2014
2015 2018-08-28  Daniel Bates  <dabates@apple.com>
2016
2017         lldb-webkit: KeyError thrown for OptionSet
2018         https://bugs.webkit.org/show_bug.cgi?id=189062
2019
2020         Reviewed by Simon Fraser.
2021
2022         For some reason lldb(1) may not retrieve the enumerator names for an enum value
2023         when it calls update() on the synthetic children provider. If this occurs then
2024         bail out as we cannot compute what enumerators are in the set.
2025
2026         * lldb/lldb_webkit.py:
2027         (WTFOptionSetProvider.update):
2028
2029 2018-08-28  Sihui Liu  <sihui_liu@apple.com>
2030
2031         Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
2032         https://bugs.webkit.org/show_bug.cgi?id=189037
2033
2034         Reviewed by Chris Dumez.
2035
2036         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
2037         (TEST):
2038
2039 2018-08-28  David Kilzer  <ddkilzer@apple.com>
2040
2041         Fix incorrect use of `sourceTree = "<group>";` for built products and frameworks in Xcode projects
2042
2043         Found by tidy-Xcode-project-file script (see Bug 188754).
2044
2045         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
2046         (IOKit.framework): Use `sourceTree = "<absolute>";` to match
2047         other frameworks in the project.
2048         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
2049         (WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for
2050         built product instead of relative build directory path.
2051         * jsc-cli/jsc-cli.xcodeproj/project.pbxproj:
2052         (JavaScriptCore.framework): Ditto.
2053         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
2054         (libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built
2055         product.
2056
2057 2018-08-28  Alex Christensen  <achristensen@webkit.org>
2058
2059         Fix 32-bit Mac build.
2060
2061         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
2062
2063 2018-08-28  Alex Christensen  <achristensen@webkit.org>
2064
2065         REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out
2066         https://bugs.webkit.org/show_bug.cgi?id=189050
2067
2068         Reviewed by Tim Horton.
2069
2070         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
2071         This test wasn't run on iOS before.  Let's re-introduce the WK_HAVE_C_SPI guard.
2072
2073 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2074
2075         [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
2076         https://bugs.webkit.org/show_bug.cgi?id=189049
2077
2078         Reviewed by Tim Horton.
2079
2080         Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the
2081         load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`.
2082
2083         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2084         (simulateFolderDragWithURL):
2085
2086 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2087
2088         [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
2089         https://bugs.webkit.org/show_bug.cgi?id=189004
2090
2091         Reviewed by Dan Bernstein.
2092
2093         Move off of deprecated attachment insertion SPI.
2094
2095         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2096         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
2097         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
2098         (-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted.
2099
2100 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
2101
2102         Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
2103         https://bugs.webkit.org/show_bug.cgi?id=188994
2104
2105         Reviewed by Tim Horton.
2106         
2107         This patch adds the notion of a "control command" in the protocol between webkitpy and 
2108         WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a #
2109         that is checked for before trying to parse the input as test URL. For now, just one
2110         commmand is supported, which is "#CHECK FOR WORLD LEAKS".
2111         
2112         In response to the command, the tool dumps an output block in the usual pseudo-MIME-style,
2113         with a trailing "#EOF". Future patches will add support to webkitpy to parse this output.
2114         
2115         DumpRenderTree stubs out the command, returning an empty block.
2116         
2117         WebKitTestRunner responds to the command by dumping the list of live documents, if it was
2118         run with the --check-for-world-leaks option.
2119         
2120         When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via
2121         WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test
2122         that leaked a document), and keeps them in a map of document identifier to test and live document URL.
2123         Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to
2124         clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense)
2125         after which it requests the list of live documents for a final time, excluding any that are loaded
2126         in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this
2127         list are therefore leaked (or abandoned).
2128         
2129         Future patches will hook up webkitpy reporting for leaked documents.
2130
2131         * DumpRenderTree/mac/DumpRenderTree.mm:
2132         (initializeGlobalsFromCommandLineOptions):
2133         (handleControlCommand):
2134         (runTestingServerLoop):
2135         * DumpRenderTree/win/DumpRenderTree.cpp:
2136         (handleControlCommand):
2137         (main):
2138         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2139         (WTR::postGCTask):
2140         (WTR::InjectedBundle::reportLiveDocuments):
2141         (WTR::InjectedBundle::didReceiveMessageToPage):
2142         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
2143         * WebKitTestRunner/Options.cpp:
2144         (WTR::handleOptionCheckForWorldLeaks):
2145         (WTR::OptionsHandler::OptionsHandler):
2146         * WebKitTestRunner/Options.h:
2147         * WebKitTestRunner/TestController.cpp:
2148         (WTR::AsyncTask::run):
2149         (WTR::AsyncTask::currentTask):
2150         (WTR::TestController::initialize):
2151         (WTR::TestController::ensureViewSupportsOptionsForTest):
2152         (WTR::TestController::resetStateToConsistentValues):
2153         (WTR::TestController::updateLiveDocumentsAfterTest):
2154         (WTR::TestController::checkForWorldLeaks):
2155         (WTR::TestController::findAndDumpWorldLeaks):
2156         (WTR::TestController::willDestroyWebView):
2157         (WTR::parseInputLine):
2158         (WTR::TestController::waitForCompletion):
2159         (WTR::TestController::handleControlCommand):
2160         (WTR::TestController::runTestingServerLoop):
2161         (WTR::TestController::run):
2162         (WTR::TestController::didReceiveLiveDocumentsList):
2163         (WTR::TestController::didReceiveMessageFromInjectedBundle):
2164         * WebKitTestRunner/TestController.h:
2165         (WTR::AsyncTask::AsyncTask):
2166         (WTR::AsyncTask::taskComplete):
2167         (WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo):
2168         * WebKitTestRunner/TestInvocation.cpp:
2169         (WTR::TestInvocation::invoke):
2170         * WebKitTestRunner/TestOptions.h:
2171         (WTR::TestOptions::hasSameInitializationOptions const):
2172
2173 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2174
2175         Fix API test after r235398
2176         https://bugs.webkit.org/show_bug.cgi?id=188997
2177
2178         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
2179         (TestWebKitAPI::setPageLoaderClient):
2180         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
2181         willGoToBackForwardListItem is unused and unsupported.  Removing its check.
2182
2183 2018-08-27  Daniel Bates  <dabates@apple.com>
2184
2185         Partial revert of r235376
2186         https://bugs.webkit.org/show_bug.cgi?id=189011
2187
2188         For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra
2189         Debug and Apple High Sierra Debug bots:
2190
2191             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple
2192             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple
2193
2194         Will investigate offline.
2195
2196         * lldb/lldbWebKitTester/main.cpp:
2197         (testSummaryProviders):
2198         * lldb/lldb_webkit_unittest.py:
2199         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
2200         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted.
2201         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted.
2202         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted.
2203         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted.
2204
2205 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
2206
2207         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
2208         https://bugs.webkit.org/show_bug.cgi?id=188931
2209
2210         Reviewed by Wenson Hsieh.
2211
2212         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
2213
2214 2018-08-27  Justin Fan  <justin_fan@apple.com>
2215
2216         Add Justin Fan to list of WebKit contributors
2217         https://bugs.webkit.org/show_bug.cgi?id=184431
2218
2219         * Scripts/webkitpy/common/config/contributors.json:
2220
2221 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
2222
2223         Convert timeout values in WebKitTestRunner to WTF::Seconds
2224         https://bugs.webkit.org/show_bug.cgi?id=188987
2225
2226         Reviewed by Ryosuke Niwa.
2227         
2228         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
2229         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
2230         using integers, convert to and from milliseconds.
2231         
2232         Also do some #pragma once, and initializer cleanup.
2233
2234         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2235         (WTR::InjectedBundle::didReceiveMessageToPage):
2236         (WTR::InjectedBundle::beginTesting):
2237         (WTR::InjectedBundle::InjectedBundle): Deleted.
2238         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
2239         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2240         (WTR::TestRunner::timeout):
2241         (WTR::TestRunner::setCustomTimeout):
2242         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
2243         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2244         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
2245         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
2246         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2247         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
2248         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2249         * WebKitTestRunner/TestController.cpp:
2250         (WTR::TestController::TestController):
2251         (WTR::parseInputLine):
2252         (WTR::TestController::runTest):
2253         (WTR::TestController::runUntil):
2254         (WTR::TestController::didReceiveMessageFromInjectedBundle):
2255         * WebKitTestRunner/TestController.h:
2256         * WebKitTestRunner/TestInvocation.cpp:
2257         (WTR::TestInvocation::shortTimeout const):
2258         (WTR::TestInvocation::createTestSettingsDictionary):
2259         * WebKitTestRunner/TestInvocation.h:
2260         * WebKitTestRunner/TestOptions.h:
2261         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2262         (WTR::TestController::platformRunUntil):
2263         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
2264         (WTR::TestController::platformRunUntil):
2265         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2266         (WTR::TestController::platformRunUntil):
2267
2268 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
2269
2270         Convert timeout values in WebKitTestRunner to WTF::Seconds
2271         https://bugs.webkit.org/show_bug.cgi?id=188987
2272
2273         Reviewed by Ryosuke Niwa.
2274         
2275         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
2276         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
2277         using integers, convert to and from milliseconds.
2278         
2279         Also do some #pragma once, and initializer cleanup.
2280
2281         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2282         (WTR::InjectedBundle::didReceiveMessageToPage):
2283         (WTR::InjectedBundle::beginTesting):
2284         (WTR::InjectedBundle::InjectedBundle): Deleted.
2285         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
2286         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2287         (WTR::TestRunner::timeout):
2288         (WTR::TestRunner::setCustomTimeout):
2289         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
2290         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2291         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
2292         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
2293         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2294         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
2295         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
2296         * WebKitTestRunner/TestController.cpp:
2297         (WTR::TestController::TestController):
2298         (WTR::parseInputLine):
2299         (WTR::TestController::runTest):
2300         (WTR::TestController::runUntil):
2301         (WTR::TestController::didReceiveMessageFromInjectedBundle):
2302         * WebKitTestRunner/TestController.h:
2303         * WebKitTestRunner/TestInvocation.cpp:
2304         (WTR::TestInvocation::shortTimeout const):
2305         (WTR::TestInvocation::createTestSettingsDictionary):
2306         * WebKitTestRunner/TestInvocation.h:
2307         * WebKitTestRunner/TestOptions.h:
2308         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2309         (WTR::TestController::platformRunUntil):
2310         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
2311         (WTR::TestController::platformRunUntil):
2312         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2313         (WTR::TestController::platformRunUntil):
2314
2315 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2316
2317         REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
2318         https://bugs.webkit.org/show_bug.cgi?id=189002
2319
2320         Reviewed by Tim Horton.
2321
2322         * TestWebKitAPI/Tests/WebKit/WillLoad.cpp:
2323         (TestWebKitAPI::TEST_F):
2324
2325 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2326
2327         [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory
2328         https://bugs.webkit.org/show_bug.cgi?id=188903
2329         <rdar://problem/43702993>
2330
2331         Reviewed by Tim Horton.
2332
2333         Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in
2334         both iOS and macOS:
2335         •       Dropping a folder as an attachment element, and then moving that attachment element in the document by
2336                 dragging and dropping.
2337         •       Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more
2338                 _WKAttachment SPI to swap the attachments' backing file wrappers.
2339
2340         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2341         (runTestWithTemporaryFolder):
2342
2343         Add a helper function to run a test with a new folder path, created in the temporary directory and populated
2344         with some sample content. This folder is deleted after running the test.
2345
2346         (simulateFolderDragWithURL):
2347
2348         Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source
2349         external to the web view.
2350
2351         (platformCopyRichTextWithMultipleAttachments):
2352         (platformCopyRichTextWithImage):
2353         (platformCopyPNG):
2354         (TestWebKitAPI::TEST):
2355
2356         Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically,
2357         ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would
2358         preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but
2359         this quirk is no longer supported.
2360
2361         Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC.
2362
2363         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2364
2365         Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient
2366         when using the same DragAndDropSimulator to perform multiple drags in a single test.
2367
2368         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2369         (-[DragAndDropSimulator clearExternalDragInformation]):
2370         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2371         (-[DragAndDropSimulator clearExternalDragInformation]):
2372
2373 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2374
2375         Translate 4 tests using WKPageLoaderClient to ObjC
2376         https://bugs.webkit.org/show_bug.cgi?id=188827
2377
2378         Reviewed by Tim Horton.
2379
2380         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
2381         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
2382         willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
2383         bundle functionality any more.
2384
2385         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2386         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
2387         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
2388         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
2389         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
2390         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
2391         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
2392         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
2393         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2394         (TestWebKitAPI::TEST):
2395         (): Deleted.
2396         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2397         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2398         (TestWebKitAPI::setPageLoaderClient): Deleted.
2399         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
2400         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
2401         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2402         (TestWebKitAPI::TEST):
2403         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
2404         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2405         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2406         (TestWebKitAPI::setInjectedBundleClient): Deleted.
2407         (TestWebKitAPI::setPageLoaderClient): Deleted.
2408         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
2409         (-[SessionStateDelegate webView:didFinishNavigation:]):
2410         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
2411         (TestWebKitAPI::createSessionStateData):
2412         (TestWebKitAPI::TEST):
2413         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2414         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
2415         (TestWebKitAPI::setPageLoaderClient): Deleted.
2416         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
2417         (-[BackForwardClient webView:didFinishNavigation:]):
2418         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
2419         (TestWebKitAPI::TEST):
2420         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2421         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
2422         (TestWebKitAPI::setPageLoaderClient): Deleted.
2423
2424 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2425
2426         [Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project
2427         https://bugs.webkit.org/show_bug.cgi?id=188989
2428
2429         Reviewed by Andy Estes.
2430
2431         Move this into the Tests/WebKit/Resources group in the project.
2432
2433         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2434
2435 2018-08-27  Thomas Denney  <tdenney@apple.com>
2436
2437         Avoid an exception in the interactive interpreter
2438         https://bugs.webkit.org/show_bug.cgi?id=188991
2439
2440         Reviewed by Myles C. Maxfield.
2441
2442         * WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a
2443         local variable
2444
2445 2018-08-27  Thomas Denney  <tdenney@apple.com>
2446
2447         Allow new vector types to work with the interactive interpreter
2448         https://bugs.webkit.org/show_bug.cgi?id=188988
2449
2450         Reviewed by Myles C. Maxfield.
2451
2452         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
2453         (FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not
2454         unncessarily visit the type arguments of a TypeRef, as by this point
2455         there are none that are relevant.
2456         * WebGPUShadingLanguageRI/Intrinsics.js:
2457         (Intrinsics): Treat VectorType as a primitive type.
2458
2459 2018-08-27  Keith Rollin  <krollin@apple.com>
2460
2461         Build system support for LTO
2462         https://bugs.webkit.org/show_bug.cgi?id=187785
2463         <rdar://problem/42353132>
2464
2465         Reviewed by Dan Bernstein.
2466
2467         Add tools/scripts support for controlling LTO builds.
2468
2469         * Scripts/build-webkit: Add --lto-mode={none,thin,full}.
2470         * Scripts/set-webkit-configuration: Add support for saving LTO
2471         configuration to WebKitBuild/LTO.
2472         * Scripts/webkitdirs.pm: Add support for reading configuration from
2473         WebKitBuild/LTO and providing it to xcodebuild.
2474         (determineLTOMode):
2475         (ltoMode):
2476         (XcodeOptions):
2477
2478 2018-08-27  Daniel Bates  <dabates@apple.com>
2479
2480         lldb-webkit: Pretty-print OptionSet
2481         https://bugs.webkit.org/show_bug.cgi?id=188936
2482
2483         Reviewed by Simon Fraser.
2484
2485         Add LLDB formatters to pretty-print an OptionSet.
2486
2487         * lldb/lldbWebKitTester/main.cpp:
2488         (testSummaryProviders):
2489         * lldb/lldb_webkit.py:
2490         (__lldb_init_module):
2491         (__lldb_init_module.lldb_webkit):
2492         (WTFOptionSet_SummaryProvider):
2493         (WTFOptionSetProvider):
2494         (WTFOptionSetProvider.__init__):
2495         (WTFOptionSetProvider.has_children):
2496         (WTFOptionSetProvider.num_children):
2497         (WTFOptionSetProvider.get_child_index):
2498         (WTFOptionSetProvider.get_child_at_index):
2499         (WTFOptionSetProvider.update):
2500         * lldb/lldb_webkit_unittest.py:
2501         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
2502         (TestSummaryProviders):
2503         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty):
2504         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple):
2505         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty):
2506         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple):
2507
2508 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2509
2510         [Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose
2511         https://bugs.webkit.org/show_bug.cgi?id=188957
2512         <rdar://problem/43737715>
2513
2514         Reviewed by Darin Adler.
2515
2516         Add a new API test to verify that pasting a web archive containing several image elements with alt attributes
2517         generates _WKAttachments whose names reflect those alt attributes.
2518
2519         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2520         (testGIFFileURL):
2521         (testGIFData):
2522         (TestWebKitAPI::TEST):
2523
2524 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2525
2526         Unreviewed, rolling out r235367.
2527
2528         Broke iOS build.
2529
2530         Reverted changeset:
2531
2532         "Translate 4 tests using WKPageLoaderClient to ObjC"
2533         https://bugs.webkit.org/show_bug.cgi?id=188827
2534         https://trac.webkit.org/changeset/235367
2535
2536 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2537
2538         Fix GTK build.
2539
2540         * TestWebKitAPI/CMakeLists.txt:
2541
2542 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2543
2544         Fix iOS build.
2545
2546         * TestWebKitAPI/PlatformWebView.h:
2547
2548 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2549
2550         Translate 4 tests using WKPageLoaderClient to ObjC
2551         https://bugs.webkit.org/show_bug.cgi?id=188827
2552
2553         Reviewed by Tim Horton.
2554
2555         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
2556         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
2557         willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
2558         bundle functionality any more.
2559
2560         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2561         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
2562         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
2563         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
2564         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
2565         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
2566         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
2567         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
2568         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2569         (TestWebKitAPI::TEST):
2570         (): Deleted.
2571         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2572         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2573         (TestWebKitAPI::setPageLoaderClient): Deleted.
2574         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
2575         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
2576         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2577         (TestWebKitAPI::TEST):
2578         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
2579         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2580         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2581         (TestWebKitAPI::setInjectedBundleClient): Deleted.
2582         (TestWebKitAPI::setPageLoaderClient): Deleted.
2583         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
2584         (-[SessionStateDelegate webView:didFinishNavigation:]):
2585         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
2586         (TestWebKitAPI::createSessionStateData):
2587         (TestWebKitAPI::TEST):
2588         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2589         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
2590         (TestWebKitAPI::setPageLoaderClient): Deleted.
2591         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
2592         (-[BackForwardClient webView:didFinishNavigation:]):
2593         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
2594         (TestWebKitAPI::TEST):
2595         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2596         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
2597         (TestWebKitAPI::setPageLoaderClient): Deleted.
2598
2599 2018-08-27  Keith Miller  <keith_miller@apple.com>
2600
2601         test262-runner -s --test-only should replace test results
2602         https://bugs.webkit.org/show_bug.cgi?id=188450
2603
2604         Reviewed by Michael Saboff.
2605
2606         * Scripts/test262/Runner.pm:
2607         (main):
2608         (SetFailureForTest):
2609         (UpdateResults):
2610
2611 2018-08-26  Sam Weinig  <sam@webkit.org>
2612
2613         Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
2614         https://bugs.webkit.org/show_bug.cgi?id=188958
2615
2616         Reviewed by Anders Carlsson.
2617
2618         * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
2619         Update test protocol to have inheritance.
2620
2621 2018-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2622
2623         [Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments
2624         https://bugs.webkit.org/show_bug.cgi?id=188933
2625         <rdar://problem/43699724>
2626
2627         Reviewed by Darin Adler.
2628
2629         Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new
2630         tests. These new tests exercise the following cases:
2631         •       Inserting and removing newlines before an inline image with an attachment element does not cause new
2632                 _WKAttachments to be created and destroyed.
2633         •       Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI
2634                 process with the original _WKAttachment.
2635         •       A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to
2636                 lose a _WKAttachment.
2637
2638         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2639         (-[TestWKWebView expectElementCount:tagName:]):
2640         (TestWebKitAPI::TEST):
2641
2642         Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted
2643         as image elements, but still have associated attachment elements whose attachment identifiers (observed via
2644         script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process.
2645
2646         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2647         (-[DragAndDropSimulator runFrom:to:]):
2648         (-[DragAndDropSimulator continueDragSession]):
2649         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2650
2651         Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning
2652         execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't
2653         flaky, due to how the promised data is retrieved asynchronously when performing the drop.
2654
2655         (-[DragAndDropSimulator _webView:didPerformDragOperation:]):
2656
2657 2018-08-26  Lucas Forschler  <lforschler@apple.com>
2658
2659         Open svn.webkit.org for commits.
2660
2661 2018-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2662
2663         Unreviewed test fix after r235249
2664         https://bugs.webkit.org/show_bug.cgi?id=178981
2665
2666         * WebGPUShadingLanguageRI/Test.js:
2667
2668 2018-08-24  Alex Christensen  <achristensen@webkit.org>
2669
2670         Introduce _WKInspector
2671         https://bugs.webkit.org/show_bug.cgi?id=188923
2672         <rdar://problem/34657861>
2673
2674         Reviewed by Brian Burg.
2675
2676         * MiniBrowser/mac/WK2BrowserWindowController.m:
2677         (-[WK2BrowserWindowController validateMenuItem:]):
2678         (-[WK2BrowserWindowController showHideWebInspector:]):
2679
2680 2018-08-24  Jonathan Bedard  <jbedard@apple.com>
2681
2682         Fix handling of iOS minor versions in default_baseline_search_path
2683         https://bugs.webkit.org/show_bug.cgi?id=188902
2684
2685         Reviewed by Aakash Jain.
2686
2687         * Scripts/webkitpy/port/ios.py:
2688         (IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat
2689         it as a the CURRENT_VERSION.
2690
2691 2018-08-24  Antti Koivisto  <antti@apple.com>
2692
2693         Allow creating WeakPtrs to const objects
2694         https://bugs.webkit.org/show_bug.cgi?id=188785
2695
2696         Reviewed by Geoff Garen.
2697
2698         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
2699         (TestWebKitAPI::Base::weakPtrFactory const):
2700         (TestWebKitAPI::TEST):
2701         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
2702
2703 2018-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2704
2705         [GTK][WPE] Add API to inject/register user content in isolated worlds
2706         https://bugs.webkit.org/show_bug.cgi?id=188883
2707
2708         Reviewed by Michael Catanzaro.
2709
2710         Add test cases for the new API.
2711
2712         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
2713         (isStyleSheetInjectedForURLAtPath):
2714         (isScriptInjectedForURLAtPath):
2715         (testUserContentManagerInjectedStyleSheet):
2716         (testUserContentManagerInjectedScript):
2717         (UserScriptMessageTest::registerHandler):
2718         (UserScriptMessageTest::unregisterHandler):
2719         (UserScriptMessageTest::postMessageAndWaitUntilReceived):
2720         (testUserContentManagerScriptMessageInWorldReceived):
2721         (beforeAll):
2722
2723 2018-08-23  Simon Fraser  <simon.fraser@apple.com>
2724
2725         Add support for dumping GC heap snapshots, and a viewer
2726         https://bugs.webkit.org/show_bug.cgi?id=186416
2727
2728         Reviewed by Joseph Pecoraro.
2729
2730         Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this
2731         page for inspection (or set via the 'filename' URL parameter).
2732
2733         For now, this page shows all objects, all roots, and the shortest path from a root
2734         to all HTMLDocuments and Windows.
2735
2736         * GCHeapInspector/gc-heap-inspector.html: Added.
2737         * GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js.
2738         * GCHeapInspector/script/interface.js: Added.
2739
2740 2018-08-23  Alex Christensen  <achristensen@webkit.org>
2741
2742         Add new _webViewRequestPointerLock SPI with a completionHandler
2743         https://bugs.webkit.org/show_bug.cgi?id=188907
2744         <rdar://problem/35871109>
2745
2746         Reviewed by Andy Estes.
2747
2748         * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
2749         (-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]):
2750         (-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2751         (TEST):
2752
2753 2018-08-23  David Fenton  <david_fenton@apple.com>
2754
2755         Unreviewed, rolling out r235129.
2756
2757         broke internal builds
2758
2759         Reverted changeset:
2760
2761         "Allow creating WeakPtrs to const objects"
2762         https://bugs.webkit.org/show_bug.cgi?id=188785
2763         https://trac.webkit.org/changeset/235129
2764
2765 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
2766
2767         API tests should output json results
2768         https://bugs.webkit.org/show_bug.cgi?id=188869
2769         <rdar://problem/43615652>
2770
2771         Reviewed by Aakash Jain.
2772
2773         JSON output for API tests is of the form:
2774             {
2775                 "Failed": [{"name": <test name>, "output": <test log>}],
2776                 "Timedout": [...],
2777                 "Skipped": [...],
2778                 "Crashed": [...]
2779             }
2780         Tests which are successful are not displayed in the json output.
2781
2782         * Scripts/webkitpy/api_tests/manager.py:
2783         (Manager.run): Print test results to provided file as a json dictionary.
2784         * Scripts/webkitpy/api_tests/run_api_tests.py:
2785         (run): Pass json option.
2786         (parse_args): Add --json-output flag.
2787
2788 2018-08-23  Andy Estes  <aestes@apple.com>
2789
2790         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
2791         https://bugs.webkit.org/show_bug.cgi?id=188829
2792
2793         Reviewed by Tim Horton.
2794
2795         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2796
2797 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
2798
2799         [WSL] Ternary expressions appear to be unimplemented
2800         https://bugs.webkit.org/show_bug.cgi?id=178981
2801
2802         Reviewed by Saam Barati.
2803
2804         Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e)
2805         is parsed as (a ? b : (c ? d : e)).
2806
2807         * WebGPUShadingLanguageRI/All.js:
2808         * WebGPUShadingLanguageRI/Checker.js:
2809         (Checker.prototype.visitTernaryExpression):
2810         * WebGPUShadingLanguageRI/Evaluator.js:
2811         (Evaluator.prototype.visitTernaryExpression):
2812         * WebGPUShadingLanguageRI/NormalUsePropertyResolver.js:
2813         (NormalUsePropertyResolver.prototype.visitTernaryExpression):
2814         (NormalUsePropertyResolver):
2815         * WebGPUShadingLanguageRI/Parse.js:
2816         (parsePossibleTernaryConditional):
2817         * WebGPUShadingLanguageRI/PropertyResolver.js:
2818         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression):
2819         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
2820         (PropertyResolver.prototype._visitRValuesWithinLValue):
2821         * WebGPUShadingLanguageRI/Rewriter.js:
2822         (Rewriter.prototype.visitTernaryExpression):
2823         * WebGPUShadingLanguageRI/SPIRV.html:
2824         * WebGPUShadingLanguageRI/Test.html:
2825         * WebGPUShadingLanguageRI/Test.js:
2826         * WebGPUShadingLanguageRI/Visitor.js:
2827         (Visitor.prototype.visitProtocolDecl):
2828         * WebGPUShadingLanguageRI/index.html:
2829
2830 2018-08-22  Ryosuke Niwa  <rniwa@webkit.org>
2831
2832         Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
2833         https://bugs.webkit.org/show_bug.cgi?id=188880
2834
2835         Reviewed by Saam Barati.
2836
2837         Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
2838         were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
2839         test WebKit's behavior in layout tests.
2840
2841         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2842         (WTR::TestRunner::terminateNetworkProcess):
2843         (WTR::TestRunner::terminateServiceWorkerProcess):
2844         (WTR::TestRunner::terminateStorageProcess):
2845         * WebKitTestRunner/TestInvocation.cpp:
2846         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2847         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2848
2849 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
2850
2851         [WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
2852         https://bugs.webkit.org/show_bug.cgi?id=188773
2853
2854         Reviewed by Filip Pizlo.
2855
2856         Before this patch, it was impossible to represent "native typedef vector<float, 4>" because NativeTypes couldn't have
2857         typeArguments.
2858
2859         Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like
2860         "vector<int, 3>" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then,
2861         there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could
2862         be uniquely identified by name. That name was then matched to the string-only NativeType name.
2863
2864         This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D<float4>) because they don't have any
2865         natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D<float4> is
2866         the same as Texture2D<vector<float, 4>>. Similarly, an author may wish to typedef float4 to a different name.
2867
2868         It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner
2869         type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D<float4> because that
2870         information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to
2871         implement in the future.
2872
2873         So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have
2874         typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each
2875         TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field
2876         which had been set - this was true even before this patch.
2877
2878         This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types
2879         that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the
2880         NameContext for the appropriate array. This is the same way that function resolution works.
2881
2882         We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is
2883         an okay start. This works just about the same way that function overload resolution works. 
2884
2885         * WebGPUShadingLanguageRI/All.js:
2886         * WebGPUShadingLanguageRI/CallExpression.js:
2887         (CallExpression.prototype.resolve):
2888         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types
2889         have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check.
2890         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
2891         (checkTypesWithArguments.TypeWithArgumentsChecker):
2892         (checkTypesWithArguments):
2893         * WebGPUShadingLanguageRI/Checker.js:
2894         (Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with
2895         typeArguments share names, this has to be updated to map strings to arrays for these types.
2896         (Checker.prototype.visitTypeRef):
2897         * WebGPUShadingLanguageRI/InferTypesForCall.js:
2898         (inferTypesForCall): Don't know why this was here.
2899         (inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments.
2900         * WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they
2901         don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This
2902         moves in the direction of matching the standard library in the spec.
2903         (Intrinsics.cast):
2904         (Intrinsics.bitwiseCast):
2905         (Intrinsics.castToHalf):
2906         (Intrinsics.):
2907         (Intrinsics):
2908         * WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays.
2909         (NameContext.prototype.add):
2910         (NameContext.prototype.get let):
2911         (NameContext.underlyingThings.prototype.else):
2912         (NameContext.prototype.Symbol.iterator):
2913         (NameContext):
2914         * WebGPUShadingLanguageRI/NameResolver.js:
2915         (NameResolver.prototype.visitTypeRef): Call TypeRef.resolve().
2916         (NameResolver.prototype.visitCallExpression):
2917         (NameResolver):
2918         (NameResolver.prototype.visitVectorType): Deleted.
2919         * WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now.
2920         (NativeType):
2921         (NativeType.prototype.get typeArguments):
2922         (NativeType.prototype.toString):
2923         (NativeType.create):
2924         * WebGPUShadingLanguageRI/Prepare.js:
2925         (let.prepare):
2926         * WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays.
2927         (Program.prototype.add):
2928         (Program.prototype.toString):
2929         (Program):
2930         * WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed.
2931         * WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays.
2932         (resolveNamesInTypes):
2933         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments.
2934         * WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays.
2935         (resolveTypeDefsInTypes):
2936         * WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments.
2937         (Rewriter.prototype.visitTypeRef):
2938         (Rewriter.prototype.visitVectorType):
2939         (Rewriter):
2940         * WebGPUShadingLanguageRI/SPIRV.html:
2941         * WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics.
2942         (bool.operator):
2943         * WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments.
2944         (StatementCloner.prototype.visitNativeType):
2945         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too.
2946         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType):
2947         (synthesizeDefaultConstructorOperator.FindAllTypes):
2948         (synthesizeDefaultConstructorOperator):
2949         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef.
2950         (synthesizeStructAccessors.createTypeRef):
2951         * WebGPUShadingLanguageRI/Test.html:
2952         * WebGPUShadingLanguageRI/Test.js:
2953         * WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js.
2954         (TypeOverloadResolutionFailure):
2955         (TypeOverloadResolutionFailure.prototype.get type):
2956         (TypeOverloadResolutionFailure.prototype.get reason):
2957         (TypeOverloadResolutionFailure.prototype.toString):
2958         * WebGPUShadingLanguageRI/TypeRef.js:
2959         (TypeRef.wrap):
2960         (TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this.
2961         (TypeRef.prototype.toString):
2962         (TypeRef):
2963         (TypeRef.instantiate): Deleted.
2964         * WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This
2965         adds this facility back into the compiler (it was previously deleted).
2966         (UnificationContext.prototype.verify):
2967         * WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments.
2968         (VectorType):
2969         (VectorType.prototype.get elementType):
2970         (VectorType.prototype.get numElements):
2971         (VectorType.prototype.get numElementsValue):
2972         (VectorType.prototype.toString):
2973         * WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments.
2974         (Visitor.prototype.visitTypeRef):
2975         (Visitor.prototype.visitNativeType):
2976         (Visitor.prototype.visitVectorType):
2977         (Visitor):
2978         * WebGPUShadingLanguageRI/index.html:
2979
2980 2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2981
2982         [Attachment Support] Attachment elements don't appear in drag images on macOS
2983         https://bugs.webkit.org/show_bug.cgi?id=188823
2984         <rdar://problem/43616378>
2985
2986         Reviewed by Tim Horton.
2987
2988         Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
2989         attachment element in macOS is not completely transparent.
2990
2991         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2992         (isCompletelyTransparent):
2993         (TestWebKitAPI::TEST):
2994
2995 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
2996
2997         Explain test name matching in run-api-tests help
2998         https://bugs.webkit.org/show_bug.cgi?id=188280
2999
3000         Reviewed by Ryosuke Niwa.
3001
3002         Improve the run-api-tests help message to explain how test
3003         name matching works.
3004
3005         * Scripts/webkitpy/api_tests/run_api_tests.py:
3006         (parse_args):
3007         * Scripts/webkitpy/port/base.py:
3008         (Port):
3009         (Port.path_to_api_test_binaries): Make binary names a globally accessible array.
3010         * Scripts/webkitpy/port/win.py:
3011         (WinPort):
3012         (WinPort.path_to_api_test_binaries): Ditto.
3013
3014 2018-08-23  Youenn Fablet  <youenn@apple.com>
3015
3016         Use "wpt serve" to launch WPT server
3017         https://bugs.webkit.org/show_bug.cgi?id=188848
3018
3019         Reviewed by Ryosuke Niwa.
3020
3021         Use "wpt serve" provided by WPT instead of using our custom launcher.
3022         This simplifies things and will avoid future breakage.
3023         Further simplify web_platform_test_server.py by removing no longer needed actions.
3024         - Do not copy files but use alias
3025         - Do not kill main pid, which leaves subprocesses alive, use interrupt instead.
3026         - Stop enumerating subprocess pids.
3027
3028         * Scripts/webkitpy/common/system/executive_mock.py:
3029         (MockExecutive.interrupt):
3030         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed.
3031         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
3032         (WebPlatformTestServer.__init__):
3033         (WebPlatformTestServer.ports_to_forward):
3034         (WebPlatformTestServer._prepare_config):
3035         (WebPlatformTestServer._spawn_process):
3036         (WebPlatformTestServer._stop_running_server):
3037
3038 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
3039
3040         run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests 
3041         https://bugs.webkit.org/show_bug.cgi?id=188262
3042
3043         Reviewed by Ryosuke Niwa.
3044
3045         * Scripts/webkitpy/api_tests/run_api_tests.py:
3046         (parse_args):
3047
3048 2018-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3049
3050         [Attachment Support] Support dragging attachment elements out as files on macOS
3051         https://bugs.webkit.org/show_bug.cgi?id=181294
3052         <rdar://problem/36298801>
3053
3054         Reviewed by Tim Horton.
3055
3056         Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This
3057         enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment
3058         elements.
3059
3060         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3061         (-[TestWKWebView attachmentElementMidPoint]):
3062
3063         Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first
3064         attachment element in the document.
3065
3066         (TestWebKitAPI::TEST):
3067
3068         Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be
3069         used to write attachment data to a path on disk. Additionally, refactor an existing API test,
3070         MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move
3071         attachment elements around in a document by using drag and drop.
3072
3073         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
3074         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
3075         (-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]):
3076         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
3077         (-[DragAndDropSimulator dealloc]):
3078         (-[DragAndDropSimulator runFrom:to:]):
3079         (-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]):
3080
3081         Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins
3082         the main runloop until dragging ends, this version returns execution to the web view and schedules dragging
3083         updates asynchronously. This matches AppKit behavior.
3084
3085         (-[DragAndDropSimulator continueDragSession]):
3086
3087         Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to
3088         itself until the progress reaches 1.
3089
3090         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
3091         (-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]):
3092
3093         Pull out common logic for creating a new TestDraggingInfo after starting a drag.
3094
3095         (-[DragAndDropSimulator insertedAttachments]):
3096         (-[DragAndDropSimulator removedAttachments]):
3097         (-[DragAndDropSimulator draggingSession]):
3098         (-[DragAndDropSimulator receivePromisedFiles]):
3099
3100         Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These
3101         files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes.
3102
3103         (-[DragAndDropSimulator endDataTransfer]):
3104
3105         Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform.
3106
3107         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
3108         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
3109
3110         Implement method stubs to keep track of inserted or removed attachments while simulating a drag.
3111
3112 2018-08-22  Aditya Keerthi  <akeerthi@apple.com>
3113
3114         [iOS] Add support for the inputmode attribute
3115         https://bugs.webkit.org/show_bug.cgi?id=183621
3116
3117         Reviewed by Tim Horton.
3118
3119         Added an API test to verify that the correct UIKeyboardType is set depending on
3120         the type, inputmode, and pattern specified for an input field.
3121
3122         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3123         (TestWebKitAPI::TEST):
3124         * TestWebKitAPI/ios/UIKitSPI.h:
3125
3126 2018-08-22  Alex Christensen  <achristensen@webkit.org>
3127
3128         Fix API test on Sierra after r235139
3129         https://bugs.webkit.org/show_bug.cgi?id=188810
3130
3131         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
3132         (TEST):
3133
3134 2018-08-22  David Kilzer  <ddkilzer@apple.com>
3135
3136         Move files in WebCore project to match Xcode folder structure
3137         <https://webkit.org/b/188851>
3138
3139         Reviewed by Tim Horton.
3140
3141         * Scripts/extract-localizable-strings:
3142         * Scripts/update-webkit-localizable-strings:
3143         - Update to match new location of extract-localizable-strings.pl.
3144
3145 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3146
3147         Roll out r235139 and r235146
3148         https://bugs.webkit.org/show_bug.cgi?id=188805
3149
3150         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3151         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
3152
3153 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3154
3155         [Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation
3156         https://bugs.webkit.org/show_bug.cgi?id=188715
3157         <rdar://problem/43541790>
3158
3159         Reviewed by Tim Horton.
3160
3161         Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe
3162         navigation, and (2) the UI client is notified of attachment removal upon web content process termination.
3163
3164         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3165         (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
3166         (TestWebKitAPI::TEST):
3167
3168 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3169
3170         Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient
3171         https://bugs.webkit.org/show_bug.cgi?id=188821
3172
3173         Reviewed by Simon Fraser.
3174
3175         * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
3176         (TestWebKitAPI::didLayout):
3177         (TestWebKitAPI::TEST):
3178
3179 2018-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3180
3181         [WHLSL] Call expressions shouldn't have type arguments
3182         https://bugs.webkit.org/show_bug.cgi?id=188770
3183
3184         Reviewed by Filip Pizlo.
3185
3186         Call expressions only had type arguments for casts, becuase native types can have type arguments.
3187         However, instead of putting those type arguments on the CallExpression, we should parse the casted
3188         type as a real type and not as an identifier, which puts the type arguments in the TypeRef.
3189
3190         Test: casts
3191
3192         * WebGPUShadingLanguageRI/CallExpression.js:
3193         (CallExpression):
3194         (CallExpression.prototype.get name):
3195         (CallExpression.resolve):
3196         (CallExpression.prototype.get typeArguments): Deleted.
3197         (CallExpression.prototype.becomeCast): Deleted.
3198         * WebGPUShadingLanguageRI/NameResolver.js:
3199         (NameResolver.prototype.visitCallExpression):
3200         * WebGPUShadingLanguageRI/Parse.js:
3201         (parseConstexpr):
3202         (parseTypeDef):
3203         (parseLeftOperatorCall):
3204         (parseCallExpression.let.parseArguments):
3205         (parsePossiblePrefix):
3206         (parsePossibleRelationalEquality):
3207         (parseLeftLogicalExpression):
3208         (parseIfStatement):
3209         (parseWhile):
3210         (parseFor):
3211         (parseDo):
3212         * WebGPUShadingLanguageRI/RemoveTypeArguments.js:
3213         * WebGPUShadingLanguageRI/Rewriter.js:
3214         (Rewriter.prototype.visitCallExpression):
3215
3216 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3217
3218         Translate WebKit.LimitTitleSize API test into ObjC
3219         https://bugs.webkit.org/show_bug.cgi?id=188810
3220
3221         Reviewed by Andy Estes.
3222
3223         It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO.
3224         I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient.
3225
3226         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3227         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed.
3228         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
3229         (TEST):
3230         (-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]):
3231         (TestWebKitAPI::TEST): Deleted.
3232
3233 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3234
3235         Remove unused shouldKeepCurrentBackForwardListItemInList check
3236         https://bugs.webkit.org/show_bug.cgi?id=188805
3237
3238         Reviewed by Andy Estes.
3239
3240         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3241         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed.
3242
3243 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3244
3245         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
3246         https://bugs.webkit.org/show_bug.cgi?id=188813
3247
3248         Reviewed by Andy Estes.
3249
3250         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp:
3251         (TestWebKitAPI::didLayout):
3252         (TestWebKitAPI::setPageLoaderClient):
3253         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
3254         (TestWebKitAPI::didFinishNavigation):
3255         (TestWebKitAPI::didLayout):
3256         (TestWebKitAPI::setPageLoaderClient):
3257         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3258         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp:
3259         (TestWebKitAPI::didLayout):
3260         (TestWebKitAPI::setPageLoaderClient):
3261
3262 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3263
3264         [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData
3265         https://bugs.webkit.org/show_bug.cgi?id=188496
3266         <rdar://problem/43216836>
3267
3268         Reviewed by Tim Horton.
3269
3270         Adjusts existing attachment API tests. See below for more detail.
3271
3272         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3273         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
3274         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
3275         (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
3276         (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
3277
3278         Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or
3279         update an existing attachment with a file wrapper.
3280
3281         (-[_WKAttachment expectRequestedDataToBe:]):
3282         (TestWebKitAPI::TEST):
3283
3284         Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data.
3285         Also augment an existing test to check that an attachment element which has been copied and pasted within the
3286         same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are
3287         backed by the same NSFileWrapper that was originally used to insert the attachment.
3288
3289         Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled
3290         editable area inserts attachment elements into the document and notifies the UI client with the inserted
3291         attachment data.
3292
3293         (-[_WKAttachment synchronouslyRequestInfo:]): Deleted.
3294         (-[_WKAttachment synchronouslyRequestData:]): Deleted.
3295         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
3296         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
3297
3298         Move off of -_webView:didInsertAttachment:.
3299
3300         (-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted.
3301
3302 2018-08-21  David Kilzer  <ddkilzer@apple.com>
3303
3304         sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name
3305         <https://webkit.org/b/188755>
3306
3307         Reviewed by Andy Estes.
3308
3309         * Scripts/sort-Xcode-project-file: Fix regular expression to
3310         make `mainGroup` name optional.
3311
3312 2018-08-21  Andy VanWagoner  <andy@vanwagoner.family>
3313
3314         Unreviewed, add myself to committers list.
3315
3316         * Scripts/webkitpy/common/config/contributors.json:
3317
3318 2018-08-21  Antti Koivisto  <antti@apple.com>
3319
3320         Allow creating WeakPtrs to const objects
3321         https://bugs.webkit.org/show_bug.cgi?id=188785
3322
3323         Reviewed by Geoffrey Garen.
3324
3325         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
3326         (TestWebKitAPI::Base::weakPtrFactory const):
3327         (TestWebKitAPI::TEST):
3328         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
3329
3330 2018-08-21  Per Arne Vollan  <pvollan@apple.com>
3331
3332         [WebGL] Contexts are not updated when display configuration changed.
3333         https://bugs.webkit.org/show_bug.cgi?id=188750
3334
3335         Reviewed by Brent Fulgham.
3336
3337         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3338         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3339         (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
3340         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3341         * WebKitTestRunner/TestController.cpp:
3342         (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
3343         * WebKitTestRunner/TestController.h:
3344         * WebKitTestRunner/TestInvocation.cpp:
3345         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3346
3347 2018-08-21  John Wilander  <wilander@apple.com>
3348
3349         Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
3350         https://bugs.webkit.org/show_bug.cgi?id=188757
3351         <rdar://problem/38713390>
3352
3353         Reviewed by Alex Christensen.
3354
3355         These changes add the new WebKitTestRunner function
3356         isStatisticsRegisteredAsSubresourceUnder().
3357
3358         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3359         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3360         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
3361         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3362         * WebKitTestRunner/TestController.cpp:
3363         (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
3364         * WebKitTestRunner/TestController.h:
3365         * WebKitTestRunner/TestInvocation.cpp:
3366         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3367
3368 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3369
3370         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
3371         https://bugs.webkit.org/show_bug.cgi?id=188797
3372
3373         Reviewed by Tim Horton.
3374
3375         * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
3376         (TestWebKitAPI::didFinishNavigation):
3377         (TestWebKitAPI::TEST):
3378         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3379         * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
3380         (TestWebKitAPI::didSameDocumentNavigation):
3381         (TestWebKitAPI::TEST):
3382         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3383         * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
3384         (TestWebKitAPI::didFailProvisionalNavigation):
3385         (TestWebKitAPI::TEST):
3386         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
3387         * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
3388         (TestWebKitAPI::didStartProvisionalNavigation):
3389         (TestWebKitAPI::didCommitNavigation):
3390         (TestWebKitAPI::didFinishNavigation):
3391         (TestWebKitAPI::TEST):
3392         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3393         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3394         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3395         * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
3396         (TestWebKitAPI::didStartProvisionalNavigation):
3397         (TestWebKitAPI::didCommitNavigation):
3398         (TestWebKitAPI::didFinishNavigation):
3399         (TestWebKitAPI::TEST):
3400         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3401         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3402         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3403         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
3404         (TestWebKitAPI::renderingProgressDidChange):
3405         (TestWebKitAPI::TEST):
3406         (TestWebKitAPI::didLayout): Deleted.
3407         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp:
3408         (TestWebKitAPI::didFinishNavigation):
3409         (TestWebKitAPI::renderingProgressDidChange):
3410         (TestWebKitAPI::setPageLoaderClient):
3411         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3412         (TestWebKitAPI::didLayout): Deleted.
3413         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
3414         (TestWebKitAPI::State::State):
3415         (TestWebKitAPI::didStartProvisionalNavigation):
3416         (TestWebKitAPI::didCommitNavigation):
3417         (TestWebKitAPI::didFinishNavigation):
3418         (TestWebKitAPI::decidePolicyForNavigationAction):
3419         (TestWebKitAPI::decidePolicyForResponse):
3420         (TestWebKitAPI::TEST):
3421         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3422         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3423         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3424         (TestWebKitAPI::decidePolicyForNewWindowAction): Deleted.
3425         * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
3426         (TestWebKitAPI::didSameDocumentNavigation):
3427         (TestWebKitAPI::TEST):
3428         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3429         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3430         * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
3431         (TestWebKitAPI::TEST):
3432         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3433         * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
3434         (TestWebKitAPI::didFinishLoad):
3435         (TestWebKitAPI::TEST):
3436         * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp:
3437         (TestWebKitAPI::didFinishNavigation):
3438         (TestWebKitAPI::TEST):
3439         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3440         * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
3441         (TestWebKitAPI::didFinishLoad):
3442         (TestWebKitAPI::TEST):
3443         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
3444         (WebKit2_CommandBackForwardTestWKView::SetUp):
3445         (WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted.
3446
3447 2018-08-20  Alex Christensen  <achristensen@webkit.org>
3448
3449         Replace WKPageLoaderClient with WKPageNavigationClient in many API tests
3450         https://bugs.webkit.org/show_bug.cgi?id=188771
3451
3452         Reviewed by Tim Horton.
3453
3454         * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
3455         (TestWebKitAPI::didFinishNavigation):
3456         (TestWebKitAPI::TEST):
3457         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3458         * TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
3459         (TestWebKitAPI::didFinishNavigation):
3460         (TestWebKitAPI::TEST):
3461         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3462         * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
3463         (TestWebKitAPI::didFinishNavigation):
3464         (TestWebKitAPI::setPageLoaderClient):
3465         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3466         * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp:
3467         (TestWebKitAPI::TEST):
3468         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3469         * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
3470         (TestWebKitAPI::didFinishNavigation):
3471         (TestWebKitAPI::setPageLoaderClient):
3472         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3473         * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
3474         (TestWebKitAPI::didFinishNavigation):
3475         (TestWebKitAPI::setClients):
3476         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3477         * TestWebKitAPI/Tests/WebKit/Find.cpp:
3478         (TestWebKitAPI::didFinishNavigation):
3479         (TestWebKitAPI::TEST):
3480         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3481         * TestWebKitAPI/Tests/WebKit/FindMatches.mm:
3482         (TestWebKitAPI::didFinishNavigation):
3483         (TestWebKitAPI::TEST):
3484         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3485         * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
3486         (TestWebKitAPI::didFinishNavigation):
3487         (TestWebKitAPI::TEST):
3488         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3489         * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
3490         (TestWebKitAPI::didFinishNavigation):
3491         (TestWebKitAPI::TEST):
3492         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3493         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
3494         (TestWebKitAPI::didFinishNavigation):
3495         (TestWebKitAPI::TEST):
3496         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3497         * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
3498         (TestWebKitAPI::didFinishNavigation):
3499         (TestWebKitAPI::setPageLoaderClient):
3500         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3501         * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp:
3502         (TestWebKitAPI::didFinishNavigation):
3503         (TestWebKitAPI::TEST):
3504         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3505         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp:
3506         (TestWebKitAPI::didFinishLoadForFrame):
3507         * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
3508         (TestWebKitAPI::didFinishNavigation):
3509         (TestWebKitAPI::loadAlternateHTMLString):
3510         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3511         * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp:
3512         (TestWebKitAPI::didFinishNavigation):
3513         (TestWebKitAPI::TEST):
3514         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3515         * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
3516         (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
3517         (TestWebKitAPI::didFinishLoad):
3518         * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
3519         (TestWebKitAPI::didFinishNavigation):
3520         (TestWebKitAPI::setPageLoaderClient):
3521         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3522         * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp:
3523         (TestWebKitAPI::didFinishNavigation):
3524         (TestWebKitAPI::setPageLoaderClient):
3525         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3526         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
3527         (TestWebKitAPI::didFinishLoadForFrame):
3528         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
3529         (TestWebKitAPI::TEST):
3530         * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
3531         (TestWebKitAPI::TEST):
3532         * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
3533         (TestWebKitAPI::didFinishLoad):
3534         (TestWebKitAPI::TEST):
3535         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
3536         (TestWebKitAPI::didFinishNavigation):
3537         (TestWebKitAPI::setPageLoaderClient):
3538         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3539         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
3540         (TestWebKitAPI::didFinishNavigation):
3541         (TestWebKitAPI::setPageLoaderClient):
3542         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3543         * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
3544         (TestWebKitAPI::didFinishNavigation):
3545         (TestWebKitAPI::TEST):
3546         (TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted.
3547         * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:
3548         (TestWebKitAPI::didFinishNavigation):
3549         (TestWebKitAPI::TEST):
3550         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3551         * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp:
3552         (TestWebKitAPI::didFailProvisionalNavigation):
3553         (TestWebKitAPI::TEST):
3554         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
3555         * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
3556         (TestWebKitAPI::didFinishNavigation):
3557         (TestWebKitAPI::TEST):
3558         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3559         * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp:
3560         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation):
3561         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient):
3562         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted.
3563         * TestWebKitAPI/Tests/WebKit/UserMessage.cpp:
3564         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation):
3565         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient):
3566         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted.
3567         * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
3568         (TestWebKitAPI::didFinishNavigation):
3569         (TestWebKitAPI::setPageLoaderClient):
3570         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3571         * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
3572         (TestWebKitAPI::didFinishNavigation):
3573         (TestWebKitAPI::setPageLoaderClient):
3574         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3575         * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
3576         (TestWebKitAPI::didFinishNavigation):
3577         (TestWebKitAPI::setPageLoaderClient):
3578         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3579         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
3580         (TestWebKitAPI::didFinishNavigation):
3581         (TestWebKitAPI::setUpClients):
3582         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3583         * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
3584         (TestWebKitAPI::didFinishNavigation):
3585         (TestWebKitAPI::setPageLoaderClient):
3586         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3587         * TestWebKitAPI/Tests/WebKit/WebArchive.cpp:
3588         (TestWebKitAPI::didFinishNavigation):
3589         (TestWebKitAPI::TEST):
3590         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3591         * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
3592         (TestWebKitAPI::didFinishNavigation):
3593         (TestWebKitAPI::TEST):
3594         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3595         * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
3596         (TestWebKitAPI::didFinishNavigation):
3597         (TestWebKitAPI::TEST):
3598         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3599         * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
3600         (TestWebKitAPI::didFinishNavigation):
3601         (TestWebKitAPI::TEST):
3602         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3603         * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
3604         (TestWebKitAPI::didFinishNavigation):
3605         (TestWebKitAPI::TEST):
3606         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3607         * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
3608         (TestWebKitAPI::didFinishNavigation):
3609         (TestWebKitAPI::TEST):
3610         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3611         * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp:
3612         (TestWebKitAPI::didFinishNavigation):
3613         (TestWebKitAPI::TEST):
3614         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3615         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
3616         (didFinishNavigation):
3617         (TestWebKitAPI::TEST):
3618         (didFinishLoadForFrame): Deleted.
3619         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3620         (didFinishNavigation):
3621         (TestWebKitAPI::TEST):
3622         (didFinishLoadForFrame): Deleted.
3623         * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm:
3624         (TestWebKitAPI::didFinishNavigation):
3625         (TestWebKitAPI::TEST):
3626         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3627         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
3628         (TestWebKitAPI::didFinishNavigation):
3629         (TestWebKitAPI::setPageLoaderClient):
3630         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3631
3632 2018-08-21  Adrian Perez de Castro  <aperez@igalia.com>
3633
3634         [WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0
3635         https://bugs.webkit.org/show_bug.cgi?id=188782
3636
3637         Reviewed by Michael Catanzaro.
3638
3639         Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development
3640         environments to use version 1.0.0 of libwpe and WPEBackend-fdo.
3641
3642         * flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from
3643         release tarballs, and removed the (now unneeded) Lua and LuaJIT modules.
3644         * wpe/jhbuild.modules: Ditto.
3645
3646 2018-08-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3647
3648         [Flatpak] Update to GNOME master runtime
3649         https://bugs.webkit.org/show_bug.cgi?id=188731
3650
3651         Reviewed by Philippe Normand.
3652
3653         The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30
3654         runtime, but I don't think there's any need to stick with the stable runtime when we have
3655         the ability to pin to a particular version of the master runtime. There are also several
3656         advantages to switching to the master runtime.
3657
3658         * flatpak/files/httpd-autogen.sh: Removed.
3659         * flatpak/flatpakutils.py:
3660         (WebkitFlatpak.clean_args):
3661         * flatpak/org.webkit.GTK.yaml:
3662         * flatpak/org.webkit.WebKit.yaml:
3663         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
3664         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
3665
3666 2018-08-20  Jonathan Bedard  <jbedard@apple.com>
3667
3668         WebKitTestRunner: Add watchOS entitlements
3669         https://bugs.webkit.org/show_bug.cgi?id=188758
3670
3671         Reviewed by Tim Horton.
3672
3673         watchOS needs an additional entitlement to open up a socket for on-device testing.
3674
3675         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added.
3676         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
3677         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3678
3679 2018-08-20  Thomas Denney  <tdenney@apple.com>
3680
3681         [WHLSL] Remove generics from the interpreter
3682         https://bugs.webkit.org/show_bug.cgi?id=187988
3683
3684         Reviewed by Myles C. Maxfield.
3685
3686         This patch completely removes generic and protocol support from WHLSL
3687         whilst adding back any features that were originally implemented with
3688         generics.
3689
3690         Many of the changes in this patch just remove occurrences of type
3691         arguments and type parameters --- although there are some cases where
3692         they have been deliberately left in --- as well as removing tests only
3693         relevant to those features. These changes are not listed below.
3694
3695         * WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies
3696         * WebGPUShadingLanguageRI/AutoWrapper.js:
3697         (AutoWrapper.prototype.visitConstexprTypeParameter): Deleted.
3698         * WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in
3699         vectors have many constructors for different scalar and vector types.
3700         These were originally implemented with generics.
3701         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the
3702         equality operator for built-in vectors, again this was removed with
3703         generics.
3704         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above.
3705         Built-in vectors only support the getter and setter, and not the ander.
3706         * WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added.
3707         * WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added.
3708         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added.
3709         * WebGPUShadingLanguageRI/CallExpression.js: Adds support for
3710         instantiating functions which cannot be discovered earlier in
3711         preparation because their types are absent (specifically support for the
3712         operator &[] for array references and the length operator for array
3713         references). Previously support for these was implemented with generics.
3714         (CallExpression.resolve):
3715         (CallExpression.prototype.resolve):
3716         (CallExpression.prototype._resolveByInstantiation):
3717         (CallExpression.prototype._resolveToOperatorAnderIndexer):
3718         (CallExpression.prototype._resolveToOperatorLength):
3719         (CallExpression.prototype.resolveToOverload):
3720         (CallExpression.prototype.becomeCast):
3721         (CallExpression.prototype.toString):
3722         (CallExpression):
3723         * WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added.
3724         We support syntax like vector<int, 2>(a, b) for constructing vectors;
3725         this new preparation step resolves them to specific constructors.
3726         * WebGPUShadingLanguageRI/CallFunction.js:
3727         * WebGPUShadingLanguageRI/Checker.js:
3728         * WebGPUShadingLanguageRI/ConstexprFolder.js:
3729         * WebGPUShadingLanguageRI/CreateLiteralType.js:
3730         * WebGPUShadingLanguageRI/ExpressionFinder.js:
3731         * WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed.
3732         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
3733         * WebGPUShadingLanguageRI/Func.js:
3734         * WebGPUShadingLanguageRI/FuncDef.js:
3735         * WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted.
3736         * WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments.
3737         * WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator.
3738         * WebGPUShadingLanguageRI/Inliner.js: Ditto.
3739         * WebGPUShadingLanguageRI/Intrinsics.js:
3740         * WebGPUShadingLanguageRI/Lexer.js:
3741         * WebGPUShadingLanguageRI/LiteralTypeChecker.js:
3742         * WebGPUShadingLanguageRI/NameContext.js:
3743         (NameContext.prototype.add):
3744         (NameContext.prototype.get let):
3745         (NameContext.underlyingThings.prototype.else):
3746         (NameContext.prototype.resolveFuncOverload):
3747         * WebGPUShadingLanguageRI/NameFinder.js:
3748         * WebGPUShadingLanguageRI/NameResolver.js:
3749         (NameResolver.prototype.visitFunc):
3750         (NameResolver.prototype.visitFuncDef):
3751         (NameResolver.prototype.visitTypeDef):
3752         (NameResolver.prototype.visitStructType):
3753         (NameResolver.prototype.visitTypeRef):
3754         (NameResolver.prototype.visitCallExpression):
3755         (NameResolver.prototype.visitVectorType):
3756         (NameResolver):
3757         (NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted.
3758         (NameResolver.prototype.visitProtocolDecl): Deleted.
3759         * WebGPUShadingLanguageRI/NativeFunc.js:
3760         (NativeFunc):
3761         * WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted.
3762         * WebGPUShadingLanguageRI/NativeType.js:
3763         (NativeType):
3764         (NativeType.prototype.get name):
3765         (NativeType.prototype.toString):
3766         (NativeType.prototype.get typeParameters): Deleted.
3767         (NativeType.prototype.instantiate): Deleted.
3768         * WebGPUShadingLanguageRI/Node.js:
3769         (Node.prototype.commit):
3770         (Node):
3771         (Node.prototype.substitute): Deleted.
3772         (Node.prototype.substituteToUnification): Deleted.
3773         * WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously
3774         implemented with generics.
3775         * WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto.
3776         * WebGPUShadingLanguageRI/OperatorBool.js: Ditto.
3777         * WebGPUShadingLanguageRI/Parse.js: Removed everything related to
3778         generics and protocols.
3779         * WebGPUShadingLanguageRI/Prepare.js: Added new stages.
3780         * WebGPUShadingLanguageRI/Program.js:
3781         (Program):
3782         (Program.prototype.get types):
3783         (Program.prototype.add):
3784         (Program.prototype.get protocols): Deleted.
3785         * WebGPUShadingLanguageRI/ProtocolDecl.js: Removed.
3786         * WebGPUShadingLanguageRI/ProtocolRef.js: Removed.
3787         * WebGPUShadingLanguageRI/RecursiveTypeChecker.js:
3788         * WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added.
3789         * WebGPUShadingLanguageRI/ResolveNames.js:
3790         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
3791         * WebGPUShadingLanguageRI/ResolveTypeDefs.js:
3792         (resolveTypeDefsInProtocols): Deleted.
3793         * WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes.
3794         * WebGPUShadingLanguageRI/SPIRV.html:
3795         * WebGPUShadingLanguageRI/SPIRVCodegen.js:
3796         * WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features.
3797         * WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes.
3798         (StructLayoutBuilder):
3799         * WebGPUShadingLanguageRI/StructType.js:
3800         * WebGPUShadingLanguageRI/SwizzleOp.js:
3801         (SwizzleOp):
3802         (SwizzleOp.prototype.get baseTypeName):
3803         (SwizzleOp.prototype.toString):
3804         (SwizzleOp.functions.):
3805         (SwizzleOp.functions):
3806         (SwizzleOp.prototype.instantiateImplementation):
3807         (SwizzleOp.allSwizzleOperators.): Deleted.
3808         (SwizzleOp.allSwizzleOperators): Deleted.
3809         * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added,
3810         previously implemented with generics.
3811         * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto.
3812         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto.
3813         * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto.
3814         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto.
3815         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
3816         (synthesizeStructAccessors.setupImplementationData):
3817         (synthesizeStructAccessors.createFieldType):
3818         (synthesizeStructAccessors.createTypeRef):
3819         (synthesizeStructAccessors.setupAnder):
3820         (synthesizeStructAccessors):
3821         (synthesizeStructAccessors.createTypeParameters): Deleted.
3822         (synthesizeStructAccessors.): Deleted.
3823         * WebGPUShadingLanguageRI/Test.html:
3824         * WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new
3825         tests for changed language features.
3826         * WebGPUShadingLanguageRI/Type.js:
3827         * WebGPUShadingLanguageRI/TypeDef.js:
3828         * WebGPUShadingLanguageRI/TypeDefResolver.js:
3829         * WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed.
3830         * WebGPUShadingLanguageRI/TypeRef.js:
3831         * WebGPUShadingLanguageRI/TypeVariable.js: Removed.
3832         * WebGPUShadingLanguageRI/UnificationContext.js:
3833         * WebGPUShadingLanguageRI/VectorType.js: Added.
3834         * WebGPUShadingLanguageRI/Visitor.js: Changes for new classes.
3835         * WebGPUShadingLanguageRI/WSL.md: Removed description of
3836         generics/protocols.
3837         * WebGPUShadingLanguageRI/WrapChecker.js:
3838         (WrapChecker):
3839         (WrapChecker.visitConstexprTypeParameter): Deleted.
3840         (WrapChecker.prototype.visitFuncParameter): Deleted.
3841         (WrapChecker.prototype.visitTypeVariable): Deleted.
3842         * WebGPUShadingLanguageRI/index.html:
3843
3844 2018-08-20  Thomas Denney  <tdenney@apple.com>
3845
3846         Added Thomas Denney to contributors.json.
3847         https://bugs.webkit.org/show_bug.cgi?id=188525
3848
3849         Reviewed by Myles C. Maxfield.
3850
3851         * Scripts/webkitpy/common/config/contributors.json:
3852
3853 2018-08-20  Bernhard M. Wiedemann  <bwiedemann@suse.de>
3854
3855         [GTK] Sort inspector GResource manifest to ensure reproducible builds
3856         https://bugs.webkit.org/show_bug.cgi?id=188738
3857
3858         Reviewed by Michael Catanzaro.
3859
3860         * glib/generate-inspector-gresource-manifest.py:
3861         (get_filenames): sort list of input files
3862
3863 2018-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3864
3865         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
3866         https://bugs.webkit.org/show_bug.cgi?id=184271
3867         <rdar://problem/39256708>
3868
3869         Reviewed by Andy Estes.
3870
3871         This API test is failing when run against older macOS builds, where custom pasteboard
3872         data is not enabled by default.
3873
3874         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
3875         (TestWebKitAPI::TEST):
3876
3877 2018-08-20  Claudio Saavedra  <csaavedra@igalia.com>
3878
3879         Add WPE Debug configuration to the flakiness dashboard
3880         https://bugs.webkit.org/show_bug.cgi?id=188743
3881
3882         Reviewed by Michael Catanzaro.
3883
3884         * TestResultServer/static-dashboards/builders.jsonp:
3885         * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
3886
3887 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3888
3889         [GLIB] Add API to throw exceptions using printf formatted strings
3890         https://bugs.webkit.org/show_bug.cgi?id=188698
3891
3892         Reviewed by Michael Catanzaro.
3893
3894         Add cases to test the new API.
3895
3896         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3897         (createFormattedError):
3898         (createCustomFormattedError):
3899         (testJSCExceptions):
3900
3901 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3902
3903         [GLIB] Complete the JSCException API
3904         https://bugs.webkit.org/show_bug.cgi?id=188695
3905
3906         Reviewed by Michael Catanzaro.
3907
3908         Add cases to test the new API.
3909
3910         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3911         (testJSCCheckSyntax):
3912         (createCustomError):
3913         (testJSCExceptions):
3914
3915 2018-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3916
3917         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
3918         https://bugs.webkit.org/show_bug.cgi?id=184271
3919         <rdar://problem/39256708>
3920
3921         Reviewed by Ryosuke Niwa.
3922
3923         Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
3924         matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
3925
3926         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
3927         (TestWebKitAPI::TEST):
3928         (imagePath): Deleted.
3929         (writeTypesAndDataToPasteboard): Deleted.
3930         (setUpWebView): Deleted.
3931         (markupString): Deleted.
3932
3933         Make this test file no longer exclusive to macOS.
3934
3935         * TestWebKitAPI/cocoa/TestWKWebView.h:
3936         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3937         (-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
3938
3939         Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL.
3940
3941         (-[TestWKWebView synchronouslyLoadHTMLString:]):
3942
3943 2018-08-17  Jonathan Bedard  <jbedard@apple.com>
3944
3945         Add back --wtf-only to run-api-tests
3946         https://bugs.webkit.org/show_bug.cgi?id=187893
3947         <rdar://problem/42483983>
3948
3949         Reviewed by Aakash Jain.
3950
3951         When doing WTF development, it is not necessary to build or run all of the API
3952         tests. Generally, if a user has specified a specific binary (or binaries) that
3953         they are interested in testing, it is not necessary to check all API test binaries.
3954
3955         * Scripts/webkitpy/api_tests/manager.py:
3956         (Manager._collect_tests): Only use the binaries matching the program arguments
3957         when collecting tests.
3958         (Manager._binaries_for_arguments): Generate a list of binaries which match the
3959         program arguments.
3960         (Manager.run): Pass a list binaries to check.
3961         * Scripts/webkitpy/api_tests/run_api_tests.py:
3962         (parse_args):
3963         * Scripts/webkitpy/port/base.py:
3964         (Port.check_api_test_build): If the caller specifies which API test binaries it
3965         requires, only check the ones specified.
3966         (Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests.
3967         (Port._build_api_tests): Allow the caller to only build the WTF API tests.
3968         * Scripts/webkitpy/port/win.py:
3969         (WinPort.path_to_api_test_binaries):
3970
3971 2018-08-17  Jer Noble  <jer.noble@apple.com>
3972
3973         REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
3974         https://bugs.webkit.org/show_bug.cgi?id=188470
3975         <rdar://problem/43144969>
3976
3977         Reviewed by Alex Christensen.
3978
3979         On a loaded server, the WebContent process may send the "playing" message before the
3980         UIProcess has a chance to register a listener for that message. Restructure the tests
3981         so that the listener is registered before the page is loaded.
3982
3983         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
3984         (PreferredAudioBufferSize::runPlayingTestWithPageNamed):
3985         (TEST_F):
3986
3987 2018-08-16  Wenson Hsieh  <wenson_hsieh@apple.com>
3988
3989         [macOS] [WK2] Add infrastructure to test receiving file promises on drop
3990         https://bugs.webkit.org/show_bug.cgi?id=188583
3991
3992         Reviewed by Andy Estes.
3993
3994         Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of
3995         NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the
3996         concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also
3997         introduces 3 new macOS tests. See below for more details.
3998
3999         A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a
4000         future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and
4001         DumpRenderTree, and make this code shared among all three testing harnesses.
4002
4003         Tests:  DragAndDropTests.DragImageElementIntoFileUpload
4004                 DragAndDropTests.DragPromisedImageFileIntoFileUpload
4005                 DragAndDropTests.DragImageFileIntoFileUpload
4006
4007         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4008         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
4009         (TEST):
4010
4011         Drive-by fix: Replace NSMakePoint with CGPointMake.
4012
4013         * TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html:
4014
4015         Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to
4016         load the dropped image.
4017
4018         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
4019         (waitForConditionWithLogging):
4020
4021         Add a helper function to wait for a condition to evaluate to true. To make failures more informative,
4022         additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met.
4023
4024         (TEST):
4025
4026         Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element,
4027         (2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs.
4028
4029         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
4030
4031         Surface the new functionality provided by the file promise receiver mock via two new methods on
4032         DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths
4033         directly to the pasteboard.
4034
4035         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
4036         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
4037         (-[DragAndDropSimulator externalPromisedFiles]):
4038         (getFilePathsAndTypeIdentifiers):
4039         (-[DragAndDropSimulator writePromisedFiles:]):
4040         (-[DragAndDropSimulator writeFiles:]):
4041         * TestWebKitAPI/mac/TestDraggingInfo.h:
4042         * TestWebKitAPI/mac/TestDraggingInfo.mm:
4043         (-[TestDraggingInfo initWithDragAndDropSimulator:]):
4044         (-[TestDraggingInfo filePromiseReceivers]):
4045         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
4046
4047         Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are
4048         unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is
4049         currently sufficient for testing purposes.
4050
4051         * TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h.
4052         * TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added.
4053         (-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]):
4054         (-[TestFilePromiseReceiver fileTypes]):
4055         (-[TestFilePromiseReceiver fileNames]):
4056         (-[TestFilePromiseReceiver dealloc]):
4057         (-[TestFilePromiseReceiver draggingSource]):
4058         (-[TestFilePromiseReceiver setDraggingSource:]):
4059         (fileNameWithNumericSuffix):
4060         (copyFile):
4061
4062         Add a helper to copy a file into a destination directory. Used to implement the main functionality of our
4063         NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by
4064         WebKit.
4065
4066         (-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
4067
4068 2018-08-16  Alex Christensen  <achristensen@webkit.org>
4069
4070         Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service
4071         https://bugs.webkit.org/show_bug.cgi?id=188677
4072
4073         Reviewed by Tim Horton.
4074
4075         * MiniBrowser/MiniBrowser.entitlements:
4076         SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement
4077         on released operating systems.  See <rdar://problem/42749777>
4078
4079 2018-08-16  Jer Noble  <jer.noble@apple.com>
4080
4081         Add option to run-api-tests to force running of DISABLED tests.
4082         https://bugs.webkit.org/show_bug.cgi?id=188674
4083
4084         Reviewed by Joseph Pecoraro.
4085
4086         * Scripts/webkitpy/api_tests/run_api_tests.py:
4087         (parse_args):
4088         * Scripts/webkitpy/api_tests/runner.py:
4089         (Runner.command_for_port):
4090         (_Worker._run_single_test):
4091
4092 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
4093
4094         [ews-build] Separate queues for Builders and Testers - macOS High Sierra
4095         https://bugs.webkit.org/show_bug.cgi?id=188540
4096
4097         Reviewed by Lucas Forschler.
4098
4099         * BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers. 
4100
4101 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
4102
4103         [ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults
4104         https://bugs.webkit.org/show_bug.cgi?id=188666
4105
4106         Reviewed by Lucas Forschler.
4107
4108         * BuildSlaveSupport/ews-build/steps.py:
4109         (ArchiveTestResults): Build step to Archive the test results.
4110         (UploadTestResults): Build step to upload the archive.
4111         (ExtractTestResults): Build step to unzip the archive on server and generate a link.
4112         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
4113         (ExpectMasterShellCommand): Copied from other similar internal code.
4114
4115 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
4116
4117         [ews-build] Separate queues for Builders and Testers - macOS Sierra
4118         https://bugs.webkit.org/show_bug.cgi?id=188516
4119
4120         Reviewed by Lucas Forschler.
4121
4122         * BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers.
4123         * BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers.
4124
4125 2018-08-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
4126
4127         [Win][DumpRenderTree] Remove error message for duplicated tests.
4128         https://bugs.webkit.org/show_bug.cgi?id=188662
4129
4130         Reviewed by Per Arne Vollan.
4131
4132         This was added to track down an issue where the same tests appeared
4133         to be run multiple times. This turned out to not be the case.
4134         See https://bugs.webkit.org/show_bug.cgi?id=166760 .
4135
4136         * DumpRenderTree/win/DumpRenderTree.cpp:
4137         (runTest):
4138
4139 2018-08-16  Alex Christensen  <achristensen@webkit.org>
4140
4141         Re-introduce assertion removed in r234890
4142         https://bugs.webkit.org/show_bug.cgi?id=188611
4143
4144         Reviewed by Geoffrey Garen.
4145
4146         * TestWebKitAPI/Tests/WTF/Vector.cpp:
4147         (TestWebKitAPI::TEST):
4148
4149 2018-08-16  Jer Noble  <jer.noble@apple.com>
4150
4151         Add Experimental Feature support for SourceBuffer.changeType()
4152         https://bugs.webkit.org/show_bug.cgi?id=188626
4153         <rdar://problem/43356021>
4154
4155         Reviewed by Eric Carlson.
4156
4157         * DumpRenderTree/mac/DumpRenderTree.mm:
4158         (enableExperimentalFeatures):
4159         (resetWebPreferencesToConsistentValues):
4160         * WebKitTestRunner/TestController.cpp:
4161         (WTR::TestController::resetPreferencesToConsistentValues):
4162
4163 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
4164
4165         Support drag-and-drop for input[type=color]
4166         https://bugs.webkit.org/show_bug.cgi?id=188464
4167
4168         Reviewed by Wenson Hsieh.
4169
4170         Added five cross-platform API tests, to verify that dragging and dropping with
4171         color inputs changes the value of the drop target if and only if both inputs are
4172         enabled. Also tests that the change and input events are fired when changing the
4173         value of a color input through drag and drop. 
4174
4175         Additionally, added a macOS-specific test to verify that dropping an item with
4176         NSColorPboardType changes the value of the color input.
4177
4178         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4179         * TestWebKitAPI/Tests/WebKitCocoa/Dr