Bug 56379 - WK2: Need to propagate enhanced accessibility flag from UI -> web process
Summary: WK2: Need to propagate enhanced accessibility flag from UI -> web process
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: chris fleizach
Depends on:
Reported: 2011-03-15 08:40 PDT by chris fleizach
Modified: 2011-03-16 14:02 PDT (History)
4 users (show)

See Also:

patch (11.48 KB, patch)
2011-03-15 08:58 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (11.48 KB, patch)
2011-03-15 16:53 PDT, chris fleizach
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2011-03-15 08:40:36 PDT
The enhanced accessibility flag needs to be propagated from the UI process to the web process.
Comment 1 chris fleizach 2011-03-15 08:58:41 PDT
Created attachment 85813 [details]
Comment 2 WebKit Review Bot 2011-03-15 09:00:58 PDT
Attachment 85813 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebKit2/WebProcess/WebProcess.cpp:54:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 14 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 chris fleizach 2011-03-15 16:53:41 PDT
Created attachment 85876 [details]
Comment 4 Darin Adler 2011-03-15 18:06:58 PDT
Comment on attachment 85876 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=85876&action=review

> Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp:44
> +void WebContet::platformInvalidateContext()

Typo: WebContet.

> Source/WebKit2/UIProcess/mac/WebContextMac.mm:40
> +NSString *NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification";

This should be marked “static” so it gets internal linkage since it’s only used within this file. Also, it’s not appropriate to use an NS prefix on something inside WebKit, because it could conflict with something in the underlying framework, so the constant’s name should not have the NS prefix, even if the string should.

> Source/WebKit2/UIProcess/mac/WebContextMac.mm:107
> +    m_enhancedAccessibilityObserver = (CFTypeRef)[[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
> +        setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]);
> +    }];

You should not need a cast to CFTypeRef.
Comment 5 chris fleizach 2011-03-16 14:02:01 PDT