- Revision
- 287049
- Author
- [email protected]
- Date
- 2021-12-14 14:20:05 -0800 (Tue, 14 Dec 2021)
Log Message
Revert r284816
https://bugs.webkit.org/show_bug.cgi?id=234308
LayoutTests/imported/w3c:
Patch by Alex Christensen <[email protected]> on 2021-12-14
Reviewed by Eric Carlson.
* web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt:
Source/WebCore:
<rdar://86294293>
Patch by Alex Christensen <[email protected]> on 2021-12-14
Reviewed by Eric Carlson.
I made it so that resources without a Content-Length header wait until the whole resource finishes downloading
then we deliver it to CoreMedia to play with a known length. This works great, except it completely breaks
live streaming, which would just wait forever. Back to the status quo. We need to convince CoreMedia to accept
byte ranges with an unknown end to fix videos such as our test video when hosted by trac, which has no Content-Length at
https://trac.webkit.org/export/284633/webkit/trunk/Tools/TestWebKitAPI/Tests/WebKit/test.mp4
* platform/network/cocoa/RangeResponseGenerator.mm:
(WebCore::synthesizedResponseForRange):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
Source/WebKit:
Patch by Alex Christensen <[email protected]> on 2021-12-14
Reviewed by Eric Carlson.
* UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged):
Tools:
Patch by Alex Christensen <[email protected]> on 2021-12-14
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287048 => 287049)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-12-14 22:20:05 UTC (rev 287049)
@@ -1,3 +1,12 @@
+2021-12-14 Alex Christensen <[email protected]>
+
+ Revert r284816
+ https://bugs.webkit.org/show_bug.cgi?id=234308
+
+ Reviewed by Eric Carlson.
+
+ * web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt:
+
2021-12-14 Andreu Botella <[email protected]>
TextDecoder doesn't detect invalid UTF-8 sequences early enough
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt (287048 => 287049)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt 2021-12-14 22:20:05 UTC (rev 287049)
@@ -1,4 +1,6 @@
-PASS Verify CORS XHR of fetch() in a Service Worker
+Harness Error (TIMEOUT), message = null
+TIMEOUT Verify CORS XHR of fetch() in a Service Worker Test timed out
+
Modified: trunk/Source/WebCore/ChangeLog (287048 => 287049)
--- trunk/Source/WebCore/ChangeLog 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Source/WebCore/ChangeLog 2021-12-14 22:20:05 UTC (rev 287049)
@@ -1,3 +1,21 @@
+2021-12-14 Alex Christensen <[email protected]>
+
+ Revert r284816
+ https://bugs.webkit.org/show_bug.cgi?id=234308
+ <rdar://86294293>
+
+ Reviewed by Eric Carlson.
+
+ I made it so that resources without a Content-Length header wait until the whole resource finishes downloading
+ then we deliver it to CoreMedia to play with a known length. This works great, except it completely breaks
+ live streaming, which would just wait forever. Back to the status quo. We need to convince CoreMedia to accept
+ byte ranges with an unknown end to fix videos such as our test video when hosted by trac, which has no Content-Length at
+ https://trac.webkit.org/export/284633/webkit/trunk/Tools/TestWebKitAPI/Tests/WebKit/test.mp4
+
+ * platform/network/cocoa/RangeResponseGenerator.mm:
+ (WebCore::synthesizedResponseForRange):
+ (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
+
2021-12-14 Gabriel Nava Marino <[email protected]>
Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
Modified: trunk/Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm (287048 => 287049)
--- trunk/Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm 2021-12-14 22:20:05 UTC (rev 287049)
@@ -72,13 +72,13 @@
ASSERT(isMainThread());
}
-static ResourceResponse synthesizedResponseForRange(const ResourceResponse& originalResponse, const ParsedRequestRange& parsedRequestRange, size_t totalContentLength)
+static ResourceResponse synthesizedResponseForRange(const ResourceResponse& originalResponse, const ParsedRequestRange& parsedRequestRange, std::optional<size_t> totalContentLength)
{
ASSERT(isMainThread());
auto begin = parsedRequestRange.begin;
auto end = parsedRequestRange.end;
- auto newContentRange = makeString("bytes ", begin, "-", end, "/", totalContentLength);
+ auto newContentRange = makeString("bytes ", begin, "-", end, "/", (totalContentLength ? makeString(*totalContentLength) : "*"));
auto newContentLength = makeString(end - begin + 1);
ResourceResponse newResponse = originalResponse;
@@ -106,11 +106,6 @@
{
ASSERT(isMainThread());
- // FIXME: We ought to be able to just make a range with a * after the / but AVFoundation doesn't accept such ranges.
- // Instead, we just wait until the load has completed, at which time we will know the content length from the buffer length.
- if (!expectedContentLength)
- return;
-
auto bufferSize = data.buffer.size();
if (bufferSize < range.begin)
return;
@@ -150,7 +145,7 @@
switch (taskData->responseState) {
case Data::TaskData::ResponseState::NotSynthesizedYet: {
- auto response = synthesizedResponseForRange(data.originalResponse, range, *expectedContentLength);
+ auto response = synthesizedResponseForRange(data.originalResponse, range, expectedContentLength);
[task resource:nullptr receivedResponse:response completionHandler:[giveBytesToTask = WTFMove(giveBytesToTask), taskData = WeakPtr { taskData }, task = retainPtr(task)] (WebCore::ShouldContinuePolicyCheck shouldContinue) {
if (taskData)
taskData->responseState = Data::TaskData::ResponseState::SessionCalledCompletionHandler;
Modified: trunk/Source/WebKit/ChangeLog (287048 => 287049)
--- trunk/Source/WebKit/ChangeLog 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Source/WebKit/ChangeLog 2021-12-14 22:20:05 UTC (rev 287049)
@@ -1,5 +1,15 @@
2021-12-14 Alex Christensen <[email protected]>
+ Revert r284816
+ https://bugs.webkit.org/show_bug.cgi?id=234308
+
+ Reviewed by Eric Carlson.
+
+ * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
+ (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged):
+
+2021-12-14 Alex Christensen <[email protected]>
+
Add _WKContentRuleListAction.redirected and .modifiedHeaders
https://bugs.webkit.org/show_bug.cgi?id=234289
Modified: trunk/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm (287048 => 287049)
--- trunk/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm 2021-12-14 22:20:05 UTC (rev 287049)
@@ -423,7 +423,6 @@
Ref<TimeRanges> timeRanges = TimeRanges::create();
for (const auto& range : ranges) {
ASSERT(isfinite(range.first));
- ASSERT(isfinite(range.second));
ASSERT(range.second >= range.first);
timeRanges->add(range.first, range.second);
}
Modified: trunk/Tools/ChangeLog (287048 => 287049)
--- trunk/Tools/ChangeLog 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Tools/ChangeLog 2021-12-14 22:20:05 UTC (rev 287049)
@@ -1,3 +1,13 @@
+2021-12-14 Alex Christensen <[email protected]>
+
+ Revert r284816
+ https://bugs.webkit.org/show_bug.cgi?id=234308
+
+ Reviewed by Eric Carlson.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
+ (TestWebKitAPI::TEST):
+
2021-12-13 Jonathan Bedard <[email protected]>
[reporelaypy] Update checkout with hook instead of polling
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm (287048 => 287049)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm 2021-12-14 22:15:49 UTC (rev 287048)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm 2021-12-14 22:20:05 UTC (rev 287049)
@@ -181,7 +181,7 @@
HTTPServer server([&](Connection connection) {
respondToRequests(connection);
});
- runVideoTest(server.request(), "playing");
+ runVideoTest(server.request(), "error");
EXPECT_EQ(totalRequests, 2u);
}