Title: [224024] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (224023 => 224024)


--- trunk/LayoutTests/ChangeLog	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/LayoutTests/ChangeLog	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,3 +1,16 @@
+2017-10-26  Ryan Haddad  <[email protected]>
+
+        Unreviewed, rolling out r223994.
+
+        The LayoutTest for this change is failing.
+
+        Reverted changeset:
+
+        "Add service worker handle fetch support for all subresource
+        requests"
+        https://bugs.webkit.org/show_bug.cgi?id=178769
+        https://trac.webkit.org/changeset/223994
+
 2017-10-25  Ryan Haddad  <[email protected]>
 
         Update TestExpectations for compositing/tiling/non-active-window-tiles-size.html.

Deleted: trunk/LayoutTests/http/tests/workers/service/image-fetch.https-expected.txt (224023 => 224024)


--- trunk/LayoutTests/http/tests/workers/service/image-fetch.https-expected.txt	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/LayoutTests/http/tests/workers/service/image-fetch.https-expected.txt	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,6 +0,0 @@
-
-Status is no status
-Status is https://127.0.0.1:8443/resources/square100.png
-PASS: Loaded image
-Image size: 100x100
-

Deleted: trunk/LayoutTests/http/tests/workers/service/image-fetch.https.html (224023 => 224024)


--- trunk/LayoutTests/http/tests/workers/service/image-fetch.https.html	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/LayoutTests/http/tests/workers/service/image-fetch.https.html	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,9 +0,0 @@
-<html>
-<head>
-<script src=""
-</head>
-<body>
-    <img id="image" _onload_="loadedImage()" _onerror_="erroredImage()"></img>
-    <script src=""
-</body>
-</html>

Deleted: trunk/LayoutTests/http/tests/workers/service/resources/image-fetch-worker.js (224023 => 224024)


--- trunk/LayoutTests/http/tests/workers/service/resources/image-fetch-worker.js	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/LayoutTests/http/tests/workers/service/resources/image-fetch-worker.js	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,14 +0,0 @@
-var status = "no status";
-self.addEventListener("fetch", (event) => {
-    if (event.request.url.indexOf("status") !== -1) {
-        event.respondWith(new Response(null, {status: 200, statusText: status}));
-        return;
-    }
-    if (!event.request.url.endsWith(".fromserviceworker")) {
-        status = "unknown url";
-        event.respondWith(new Response(null, {status: 404, statusText: "Not Found"}));
-        return;
-    }
-    status = event.request.url.substring(0, event.request.url.length - 18);
-    event.respondWith(fetch(status));
-});

Deleted: trunk/LayoutTests/http/tests/workers/service/resources/image-fetch.js (224023 => 224024)


--- trunk/LayoutTests/http/tests/workers/service/resources/image-fetch.js	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/LayoutTests/http/tests/workers/service/resources/image-fetch.js	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,40 +0,0 @@
-function done()
-{
-    finishSWTest();
-}
-
-async function loadedImage()
-{
-    log("PASS: Loaded image");
-    log("Image size: " + image.width + "x" + image.height);
-    finishSWTest();
-}
-
-async function erroredImage()
-{
-    log("FAIL: image loading failed");
-    await logStatus();
-    finishSWTest();
-}
-
-async function logStatus()
-{
-    var response = await fetch("status");
-    log("Status is " + response.statusText);
-}
-
-async function test()
-{
-    try {
-        await navigator.serviceWorker.register("resources/image-fetch-worker.js", { });
-
-        await logStatus();
-        image.src = ""
-        await logStatus();
-    } catch(e) {
-        log("Got exception: " + e);
-        await logStatus();
-    }
-}
-
-test();

Modified: trunk/Source/WebCore/ChangeLog (224023 => 224024)


--- trunk/Source/WebCore/ChangeLog	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebCore/ChangeLog	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,5 +1,18 @@
 2017-10-26  Ryan Haddad  <[email protected]>
 
+        Unreviewed, rolling out r223994.
+
+        The LayoutTest for this change is failing.
+
+        Reverted changeset:
+
+        "Add service worker handle fetch support for all subresource
+        requests"
+        https://bugs.webkit.org/show_bug.cgi?id=178769
+        https://trac.webkit.org/changeset/223994
+
+2017-10-26  Ryan Haddad  <[email protected]>
+
         Unreviewed, rolling out r223908.
 
         Causes LayoutTest crashes with newer SDKs.

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (224023 => 224024)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-10-26 17:26:21 UTC (rev 224024)
@@ -103,6 +103,11 @@
 {
     relaxAdoptionRequirement();
 
+#if ENABLE(SERVICE_WORKER)
+    if (m_options.serviceWorkersMode == ServiceWorkersMode::All && !m_options.serviceWorkerIdentifier)
+        m_options.serviceWorkerIdentifier = document.selectedServiceWorkerIdentifier();
+#endif
+
     // Setting a referrer header is only supported in the async code path.
     ASSERT(m_async || m_referrer.isEmpty());
 

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (224023 => 224024)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-10-26 17:26:21 UTC (rev 224024)
@@ -686,15 +686,9 @@
 void CachedResourceLoader::prepareFetch(CachedResource::Type type, CachedResourceRequest& request)
 {
     // Implementing step 1 to 7 of https://fetch.spec.whatwg.org/#fetching
-    auto* document = this->document();
 
-    if (document) {
-        if (!request.origin())
-            request.setOrigin(document->securityOrigin());
-#if ENABLE(SERVICE_WORKER)
-        request.setSelectedServiceWorkerIdentifierIfNeeded(document->selectedServiceWorkerIdentifier());
-#endif
-    }
+    if (!request.origin() && document())
+        request.setOrigin(document()->securityOrigin());
 
     request.setAcceptHeaderIfNone(type);
 

Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (224023 => 224024)


--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2017-10-26 17:26:21 UTC (rev 224024)
@@ -273,21 +273,4 @@
     m_options.destination = destination;
 }
 
-#if ENABLE(SERVICE_WORKER)
-void CachedResourceRequest::setSelectedServiceWorkerIdentifierIfNeeded(uint64_t serviceWorkerIdentifier)
-{
-    if (isNonSubresourceRequest(m_options.destination))
-        return;
-    if (isPotentialNavigationOrSubresourceRequest(m_options.destination))
-        return;
-
-    if (m_options.serviceWorkersMode != ServiceWorkersMode::All)
-        return;
-    if (m_options.serviceWorkerIdentifier)
-        return;
-
-    m_options.serviceWorkerIdentifier = serviceWorkerIdentifier;
-}
-#endif
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.h (224023 => 224024)


--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.h	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.h	2017-10-26 17:26:21 UTC (rev 224024)
@@ -95,10 +95,6 @@
 
     static String splitFragmentIdentifierFromRequestURL(ResourceRequest&);
 
-#if ENABLE(SERVICE_WORKER)
-    void setSelectedServiceWorkerIdentifierIfNeeded(uint64_t serviceWorkerIdentifier);
-#endif
-
 private:
     ResourceRequest m_resourceRequest;
     String m_charset;

Modified: trunk/Source/WebKit/ChangeLog (224023 => 224024)


--- trunk/Source/WebKit/ChangeLog	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebKit/ChangeLog	2017-10-26 17:26:21 UTC (rev 224024)
@@ -1,5 +1,18 @@
 2017-10-26  Ryan Haddad  <[email protected]>
 
+        Unreviewed, rolling out r223994.
+
+        The LayoutTest for this change is failing.
+
+        Reverted changeset:
+
+        "Add service worker handle fetch support for all subresource
+        requests"
+        https://bugs.webkit.org/show_bug.cgi?id=178769
+        https://trac.webkit.org/changeset/223994
+
+2017-10-26  Ryan Haddad  <[email protected]>
+
         Unreviewed, rolling out r223908.
 
         Causes LayoutTest crashes with newer SDKs.

Modified: trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp (224023 => 224024)


--- trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp	2017-10-26 17:18:20 UTC (rev 224023)
+++ trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp	2017-10-26 17:26:21 UTC (rev 224024)
@@ -64,11 +64,12 @@
     if (options.serviceWorkersMode != ServiceWorkersMode::All)
         return false;
 
+    // FIXME: We should probably assert that options.serviceWorkersIdentifier is not null.
     if (isPotentialNavigationOrSubresourceRequest(options.destination))
         return false;
 
     // FIXME: Implement non-subresource request loads.
-    if (isNonSubresourceRequest(options.destination) || !options.serviceWorkerIdentifier)
+    if (isNonSubresourceRequest(options.destination))
         return false;
 
     if (!resource)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to