Changeset 53567 in webkit
- Timestamp:
- Jan 20, 2010 2:31:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53564 r53567 1 2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> 2 3 MSAA: accSelect() is not implemented 4 5 https://bugs.webkit.org/show_bug.cgi?id=33918 6 <rdar://problem/7436861> 7 8 Reviewed by Darin Adler. 9 10 * platform/win/accessibility/selection-and-focus-expected.txt: Added. 11 * platform/win/accessibility/selection-and-focus.html: Added. 12 1 13 2010-01-19 Nikolas Zimmermann <nzimmermann@rim.com> 2 14 -
trunk/WebCore/ChangeLog
r53566 r53567 1 2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> 2 3 MSAA: accSelect() is not implemented 4 5 https://bugs.webkit.org/show_bug.cgi?id=33918 6 <rdar://problem/7436861> 7 8 Reviewed by Darin Adler. 9 10 Test: platform/win/accessibility/selection-and-focus.html 11 12 * accessibility/AccessibilityMenuListOption.cpp: 13 (WebCore::AccessibilityMenuListOption::setSelected): 14 Return early if the object is not selectable. 15 1 16 2010-01-20 Nikolas Zimmermann <nzimmermann@rim.com> 2 17 -
trunk/WebCore/accessibility/AccessibilityMenuListOption.cpp
r53512 r53567 84 84 void AccessibilityMenuListOption::setSelected(bool b) 85 85 { 86 if (!canSetSelectedAttribute()) 87 return; 88 86 89 static_cast<HTMLOptionElement*>(m_element.get())->setSelected(b); 87 90 } -
trunk/WebKit/win/AccessibleBase.cpp
r53512 r53567 30 30 #include "AccessibleImage.h" 31 31 #include "WebView.h" 32 #include <WebCore/AccessibilityListBox.h> 33 #include <WebCore/AccessibilityMenuListPopup.h> 32 34 #include <WebCore/AccessibilityObject.h> 33 35 #include <WebCore/AXObjectCache.h> … … 363 365 } 364 366 365 HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT) 366 { 367 return E_NOTIMPL; 367 HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long selectionFlags, VARIANT vChild) 368 { 369 // According to MSDN, these combinations are invalid. 370 if (((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) || 371 ((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) || 372 ((selectionFlags & (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) || 373 ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) 374 return E_INVALIDARG; 375 376 AccessibilityObject* childObject; 377 HRESULT hr = getAccessibilityObjectForChild(vChild, childObject); 378 379 if (FAILED(hr)) 380 return hr; 381 382 if (selectionFlags & SELFLAG_TAKEFOCUS) 383 childObject->setFocused(true); 384 385 AccessibilityObject* parentObject = childObject->parentObject(); 386 if (!parentObject) 387 return E_INVALIDARG; 388 389 if (selectionFlags & SELFLAG_TAKESELECTION) { 390 if (parentObject->isListBox()) { 391 Vector<RefPtr<AccessibilityObject> > selectedChildren(1); 392 selectedChildren[0] = childObject; 393 static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren); 394 } else if (parentObject->isMenuListPopup()) 395 childObject->setSelected(true); 396 else 397 return E_INVALIDARG; 398 } 399 400 // MSDN says that ADD, REMOVE, and EXTENDSELECTION are invalid for 401 // single-select. 402 if (!parentObject->isMultiSelectable()) 403 return E_INVALIDARG; 404 405 if (selectionFlags & SELFLAG_ADDSELECTION) 406 childObject->setSelected(true); 407 408 if (selectionFlags & SELFLAG_REMOVESELECTION) 409 childObject->setSelected(false); 410 411 // FIXME: Should implement SELFLAG_EXTENDSELECTION. For now, we just return 412 // S_OK, matching Firefox. 413 414 return S_OK; 368 415 } 369 416 -
trunk/WebKit/win/ChangeLog
r53554 r53567 1 2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> 2 3 MSAA: accSelect() is not implemented 4 5 https://bugs.webkit.org/show_bug.cgi?id=33918 6 <rdar://problem/7436861> 7 8 Reviewed by Darin Adler. 9 10 * AccessibleBase.cpp: 11 (AccessibleBase::accSelect): 12 If there is an invalid combination of state flags, return early. If the 13 caller passed the "take focus" flag, focus the object. If the "take 14 selection" flag was passed, check whether the parent object is an 15 AccessibilityListBox; if so, call the object's setSelectedChildren() 16 function. If the parent is an AccessibilityMenuListPopup, call the 17 child object's setSelected() function. Otherwise, if the parent is some 18 other, unsupported object, return early. 19 If the selection flags include "add", "remove", or "extend" selection, 20 and the parent object is not multi-selectable, return early. Otherwise, 21 set or unset the child's selected flag based on the passed flag. 22 1 23 2010-01-20 Steve Falkenburg <sfalken@apple.com> 2 24 -
trunk/WebKitTools/ChangeLog
r53559 r53567 1 2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> 2 3 MSAA: accSelect() is not implemented 4 5 https://bugs.webkit.org/show_bug.cgi?id=33918 6 <rdar://problem/7436861> 7 8 Reviewed by Darin Adler. 9 10 * DumpRenderTree/AccessibilityUIElement.cpp: 11 (takeFocusCallback): 12 Call the object's takeFocus() function. 13 (takeSelectionCallback): 14 Call its takeSelection() function. 15 (addSelectionCallback): 16 Call its addSelection() function. 17 (removeSelectionCallback): 18 Call its removeSelection() function. 19 (AccessibilityUIElement::getJSClass): 20 Add new functions to the JS class definition. 21 22 * DumpRenderTree/AccessibilityUIElement.h: 23 Declare new functions. 24 25 * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: 26 (AccessibilityUIElement::takeFocus): 27 Stubbed. 28 (AccessibilityUIElement::takeSelection): 29 Stubbed. 30 (AccessibilityUIElement::addSelection): 31 Stubbed. 32 (AccessibilityUIElement::removeSelection): 33 Stubbed. 34 35 * DumpRenderTree/mac/AccessibilityUIElementMac.mm: 36 (AccessibilityUIElement::takeFocus): 37 Stubbed. 38 (AccessibilityUIElement::takeSelection): 39 Stubbed. 40 (AccessibilityUIElement::addSelection): 41 Stubbed. 42 (AccessibilityUIElement::removeSelection): 43 Stubbed. 44 45 * DumpRenderTree/win/AccessibilityUIElementWin.cpp: 46 (AccessibilityUIElement::takeFocus): 47 Call the object's accSelect() function, passing the appropriate flag. 48 (AccessibilityUIElement::takeSelection): 49 Ditto. 50 (AccessibilityUIElement::addSelection): 51 Ditto. 52 (AccessibilityUIElement::removeSelection): 53 Ditto. 54 1 55 2010-01-20 Andras Becsi <abecsi@inf.u-szeged.hu> 2 56 -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
r53512 r53567 344 344 return JSValueMakeUndefined(context); 345 345 } 346 347 static JSValueRef takeFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 348 { 349 toAXElement(thisObject)->takeFocus(); 350 return JSValueMakeUndefined(context); 351 } 352 353 static JSValueRef takeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 354 { 355 toAXElement(thisObject)->takeSelection(); 356 return JSValueMakeUndefined(context); 357 } 358 359 static JSValueRef addSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 360 { 361 toAXElement(thisObject)->addSelection(); 362 return JSValueMakeUndefined(context); 363 } 364 365 static JSValueRef removeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 366 { 367 toAXElement(thisObject)->removeSelection(); 368 return JSValueMakeUndefined(context); 369 } 370 346 371 347 372 // Static Value Getters … … 678 703 { "isEqual", isEqualCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 679 704 { "addNotificationListener", addNotificationListenerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 705 { "takeFocus", takeFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 706 { "takeSelection", takeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 707 { "addSelection", addSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 708 { "removeSelection", removeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 680 709 { 0, 0, 0 } 681 710 }; -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
r53512 r53567 75 75 AccessibilityUIElement titleUIElement(); 76 76 AccessibilityUIElement parentElement(); 77 77 78 void takeFocus(); 79 void takeSelection(); 80 void addSelection(); 81 void removeSelection(); 82 78 83 // Methods - platform-independent implementations 79 84 JSStringRef allAttributes(); -
trunk/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
r53512 r53567 594 594 return false; 595 595 } 596 597 void AccessibilityUIElement::takeFocus() 598 { 599 // FIXME: implement 600 } 601 602 void AccessibilityUIElement::takeSelection() 603 { 604 // FIXME: implement 605 } 606 607 void AccessibilityUIElement::addSelection() 608 { 609 // FIXME: implement 610 } 611 612 void AccessibilityUIElement::removeSelection() 613 { 614 // FIXME: implement 615 } -
trunk/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r53512 r53567 816 816 return false; 817 817 } 818 819 void AccessibilityUIElement::takeFocus() 820 { 821 // FIXME: implement 822 } 823 824 void AccessibilityUIElement::takeSelection() 825 { 826 // FIXME: implement 827 } 828 829 void AccessibilityUIElement::addSelection() 830 { 831 // FIXME: implement 832 } 833 834 void AccessibilityUIElement::removeSelection() 835 { 836 // FIXME: implement 837 } -
trunk/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
r53512 r53567 571 571 return (state & STATE_SYSTEM_HASPOPUP) == STATE_SYSTEM_HASPOPUP; 572 572 } 573 574 void AccessibilityUIElement::takeFocus() 575 { 576 m_element->accSelect(SELFLAG_TAKEFOCUS, self()); 577 } 578 579 void AccessibilityUIElement::takeSelection() 580 { 581 m_element->accSelect(SELFLAG_TAKESELECTION, self()); 582 } 583 584 void AccessibilityUIElement::addSelection() 585 { 586 m_element->accSelect(SELFLAG_ADDSELECTION, self()); 587 } 588 589 void AccessibilityUIElement::removeSelection() 590 { 591 m_element->accSelect(SELFLAG_REMOVESELECTION, self()); 592 }
Note: See TracChangeset
for help on using the changeset viewer.