WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207828
AX: Adopt _AXSCopyPathForAccessibilityBundle for WebKit
https://bugs.webkit.org/show_bug.cgi?id=207828
Summary
AX: Adopt _AXSCopyPathForAccessibilityBundle for WebKit
Eric Liang
Reported
2020-02-16 15:16:43 PST
AX: Adopt _AXSCopyPathForAccessibilityBundle for WebKit
Attachments
Patch
(4.30 KB, patch)
2020-02-16 15:46 PST
,
Eric Liang
no flags
Details
Formatted Diff
Diff
Patch
(4.31 KB, patch)
2020-02-19 23:00 PST
,
Eric Liang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-02-16 15:16:56 PST
<
rdar://problem/59496899
>
Eric Liang
Comment 2
2020-02-16 15:46:57 PST
Created
attachment 390892
[details]
Patch
Darin Adler
Comment 3
2020-02-16 16:43:33 PST
Comment on
attachment 390892
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=390892&action=review
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:-412 > - accessibilityBundlesPath = (__bridge NSString *)_AXSAccessibilityBundlesPath();
Wouldn’t we want to continue using this on iOS 13?
Darin Adler
Comment 4
2020-02-16 16:44:44 PST
Comment on
attachment 390892
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=390892&action=review
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:410 > #if HAVE(ACCESSIBILITY_BUNDLES_PATH)
We should use a new HAVE for the new function, not redefine the existing HAVE that is named after the existing function. Like HAVE(COPY_PATH_FOR_ACCESSIBILITY_BUNDLE).
Eric Liang
Comment 5
2020-02-17 13:07:13 PST
In theory yes we should define a new HAVE, but I was trying to simplify the code, reasons: 1) HAVE_ACCESSIBILITY_BUNDLES_PATH is only used in this one place 2) _AXSAccessibilityBundlesPath() is extremely simple: it just returns "/System/Library/AccessibilitBundles" for iOS and "/System/iOSSupport/System/Library/AccessibilitBundles" for catalyst. 3) The new _AXSCopyPathForAccessibilityBundle is also very simple: it just returns "/System/Library/AccessibilitBundles/WebProcessLoader.axbundle" for iOS and "/System/iOSSupport/System/Library/AccessibilitBundles/WebProcessLoader.axbundle" for catalyst. Based on above three reason, my personal pref (that makes code a little bit easier to read) would be to change the old HAVE and bump to iOS 14. This way, we don't need to have three code paths (1) for less than ios13 (2) for between iOS 13 and iOS 14 (3) for iOS14 and above. Under my preferences, the code that runs in less than iOS 14 is still perfectly valid. But if you think adding the new HAVE still makes more sense, I could for sure switch to that.
Darin Adler
Comment 6
2020-02-18 09:21:20 PST
Comment on
attachment 390892
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=390892&action=review
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:411 > + return (__bridge_transfer NSString *)_AXSCopyPathForAccessibilityBundle(CFSTR("WebProcessLoader"));
In my obsession with encouraging you to keep using the old function, I missed something more important. This file is not compiled with ARC, and in this case I suspect __bridge_transfer is not going to do the right thing. We need something that will compile into a call to autorelease; I think a call to CFAutorelease. I’m going to say review+ but please don’t land this if it’s leaking the string. I don’t think __bridge_transfer actually correctly causes the autorelease needed in non-ARC code.
Eric Liang
Comment 7
2020-02-19 23:00:48 PST
Created
attachment 391264
[details]
Patch
WebKit Commit Bot
Comment 8
2020-02-20 13:50:38 PST
Comment on
attachment 391264
[details]
Patch Clearing flags on attachment: 391264 Committed
r257083
: <
https://trac.webkit.org/changeset/257083
>
WebKit Commit Bot
Comment 9
2020-02-20 13:50:40 PST
All reviewed patches have been landed. Closing bug.
Andy Estes
Comment 10
2020-06-03 09:46:16 PDT
Comment on
attachment 391264
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391264&action=review
> Source/WTF/wtf/PlatformHave.h:423 > -#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000 && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130100 > +#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
This means that HAVE_ACCESSIBILITY_BUNDLES_PATH is undefined on tvOS and watchOS (because __IPHONE_OS_VERSION_MIN_REQUIRED will never be >= 140000 on those platforms). Was that your intention? Filed <
https://webkit.org/b/212704
> HAVE(ACCESSIBILITY_BUNDLES_PATH) is defined in terms of PLATFORM(IOS_FAMILY) but only checks the version of __IPHONE_OS_VERSION_MIN_REQUIRED
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug