[Webkit-unassigned] [Bug 200367] AX: don't hard code webprocessloader bundle path
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 4 10:44:16 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=200367
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |darin at apple.com
Attachment #375364|review? |review-
Flags| |
--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 375364
--> https://bugs.webkit.org/attachment.cgi?id=375364
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=375364&action=review
>> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:325
>> + NSString *accessibilityBundlePath = (__bridge NSString *)_AXSAccessibilityBundlesPath();
>
> you'll need to conditonalize this based on availability per platform and release
Exactly.
Also, I think the code above isn’t right yet because it doesn’t add "WebProcessLoader.axbundle" to the end of the path.
One good way to do following the WebKit style is to add lines to Platform.h telling us where it’s available. You can use an example like HAVE_UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI or HAVE_DESIGN_SYSTEM_UI_FONTS to get the general style right. Could name it something like HAVE_ACCESSIBILITY_BUNDLES_PATH
Then I would suggest adding something like this above:
#if PLATFORM(IOS_FAMILY) && !HAVE(ACCESSIBILITY_BUNDLES_PATH)
static NSString *accessibilityBundlesDirectory()
{
NSString *path = (__bridge NSString *)GSSystemRootDirectory();
#if PLATFORM(MACCATALYST)
path = [path stringByAppendingString:@"System/iOSSupport"];
#endif
return [path stringByAppendingString:@"System/Library/AccessibilityBundles"];
}
#endif
Then below we would write:
#if HAVE(ACCESSIBILITY_BUNDLES_PATH)
NSString *directory = (__bridge NSString *)_AXSAccessibilityBundlesPath();
#else
NSString *directory = accessibilityBundlesDirectory();
#endif
NSString *path = [directory stringByAppendingPathComponent:@"WebProcessLoader.axbundle"];
Later we can delete the !HAVE(ACCESSIBILITY_BUNDLES_PATH) part, once we have the function everywhere.
Also, we need to find a way to test this. I assume the posted patch wasn’t tested yet since it didn’t include the WebProcessLoader bundle name.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190804/7c7bd041/attachment.html>
More information about the webkit-unassigned
mailing list