diff options
Diffstat (limited to 'Tools/DumpRenderTree/AccessibilityUIElement.h')
-rw-r--r-- | Tools/DumpRenderTree/AccessibilityUIElement.h | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.h b/Tools/DumpRenderTree/AccessibilityUIElement.h index f1f21b69b..349e40976 100644 --- a/Tools/DumpRenderTree/AccessibilityUIElement.h +++ b/Tools/DumpRenderTree/AccessibilityUIElement.h @@ -31,7 +31,7 @@ #include <wtf/Platform.h> #include <wtf/Vector.h> -#if PLATFORM(MAC) +#if PLATFORM(COCOA) #ifdef __OBJC__ typedef id PlatformUIElement; #else @@ -53,7 +53,7 @@ typedef AtkObject* PlatformUIElement; typedef void* PlatformUIElement; #endif -#if PLATFORM(MAC) +#if PLATFORM(COCOA) #ifdef __OBJC__ typedef id NotificationHandler; #else @@ -109,6 +109,7 @@ public: void uiElementArrayAttributeValue(JSStringRef attribute, Vector<AccessibilityUIElement>& elements) const; AccessibilityUIElement uiElementAttributeValue(JSStringRef attribute) const; bool boolAttributeValue(JSStringRef attribute); + void setBoolAttributeValue(JSStringRef attribute, bool value); bool isAttributeSupported(JSStringRef attribute); bool isAttributeSettable(JSStringRef attribute); bool isPressActionSupported(); @@ -117,11 +118,13 @@ public: JSStringRef role(); JSStringRef subrole(); JSStringRef roleDescription(); + JSStringRef computedRoleString(); JSStringRef title(); JSStringRef description(); JSStringRef language(); JSStringRef stringValue(); JSStringRef accessibilityValue() const; + void setValue(JSStringRef); JSStringRef helpText() const; JSStringRef orientation() const; double x(); @@ -147,6 +150,9 @@ public: void setSelectedChild(AccessibilityUIElement*) const; unsigned selectedChildrenCount() const; AccessibilityUIElement selectedChildAtIndex(unsigned) const; + void setSelectedChildAtIndex(unsigned) const; + void removeSelectionAtIndex(unsigned) const; + void clearSelectedChildren() const; bool isExpanded() const; bool isChecked() const; @@ -154,6 +160,8 @@ public: bool isOffScreen() const; bool isCollapsed() const; bool isIgnored() const; + bool isSingleLine() const; + bool isMultiLine() const; bool isIndeterminate() const; bool hasPopup() const; int hierarchicalLevel() const; @@ -191,6 +199,7 @@ public: // ARIA specific AccessibilityUIElement ariaOwnsElementAtIndex(unsigned); AccessibilityUIElement ariaFlowToElementAtIndex(unsigned); + AccessibilityUIElement ariaControlsElementAtIndex(unsigned); // ARIA Drag and Drop bool ariaIsGrabbed() const; @@ -206,14 +215,23 @@ public: JSStringRef stringForRange(unsigned location, unsigned length); JSStringRef attributedStringForRange(unsigned location, unsigned length); bool attributedStringRangeIsMisspelled(unsigned location, unsigned length); - unsigned uiElementCountForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly); - AccessibilityUIElement uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly); + unsigned uiElementCountForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly); + AccessibilityUIElement uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly); + JSStringRef selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity); #if PLATFORM(IOS) void elementsForRange(unsigned location, unsigned length, Vector<AccessibilityUIElement>& elements); JSStringRef stringForSelection(); void increaseTextSelection(); void decreaseTextSelection(); AccessibilityUIElement linkedElement(); + + bool scrollPageUp(); + bool scrollPageDown(); + bool scrollPageLeft(); + bool scrollPageRight(); + + bool hasContainedByFieldsetTrait(); + AccessibilityUIElement fieldsetAncestorElement(); #endif #if PLATFORM(GTK) || PLATFORM(EFL) @@ -232,6 +250,7 @@ public: AccessibilityUIElement verticalScrollbar() const; // Text markers. + AccessibilityTextMarkerRange lineTextMarkerRangeForTextMarker(AccessibilityTextMarker*); AccessibilityTextMarkerRange textMarkerRangeForElement(AccessibilityUIElement*); AccessibilityTextMarkerRange textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker); AccessibilityTextMarker startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*); @@ -244,6 +263,19 @@ public: AccessibilityUIElement accessibilityElementForTextMarker(AccessibilityTextMarker*); AccessibilityTextMarker startTextMarker(); AccessibilityTextMarker endTextMarker(); + AccessibilityTextMarkerRange leftWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarkerRange rightWordTextMarkerRangeForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker previousWordStartTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker nextWordEndTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarkerRange paragraphTextMarkerRangeForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker previousParagraphStartTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker nextParagraphEndTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarkerRange sentenceTextMarkerRangeForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker previousSentenceStartTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarker nextSentenceEndTextMarkerForTextMarker(AccessibilityTextMarker*); + AccessibilityTextMarkerRange selectedTextMarkerRange(); + void resetSelectedTextMarkerRange(); + bool setSelectedVisibleTextRange(AccessibilityTextMarkerRange*); JSStringRef stringForTextMarkerRange(AccessibilityTextMarkerRange*); int textMarkerRangeLength(AccessibilityTextMarkerRange*); @@ -263,17 +295,17 @@ public: void removeNotificationListener(); #if PLATFORM(IOS) - JSStringRef iphoneLabel(); - JSStringRef iphoneValue(); - JSStringRef iphoneTraits(); - JSStringRef iphoneHint(); - JSStringRef iphoneIdentifier(); - bool iphoneIsElement(); - int iphoneElementTextPosition(); - int iphoneElementTextLength(); + JSStringRef traits(); + JSStringRef identifier(); + int elementTextPosition(); + int elementTextLength(); AccessibilityUIElement headerElementAtIndex(unsigned); // This will simulate the accessibilityDidBecomeFocused API in UIKit. void assistiveTechnologySimulatedFocus(); + + bool isTextArea() const; + bool isSearchField() const; + #endif // PLATFORM(IOS) #if PLATFORM(MAC) && !PLATFORM(IOS) @@ -289,9 +321,7 @@ private: static JSClassRef getJSClass(); PlatformUIElement m_element; -#if PLATFORM(IOS) - JSObjectRef m_notificationFunctionCallback; -#elif PLATFORM(MAC) +#if PLATFORM(COCOA) // A retained, platform specific object used to help manage notifications for this object. NotificationHandler m_notificationHandler; #endif |