[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Feb 4 21:22:06 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 6c77123bab005eda8ecae7e62363cf97d4ae9fde
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 20 22:31:19 2010 +0000

    MSAA: accSelect() is not implemented
    
    https://bugs.webkit.org/show_bug.cgi?id=33918
    <rdar://problem/7436861>
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    Test: platform/win/accessibility/selection-and-focus.html
    
    * accessibility/AccessibilityMenuListOption.cpp:
    (WebCore::AccessibilityMenuListOption::setSelected):
    Return early if the object is not selectable.
    
    WebKit/win:
    
    * AccessibleBase.cpp:
    (AccessibleBase::accSelect):
    If there is an invalid combination of state flags, return early. If the
    caller passed the "take focus" flag, focus the object. If the "take
    selection" flag was passed, check whether the parent object is an
    AccessibilityListBox; if so, call the object's setSelectedChildren()
    function. If the parent is an AccessibilityMenuListPopup, call the
    child object's setSelected() function. Otherwise, if the parent is some
    other, unsupported object, return early.
    If the selection flags include "add", "remove", or "extend" selection,
    and the parent object is not multi-selectable, return early. Otherwise,
    set or unset the child's selected flag based on the passed flag.
    
    WebKitTools:
    
    * DumpRenderTree/AccessibilityUIElement.cpp:
    (takeFocusCallback):
    Call the object's takeFocus() function.
    (takeSelectionCallback):
    Call its takeSelection() function.
    (addSelectionCallback):
    Call its addSelection() function.
    (removeSelectionCallback):
    Call its removeSelection() function.
    (AccessibilityUIElement::getJSClass):
    Add new functions to the JS class definition.
    
    * DumpRenderTree/AccessibilityUIElement.h:
    Declare new functions.
    
    * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
    (AccessibilityUIElement::takeFocus):
    Stubbed.
    (AccessibilityUIElement::takeSelection):
    Stubbed.
    (AccessibilityUIElement::addSelection):
    Stubbed.
    (AccessibilityUIElement::removeSelection):
    Stubbed.
    
    * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
    (AccessibilityUIElement::takeFocus):
    Stubbed.
    (AccessibilityUIElement::takeSelection):
    Stubbed.
    (AccessibilityUIElement::addSelection):
    Stubbed.
    (AccessibilityUIElement::removeSelection):
    Stubbed.
    
    * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
    (AccessibilityUIElement::takeFocus):
    Call the object's accSelect() function, passing the appropriate flag.
    (AccessibilityUIElement::takeSelection):
    Ditto.
    (AccessibilityUIElement::addSelection):
    Ditto.
    (AccessibilityUIElement::removeSelection):
    Ditto.
    
    LayoutTests:
    
    * platform/win/accessibility/selection-and-focus-expected.txt: Added.
    * platform/win/accessibility/selection-and-focus.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 24577be..746576a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-20  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: accSelect() is not implemented
+
+        https://bugs.webkit.org/show_bug.cgi?id=33918
+        <rdar://problem/7436861>
+
+        Reviewed by Darin Adler.
+
+        * platform/win/accessibility/selection-and-focus-expected.txt: Added.
+        * platform/win/accessibility/selection-and-focus.html: Added.
+
 2010-01-19  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Alexey Proskuryakov. 
diff --git a/LayoutTests/platform/win/accessibility/selection-and-focus-expected.txt b/LayoutTests/platform/win/accessibility/selection-and-focus-expected.txt
new file mode 100644
index 0000000..c83d082
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/selection-and-focus-expected.txt
@@ -0,0 +1,84 @@
+  
+This tests that we can adjust focus and selection via accessibility API.
+
+
+PASS accessibilityController.focusedElement.role is "document"
+PASS accessibilityController.focusedElement.role is "list"
+
+Option 0 is selected.
+Option 1 is not selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is not selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is not selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is selected.
+Option 1 is not selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is selected.
+Option 1 is not selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is not selected.
+Option 2 is selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is not selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is not selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+== single select ==
+Option 0 is selected.
+Option 1 is not selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+Option 0 is not selected.
+Option 1 is selected.
+Option 2 is not selected.
+Option 3 is not selected.
+
+
diff --git a/LayoutTests/platform/win/accessibility/selection-and-focus.html b/LayoutTests/platform/win/accessibility/selection-and-focus.html
new file mode 100644
index 0000000..806bf04
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/selection-and-focus.html
@@ -0,0 +1,123 @@
+<html>
+<head>
+    <link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+    <script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+
+<body id="body">
+
+<select id="selectElement" multiple title="selectElement">
+    <option SELECTED>Option 0</option>
+    <option>Option 1</option>
+    <option>Option 2</option>
+    <option DISABLED>Option 3</option>
+</select>
+
+<select id="selectElement2" title="selectElement">
+    <option SELECTED>Option 0</option>
+    <option>Option 1</option>
+    <option>Option 2</option>
+    <option DISABLED>Option 3</option>
+</select>
+
+<p>This tests that we can adjust focus and selection via accessibility API.</p>
+
+<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
+
+<p id="console"></p>
+
+<script>
+    function dumpSelection(element)
+    {
+        var options = element.options;
+        for (var i = 0; i < options.length; ++i)
+            debug("Option " + i + " is " + (options[i].selected ? "" : "not ") + "selected.");
+        debug("");
+    }
+
+    if (window.layoutTestController && window.accessibilityController) {
+        document.getElementById("notDRT").style.visibility = "hidden";
+
+        layoutTestController.dumpAsText();
+
+        document.getElementById("body").focus();
+        shouldBe('accessibilityController.focusedElement.role', '"document"');
+
+        // Focus the select element.
+        accessibilityController.focusedElement.childAtIndex(0).takeFocus();
+        shouldBe('accessibilityController.focusedElement.role', '"list"');
+
+        debug("");
+
+        var selectElement = document.getElementById("selectElement");
+
+        // Option 0 selected
+        accessibilityController.focusedElement.childAtIndex(0).takeSelection();
+        dumpSelection(selectElement);
+
+        // Option 1 selected
+        accessibilityController.focusedElement.childAtIndex(1).takeSelection();
+        dumpSelection(selectElement);
+
+        // Options 1, 2 selected
+        accessibilityController.focusedElement.childAtIndex(2).addSelection();
+        dumpSelection(selectElement);
+
+        // Option 2 selected
+        accessibilityController.focusedElement.childAtIndex(1).removeSelection();
+        dumpSelection(selectElement);
+
+        // Option 2 selected
+        accessibilityController.focusedElement.childAtIndex(0).removeSelection();
+        dumpSelection(selectElement);
+
+        // Options 0, 2 selected
+        accessibilityController.focusedElement.childAtIndex(0).addSelection();
+        dumpSelection(selectElement);
+
+        // Options 0, 2 selected
+        accessibilityController.focusedElement.childAtIndex(0).addSelection();
+        dumpSelection(selectElement);
+
+        // Option 2 selected
+        accessibilityController.focusedElement.childAtIndex(0).removeSelection();
+        dumpSelection(selectElement);
+
+        // No options selected
+        accessibilityController.focusedElement.childAtIndex(2).removeSelection();
+        dumpSelection(selectElement);
+
+        // No options selected (option at index 3 is disabled)
+        accessibilityController.focusedElement.childAtIndex(3).addSelection();
+        dumpSelection(selectElement);
+
+        debug("== single select ==");
+
+        var selectElement2 = document.getElementById("selectElement2");
+        selectElement2.focus();
+
+        var popupMenu = accessibilityController.focusedElement.childAtIndex(0);
+
+        // Option 0 is selected
+        popupMenu.childAtIndex(0).takeSelection();
+        dumpSelection(selectElement2);
+
+        // Option 1 selected
+        popupMenu.childAtIndex(1).takeSelection();
+        dumpSelection(selectElement2);
+
+        // Options 1 selected - addSelection() is not valid for single-select.
+        popupMenu.childAtIndex(2).addSelection();
+        dumpSelection(selectElement2);
+
+        // Options 1 selected - removeSelection() is not valid for single-select.
+        popupMenu.childAtIndex(1).removeSelection();
+        dumpSelection(selectElement2);
+
+        // Options 1 selected - option at index 3 is disabled
+        popupMenu.childAtIndex(3).takeSelection();
+        dumpSelection(selectElement2);
+    }
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 750210f..2ae77d2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-20  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: accSelect() is not implemented
+
+        https://bugs.webkit.org/show_bug.cgi?id=33918
+        <rdar://problem/7436861>
+
+        Reviewed by Darin Adler.
+
+        Test: platform/win/accessibility/selection-and-focus.html
+
+        * accessibility/AccessibilityMenuListOption.cpp:
+        (WebCore::AccessibilityMenuListOption::setSelected):
+        Return early if the object is not selectable.
+
 2010-01-20  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Not reviewed. Fix chromium build, introduced a copy&paste error.
diff --git a/WebCore/accessibility/AccessibilityMenuListOption.cpp b/WebCore/accessibility/AccessibilityMenuListOption.cpp
index 2a7bd91..d7473de 100644
--- a/WebCore/accessibility/AccessibilityMenuListOption.cpp
+++ b/WebCore/accessibility/AccessibilityMenuListOption.cpp
@@ -83,6 +83,9 @@ bool AccessibilityMenuListOption::isSelected() const
 
 void AccessibilityMenuListOption::setSelected(bool b)
 {
+    if (!canSetSelectedAttribute())
+        return;
+
     static_cast<HTMLOptionElement*>(m_element.get())->setSelected(b);
 }
 
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index 930ab9f..978a339 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -29,6 +29,8 @@
 
 #include "AccessibleImage.h"
 #include "WebView.h"
+#include <WebCore/AccessibilityListBox.h>
+#include <WebCore/AccessibilityMenuListPopup.h>
 #include <WebCore/AccessibilityObject.h>
 #include <WebCore/AXObjectCache.h>
 #include <WebCore/BString.h>
@@ -362,9 +364,54 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accKeyboardShortcut(VARIANT vChild
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT)
+HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long selectionFlags, VARIANT vChild)
 {
-    return E_NOTIMPL;
+    // According to MSDN, these combinations are invalid.
+    if (((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) ||
+        ((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) ||
+        ((selectionFlags & (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) ||
+        ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)))
+        return E_INVALIDARG;
+
+    AccessibilityObject* childObject;
+    HRESULT hr = getAccessibilityObjectForChild(vChild, childObject);
+
+    if (FAILED(hr))
+        return hr;
+
+    if (selectionFlags & SELFLAG_TAKEFOCUS)
+        childObject->setFocused(true);
+
+    AccessibilityObject* parentObject = childObject->parentObject();
+    if (!parentObject)
+        return E_INVALIDARG;
+
+    if (selectionFlags & SELFLAG_TAKESELECTION) {
+        if (parentObject->isListBox()) {
+            Vector<RefPtr<AccessibilityObject> > selectedChildren(1);
+            selectedChildren[0] = childObject;
+            static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren);
+        } else if (parentObject->isMenuListPopup())
+            childObject->setSelected(true);
+        else
+            return E_INVALIDARG;
+    }
+
+    // MSDN says that ADD, REMOVE, and EXTENDSELECTION are invalid for
+    // single-select.
+    if (!parentObject->isMultiSelectable())
+        return E_INVALIDARG;
+
+    if (selectionFlags & SELFLAG_ADDSELECTION)
+        childObject->setSelected(true);
+
+    if (selectionFlags & SELFLAG_REMOVESELECTION)
+        childObject->setSelected(false);
+
+    // FIXME: Should implement SELFLAG_EXTENDSELECTION. For now, we just return
+    // S_OK, matching Firefox.
+
+    return S_OK;
 }
 
 HRESULT STDMETHODCALLTYPE AccessibleBase::get_accSelection(VARIANT*)
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 0bc7458..c6c36c2 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,25 @@
+2010-01-20  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: accSelect() is not implemented
+
+        https://bugs.webkit.org/show_bug.cgi?id=33918
+        <rdar://problem/7436861>
+
+        Reviewed by Darin Adler.
+
+        * AccessibleBase.cpp:
+        (AccessibleBase::accSelect):
+        If there is an invalid combination of state flags, return early. If the
+        caller passed the "take focus" flag, focus the object. If the "take
+        selection" flag was passed, check whether the parent object is an
+        AccessibilityListBox; if so, call the object's setSelectedChildren()
+        function. If the parent is an AccessibilityMenuListPopup, call the
+        child object's setSelected() function. Otherwise, if the parent is some
+        other, unsupported object, return early.
+        If the selection flags include "add", "remove", or "extend" selection,
+        and the parent object is not multi-selectable, return early. Otherwise,
+        set or unset the child's selected flag based on the passed flag.
+
 2010-01-20  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Darin Adler and Adam Roben.
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4eacdad..773eff0 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,57 @@
+2010-01-20  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: accSelect() is not implemented
+
+        https://bugs.webkit.org/show_bug.cgi?id=33918
+        <rdar://problem/7436861>
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (takeFocusCallback):
+        Call the object's takeFocus() function.
+        (takeSelectionCallback):
+        Call its takeSelection() function.
+        (addSelectionCallback):
+        Call its addSelection() function.
+        (removeSelectionCallback):
+        Call its removeSelection() function.
+        (AccessibilityUIElement::getJSClass):
+        Add new functions to the JS class definition.
+
+        * DumpRenderTree/AccessibilityUIElement.h:
+        Declare new functions.
+
+        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+        (AccessibilityUIElement::takeFocus):
+        Stubbed.
+        (AccessibilityUIElement::takeSelection):
+        Stubbed.
+        (AccessibilityUIElement::addSelection):
+        Stubbed.
+        (AccessibilityUIElement::removeSelection):
+        Stubbed.
+
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::takeFocus):
+        Stubbed.
+        (AccessibilityUIElement::takeSelection):
+        Stubbed.
+        (AccessibilityUIElement::addSelection):
+        Stubbed.
+        (AccessibilityUIElement::removeSelection):
+        Stubbed.
+
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        (AccessibilityUIElement::takeFocus):
+        Call the object's accSelect() function, passing the appropriate flag.
+        (AccessibilityUIElement::takeSelection):
+        Ditto.
+        (AccessibilityUIElement::addSelection):
+        Ditto.
+        (AccessibilityUIElement::removeSelection):
+        Ditto.
+
 2010-01-20  Andras Becsi  <abecsi at inf.u-szeged.hu>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
index 958d206..87fe05c 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -344,6 +344,31 @@ static JSValueRef showMenuCallback(JSContextRef context, JSObjectRef function, J
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef takeFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    toAXElement(thisObject)->takeFocus();
+    return JSValueMakeUndefined(context);
+}
+
+static JSValueRef takeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    toAXElement(thisObject)->takeSelection();
+    return JSValueMakeUndefined(context);
+}
+
+static JSValueRef addSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    toAXElement(thisObject)->addSelection();
+    return JSValueMakeUndefined(context);
+}
+
+static JSValueRef removeSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    toAXElement(thisObject)->removeSelection();
+    return JSValueMakeUndefined(context);
+}
+
+
 // Static Value Getters
 
 static JSValueRef getARIADropEffectsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
@@ -677,6 +702,10 @@ JSClassRef AccessibilityUIElement::getJSClass()
         { "selectedRowAtIndex", selectedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isEqual", isEqualCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "addNotificationListener", addNotificationListenerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "takeFocus", takeFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "takeSelection", takeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "addSelection", addSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "removeSelection", removeSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }
     };
 
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
index f5cc255..e7d3bc7 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -74,7 +74,12 @@ public:
     int childrenCount();
     AccessibilityUIElement titleUIElement();
     AccessibilityUIElement parentElement();
-    
+
+    void takeFocus();
+    void takeSelection();
+    void addSelection();
+    void removeSelection();
+
     // Methods - platform-independent implementations
     JSStringRef allAttributes();
     JSStringRef attributesOfLinkedUIElements();
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 4307c6d..abfe115 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -593,3 +593,23 @@ bool AccessibilityUIElement::hasPopup() const
     // FIXME: implement
     return false;
 }
+
+void AccessibilityUIElement::takeFocus()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+    // FIXME: implement
+}
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 9eb5945..e9361f2 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -815,3 +815,23 @@ bool AccessibilityUIElement::hasPopup() const
     // FIXME: implement
     return false;
 }
+
+void AccessibilityUIElement::takeFocus()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+    // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+    // FIXME: implement
+}
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index a2cf21c..9aff5e6 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -570,3 +570,23 @@ bool AccessibilityUIElement::hasPopup() const
     DWORD state = accessibilityState(m_element);
     return (state & STATE_SYSTEM_HASPOPUP) == STATE_SYSTEM_HASPOPUP;
 }
+
+void AccessibilityUIElement::takeFocus()
+{
+    m_element->accSelect(SELFLAG_TAKEFOCUS, self());
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+    m_element->accSelect(SELFLAG_TAKESELECTION, self());
+}
+
+void AccessibilityUIElement::addSelection()
+{
+    m_element->accSelect(SELFLAG_ADDSELECTION, self());
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+    m_element->accSelect(SELFLAG_REMOVESELECTION, self());
+}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list