[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Apr 8 01:11:11 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 54755fa009c83cd2e19fbe681e8264664a9b4fd9
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jan 17 01:42:36 2010 +0000

    get_accParent should try to retrieve parent AccessibilityObject, before
    calling upon window
    
    https://bugs.webkit.org/show_bug.cgi?id=22893
    
    Reviewed by Darin Adler.
    
    WebKit/win:
    
    * AccessibleBase.cpp:
    (AccessibleBase::get_accParent):
    If the object has a parent object, return it. If not, return the
    accessible for the WebView window.
    
    WebKitTools:
    
    * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
    (AccessibilityUIElement::parentElement):
    Get the object's parent. Query it for IAccessible, and return it.
    
    LayoutTests:
    
    * platform/win/accessibility/parent-element-expected.txt: Added.
    * platform/win/accessibility/parent-element.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53368 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index df7a333..fdebb44 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-15  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        get_accParent should try to retrieve parent AccessibilityObject, before
+        calling upon window
+
+        https://bugs.webkit.org/show_bug.cgi?id=22893
+
+        Reviewed by Darin Adler.
+
+        * platform/win/accessibility/parent-element-expected.txt: Added.
+        * platform/win/accessibility/parent-element.html: Added.
+
 2010-01-16  Darin Adler  <darin at apple.com>
 
         Reviewed by Oliver Hunt and Alexey Proskuryakov.
diff --git a/LayoutTests/platform/win/accessibility/parent-element-expected.txt b/LayoutTests/platform/win/accessibility/parent-element-expected.txt
new file mode 100644
index 0000000..be28c84
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/parent-element-expected.txt
@@ -0,0 +1,6 @@
+This tests that elements return their correct parent element.
+
+
+
+PASS optionElement.parentElement().role is "list"
+
diff --git a/LayoutTests/platform/win/accessibility/parent-element.html b/LayoutTests/platform/win/accessibility/parent-element.html
new file mode 100644
index 0000000..75b7f03
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/parent-element.html
@@ -0,0 +1,34 @@
+<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">
+
+<p>This tests that elements return their correct parent element.</p>
+
+<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
+
+<select id="selectElement" multiple>
+    <option>Option 1</option>
+</select>
+
+<p id="console"></p>
+
+<script>
+    if (window.layoutTestController && window.accessibilityController) {
+        document.getElementById("notDRT").style.visibility = "hidden";
+
+        layoutTestController.dumpAsText();
+
+        document.getElementById("selectElement").focus();
+
+        var optionElement = accessibilityController.focusedElement.childAtIndex(0);
+
+        shouldBe('optionElement.parentElement().role', '"list"');
+    }
+</script>
+</body>
+</html>
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index 0e9966d..ba05102 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -106,7 +106,17 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent)
 {
     *parent = 0;
 
-    if (!m_object || !m_object->topDocumentFrameView())
+    if (!m_object)
+        return E_FAIL;
+
+    AccessibilityObject* parentObject = m_object->parentObjectUnignored();
+    if (parentObject) {
+        *parent = wrapper(parentObject);
+        (*parent)->AddRef();
+        return S_OK;
+    }
+
+    if (!m_object->topDocumentFrameView())
         return E_FAIL;
 
     return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformPageClient(),
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9799e8f..6d7fbf8 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-15  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        get_accParent should try to retrieve parent AccessibilityObject, before
+        calling upon window
+
+        https://bugs.webkit.org/show_bug.cgi?id=22893
+
+        Reviewed by Darin Adler.
+
+        * AccessibleBase.cpp:
+        (AccessibleBase::get_accParent):
+        If the object has a parent object, return it. If not, return the
+        accessible for the WebView window.
+
 2010-01-12  Jon Honeycutt  <jhoneycutt at apple.com>
 
         MSAA: selected, selectable, extended selectable, and multiple
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 40e47bd..61f5c96 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-15  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        get_accParent should try to retrieve parent AccessibilityObject, before
+        calling upon window
+
+        https://bugs.webkit.org/show_bug.cgi?id=22893
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        (AccessibilityUIElement::parentElement):
+        Get the object's parent. Query it for IAccessible, and return it.
+
 2010-01-16  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Mark Rowe.
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index f67b635..c8173d7 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -126,7 +126,11 @@ AccessibilityUIElement AccessibilityUIElement::titleUIElement()
 
 AccessibilityUIElement AccessibilityUIElement::parentElement()
 {
-    return 0;
+    COMPtr<IDispatch> parent;
+    m_element->get_accParent(&parent);
+
+    COMPtr<IAccessible> parentAccessible(Query, parent);
+    return parentAccessible;
 }
 
 JSStringRef AccessibilityUIElement::attributesOfChildren()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list