Bug 118094

Summary: Add an accessibility delegate interface to Windows solution
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, bfulgham, cfleizach, commit-queue, dmazzoni, japhet, jdiggs, mario, roger_fong
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
patch
bfulgham: review-
patch v2 bfulgham: review+

Description Roger Fong 2013-06-26 15:30:26 PDT
So client's can do stuff when Frame loads start and finish.
Some accessibility programs like WE require that certain notifications be sent from OUTSIDE of webkit when a frame is being loaded.
This API allows this.
Comment 1 Roger Fong 2013-06-26 15:30:43 PDT
<rdar://problem/10055712>
Comment 2 Roger Fong 2013-06-26 16:20:47 PDT
Created attachment 205537 [details]
patch

tentative first patch
Comment 3 WebKit Commit Bot 2013-06-26 16:22:13 PDT
Attachment 205537 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/accessibility/win/AXObjectCacheWin.cpp', u'Source/WebCore/loader/EmptyClients.h', u'Source/WebCore/page/ChromeClient.h', u'Source/WebKit/ChangeLog', u'Source/WebKit/WebKit.vcxproj/Interfaces/Interfaces.vcxproj', u'Source/WebKit/WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters', u'Source/WebKit/win/ChangeLog', u'Source/WebKit/win/Interfaces/IWebView.idl', u'Source/WebKit/win/Interfaces/WebKit.idl', u'Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp', u'Source/WebKit/win/WebCoreSupport/WebChromeClient.h', u'Source/WebKit/win/WebView.cpp', u'Source/WebKit/win/WebView.h']" exit_code: 1
Source/WebKit/win/WebView.cpp:2875:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.cpp:2882:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.h:143:  The parameter name "d" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit/win/WebView.h:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.h:146:  The parameter name "d" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit/win/WebView.h:146:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Roger Fong 2013-06-26 16:23:06 PDT
style bot no like our COM syntax
Comment 5 Brent Fulgham 2013-06-26 16:25:17 PDT
Comment on attachment 205537 [details]
patch

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

Looks good -- but we're missing the AccessibilityDelegate.idl file!

> Source/WebKit/win/WebView.cpp:2885
> +        return E_FAIL;

I usually return E_POINTER
Comment 6 Roger Fong 2013-06-26 16:32:27 PDT
(In reply to comment #5)
> (From update of attachment 205537 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=205537&action=review
> 
> Looks good -- but we're missing the AccessibilityDelegate.idl file!
> 
Doh.

> > Source/WebKit/win/WebView.cpp:2885
> > +        return E_FAIL;
> 
> I usually return E_POINTER
 Hmm what's the difference? I was just copying what the other delegate getters in the file were returning.
Comment 7 Brent Fulgham 2013-06-26 16:34:24 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 205537 [details] [details])
> > > Source/WebKit/win/WebView.cpp:2885
> > > +        return E_FAIL;
> > 
> > I usually return E_POINTER
>  Hmm what's the difference? I was just copying what the other delegate getters in the file were returning.

E_POINTER is returned when the caller doesn't supply a valid pointer to the routine.
Comment 8 Roger Fong 2013-06-26 16:56:09 PDT
Created attachment 205543 [details]
patch v2
Comment 9 Brent Fulgham 2013-06-26 16:57:27 PDT
Comment on attachment 205543 [details]
patch v2

Looks good!
Comment 10 WebKit Commit Bot 2013-06-26 16:58:59 PDT
Attachment 205543 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/accessibility/win/AXObjectCacheWin.cpp', u'Source/WebCore/loader/EmptyClients.h', u'Source/WebCore/page/ChromeClient.h', u'Source/WebKit/ChangeLog', u'Source/WebKit/WebKit.vcxproj/Interfaces/Interfaces.vcxproj', u'Source/WebKit/WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters', u'Source/WebKit/win/ChangeLog', u'Source/WebKit/win/Interfaces/AccessibilityDelegate.idl', u'Source/WebKit/win/Interfaces/IWebView.idl', u'Source/WebKit/win/Interfaces/WebKit.idl', u'Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp', u'Source/WebKit/win/WebCoreSupport/WebChromeClient.h', u'Source/WebKit/win/WebView.cpp', u'Source/WebKit/win/WebView.h']" exit_code: 1
Source/WebKit/win/WebView.cpp:2875:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.cpp:2882:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.h:143:  The parameter name "d" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit/win/WebView.h:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit/win/WebView.h:146:  The parameter name "d" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit/win/WebView.h:146:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Brent Fulgham 2013-06-26 17:10:22 PDT
Comment on attachment 205543 [details]
patch v2

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

You might consider fixing the parameter name warnings from the style bot. I'd also get rid of the STDMETHODCALLTYPE declarations in the CPP file (leave them in the header file).

> Source/WebKit/win/WebView.cpp:2874
> +HRESULT STDMETHODCALLTYPE WebView::setAccessibilityDelegate(

You don't need STDMETHODCALLTYPE in the implementation -- only in the header.

> Source/WebKit/win/WebView.cpp:2881
> +HRESULT STDMETHODCALLTYPE WebView::accessibilityDelegate(

You can remove STDMETHODCALLTYPE
Comment 12 Roger Fong 2013-06-26 17:43:32 PDT
http://trac.webkit.org/changeset/152065