Bug 242502

Summary: [Web share] canShare() validation returns incorrect result when sharing valid files but invalid URL
Product: WebKit Reporter: Marcos Caceres <marcosc>
Component: New BugsAssignee: Marcos Caceres <marcosc>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Marcos Caceres 2022-07-08 02:54:46 PDT
As shown in /LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/web-share/canShare.https-expected.txt, we are failing a test:

FAIL canShare() files member assert_false: invalid URL invalidates the share expected false got true

In WebKit, canShare() assumes that if any of the things passed are valid, then canShare() returns true. 

However, the spec says that, if something can't be shared, then canShare() should return false.
Comment 1 Marcos Caceres 2022-07-08 03:25:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2217
Comment 2 EWS 2022-07-12 18:08:09 PDT
Committed 252403@main (44186059d58a): <https://commits.webkit.org/252403@main>

Reviewed commits have been landed. Closing PR #2217 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-07-12 18:09:16 PDT
<rdar://problem/96921316>