[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:45:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6f7cb9e3276dd8c27a071ab49cc6cd71397b54b0
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 28 09:30:38 2010 +0000

    2010-08-28  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Add AX notification for childrenChanged
            https://bugs.webkit.org/show_bug.cgi?id=44472
    
            Test by running platform/chromium/accessibility/children-changed-notification.html within chromium's DRT
    
            * platform/chromium/accessibility: Added.
            * platform/chromium/accessibility/children-changed-notification-expected.txt: Added.
            * platform/chromium/accessibility/children-changed-notification.html: Added.
            * platform/chromium/drt_expectations.txt:
            * platform/chromium/test_expectations.txt:
    2010-08-28  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Add AX notification for childrenChanged
            https://bugs.webkit.org/show_bug.cgi?id=44472
    
            Test by running platform/chromium/accessibility/children-changed-notification.html within chromium's DRT
    
            * accessibility/AXObjectCache.h:
            (WebCore::AXObjectCache::):
            * accessibility/AccessibilityRenderObject.cpp:
            (WebCore::AccessibilityRenderObject::childrenChanged):
            * accessibility/chromium/AXObjectCacheChromium.cpp:
            (WebCore::AXObjectCache::postPlatformNotification):
            * page/chromium/ChromeClientChromium.h:
    2010-08-28  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Add AX notification for childrenChanged
            https://bugs.webkit.org/show_bug.cgi?id=44472
    
            * public/WebViewClient.h:
            (WebKit::WebViewClient::didChangeAccessibilityObjectChildren):
            * src/ChromeClientImpl.cpp:
            (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren):
            * src/ChromeClientImpl.h:
    2010-08-28  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Add AX notification for childrenChanged
            https://bugs.webkit.org/show_bug.cgi?id=44472
    
            * DumpRenderTree/chromium/AccessibilityController.cpp:
            (AccessibilityController::AccessibilityController):
            (AccessibilityController::reset):
            (AccessibilityController::getRootElement):
            (AccessibilityController::dumpAccessibilityNotifications):
            * DumpRenderTree/chromium/AccessibilityController.h:
            (AccessibilityController::shouldDumpAccessibilityNotifications):
            * DumpRenderTree/chromium/WebViewHost.cpp:
            (WebViewHost::didChangeAccessibilityObjectChildren):
            * DumpRenderTree/chromium/WebViewHost.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66305 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ec37047..d6f51b3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-28  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Add AX notification for childrenChanged
+        https://bugs.webkit.org/show_bug.cgi?id=44472
+
+        Test by running platform/chromium/accessibility/children-changed-notification.html within chromium's DRT
+
+        * platform/chromium/accessibility: Added.
+        * platform/chromium/accessibility/children-changed-notification-expected.txt: Added.
+        * platform/chromium/accessibility/children-changed-notification.html: Added.
+        * platform/chromium/drt_expectations.txt:
+        * platform/chromium/test_expectations.txt:
+
 2010-08-27  Daniel Bates  <dbates at rim.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/chromium/accessibility/children-changed-notification-expected.txt b/LayoutTests/platform/chromium/accessibility/children-changed-notification-expected.txt
new file mode 100644
index 0000000..86c5d4a
--- /dev/null
+++ b/LayoutTests/platform/chromium/accessibility/children-changed-notification-expected.txt
@@ -0,0 +1,3 @@
+didChangeAccessibilityObjectChildren - new count: 1
+This tests that chromium correctly recieves notifications when the children of an accessibility object change.
+text
diff --git a/LayoutTests/platform/chromium/accessibility/children-changed-notification.html b/LayoutTests/platform/chromium/accessibility/children-changed-notification.html
new file mode 100644
index 0000000..e7f7f18
--- /dev/null
+++ b/LayoutTests/platform/chromium/accessibility/children-changed-notification.html
@@ -0,0 +1,37 @@
+<html>
+<body>
+This tests that chromium correctly recieves notifications when the children of an accessibility object change.
+<div></div>
+<script>
+    function testDone() {
+        layoutTestController.notifyDone();
+    }
+    
+    function test() {
+        if (!window.layoutTestController)
+            return;
+
+        layoutTestController.dumpAsText();
+
+        if (!accessibilityController || !accessibilityController.dumpAccessibilityNotifications)
+            return;
+
+        layoutTestController.waitUntilDone();
+        
+        // Access accessibility object that will be deleted.
+        document.body.focus();
+        accessibilityController.focusedElement.childAtIndex(0);
+        
+        accessibilityController.dumpAccessibilityNotifications();
+        
+        // Insert a child element on the div. This generates an accessibility childred changed notification.
+        document.body.children[0].innerHTML = "text";
+
+        // Use setTimeout so that asynchronous accessibility notifications can be processed.
+        setTimeout(testDone, 0);
+    }
+
+    test();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium/drt_expectations.txt b/LayoutTests/platform/chromium/drt_expectations.txt
index bae6526..c29bd43 100644
--- a/LayoutTests/platform/chromium/drt_expectations.txt
+++ b/LayoutTests/platform/chromium/drt_expectations.txt
@@ -345,6 +345,7 @@ BUG_DRT WIN : http/tests/loading/preload-img-test.html = TEXT TIMEOUT PASS
 BUG_DRT MAC LINUX : http/tests/misc/slow-loading-image-in-pattern.html = IMAGE PASS
 BUG_DRT WIN MAC LINUX : fast/events/special-key-events-in-input-text.html = TEXT
 BUG_DRT WIN MAC : fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html = TIMEOUT
+BUG_DRT : platform/chromium/accessibility/children-changed-notification.html = PASS
 
 // Windows failures from the new build slave (some may be Vista/XP diffs)
 BUG_DRT WIN : css2.1/t0805-c5519-brdr-r-01-e.html = IMAGE+TEXT
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index b8139b6..a75041a 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -952,6 +952,9 @@ BUG10322 DEFER SKIP : accessibility = PASS FAIL
 BUG10322 DEFER SKIP : platform/mac/accessibility = PASS FAIL
 BUG10322 DEFER SKIP : platform/win/accessibility = PASS FAIL
 
+// Functionality is supported in DRT but not TestShell
+WONTFIX SKIP : platform/chromium/accessibility/children-changed-notification.html = FAIL
+
 // -----------------------------------------------------------------
 // Other failures
 // -----------------------------------------------------------------
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 10aba06..34d7c90 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-28  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Add AX notification for childrenChanged
+        https://bugs.webkit.org/show_bug.cgi?id=44472
+
+        Test by running platform/chromium/accessibility/children-changed-notification.html within chromium's DRT
+
+        * accessibility/AXObjectCache.h:
+        (WebCore::AXObjectCache::):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::childrenChanged):
+        * accessibility/chromium/AXObjectCacheChromium.cpp:
+        (WebCore::AXObjectCache::postPlatformNotification):
+        * page/chromium/ChromeClientChromium.h:
+
 2010-08-28  Eric Uhrhane  <ericu at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/accessibility/AXObjectCache.h b/WebCore/accessibility/AXObjectCache.h
index 6da6842..28a5917 100644
--- a/WebCore/accessibility/AXObjectCache.h
+++ b/WebCore/accessibility/AXObjectCache.h
@@ -107,6 +107,7 @@ public:
     enum AXNotification {
         AXActiveDescendantChanged,
         AXCheckedStateChanged,
+        AXChildrenChanged,
         AXFocusedUIElementChanged,
         AXLayoutComplete,
         AXLoadComplete,
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 92c57c6..e292971 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3239,6 +3239,8 @@ void AccessibilityRenderObject::childrenChanged()
     if (!m_renderer)
         return;
     
+    bool sentChildrenChanged = false;
+    
     // Go up the accessibility parent chain, but only if the element already exists. This method is
     // called during render layouts, minimal work should be done. 
     // If AX elements are created now, they could interrogate the render tree while it's in a funky state.
@@ -3248,6 +3250,13 @@ void AccessibilityRenderObject::childrenChanged()
             continue;
         
         AccessibilityRenderObject* axParent = static_cast<AccessibilityRenderObject*>(parent);
+        
+        // Send the children changed notification on the first accessibility render object ancestor.
+        if (!sentChildrenChanged) {
+            axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXChildrenChanged, true);
+            sentChildrenChanged = true;
+        }
+        
         // Only do work if the children haven't been marked dirty. This has the effect of blocking
         // future live region change notifications until the AX tree has been accessed again. This
         // is a good performance win for all parties.
diff --git a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
index 4118c63..44ebee6 100644
--- a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
+++ b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
@@ -56,15 +56,20 @@ void AXObjectCache::attachWrapper(AccessibilityObject*)
 
 void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
 {
-    if (notification != AXCheckedStateChanged)
-        return;
-
     if (!obj || !obj->document() || !obj->documentFrameView())
         return;
 
     ChromeClientChromium* client = toChromeClientChromium(obj->documentFrameView());
-    if (client)
-        client->didChangeAccessibilityObjectState(obj);
+    if (client) {
+        switch (notification) {
+        case AXCheckedStateChanged:
+            client->didChangeAccessibilityObjectState(obj);
+            break;
+        case AXChildrenChanged:
+            client->didChangeAccessibilityObjectChildren(obj);
+            break;
+        }
+    }
 }
 
 void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
diff --git a/WebCore/page/chromium/ChromeClientChromium.h b/WebCore/page/chromium/ChromeClientChromium.h
index e897c15..7765472 100644
--- a/WebCore/page/chromium/ChromeClientChromium.h
+++ b/WebCore/page/chromium/ChromeClientChromium.h
@@ -55,6 +55,9 @@ public:
 
     // Notifies embedder that the state of an accessibility object has changed.
     virtual void didChangeAccessibilityObjectState(AccessibilityObject*) = 0;
+    
+    // Notified embedder that the children of an accessibility object has changed.
+    virtual void didChangeAccessibilityObjectChildren(AccessibilityObject*) = 0;
 };
 
 } // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 95a4f6f..1ed3de9 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-28  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Add AX notification for childrenChanged
+        https://bugs.webkit.org/show_bug.cgi?id=44472
+
+        * public/WebViewClient.h:
+        (WebKit::WebViewClient::didChangeAccessibilityObjectChildren):
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren):
+        * src/ChromeClientImpl.h:
+
 2010-08-27  Daniel Cheng  <dcheng at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index c64418b..5c9a79b 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -277,6 +277,9 @@ public:
 
     // Notifies embedder that the state of an accessibility object has changed.
     virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }
+    
+    // Notifies embedder that the children of an accessibility object has changed.
+    virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { }
 
 
     // Developer tools -----------------------------------------------------
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index f4e26b6..e6f1400 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -712,6 +712,13 @@ void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* ob
         m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));
 }
 
+void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj)
+{
+    // Alert assistive technology about the accessibility object children change
+    if (obj)
+        m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj));
+}
+
 #if ENABLE(NOTIFICATIONS)
 NotificationPresenter* ChromeClientImpl::notificationPresenter() const
 {
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 1981641..bff9f90 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -162,6 +162,7 @@ public:
                              bool handleExternally);
     virtual void popupClosed(WebCore::PopupContainer* popupContainer);
     virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
+    virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);
 
     // ChromeClientImpl:
     void setCursor(const WebCursorInfo& cursor);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1ee6af7..2716186 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-28  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Add AX notification for childrenChanged
+        https://bugs.webkit.org/show_bug.cgi?id=44472
+
+        * DumpRenderTree/chromium/AccessibilityController.cpp:
+        (AccessibilityController::AccessibilityController):
+        (AccessibilityController::reset):
+        (AccessibilityController::getRootElement):
+        (AccessibilityController::dumpAccessibilityNotifications):
+        * DumpRenderTree/chromium/AccessibilityController.h:
+        (AccessibilityController::shouldDumpAccessibilityNotifications):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::didChangeAccessibilityObjectChildren):
+        * DumpRenderTree/chromium/WebViewHost.h:
+
 2010-08-28  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
index afe850c..2487e1a 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
@@ -44,15 +44,12 @@ AccessibilityController::AccessibilityController(TestShell* shell)
     : m_shell(shell)
 {
 
-    bindMethod("logFocusEvents",
-        &AccessibilityController::logFocusEventsCallback);
-    bindMethod("logScrollingStartEvents",
-        &AccessibilityController::logScrollingStartEventsCallback);
+    bindMethod("dumpAccessibilityNotifications", &AccessibilityController::dumpAccessibilityNotifications);
+    bindMethod("logFocusEvents", &AccessibilityController::logFocusEventsCallback);
+    bindMethod("logScrollingStartEvents", &AccessibilityController::logScrollingStartEventsCallback);
 
-    bindProperty("focusedElement",
-        &AccessibilityController::focusedElementGetterCallback);
-    bindProperty("rootElement",
-        &AccessibilityController::rootElementGetterCallback);
+    bindProperty("focusedElement", &AccessibilityController::focusedElementGetterCallback);
+    bindProperty("rootElement", &AccessibilityController::rootElementGetterCallback);
 
     bindFallbackMethod(&AccessibilityController::fallbackCallback);
 }
@@ -68,6 +65,8 @@ void AccessibilityController::reset()
     m_rootElement = WebAccessibilityObject();
     m_focusedElement = WebAccessibilityObject();
     m_elements.clear();
+    
+    m_dumpAccessibilityNotifications = false;
 }
 
 void AccessibilityController::setFocusedElement(const WebAccessibilityObject& focusedElement)
@@ -89,6 +88,12 @@ AccessibilityUIElement* AccessibilityController::getRootElement()
     return m_elements.createRoot(m_rootElement);
 }
 
+void AccessibilityController::dumpAccessibilityNotifications(const CppArgumentList&, CppVariant* result)
+{
+    m_dumpAccessibilityNotifications = true;
+    result->setNull();
+}
+
 void AccessibilityController::logFocusEventsCallback(const CppArgumentList&, CppVariant* result)
 {
     // As of r49031, this is not being used upstream.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
index 3cde7cc..0817ec3 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
@@ -52,8 +52,19 @@ public:
     void setFocusedElement(const WebKit::WebAccessibilityObject&);
     AccessibilityUIElement* getFocusedElement();
     AccessibilityUIElement* getRootElement();
+    
+    // This function sets a flag that tells the test_shell to dump all 
+    // accessibility notifications.
+    void dumpAccessibilityNotifications(const CppArgumentList&, CppVariant*);
+
+public:
+    // The following methods are not exposed to JavaScript.
+    bool shouldDumpAccessibilityNotifications() { return m_dumpAccessibilityNotifications; }
 
 private:
+    // If true, the test_shell will dump all accessibility notifications.
+    bool m_dumpAccessibilityNotifications;
+
     // Bound methods and properties
     void logFocusEventsCallback(const CppArgumentList&, CppVariant*);
     void logScrollingStartEventsCallback(const CppArgumentList&, CppVariant*);
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index a145bf9..fae3f56 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -489,6 +489,12 @@ void WebViewHost::focusAccessibilityObject(const WebAccessibilityObject& object)
     m_shell->accessibilityController()->setFocusedElement(object);
 }
 
+void WebViewHost::didChangeAccessibilityObjectChildren(const WebAccessibilityObject& object)
+{
+    if (m_shell->accessibilityController()->shouldDumpAccessibilityNotifications())
+        printf("didChangeAccessibilityObjectChildren - new count: %d\n", object.childCount());
+}
+
 WebNotificationPresenter* WebViewHost::notificationPresenter()
 {
     return m_shell->notificationPresenter();
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index d95c59f..5067342 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -126,6 +126,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     virtual int historyBackListCount();
     virtual int historyForwardListCount();
     virtual void focusAccessibilityObject(const WebKit::WebAccessibilityObject&);
+    virtual void didChangeAccessibilityObjectChildren(const WebKit::WebAccessibilityObject&);
     virtual WebKit::WebNotificationPresenter* notificationPresenter();
     virtual WebKit::WebGeolocationService* geolocationService();
     virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list