diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp')
-rw-r--r-- | WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp index 22bbbaa..13c642a 100644 --- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp +++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp @@ -424,6 +424,18 @@ static JSValueRef textMarkerRangeLengthCallback(JSContextRef context, JSObjectRe return JSValueMakeNumber(context, (int)toAXElement(thisObject)->textMarkerRangeLength(range)); } +static JSValueRef textMarkerForPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + int x = 0; + int y = 0; + if (argumentCount == 2) { + x = JSValueToNumber(context, arguments[0], exception); + y = JSValueToNumber(context, arguments[1], exception); + } + + return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->textMarkerForPoint(x, y)); +} + static JSValueRef textMarkerRangeForMarkersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { AccessibilityTextMarker* startMarker = 0; @@ -662,6 +674,11 @@ static JSValueRef getIsCollapsedCallback(JSContextRef context, JSObjectRef thisO return JSValueMakeBoolean(context, toAXElement(thisObject)->isCollapsed()); } +static JSValueRef isIgnoredCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) +{ + return JSValueMakeBoolean(context, toAXElement(thisObject)->isIgnored()); +} + static JSValueRef getHasPopupCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) { return JSValueMakeBoolean(context, toAXElement(thisObject)->hasPopup()); @@ -752,6 +769,11 @@ AccessibilityUIElement AccessibilityUIElement::accessibilityElementForTextMarker return 0; } +AccessibilityTextMarker AccessibilityUIElement::textMarkerForPoint(int x, int y) +{ + return 0; +} + #endif // Destruction @@ -814,6 +836,7 @@ JSClassRef AccessibilityUIElement::getJSClass() { "orientation", getOrientationCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "ariaIsGrabbed", getARIAIsGrabbedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "ariaDropEffects", getARIADropEffectsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "isIgnored", isIgnoredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { 0, 0, 0, 0 } }; @@ -872,6 +895,7 @@ JSClassRef AccessibilityUIElement::getJSClass() { "endTextMarkerForTextMarkerRange", endTextMarkerForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "accessibilityElementForTextMarker", accessibilityElementForTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "textMarkerRangeLength", textMarkerRangeLengthCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "textMarkerForPoint", textMarkerForPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { 0, 0, 0 } }; |