Modified: trunk/Source/WebCore/ChangeLog (289657 => 289658)
--- trunk/Source/WebCore/ChangeLog 2022-02-11 20:10:31 UTC (rev 289657)
+++ trunk/Source/WebCore/ChangeLog 2022-02-11 20:19:40 UTC (rev 289658)
@@ -1,3 +1,17 @@
+2022-02-11 Chris Dumez <[email protected]>
+
+ Regression(r287684) Microsoft teams meeting URLs fail to open the app
+ https://bugs.webkit.org/show_bug.cgi?id=236516
+ <rdar://88678598>
+
+ Reviewed by Geoffrey Garen.
+
+ Add a quirk for Microsoft teams.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
+ * page/Quirks.h:
+
2022-02-11 Gabriel Nava Marino <[email protected]>
Keep promise in scope when calling DeferredPromise::reject
Modified: trunk/Source/WebCore/page/Quirks.cpp (289657 => 289658)
--- trunk/Source/WebCore/page/Quirks.cpp 2022-02-11 20:10:31 UTC (rev 289657)
+++ trunk/Source/WebCore/page/Quirks.cpp 2022-02-11 20:19:40 UTC (rev 289658)
@@ -1416,6 +1416,11 @@
#endif
}
+bool Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture(StringView protocol, const SecurityOriginData& requesterOrigin)
+{
+ return protocol == "msteams" && requesterOrigin.host == "teams.live.com";
+}
+
#if ENABLE(IMAGE_ANALYSIS)
bool Quirks::needsToForceUserSelectAndUserDragWhenInstallingImageOverlay() const
Modified: trunk/Source/WebCore/page/Quirks.h (289657 => 289658)
--- trunk/Source/WebCore/page/Quirks.h 2022-02-11 20:10:31 UTC (rev 289657)
+++ trunk/Source/WebCore/page/Quirks.h 2022-02-11 20:19:40 UTC (rev 289658)
@@ -38,6 +38,7 @@
class HTMLVideoElement;
class LayoutUnit;
class PlatformMouseEvent;
+struct SecurityOriginData;
#if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
class RegistrableDomain;
@@ -93,6 +94,7 @@
WEBCORE_EXPORT bool shouldIgnoreAriaForFastPathContentObservationCheck() const;
WEBCORE_EXPORT bool shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints() const;
WEBCORE_EXPORT bool shouldIgnoreContentObservationForSyntheticClick(bool isFirstSyntheticClickOnPage) const;
+ WEBCORE_EXPORT static bool shouldAllowNavigationToCustomProtocolWithoutUserGesture(StringView protocol, const SecurityOriginData& requesterOrigin);
WEBCORE_EXPORT bool needsYouTubeMouseOutQuirk() const;
Modified: trunk/Source/WebKit/ChangeLog (289657 => 289658)
--- trunk/Source/WebKit/ChangeLog 2022-02-11 20:10:31 UTC (rev 289657)
+++ trunk/Source/WebKit/ChangeLog 2022-02-11 20:19:40 UTC (rev 289658)
@@ -1,3 +1,16 @@
+2022-02-11 Chris Dumez <[email protected]>
+
+ Regression(r287684) Microsoft teams meeting URLs fail to open the app
+ https://bugs.webkit.org/show_bug.cgi?id=236516
+ <rdar://88678598>
+
+ Reviewed by Geoffrey Garen.
+
+ Add a quirk for Microsoft teams.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+
2022-02-11 Simon Fraser <[email protected]>
Introduce a RemoteLayerBackingStoreCollection subclass for GPU Process-based rendering
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (289657 => 289658)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2022-02-11 20:10:31 UTC (rev 289657)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2022-02-11 20:19:40 UTC (rev 289658)
@@ -5460,9 +5460,12 @@
// Sandboxed iframes should be allowed to open external apps via custom protocols unless explicitely allowed (https://html.spec.whatwg.org/#hand-off-to-external-software).
bool canHandleRequest = navigationActionData.canHandleRequest || m_urlSchemeHandlersByScheme.contains(request.url().protocol().toStringWithoutCopying());
if (!canHandleRequest && !destinationFrameInfo->isMainFrame() && !frameSandboxAllowsOpeningExternalCustomProtocols(navigationActionData.effectiveSandboxFlags, !!navigationActionData.userGestureTokenIdentifier)) {
- WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "Ignoring request to load this main resource because it has a custom protocol and comes from a sandboxed iframe");
- process->send(Messages::WebPage::AddConsoleMessage(frame.frameID(), MessageSource::Security, MessageLevel::Error, "Ignoring request to load this main resource because it has a custom protocol and comes from a sandboxed iframe"_s, std::nullopt), webPageID);
- return receivedPolicyDecision(PolicyAction::Ignore, m_navigationState->navigation(navigationID), nullptr, WTFMove(navigationAction), WTFMove(sender));
+ if (!sourceFrameInfo || !m_preferences->needsSiteSpecificQuirks() || !Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture(request.url().protocol(), sourceFrameInfo->securityOrigin())) {
+ WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "Ignoring request to load this main resource because it has a custom protocol and comes from a sandboxed iframe");
+ process->send(Messages::WebPage::AddConsoleMessage(frame.frameID(), MessageSource::Security, MessageLevel::Error, "Ignoring request to load this main resource because it has a custom protocol and comes from a sandboxed iframe"_s, std::nullopt), webPageID);
+ return receivedPolicyDecision(PolicyAction::Ignore, m_navigationState->navigation(navigationID), nullptr, WTFMove(navigationAction), WTFMove(sender));
+ }
+ process->send(Messages::WebPage::AddConsoleMessage(frame.frameID(), MessageSource::Security, MessageLevel::Warning, "In the future, requests to navigate to a URL with custom protocol from a sandboxed iframe will be ignored"_s, std::nullopt), webPageID);
}
#endif