[webkit-changes] [WebKit/WebKit] 6991c3: For Blocked cross origin redirect downloads, try r...

Commit Queue noreply at github.com
Fri Oct 11 17:41:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6991c34c554a7341a47cd9979004ad20236b7fa1
      https://github.com/WebKit/WebKit/commit/6991c34c554a7341a47cd9979004ad20236b7fa1
  Author: Nitin Mahendru <nitinmahendru at apple.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    A LayoutTests/http/tests/download/anchor-download-redirect-cross-origin-top-level-expected.txt
    A LayoutTests/http/tests/download/anchor-download-redirect-cross-origin-top-level.html
    M LayoutTests/http/tests/download/anchor-download-redirect-cross-origin.html
    A LayoutTests/http/tests/download/anchor-download-redirect-same-origin-top-level-expected.txt
    A LayoutTests/http/tests/download/anchor-download-redirect-same-origin-top-level.html
    M LayoutTests/http/tests/download/resources/iframe-anchor-cross-origin-redirect-download.html
    A LayoutTests/http/tests/download/resources/sample-render.html
    M LayoutTests/platform/mac-sonoma/TestExpectations
    M LayoutTests/platform/mac-ventura/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.mm
    M Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
    M Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
    M Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
    M Source/WebKit/NetworkProcess/Downloads/PendingDownload.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/NetworkProcess/NetworkLoad.cpp
    M Source/WebKit/NetworkProcess/NetworkLoad.h
    M Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
    M Source/WebKit/WebProcess/Network/NetworkProcessConnection.h
    M Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h

  Log Message:
  -----------
  For Blocked cross origin redirect downloads, try rendering the page instead.
rdar://131962658

Reviewed by Alex Christensen and Pascoe.

An earlier change introduced in rdar://130901951 correctly blocks cross origin redirect downloads.
With This change, we will instead try to render the page instead.

Manually tested with Safari and layout tests are added to validate the
behavior.

* LayoutTests/http/tests/download/anchor-download-redirect-cross-origin-top-level-expected.txt: Added.
* LayoutTests/http/tests/download/anchor-download-redirect-cross-origin-top-level.html: Added.
* LayoutTests/http/tests/download/anchor-download-redirect-cross-origin.html:
* LayoutTests/http/tests/download/anchor-download-redirect-same-origin-top-level-expected.txt: Added.
* LayoutTests/http/tests/download/anchor-download-redirect-same-origin-top-level.html: Copied from LayoutTests/http/tests/download/anchor-download-redirect-cross-origin.html.
* LayoutTests/http/tests/download/resources/iframe-anchor-cross-origin-redirect-download.html:
* LayoutTests/http/tests/download/resources/sample-render.html: Added.
* LayoutTests/platform/mac-sonoma/TestExpectations:
* LayoutTests/platform/mac-ventura/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.mm:
(WTF::computeSDKAlignedBehaviors):
* Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* Source/WebKit/NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::startDownload):
* Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload):
(WebKit::PendingDownload::willSendRedirectedRequest):
* Source/WebKit/NetworkProcess/Downloads/PendingDownload.h:
(WebKit::PendingDownload::create):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::loadCancelledDownloadRedirectRequestInFrame):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::webFrameID const):
(WebKit::NetworkLoad::webPageID const):
(WebKit::NetworkLoad::networkProcess):
(WebKit::NetworkLoad::willPerformHTTPRedirection):
* Source/WebKit/NetworkProcess/NetworkLoad.h:
* Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::loadCancelledDownloadRedirectRequestInFrame):
* Source/WebKit/WebProcess/Network/NetworkProcessConnection.h:
* Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

Originally-landed-as: 280938.98 at safari-7619-branch (48dd822d88e1). rdar://136110563
Canonical link: https://commits.webkit.org/285050@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list