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