Changeset 85007 in webkit
- Timestamp:
- Apr 26, 2011 8:50:15 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85006 r85007 1 2011-04-26 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 AX: Add more text marker routines to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=58949 7 8 * platform/mac/accessibility/textmarker-string-for-range-expected.txt: Added. 9 * platform/mac/accessibility/textmarker-string-for-range.html: Added. 10 1 11 2011-04-26 Dirk Pranke <dpranke@chromium.org> 2 12 -
trunk/Tools/ChangeLog
r85003 r85007 1 2011-04-26 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 AX: Add more text marker routines to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=58949 7 8 Add a few more methods to help test the text marker system, including nextMarker, previousMarker and 9 stringForMarkerRange. 10 11 * DumpRenderTree/AccessibilityUIElement.cpp: 12 (nextTextMarkerCallback): 13 (previousTextMarkerCallback): 14 (stringForTextMarkerRangeCallback): 15 (AccessibilityUIElement::previousTextMarker): 16 (AccessibilityUIElement::nextTextMarker): 17 (AccessibilityUIElement::stringForTextMarkerRange): 18 (AccessibilityUIElement::getJSClass): 19 * DumpRenderTree/AccessibilityUIElement.h: 20 * DumpRenderTree/mac/AccessibilityUIElementMac.mm: 21 (AccessibilityUIElement::previousTextMarker): 22 (AccessibilityUIElement::nextTextMarker): 23 (AccessibilityUIElement::stringForTextMarkerRange): 24 1 25 2011-04-26 Dan Bernstein <mitz@apple.com> 2 26 -
trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp
r74025 r85007 455 455 } 456 456 457 static JSValueRef nextTextMarkerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 458 { 459 AccessibilityTextMarker* marker = 0; 460 if (argumentCount == 1) 461 marker = toTextMarker(JSValueToObject(context, arguments[0], exception)); 462 463 return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->nextTextMarker(marker)); 464 } 465 466 static JSValueRef previousTextMarkerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 467 { 468 AccessibilityTextMarker* marker = 0; 469 if (argumentCount == 1) 470 marker = toTextMarker(JSValueToObject(context, arguments[0], exception)); 471 472 return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->previousTextMarker(marker)); 473 } 474 475 static JSValueRef stringForTextMarkerRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 476 { 477 AccessibilityTextMarkerRange* markerRange = 0; 478 if (argumentCount == 1) 479 markerRange = toTextMarkerRange(JSValueToObject(context, arguments[0], exception)); 480 481 JSRetainPtr<JSStringRef> markerRangeString(Adopt, toAXElement(thisObject)->stringForTextMarkerRange(markerRange)); 482 return JSValueMakeString(context, markerRangeString.get()); 483 } 484 457 485 static JSValueRef textMarkerForPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 458 486 { … … 838 866 839 867 AccessibilityTextMarker AccessibilityUIElement::textMarkerForPoint(int x, int y) 868 { 869 return 0; 870 } 871 872 AccessibilityTextMarker AccessibilityUIElement::previousTextMarker(AccessibilityTextMarker*) 873 { 874 return 0; 875 } 876 877 AccessibilityTextMarker AccessibilityUIElement::nextTextMarker(AccessibilityTextMarker*) 878 { 879 return 0; 880 } 881 882 JSStringRef AccessibilityUIElement::stringForTextMarkerRange(AccessibilityTextMarkerRange*) 840 883 { 841 884 return 0; … … 969 1012 { "textMarkerRangeLength", textMarkerRangeLengthCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 970 1013 { "textMarkerForPoint", textMarkerForPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1014 { "nextTextMarker", nextTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1015 { "previousTextMarker", previousTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1016 { "stringForTextMarkerRange", stringForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 971 1017 { "setSelectedChild", setSelectedChildCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 972 1018 { "selectedChildAtIndex", selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/AccessibilityUIElement.h
r74025 r85007 203 203 AccessibilityTextMarker endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*); 204 204 AccessibilityTextMarker textMarkerForPoint(int x, int y); 205 AccessibilityTextMarker previousTextMarker(AccessibilityTextMarker*); 206 AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker*); 205 207 AccessibilityUIElement accessibilityElementForTextMarker(AccessibilityTextMarker*); 208 JSStringRef stringForTextMarkerRange(AccessibilityTextMarkerRange*); 206 209 int textMarkerRangeLength(AccessibilityTextMarkerRange*); 207 210 -
trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r74025 r85007 1287 1287 } 1288 1288 1289 AccessibilityTextMarker AccessibilityUIElement::previousTextMarker(AccessibilityTextMarker* textMarker) 1290 { 1291 BEGIN_AX_OBJC_EXCEPTIONS 1292 id previousMarker = [m_element accessibilityAttributeValue:@"AXPreviousTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; 1293 return AccessibilityTextMarker(previousMarker); 1294 END_AX_OBJC_EXCEPTIONS 1295 1296 return 0; 1297 } 1298 1299 AccessibilityTextMarker AccessibilityUIElement::nextTextMarker(AccessibilityTextMarker* textMarker) 1300 { 1301 BEGIN_AX_OBJC_EXCEPTIONS 1302 id nextMarker = [m_element accessibilityAttributeValue:@"AXNextTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; 1303 return AccessibilityTextMarker(nextMarker); 1304 END_AX_OBJC_EXCEPTIONS 1305 1306 return 0; 1307 } 1308 1309 JSStringRef AccessibilityUIElement::stringForTextMarkerRange(AccessibilityTextMarkerRange* markerRange) 1310 { 1311 BEGIN_AX_OBJC_EXCEPTIONS 1312 id textString = [m_element accessibilityAttributeValue:@"AXStringForTextMarkerRange" forParameter:(id)markerRange->platformTextMarkerRange()]; 1313 return [textString createJSStringRef]; 1314 END_AX_OBJC_EXCEPTIONS 1315 1316 return 0; 1317 } 1289 1318 1290 1319 AccessibilityTextMarkerRange AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
Note: See TracChangeset
for help on using the changeset viewer.