Summary: | WKWebView false positive when testing a.relList.supports("ar"), fails to open USDZ in AR QuickLook | ||
---|---|---|---|
Product: | WebKit | Reporter: | Miles <mail> |
Component: | New Bugs | Assignee: | Antoine Quint <graouts> |
Status: | REOPENED --- | ||
Severity: | Major | CC: | ajuma, berkaytutal+webkit, dino, graouts, mail, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 15 | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 15 |
Description
Miles
2022-04-12 11:51:10 PDT
I think this only requires a check for the runtime setting in HTMLAnchorElement::relList(). Pull request: https://github.com/WebKit/WebKit/pull/294 Thanks Antoine, for looking at this. Just to add more detail to this issue... It's worth noting that some apps *do* support opening USDZ files into AR QuickLook from, I think, a WKWebView. iOS Chrome, iOS Edge, iOS Firefox all use WKWebView for browser rendering (I think). In these apps, a.relList.supports("ar") returns true, and they do indeed open USDZ files correctly in AR QuickLook. Just wanted to make sure that true positive scenario still works. Thanks. Committed r292923 (249690@main): <https://commits.webkit.org/249690@main> Reviewed commits have been landed. Closing PR #294 and removing active labels. Hi. Did this fix ship with iOS 15.5? I'm still seeing false positives in a variety of apps in iOS 15.5. No, this did not make iOS 15.5. However, it did ship in the iOS 16 developer seed made available last week. (In reply to Antoine Quint from comment #7) > No, this did not make iOS 15.5. However, it did ship in the iOS 16 developer > seed made available last week. Amazing. Thanks for confirming. I'll look for it there. Cheers. (In reply to Antoine Quint from comment #7) > No, this did not make iOS 15.5. However, it did ship in the iOS 16 developer > seed made available last week. Hi Antoine. I'm testing this fix on iOS 16.0 Beta (20A5312j) and now seeing false *negatives* with some instances of a.relList.supports("ar"). Specifically, this now breaks in iOS Chrome, Firefox, Edge. For example: - Returns TRUE in Safari. GOOD - AR QuickLook is indeed supported. - Returns TRUE in SFSafariViewController. GOOD - AR QuickLook is indeed supported. - Returns FALSE in Facebook, Instagram, LinkedIn in-app browsers. GOOD - these in-app browsers use basic WKWebView implementation and do not support opening USDZ files in AR QuickLook. But... - Returns FALSE in iOS Chrome, Firefox, Edge, DuckDuckGo browser apps (possibly more). BAD - these third-party browsers, built on WKWebView, have gone the extra mile and do in fact support opening USDZ files in AR QuickLook. Also... - Returns FALSE in iOS Opera and Brave browser apps (possibly more). GOOD - these third-party browsers, also built on WKWebView, have not implemented AR QuickLook support. So although this fix has indeed removed the false positive for WKWebViews, it's too aggressive and now gives false negatives for apps that have implemented AR QuickLook support in their WKWebViews. Is there some other way to detect AR QuickLook support for those WKWebViews that have implemented it? Or, is there something else third-party browser developers need to do to indicate AR QuickLook support in their WKWebViews? Many thanks for your time. (In reply to Antoine Quint from comment #7) > No, this did not make iOS 15.5. However, it did ship in the iOS 16 developer > seed made available last week. Retesting this in iOS 16.0 Public Beta 2 (20A5328h) in Chrome 105.0.5195.19 beta. a.relList.supports("ar") still returns FALSE even though Chrome supports viewing USDZ files. This is a breaking change that will affect many sites. Please advise if there is an alternative solution. Thanks (In reply to Miles from comment #10) > (In reply to Antoine Quint from comment #7) > > No, this did not make iOS 15.5. However, it did ship in the iOS 16 developer > > seed made available last week. > > Retesting this in iOS 16.0 Public Beta 2 (20A5328h) in Chrome 105.0.5195.19 > beta. > > a.relList.supports("ar") still returns FALSE even though Chrome supports > viewing USDZ files. > > This is a breaking change that will affect many sites. > > Please advise if there is an alternative solution. > > Thanks In order for WebKit to report the correct value here, we need a way for embedders like Chrome to tell WebKit that they've added logic to download USDZ files and display them using QLPreviewController. I believe this is correct behaviour. AR Quick Look is not supported directly in WKWebView clients (this is a bug we want to fix). Some browsers might implement their own code to intercept the navigation and display their own "Quick Look" view, but there is no API for those clients to tell the WKWebView they are doing it. So from the perspective of the WKWebView, it is correct to say it doesn't support the "ar" attribute value on "rel". Again, the real solution is to allow all WKWebView clients to support ARQL (that might require some API changes too, based on the hosting UIViewController). I believe this is correct behaviour. AR Quick Look is not supported directly in WKWebView clients (this is a bug we want to fix). Some browsers might implement their own code to intercept the navigation and display their own "Quick Look" view, but there is no API for those clients to tell the WKWebView they are doing it. So from the perspective of the WKWebView, it is correct to say it doesn't support the "ar" attribute value on "rel". Again, the real solution is to allow all WKWebView clients to support ARQL (that might require some API changes too, based on the hosting UIViewController). Should this be closed? |