Changeset 189149 in webkit


Ignore:
Timestamp:
Aug 29, 2015 12:41:46 AM (9 years ago)
Author:
Chris Fleizach
Message:

AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
https://bugs.webkit.org/show_bug.cgi?id=125720

Reviewed by Daniel Bates.

Source/WebCore:

The scrollToVisible code did not account for scrollable elements that are larger than their viewports.
First, we need to pass the sub-focus up the scroll chain (otherwise we'll scroll some parent to y=0).
Second, we should try to center the focus within the viewport, rather than positioning at the bottom for a
better experience.

This change was adapted from Blink r183926:
https://src.chromium.org/viewvc/blink?view=rev&revision=183926

Tests: accessibility/scroll-to-global-point-iframe-nested.html

accessibility/scroll-to-global-point-iframe.html
accessibility/scroll-to-global-point-main-window.html
accessibility/scroll-to-global-point-nested.html
accessibility/scroll-to-make-visible-div-overflow.html
accessibility/scroll-to-make-visible-iframe.html
accessibility/scroll-to-make-visible-nested-2.html
accessibility/scroll-to-make-visible-nested.html
accessibility/scroll-to-make-visible-with-subfocus.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::computeBestScrollOffset):
(WebCore::AccessibilityObject::isOnscreen):
(WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
(WebCore::AccessibilityObject::scrollToGlobalPoint):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
(-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
(-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):

Tools:

Add support for scrollToMakeVisibleWithSubFocus and scrollToGlobalPoint.

  • DumpRenderTree/AccessibilityUIElement.cpp:

(pressCallback):
(scrollToMakeVisibleWithSubFocusCallback):
(scrollToGlobalPointCallback):
(scrollToMakeVisibleCallback):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::scrollToMakeVisible):
(AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(AccessibilityUIElement::scrollToGlobalPoint):
(AccessibilityUIElement::selectedTextRange):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::AccessibilityUIElement):
(AccessibilityUIElement::mathPrescriptsDescription):
(AccessibilityUIElement::scrollToMakeVisible):
(AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(AccessibilityUIElement::scrollToGlobalPoint):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::scrollToGlobalPoint):
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(WTR::AccessibilityUIElement::supportedActions):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::scrollToGlobalPoint):
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(WTR::AccessibilityUIElement::selectedTextRange):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::scrollToGlobalPoint):
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(WTR::AccessibilityUIElement::selectedTextRange):

LayoutTests:

  • accessibility/scroll-to-global-point-iframe-expected.txt: Added.
  • accessibility/scroll-to-global-point-iframe-nested-expected.txt: Added.
  • accessibility/scroll-to-global-point-iframe-nested.html: Added.
  • accessibility/scroll-to-global-point-iframe.html: Added.
  • accessibility/scroll-to-global-point-main-window-expected.txt: Added.
  • accessibility/scroll-to-global-point-main-window.html: Added.
  • accessibility/scroll-to-global-point-nested-expected.txt: Added.
  • accessibility/scroll-to-global-point-nested.html: Added.
  • accessibility/scroll-to-make-visible-div-overflow-expected.txt: Added.
  • accessibility/scroll-to-make-visible-div-overflow.html: Added.
  • accessibility/scroll-to-make-visible-iframe-expected.txt: Added.
  • accessibility/scroll-to-make-visible-iframe.html: Added.
  • accessibility/scroll-to-make-visible-nested-2-expected.txt: Added.
  • accessibility/scroll-to-make-visible-nested-2.html: Added.
  • accessibility/scroll-to-make-visible-nested-expected.txt: Added.
  • accessibility/scroll-to-make-visible-nested.html: Added.
  • accessibility/scroll-to-make-visible-with-subfocus-expected.txt: Added.
  • accessibility/scroll-to-make-visible-with-subfocus.html: Added.
Location:
trunk
Files:
18 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r189146 r189149  
     12015-08-29  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
     4        https://bugs.webkit.org/show_bug.cgi?id=125720
     5
     6        Reviewed by Daniel Bates.
     7
     8        * accessibility/scroll-to-global-point-iframe-expected.txt: Added.
     9        * accessibility/scroll-to-global-point-iframe-nested-expected.txt: Added.
     10        * accessibility/scroll-to-global-point-iframe-nested.html: Added.
     11        * accessibility/scroll-to-global-point-iframe.html: Added.
     12        * accessibility/scroll-to-global-point-main-window-expected.txt: Added.
     13        * accessibility/scroll-to-global-point-main-window.html: Added.
     14        * accessibility/scroll-to-global-point-nested-expected.txt: Added.
     15        * accessibility/scroll-to-global-point-nested.html: Added.
     16        * accessibility/scroll-to-make-visible-div-overflow-expected.txt: Added.
     17        * accessibility/scroll-to-make-visible-div-overflow.html: Added.
     18        * accessibility/scroll-to-make-visible-iframe-expected.txt: Added.
     19        * accessibility/scroll-to-make-visible-iframe.html: Added.
     20        * accessibility/scroll-to-make-visible-nested-2-expected.txt: Added.
     21        * accessibility/scroll-to-make-visible-nested-2.html: Added.
     22        * accessibility/scroll-to-make-visible-nested-expected.txt: Added.
     23        * accessibility/scroll-to-make-visible-nested.html: Added.
     24        * accessibility/scroll-to-make-visible-with-subfocus-expected.txt: Added.
     25        * accessibility/scroll-to-make-visible-with-subfocus.html: Added.
     26
    1272015-08-28  Alexey Proskuryakov  <ap@apple.com>
    228
  • trunk/Source/WebCore/ChangeLog

    r189144 r189149  
     12015-08-29  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
     4        https://bugs.webkit.org/show_bug.cgi?id=125720
     5
     6        Reviewed by Daniel Bates.
     7
     8        The scrollToVisible code did not account for scrollable elements that are larger than their viewports.
     9        First, we need to pass the sub-focus up the scroll chain (otherwise we'll scroll some parent to y=0).
     10        Second, we should try to center the focus within the viewport, rather than positioning at the bottom for a
     11        better experience.
     12
     13        This change was adapted from Blink r183926:
     14        https://src.chromium.org/viewvc/blink?view=rev&revision=183926
     15
     16        Tests: accessibility/scroll-to-global-point-iframe-nested.html
     17               accessibility/scroll-to-global-point-iframe.html
     18               accessibility/scroll-to-global-point-main-window.html
     19               accessibility/scroll-to-global-point-nested.html
     20               accessibility/scroll-to-make-visible-div-overflow.html
     21               accessibility/scroll-to-make-visible-iframe.html
     22               accessibility/scroll-to-make-visible-nested-2.html
     23               accessibility/scroll-to-make-visible-nested.html
     24               accessibility/scroll-to-make-visible-with-subfocus.html
     25
     26        * accessibility/AccessibilityObject.cpp:
     27        (WebCore::computeBestScrollOffset):
     28        (WebCore::AccessibilityObject::isOnscreen):
     29        (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
     30        (WebCore::AccessibilityObject::scrollToGlobalPoint):
     31        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     32        (-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
     33        (-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
     34        (-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
     35        (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
     36
    1372015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
    238
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r187371 r189149  
    23322332// in order to make an object visible within a viewport.
    23332333//
     2334// If the object is already fully visible, returns the same scroll
     2335// offset.
     2336//
    23342337// In case the whole object cannot fit, you can specify a
    23352338// subfocus - a smaller region within the object that should
     
    23372340// ignored.
    23382341//
    2339 // Example: the viewport is scrolled to the right just enough
    2340 // that the object is in view.
     2342// If possible, the object and subfocus are centered within the
     2343// viewport.
     2344//
     2345// Example 1: the object is already visible, so nothing happens.
     2346//   +----------Viewport---------+
     2347//                 +---Object---+
     2348//                 +--SubFocus--+
     2349//
     2350// Example 2: the object is not fully visible, so it's centered
     2351// within the viewport.
    23412352//   Before:
    23422353//   +----------Viewport---------+
     
    23452356//
    23462357//   After:
    2347 //          +----------Viewport---------+
     2358//                 +----------Viewport---------+
    23482359//                         +---Object---+
    23492360//                         +--SubFocus--+
     2361//
     2362// Example 3: the object is larger than the viewport, so the
     2363// viewport moves to show as much of the object as possible,
     2364// while also trying to center the subfocus.
     2365//   Before:
     2366//   +----------Viewport---------+
     2367//     +---------------Object--------------+
     2368//                         +-SubFocus-+
     2369//
     2370//   After:
     2371//             +----------Viewport---------+
     2372//     +---------------Object--------------+
     2373//                         +-SubFocus-+
    23502374//
    23512375// When constraints cannot be fully satisfied, the min
     
    23552379// This may be out of range - the calling function should clip this
    23562380// to the available range.
    2357 static int computeBestScrollOffset(int currentScrollOffset, int subfocusMin, int objectMin, int objectMax, int viewportMin, int viewportMax)
     2381static int computeBestScrollOffset(int currentScrollOffset, int subfocusMin, int subfocusMax, int objectMin, int objectMax, int viewportMin, int viewportMax)
    23582382{
    23592383    int viewportSize = viewportMax - viewportMin;
    2360 
    2361     // If the focus size is larger than the viewport size, shrink it in the
    2362     // direction of subfocus.
     2384   
     2385    // If the object size is larger than the viewport size, consider
     2386    // only a portion that's as large as the viewport, centering on
     2387    // the subfocus as much as possible.
    23632388    if (objectMax - objectMin > viewportSize) {
    2364         // Subfocus must be within focus:
     2389        // Since it's impossible to fit the whole object in the
     2390        // viewport, exit now if the subfocus is already within the viewport.
     2391        if (subfocusMin - currentScrollOffset >= viewportMin && subfocusMax - currentScrollOffset <= viewportMax)
     2392            return currentScrollOffset;
     2393       
     2394        // Subfocus must be within focus.
    23652395        subfocusMin = std::max(subfocusMin, objectMin);
    2366 
     2396        subfocusMax = std::min(subfocusMax, objectMax);
     2397       
    23672398        // Subfocus must be no larger than the viewport size; favor top/left.
    2368         if (subfocusMin + viewportSize > objectMax)
    2369             objectMin = objectMax - viewportSize;
    2370         else {
    2371             objectMin = subfocusMin;
    2372             objectMax = subfocusMin + viewportSize;
    2373         }
     2399        if (subfocusMax - subfocusMin > viewportSize)
     2400            subfocusMax = subfocusMin + viewportSize;
     2401       
     2402        // Compute the size of an object centered on the subfocus, the size of the viewport.
     2403        int centeredObjectMin = (subfocusMin + subfocusMax - viewportSize) / 2;
     2404        int centeredObjectMax = centeredObjectMin + viewportSize;
     2405
     2406        objectMin = std::max(objectMin, centeredObjectMin);
     2407        objectMax = std::min(objectMax, centeredObjectMax);
    23742408    }
    23752409
     
    23782412        && objectMax - currentScrollOffset <= viewportMax)
    23792413        return currentScrollOffset;
    2380 
    2381     // Scroll left if we're too far to the right.
    2382     if (objectMax - currentScrollOffset > viewportMax)
    2383         return objectMax - viewportMax;
    2384 
    2385     // Scroll right if we're too far to the left.
    2386     if (objectMin - currentScrollOffset < viewportMin)
    2387         return objectMin - viewportMin;
    2388 
    2389     ASSERT_NOT_REACHED();
    2390 
    2391     // This shouldn't happen.
    2392     return currentScrollOffset;
     2414   
     2415    // Center the object in the viewport.
     2416    return (objectMin + objectMax - viewportMin - viewportMax) / 2;
    23932417}
    23942418
     
    24502474    IntRect scrollVisibleRect = scrollableArea->visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
    24512475
     2476    if (!scrollParent->isScrollView()) {
     2477        objectRect.moveBy(scrollPosition);
     2478        objectRect.moveBy(-snappedIntRect(scrollParent->elementRect()).location());
     2479    }
     2480   
    24522481    int desiredX = computeBestScrollOffset(
    24532482        scrollPosition.x(),
    2454         objectRect.x() + subfocus.x(),
     2483        objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(),
    24552484        objectRect.x(), objectRect.maxX(),
    24562485        0, scrollVisibleRect.width());
    24572486    int desiredY = computeBestScrollOffset(
    24582487        scrollPosition.y(),
    2459         objectRect.y() + subfocus.y(),
     2488        objectRect.y() + subfocus.y(), objectRect.y() + subfocus.maxY(),
    24602489        objectRect.y(), objectRect.maxY(),
    24612490        0, scrollVisibleRect.height());
     
    24632492    scrollParent->scrollTo(IntPoint(desiredX, desiredY));
    24642493
     2494    // Convert the subfocus into the coordinates of the scroll parent.
     2495    IntRect newSubfocus = subfocus;
     2496    IntRect newElementRect = snappedIntRect(elementRect());
     2497    IntRect scrollParentRect = snappedIntRect(scrollParent->elementRect());
     2498    newSubfocus.move(newElementRect.x(), newElementRect.y());
     2499    newSubfocus.move(-scrollParentRect.x(), -scrollParentRect.y());
     2500   
    24652501    // Recursively make sure the scroll parent itself is visible.
    24662502    if (scrollParent->parentObject())
    2467         scrollParent->scrollToMakeVisible();
     2503        scrollParent->scrollToMakeVisibleWithSubFocus(newSubfocus);
    24682504}
    24692505
     
    25042540        int desiredX = computeBestScrollOffset(
    25052541            0,
    2506             objectRect.x(),
     2542            objectRect.x(), objectRect.maxX(),
    25072543            objectRect.x(), objectRect.maxX(),
    25082544            point.x(), point.x());
    25092545        int desiredY = computeBestScrollOffset(
    25102546            0,
    2511             objectRect.y(),
     2547            objectRect.y(), objectRect.maxY(),
    25122548            objectRect.y(), objectRect.maxY(),
    25132549            point.y(), point.y());
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r188947 r189149  
    33623362}
    33633363
     3364- (void)_accessibilityScrollToMakeVisibleWithSubFocus:(NSRect)rect
     3365{
     3366    m_object->scrollToMakeVisibleWithSubFocus(IntRect(rect));
     3367}
     3368
     3369- (void)_accessibilityScrollToGlobalPoint:(NSPoint)point
     3370{
     3371    m_object->scrollToGlobalPoint(IntPoint(point));
     3372}
     3373
    33643374- (void)accessibilityPerformAction:(NSString*)action
    33653375{
  • trunk/Tools/ChangeLog

    r189137 r189149  
     12015-08-29  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
     4        https://bugs.webkit.org/show_bug.cgi?id=125720
     5
     6        Reviewed by Daniel Bates.
     7
     8        Add support for scrollToMakeVisibleWithSubFocus and scrollToGlobalPoint.
     9
     10        * DumpRenderTree/AccessibilityUIElement.cpp:
     11        (pressCallback):
     12        (scrollToMakeVisibleWithSubFocusCallback):
     13        (scrollToGlobalPointCallback):
     14        (scrollToMakeVisibleCallback):
     15        (AccessibilityUIElement::getJSClass):
     16        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
     17        (AccessibilityUIElement::scrollToMakeVisible):
     18        (AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
     19        (AccessibilityUIElement::scrollToGlobalPoint):
     20        (AccessibilityUIElement::selectedTextRange):
     21        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
     22        (AccessibilityUIElement::AccessibilityUIElement):
     23        (AccessibilityUIElement::mathPrescriptsDescription):
     24        (AccessibilityUIElement::scrollToMakeVisible):
     25        (AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
     26        (AccessibilityUIElement::scrollToGlobalPoint):
     27        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
     28        (WTR::AccessibilityUIElement::isTextMarkerValid):
     29        (WTR::AccessibilityUIElement::textMarkerForIndex):
     30        (WTR::AccessibilityUIElement::scrollToMakeVisible):
     31        (WTR::AccessibilityUIElement::scrollToGlobalPoint):
     32        (WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
     33        (WTR::AccessibilityUIElement::supportedActions):
     34        (WTR::AccessibilityUIElement::mathPostscriptsDescription):
     35        (WTR::AccessibilityUIElement::mathPrescriptsDescription):
     36        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
     37        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
     38        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
     39        (WTR::AccessibilityUIElement::scrollToMakeVisible):
     40        (WTR::AccessibilityUIElement::scrollToGlobalPoint):
     41        (WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
     42        (WTR::AccessibilityUIElement::selectedTextRange):
     43        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
     44        (WTR::AccessibilityUIElement::scrollToMakeVisible):
     45        (WTR::AccessibilityUIElement::scrollToGlobalPoint):
     46        (WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
     47        (WTR::AccessibilityUIElement::selectedTextRange):
     48
    1492015-08-28  Timothy Horton  <timothy_horton@apple.com>
    250
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp

    r189044 r189149  
    706706{
    707707    toAXElement(thisObject)->press();
     708    return JSValueMakeUndefined(context);
     709}
     710
     711static JSValueRef scrollToMakeVisibleWithSubFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     712{
     713    unsigned x = 0;
     714    unsigned y = 0;
     715    unsigned width = 0;
     716    unsigned height = 0;
     717    if (argumentCount == 4) {
     718        x = JSValueToNumber(context, arguments[0], exception);
     719        y = JSValueToNumber(context, arguments[1], exception);
     720        width = JSValueToNumber(context, arguments[2], exception);
     721        height = JSValueToNumber(context, arguments[3], exception);
     722    }
     723
     724    toAXElement(thisObject)->scrollToMakeVisibleWithSubFocus(x, y, width, height);
     725    return JSValueMakeUndefined(context);
     726}
     727
     728static JSValueRef scrollToGlobalPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     729{
     730    unsigned x = 0;
     731    unsigned y = 0;
     732    if (argumentCount == 2) {
     733        x = JSValueToNumber(context, arguments[0], exception);
     734        y = JSValueToNumber(context, arguments[1], exception);
     735    }
     736
     737    toAXElement(thisObject)->scrollToGlobalPoint(x, y);
    708738    return JSValueMakeUndefined(context);
    709739}
     
    17011731        { "selectedChildAtIndex", selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17021732        { "scrollToMakeVisible", scrollToMakeVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1733        { "scrollToGlobalPoint", scrollToGlobalPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1734        { "scrollToMakeVisibleWithSubFocus", scrollToMakeVisibleWithSubFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    17031735#if PLATFORM(GTK) || PLATFORM(EFL)
    17041736        { "characterAtOffset", characterAtOffsetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm

    r187371 r189149  
    681681}
    682682
     683void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
     684{
     685    // FIXME: implement
     686}
     687
     688void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
     689{
     690    // FIXME: implement
     691}
     692
    683693JSStringRef AccessibilityUIElement::selectedTextRange()
    684694{
  • trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r189044 r189149  
    7777- (NSUInteger)accessibilityArrayAttributeCount:(NSString *)attribute;
    7878- (void)_accessibilitySetTestValue:(id)value forAttribute:(NSString*)attributeName;
     79- (void)_accessibilityScrollToMakeVisibleWithSubFocus:(NSRect)rect;
     80- (void)_accessibilityScrollToGlobalPoint:(NSPoint)point;
    7981- (void)_accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName;
    8082@end
     
    18821884}
    18831885
    1884 
    18851886void AccessibilityUIElement::scrollToMakeVisible()
    18861887{
     
    18921893void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
    18931894{
    1894     // FIXME: implement
     1895    BEGIN_AX_OBJC_EXCEPTIONS
     1896    [m_element _accessibilityScrollToMakeVisibleWithSubFocus:NSMakeRect(x, y, width, height)];
     1897    END_AX_OBJC_EXCEPTIONS
    18951898}
    18961899
    18971900void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
    18981901{
    1899     // FIXME: implement
    1900 }
     1902    BEGIN_AX_OBJC_EXCEPTIONS
     1903    [m_element _accessibilityScrollToGlobalPoint:NSMakePoint(x, y)];
     1904    END_AX_OBJC_EXCEPTIONS
     1905}
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp

    r189044 r189149  
    225225PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForIndex(int) { return 0; }
    226226void AccessibilityUIElement::scrollToMakeVisible() { }
     227void AccessibilityUIElement::scrollToGlobalPoint(int, int) { }
     228void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int, int, int, int) { }
    227229JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const { return 0; }
    228230JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const { return 0; }
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h

    r187371 r189149  
    226226
    227227    void scrollToMakeVisible();
     228    void scrollToGlobalPoint(int x, int y);
     229    void scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height);
    228230   
    229231    // Text markers.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl

    r187371 r189149  
    170170
    171171    void scrollToMakeVisible();
     172    void scrollToGlobalPoint(int x, int y);
     173    void scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height);
     174
    172175    void takeFocus();
    173176    boolean scrollPageDown();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r185502 r189149  
    19361936    // FIXME: implement
    19371937}
     1938   
     1939void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
     1940{
     1941    // FIXME: implement
     1942}
     1943   
     1944void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
     1945{
     1946    // FIXME: implement
     1947}
    19381948
    19391949JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const
  • trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm

    r189044 r189149  
    700700{
    701701}
     702   
     703void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
     704{
     705}
     706   
     707void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
     708{
     709}
    702710
    703711JSRetainPtr<JSStringRef> AccessibilityUIElement::selectedTextRange()
  • trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

    r189044 r189149  
    8181- (NSUInteger)accessibilityArrayAttributeCount:(NSString *)attribute;
    8282- (void)_accessibilitySetTestValue:(id)value forAttribute:(NSString*)attributeName;
     83- (void)_accessibilityScrollToMakeVisibleWithSubFocus:(NSRect)rect;
     84- (void)_accessibilityScrollToGlobalPoint:(NSPoint)point;
    8385- (void)_accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName;
    8486@end
     
    13741376}
    13751377   
     1378void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
     1379{
     1380    BEGIN_AX_OBJC_EXCEPTIONS
     1381    [m_element _accessibilityScrollToGlobalPoint:NSMakePoint(x, y)];
     1382    END_AX_OBJC_EXCEPTIONS
     1383}
     1384
     1385void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
     1386{
     1387    BEGIN_AX_OBJC_EXCEPTIONS
     1388    [m_element _accessibilityScrollToMakeVisibleWithSubFocus:NSMakeRect(x, y, width, height)];
     1389    END_AX_OBJC_EXCEPTIONS
     1390}
     1391
    13761392JSRetainPtr<JSStringRef> AccessibilityUIElement::selectedTextRange()
    13771393{
Note: See TracChangeset for help on using the changeset viewer.