Title: [250410] trunk
- Revision
- 250410
- Author
- [email protected]
- Date
- 2019-09-26 20:00:10 -0700 (Thu, 26 Sep 2019)
Log Message
REGRESSION (iOS 13): Trying to record just audio using HTML Media Capture crashes Safari
https://bugs.webkit.org/show_bug.cgi?id=202039
<rdar://problem/55566628>
Reviewed by Jer Noble.
Source/WebKit:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _mediaTypesForPickerSourceType:]): UIImagePickerController doesn't
support audio-only recording, so show the video recorder for "audio/*".
LayoutTests:
* fast/forms/ios/file-upload-panel-capture-expected.txt: Added.
* fast/forms/ios/file-upload-panel-capture.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (250409 => 250410)
--- trunk/LayoutTests/ChangeLog 2019-09-27 02:40:25 UTC (rev 250409)
+++ trunk/LayoutTests/ChangeLog 2019-09-27 03:00:10 UTC (rev 250410)
@@ -1,3 +1,14 @@
+2019-09-26 Eric Carlson <[email protected]>
+
+ REGRESSION (iOS 13): Trying to record just audio using HTML Media Capture crashes Safari
+ https://bugs.webkit.org/show_bug.cgi?id=202039
+ <rdar://problem/55566628>
+
+ Reviewed by Jer Noble.
+
+ * fast/forms/ios/file-upload-panel-capture-expected.txt: Added.
+ * fast/forms/ios/file-upload-panel-capture.html: Added.
+
2019-09-26 Russell Epstein <[email protected]>
[ iOS ] Layout Test scrollingcoordinator/ios/fixed-scrolling-with-keyboard.html is a Flaky Failure
Added: trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture-expected.txt (0 => 250410)
--- trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture-expected.txt 2019-09-27 03:00:10 UTC (rev 250410)
@@ -0,0 +1,15 @@
+Test that the iOS File Upload Panel doesn't crash when the 'capture' is present.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+* accept = image/*
+
+* accept = video/*
+
+* accept = audio/*
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture.html (0 => 250410)
--- trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture.html (rev 0)
+++ trunk/LayoutTests/fast/forms/ios/file-upload-panel-capture.html 2019-09-27 03:00:10 UTC (rev 250410)
@@ -0,0 +1,52 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true, shouldHandleRunOpenPanel=false, shouldPresentPopovers=false ] -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width">
+<script src=""
+<script src=""
+</head>
+<body>
+<div id="description"></div>
+<input id="testInput" type="file" capture>
+<div id="console"></div>
+<script>
+description("Test that the iOS File Upload Panel doesn't crash when the 'capture' is present.");
+jsTestIsAsync = true;
+
+function dismissFilePicker()
+{
+ const uiScript = `uiController.dismissFilePicker(() => uiController.uiScriptComplete())`;
+ return new Promise(resolve => testRunner.runUIScript(uiScript, resolve));
+}
+
+function runCaptureTest(accept)
+{
+ return new Promise((resolve) => {
+ debug("* accept = " + accept);
+ testInput.accept = accept;
+
+ UIHelper.activateElement(testInput).then(() => {
+ debug("");
+ dismissFilePicker().then(() => { resolve(); });
+ });
+ });
+}
+
+async function runTests()
+{
+ document.getElementById("console").style = "display: none";
+
+ await runCaptureTest("image/*");
+ await runCaptureTest("video/*");
+ await runCaptureTest("audio/*");
+
+ document.getElementById("console").style = "";
+ finishJSTest();
+}
+
+
+_onload_ = runTests;
+
+</script>
+</body>
+</html>
Modified: trunk/Source/WebKit/ChangeLog (250409 => 250410)
--- trunk/Source/WebKit/ChangeLog 2019-09-27 02:40:25 UTC (rev 250409)
+++ trunk/Source/WebKit/ChangeLog 2019-09-27 03:00:10 UTC (rev 250410)
@@ -1,3 +1,15 @@
+2019-09-26 Eric Carlson <[email protected]>
+
+ REGRESSION (iOS 13): Trying to record just audio using HTML Media Capture crashes Safari
+ https://bugs.webkit.org/show_bug.cgi?id=202039
+ <rdar://problem/55566628>
+
+ Reviewed by Jer Noble.
+
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+ (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]): UIImagePickerController doesn't
+ support audio-only recording, so show the video recorder for "audio/*".
+
2019-09-26 Tim Horton <[email protected]>
Add some logging to help diagnose blank or stuck WKWebViews
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (250409 => 250410)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2019-09-27 02:40:25 UTC (rev 250409)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2019-09-27 03:00:10 UTC (rev 250410)
@@ -343,7 +343,9 @@
else if ([mimeType caseInsensitiveCompare:@"video/*"] == NSOrderedSame)
[mediaTypes addObject:(__bridge NSString *)kUTTypeMovie];
else if ([mimeType caseInsensitiveCompare:@"audio/*"] == NSOrderedSame)
- [mediaTypes addObject:(__bridge NSString *)kUTTypeAudio];
+ // UIImagePickerController doesn't allow audio-only recording, so show the video
+ // recorder for "audio/*".
+ [mediaTypes addObject:(__bridge NSString *)kUTTypeMovie];
else {
auto uti = WebCore::UTIFromMIMEType(mimeType);
if (!uti.isEmpty())
@@ -371,7 +373,10 @@
}
}
}
- return mediaTypes;
+
+ ASSERT(mediaTypes.count);
+ if (mediaTypes.count)
+ return mediaTypes;
}
// Fallback to every supported media type if there is no filter.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes