| Summary: | AX: Fix build failure for WK API WTF::String usage | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | chris fleizach <cfleizach> | ||||||
| Component: | Accessibility | Assignee: | chris fleizach <cfleizach> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | darin, thorton, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Attachments: |
|
||||||||
|
Description
chris fleizach
2021-05-24 18:13:26 PDT
Created attachment 429605 [details]
patch
Comment on attachment 429605 [details]
patch
I think the caller of WKAccessibilityTestingInjectPreference in WKTR likely needs to change too
Created attachment 429607 [details]
patch
Comment on attachment 429607 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=429607&action=review > Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:105 > + WKAccessibilityTestingInjectPreference(page, toWKString(context, JSValueMakeString(context, domain)).get(), toWKString(context, JSValueMakeString(context, key)).get(), toWK((String)encodedString).get()); Probably could be WKStringCreateWithJSString Comment on attachment 429607 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=429607&action=review >> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:105 >> + WKAccessibilityTestingInjectPreference(page, toWKString(context, JSValueMakeString(context, domain)).get(), toWKString(context, JSValueMakeString(context, key)).get(), toWK((String)encodedString).get()); > > Probably could be WKStringCreateWithJSString instead of: toWKString(context, JSValueMakeString(context, domain)).get() write: toWK(domain).get() As long as you include the header StringFunctions.h. Also should come up with a better way to convert an NSString to a WKString that does not involve converting to (String). Instead of:
toWK((String)encodedString).get()
Should use:
toWK(encodedString.createJSStringRef.get())
As long as we include the header AccessibilityCommonMac.h and StringFunctions.h
Or could add createWKStringRef to the NSString category. Could name that toWK and overload it for NSString. Committed r277987 (238100@main): <https://commits.webkit.org/238100@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429607 [details]. |