Bug 56379

Summary: WK2: Need to propagate enhanced accessibility flag from UI -> web process
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch
none
patch darin: review+

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]
patch
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]
patch
Comment 4 Darin Adler 2011-03-15 18:06:58 PDT
Comment on attachment 85876 [details]
patch

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
http://trac.webkit.org/changeset/81274