Title: [204185] branches/safari-602-branch

Diff

Modified: branches/safari-602-branch/LayoutTests/ChangeLog (204184 => 204185)


--- branches/safari-602-branch/LayoutTests/ChangeLog	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/LayoutTests/ChangeLog	2016-08-05 19:29:55 UTC (rev 204185)
@@ -1,5 +1,9 @@
 2016-08-05  Babak Shafiei  <[email protected]>
 
+        Rollout r204169. rdar://problem/27592694
+
+2016-08-05  Babak Shafiei  <[email protected]>
+
         Merge r204128. rdar://problem/27592694
 
     2016-08-04  Jeremy Jones  <[email protected]>

Deleted: branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt (204184 => 204185)


--- branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect-expected.txt	2016-08-05 19:29:55 UTC (rev 204185)
@@ -1,4 +0,0 @@
-
-load metadata OK
-END OF TEST
-

Deleted: branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect.html (204184 => 204185)


--- branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect.html	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/LayoutTests/http/tests/media/hls/hls-redirect.html	2016-08-05 19:29:55 UTC (rev 204185)
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<video src="" _onloadedmetadata_="logResult(true, 'load metadata'); endTest()" _onerror_="failTest('load error')"></video>
-</body>
-</html>

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (204184 => 204185)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-08-05 19:29:55 UTC (rev 204185)
@@ -1,5 +1,9 @@
 2016-08-05  Babak Shafiei  <[email protected]>
 
+        Rollout r204169. rdar://problem/27592694
+
+2016-08-05  Babak Shafiei  <[email protected]>
+
         Merge r204159. rdar://problem/27669831
 
     2016-08-04  Myles C. Maxfield  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.cpp (204184 => 204185)


--- branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.cpp	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.cpp	2016-08-05 19:29:55 UTC (rev 204185)
@@ -146,7 +146,6 @@
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedJavaScriptMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedNonImageMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* supportedMediaMIMETypes;
-static HashSet<String, ASCIICaseInsensitiveHash>* mpegPlaylistMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* pdfMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* pdfAndPostScriptMIMETypes;
 static HashSet<String, ASCIICaseInsensitiveHash>* unsupportedTextMIMETypes;
@@ -302,22 +301,6 @@
         supportedJavaScriptMIMETypes->add(type);
 }
 
-static void initializeMPEGPlaylistMIMETypes()
-{
-    const char* const types[] = {
-        "application/vnd.apple.mpegurl",
-        "application/mpegurl",
-        "application/x-mpegurl",
-        "audio/mpegurl",
-        "audio/x-mpegurl",
-        "audio/mpegurl",
-        "audio/x-mpegurl"
-    };
-
-    for (auto& type : types)
-        mpegPlaylistMIMETypes->add(type);
-}
-
 static void initializePDFMIMETypes()
 {
     const char* const types[] = {
@@ -472,9 +455,6 @@
     supportedImageMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
     initializeSupportedImageMIMETypes();
 
-    mpegPlaylistMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
-    initializeMPEGPlaylistMIMETypes();
-
     pdfMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>;
     initializePDFMIMETypes();
 
@@ -573,15 +553,6 @@
         || mimeType.startsWith("application/x-java-vm", false);
 }
 
-bool MIMETypeRegistry::isMPEGPlaylistMIMEType(const String& mimeType)
-{
-    if (mimeType.isEmpty())
-        return false;
-    if (!mpegPlaylistMIMETypes)
-        initializeMIMETypeRegistry();
-    return mpegPlaylistMIMETypes->contains(mimeType);
-}
-
 bool MIMETypeRegistry::isPDFOrPostScriptMIMEType(const String& mimeType)
 {
     if (mimeType.isEmpty())

Modified: branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.h (204184 => 204185)


--- branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.h	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/Source/WebCore/platform/MIMETypeRegistry.h	2016-08-05 19:29:55 UTC (rev 204185)
@@ -76,9 +76,6 @@
     // Check to see if a MIME type is a plugin implemented by the browser.
     static bool isApplicationPluginMIMEType(const String& mimeType);
 
-    // Check to see if a MIME type is one of the MPEG playlists types.
-    static bool isMPEGPlaylistMIMEType(const String& mimeType);
-
     // Check to see if a MIME type is one of the common PDF/PS types.
     WEBCORE_EXPORT static bool isPDFOrPostScriptMIMEType(const String& mimeType);
     static bool isPDFMIMEType(const String& mimeType);

Modified: branches/safari-602-branch/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm (204184 => 204185)


--- branches/safari-602-branch/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm	2016-08-05 19:16:55 UTC (rev 204184)
+++ branches/safari-602-branch/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm	2016-08-05 19:29:55 UTC (rev 204185)
@@ -29,7 +29,6 @@
 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
 
 #import "CachedResourceRequest.h"
-#import "MIMETypeRegistry.h"
 #import "PlatformMediaResourceLoader.h"
 #import "SecurityOrigin.h"
 #import "SubresourceLoader.h"
@@ -587,20 +586,9 @@
         // and use that URL for all future requests for the same piece of media. This breaks
         // certain features of CORS, as well as being against the HTTP spec in the case of
         // non-permanent redirects.
-
-        // Exclude MPEG Playlists since these require the redirected URL as the base URL
-        // for relative paths.
-        String mimeType = response.nsURLResponse().MIMEType;
-        if (mimeType.isEmpty() || mimeType == "application/octet-stream" || mimeType == "text/plain") {
-            String extension = response.nsURLResponse().URL.pathExtension;
-            mimeType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
-
-        }
-        if (!MIMETypeRegistry::isMPEGPlaylistMIMEType(mimeType)) {
-            auto responseData = response.crossThreadData();
-            responseData.url = ""
-            strongResponse = ResourceResponseBase::fromCrossThreadData(WTFMove(responseData)).nsURLResponse();
-        }
+        auto responseData = response.crossThreadData();
+        responseData.url = ""
+        strongResponse = ResourceResponseBase::fromCrossThreadData(WTFMove(responseData)).nsURLResponse();
     }
 
     RetainPtr<WebCoreNSURLSessionDataTask> strongSelf { self };
@@ -670,19 +658,9 @@
     // FIXME(<rdar://problem/27000361>):
     // Do not update the current request if the redirect is temporary; use this
     // current request during responseReceieved: to work around a CoreMedia bug.
+    if (response.httpStatusCode() != 302 && response.httpStatusCode() != 307)
+        self.currentRequest = [NSURLRequest requestWithURL:request.url()];
 
-    // Exclude MPEG Playlists since these require the redirected URL as the base URL
-    // for relative paths.
-    if (response.httpStatusCode() != 302 && response.httpStatusCode() != 307) {
-        String mimeType = response.nsURLResponse().MIMEType;
-        if (mimeType.isEmpty() || mimeType == "application/octet-stream" || mimeType == "text/plain") {
-            String extension = response.nsURLResponse().URL.pathExtension;
-            mimeType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
-        }
-        if (!MIMETypeRegistry::isMPEGPlaylistMIMEType(mimeType))
-            self.currentRequest = [NSURLRequest requestWithURL:request.url()];
-    }
-
     [self.session updateHasSingleSecurityOrigin:SecurityOrigin::create(request.url())];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to