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