RESOLVED FIXED 226204
AX: Fix build failure for WK API WTF::String usage
https://bugs.webkit.org/show_bug.cgi?id=226204
Summary AX: Fix build failure for WK API WTF::String usage
chris fleizach
Reported 2021-05-24 18:13:26 PDT
Attachments
patch (2.85 KB, patch)
2021-05-24 18:15 PDT, chris fleizach
no flags
patch (4.96 KB, patch)
2021-05-24 18:48 PDT, chris fleizach
no flags
Radar WebKit Bug Importer
Comment 1 2021-05-24 18:13:43 PDT
chris fleizach
Comment 2 2021-05-24 18:15:38 PDT
Tim Horton
Comment 3 2021-05-24 18:42:03 PDT
Comment on attachment 429605 [details] patch I think the caller of WKAccessibilityTestingInjectPreference in WKTR likely needs to change too
chris fleizach
Comment 4 2021-05-24 18:48:37 PDT
Tim Horton
Comment 5 2021-05-24 18:56:19 PDT
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
Darin Adler
Comment 6 2021-05-24 19:04:37 PDT
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).
Darin Adler
Comment 7 2021-05-24 19:08:41 PDT
Instead of: toWK((String)encodedString).get() Should use: toWK(encodedString.createJSStringRef.get()) As long as we include the header AccessibilityCommonMac.h and StringFunctions.h
Darin Adler
Comment 8 2021-05-24 19:10:38 PDT
Or could add createWKStringRef to the NSString category.
Darin Adler
Comment 9 2021-05-24 19:11:01 PDT
Could name that toWK and overload it for NSString.
EWS
Comment 10 2021-05-24 19:33:23 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.