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