Bug 228174

Summary: javaScriptEnabled is wrongly marked as deprecated for all iOS version in Xcode 13 beta3
Product: WebKit Reporter: honma
Component: WebKit APIAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Major CC: achristensen, beidson, cdumez, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
Test project.
none
Patch v1 none

Description honma 2021-07-21 20:33:42 PDT
Created attachment 433986 [details]
Test project.

According to the documentation, this api is available on iOS 8.0 to 14.0, but after specifying the version with @available attribute on xcode beta3, the following warning still appears when compiling. 

>'javaScriptEnabled' is deprecated: Use WKWebPagePreferences.allowsContentJavaScript to disable content JavaScript on a per-navigation basis

This problem does not exist on beta2. It seems to be a bug introduced by beta3. You can build the attached test project with Xcode 13 beta3 to reproduce.
Comment 1 Radar WebKit Bug Importer 2021-07-21 21:59:59 PDT
<rdar://problem/80940334>
Comment 2 Alex Christensen 2021-07-22 09:18:55 PDT
This was deprecated in r256715 and the macro was updated in r271813.
I'm curious what the WKPreferences.h looked like after javaScriptEnabled in beta2 and beta3.
Comment 3 Brady Eidson 2021-07-22 13:58:07 PDT
Created attachment 434033 [details]
Patch v1
Comment 4 Brady Eidson 2021-07-22 14:03:19 PDT
https://trac.webkit.org/changeset/279089/webkit is where we think we got this wrong, for reference.
Comment 5 EWS 2021-07-22 15:45:58 PDT
Committed r280202 (239890@main): <https://commits.webkit.org/239890@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434033 [details].