Skip to content

Commit

Permalink
REGRESSION(266247@main): PDF "Save" button does nothing, "Print" func…
Browse files Browse the repository at this point in the history
…tion also broken

https://bugs.webkit.org/show_bug.cgi?id=260771

Reviewed by Chris Dumez.

The PDF.js viewer protocol and resource protocols both should be treated
the same as HTTP protocols and have access to blob URLs. The protocol is
an implementation detail that shouldn't affect how the web content
behaves and certainly should not restrict access to web platform
features.

* Source/WebCore/page/SecurityOrigin.cpp:
(WebCore::isSafelistedBlobProtocol):

Canonical link: https://commits.webkit.org/270274@main
  • Loading branch information
mcatanzaro committed Nov 6, 2023
1 parent 245f14a commit 58df23f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/WebCore/page/SecurityOrigin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ inline bool isSafelistedBlobProtocol(const URL& url)
// except that assert gets hit on certain tests.
return url.protocolIsInHTTPFamily()
|| url.protocolIsFile()
#if PLATFORM(GTK) || PLATFORM(WPE)
|| url.protocolIs("resource"_s)
#endif
#if ENABLE(PDFJS)
|| url.protocolIs("webkit-pdfjs-viewer"_s)
#endif
|| LegacySchemeRegistry::schemeIsHandledBySchemeHandler(url.protocol());
}

Expand Down

0 comments on commit 58df23f

Please sign in to comment.