Summary: | MSAA: accSelect returns error codes for most elements that arent listbox or menupopup related | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alice Liu <alice.barraclough> | ||||
Component: | Accessibility | Assignee: | Alice Liu <alice.barraclough> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Attachments: |
|
Description
Alice Liu
2010-02-04 13:17:14 PST
Created attachment 48162 [details]
patch
Attachment 48162 [details] did not pass style-queue:
Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/win/AccessibleBase.cpp:393: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4]
WebKit/win/AccessibleBase.cpp:394: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4]
WebKit/win/AccessibleBase.cpp:422: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4]
WebKit/win/AccessibleBase.cpp:423: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4]
WebKit/win/AccessibleBase.cpp:424: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4]
Total errors found: 5
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 48162 [details] patch > Index: WebKit/win/AccessibleBase.cpp > =================================================================== > --- WebKit/win/AccessibleBase.cpp (revision 54295) > +++ WebKit/win/AccessibleBase.cpp (working copy) > @@ -388,6 +388,13 @@ HRESULT STDMETHODCALLTYPE AccessibleBase > ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) > return E_INVALIDARG; > > + // Match Firefox by returning E_FAIL for these situations that don't make sense. > + const long allSELFLAGs = SELFLAG_TAKEFOCUS | SELFLAG_TAKESELECTION | SELFLAG_EXTENDSELECTION | SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION; > + if (((selectionFlags & allSELFLAGs) == SELFLAG_NONE) || > + ((selectionFlags & allSELFLAGs) == SELFLAG_ADDSELECTION) || > + ((selectionFlags & allSELFLAGs) == SELFLAG_EXTENDSELECTION)) > + return E_FAIL; > + Firefox doesn't allow you to add an object to the selection or extend the selection without also passing TAKEFOCUS? MSDN seems to say that ADDSELECTION and EXTENDSELECTION are valid without any other flags. > AccessibilityObject* childObject; > HRESULT hr = getAccessibilityObjectForChild(vChild, childObject); > > @@ -406,15 +413,16 @@ HRESULT STDMETHODCALLTYPE AccessibleBase > Vector<RefPtr<AccessibilityObject> > selectedChildren(1); > selectedChildren[0] = childObject; > static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren); > - } else if (parentObject->isMenuListPopup()) > + } else // any element may be selectable by virtue of it having the aria-selected property > childObject->setSelected(true); > - else > - return E_INVALIDARG; > } TAKESELECTION is meant to select that object and deselect any other objects, so it might be good to ASSERT(!parentObject->isMultiSelectable()) in the else condition to catch cases where TAKESELECTION could allow multiple items to be selected. r=me! Thanks for fixing this! Comment on attachment 48162 [details] patch > Index: WebKit/win/AccessibleBase.cpp > =================================================================== > --- WebKit/win/AccessibleBase.cpp (revision 54295) > +++ WebKit/win/AccessibleBase.cpp (working copy) > @@ -388,6 +388,13 @@ HRESULT STDMETHODCALLTYPE AccessibleBase > ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) This is a copy/paste error. It should read: ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION))) Feel free to fix that :) (In reply to comment #3) > (From update of attachment 48162 [details]) > > Index: WebKit/win/AccessibleBase.cpp > > =================================================================== > > --- WebKit/win/AccessibleBase.cpp (revision 54295) > > +++ WebKit/win/AccessibleBase.cpp (working copy) > > @@ -388,6 +388,13 @@ HRESULT STDMETHODCALLTYPE AccessibleBase > > ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) > > return E_INVALIDARG; > > > > + // Match Firefox by returning E_FAIL for these situations that don't make sense. > > + const long allSELFLAGs = SELFLAG_TAKEFOCUS | SELFLAG_TAKESELECTION | SELFLAG_EXTENDSELECTION | SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION; > > + if (((selectionFlags & allSELFLAGs) == SELFLAG_NONE) || > > + ((selectionFlags & allSELFLAGs) == SELFLAG_ADDSELECTION) || > > + ((selectionFlags & allSELFLAGs) == SELFLAG_EXTENDSELECTION)) > > + return E_FAIL; > > + > > Firefox doesn't allow you to add an object to the selection or extend the > selection without also passing TAKEFOCUS? MSDN seems to say that ADDSELECTION > and EXTENDSELECTION are valid without any other flags. Ya, this is the way it is in Firefox. However, after checking with IE8, i'm deciding to remove this chunk of code because this isn't what IE8 does. |