[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 13:43:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 666227bec294d3c1ab22f9cfd8fcb4529391d8ca
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 07:51:48 2010 +0000

    2010-09-24  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Send webkit accessibility notifications to Chromium.
            https://bugs.webkit.org/show_bug.cgi?id=45156
    
            * platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html:
            * platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt:
            * platform/chromium/accessibility/post-notification-LayoutComplete.html:
            * platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-LoadComplete-expected.txt:
            * platform/chromium/accessibility/post-notification-LoadComplete.html:
            * platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt:
            * platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-RowExpanded-expected.txt:
            * platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt:
            * platform/chromium/accessibility/post-notification-ScrolledToAnchor.html:
            * platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt:
            * platform/chromium/accessibility/post-notification-SelectedTextChanged.html:
            * platform/chromium/accessibility/post-notification-ValueChanged-expected.txt:
            * platform/chromium/accessibility/post-notification.js:
            (test):
    2010-09-24  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Send webkit accessibility notifications to Chromium.
            https://bugs.webkit.org/show_bug.cgi?id=45156
    
            * WebCore.gypi:
            * accessibility/chromium/AXObjectCacheChromium.cpp:
            (WebCore::AXObjectCache::postPlatformNotification):
            (WebCore::AXObjectCache::handleFocusedUIElementChanged):
            (WebCore::AXObjectCache::handleScrolledToAnchor):
            * dom/Document.cpp:
            (WebCore::Document::implicitClose):
            (WebCore::Document::setFocusedNode):
            * editing/SelectionController.h:
            * page/ChromeClient.h:
            (WebCore::ChromeClient::postAccessibilityNotification):
            * page/FrameView.cpp:
            (WebCore::FrameView::layout):
    2010-09-24  Chris Guillory   <chris.guillory at google.com>
    
            Reviewed by Chris Fleizach.
    
            Send webkit accessibility notifications to Chromium.
            https://bugs.webkit.org/show_bug.cgi?id=45156
    
            * public/WebAccessibilityCache.h:
            * public/WebViewClient.h:
            * src/ChromeClientImpl.cpp:
            (WebKit::ChromeClientImpl::focusedNodeChanged):
            (WebKit::ChromeClientImpl::getPopupMenuInfo):
            * src/ChromeClientImpl.h:
            * src/WebAccessibilityCache.cpp:
            (WebKit::WebAccessibilityCache::accessibilityEnabled):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68240 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 075fa7a..9f985a1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,33 @@
+2010-09-24  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Send webkit accessibility notifications to Chromium.
+        https://bugs.webkit.org/show_bug.cgi?id=45156
+
+        * platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html:
+        * platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt:
+        * platform/chromium/accessibility/post-notification-LayoutComplete.html:
+        * platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-LoadComplete-expected.txt:
+        * platform/chromium/accessibility/post-notification-LoadComplete.html:
+        * platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt:
+        * platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-RowExpanded-expected.txt:
+        * platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt:
+        * platform/chromium/accessibility/post-notification-ScrolledToAnchor.html:
+        * platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification-SelectedTextChanged.html:
+        * platform/chromium/accessibility/post-notification-ValueChanged-expected.txt:
+        * platform/chromium/accessibility/post-notification.js:
+        (test):
+
 2010-09-23  Hans Wennborg  <hans at chromium.org>
 
         Reviewed by Simon Fraser.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt
index 2f9b708..df356e2 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt
@@ -1,3 +1,6 @@
+AccessibilityNotification - FocusedUIElementChanged - id:ul-for-ActiveDescendantChanged
+AccessibilityNotification - FocusedUIElementChanged - id:r1
 AccessibilityNotification - ActiveDescendantChanged - id:ul-for-ActiveDescendantChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the ActiveDescendantChanged notification.
 li1
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt
index 27666e4..34987a3 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - CheckedStateChanged - id:checkbox-for-CheckedStateChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the CheckedStateChanged notification.  
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt
index 64a23e3..715b350 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt
@@ -1,3 +1,5 @@
 AccessibilityNotification - ChildrenChanged - id:div-for-ChildrenChanged
+AccessibilityNotification - LayoutComplete
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the ChildrenChanged notification.
 text
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt
index 9dfe2a4..c44b67a 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt
@@ -1 +1,4 @@
+AccessibilityNotification - FocusedUIElementChanged - id:div-for-FocusedUIElementChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the FocusedUIElementChanged notification.
+div
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html b/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html
index 4790849..a568e53 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html
@@ -2,13 +2,15 @@
 <head>
 <script>
     function testNotification() {
-        // Not sent to the chromium port - see handleFocusedUIElementChanged
+        document.body.children[0].focus();
     }
 </script>
 </head>
 <body onload="test()">
 This tests that chromium correctly recieves the FocusedUIElementChanged notification.
 
+<div id="div-for-FocusedUIElementChanged" aria-help="div-for-FocusedUIElementChanged" tabindex="-1">div</div>
+
 <script type="text/javascript" src="post-notification.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt
index da109f3..ac6754c 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt
@@ -1 +1,3 @@
+AccessibilityNotification - LayoutComplete
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the LayoutComplete notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete.html b/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete.html
index 10287f7..04c6d02 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete.html
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete.html
@@ -2,13 +2,16 @@
 <head>
 <script>
     function testNotification() {
-        // Mac specific
+        // Triger layout operation.
+        document.body.children[0].style.width = 500;
     }
 </script>
 </head>
 <body onload="test()">
 This tests that chromium correctly recieves the LayoutComplete notification.
 
+<div id="div-for-LayoutComplete" aria-help="div-for-LayoutComplete"><div></div></div>
+
 <script type="text/javascript" src="post-notification.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt
index e6a4c08..c8e61c1 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - LiveRegionChanged - id:ul-for-LiveRegionChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the LiveRegionChanged notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete-expected.txt
index 082172b..750eb42 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete-expected.txt
@@ -1 +1,2 @@
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the LoadComplete notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete.html b/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete.html
index df68f19..9c8fecf 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete.html
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete.html
@@ -1,9 +1,7 @@
 <html>
 <head>
 <script>
-    function testNotification() {
-        // Mac specific
-    }
+    function testNotification() { }
 </script>
 </head>
 <body onload="test()">
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt
index 368b614..2f3e420 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - MenuListValueChanged - id:select-for-MenuListValueChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the MenuListValueChanged notification.  
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt
index e82794f..7cc70e1 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - RowCollapsed - id:div-for-RowCollapsed
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the RowCollapsed notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt
index 3710548..850f63b 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - RowCountChanged - id:div-for-RowCountChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the RowCountChanged notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-RowExpanded-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-RowExpanded-expected.txt
index 907d66c..5274cb0 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-RowExpanded-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-RowExpanded-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - RowExpanded - id:div-for-RowExpanded
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the RowExpanded notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt
index 0499099..4836d9f 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt
@@ -1 +1,6 @@
+AccessibilityNotification - ScrolledToAnchor - id:a-for-ScrolledToAnchor
+AccessibilityNotification - ChildrenChanged
+AccessibilityNotification - ChildrenChanged
+AccessibilityNotification - LayoutComplete
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the ScrolledToAnchor notification.
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor.html b/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor.html
index c1f1c6f..ae16f1a 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor.html
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor.html
@@ -2,13 +2,18 @@
 <head>
 <script>
     function testNotification() {
-        // Not sent to the chromium port - see handleScrolledToAnchor
+        window.location.href = '#a-for-ScrolledToAnchor';
+
+        // Remove element to prevent another scroll notification. Appears to repro when test is run in isolation.
+        document.body.removeChild(document.body.children[0]);
     }
 </script>
 </head>
 <body onload="test()">
 This tests that chromium correctly recieves the ScrolledToAnchor notification.
 
+<a id="a-for-ScrolledToAnchor" aria-help="a-for-ScrolledToAnchor"></a>
+
 <script type="text/javascript" src="post-notification.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt
index 5fecca3..e403387 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - SelectedChildrenChanged - id:select-for-SelectedChildrenChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the SelectedChildrenChanged notification.  
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt
index c2e94fc..2ac09ff 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt
@@ -1 +1,4 @@
-This tests that chromium correctly recieves the SelectedTextChanged notification.
+AccessibilityNotification - FocusedUIElementChanged - id:text-for-SelectedTextChanged
+AccessibilityNotification - SelectedTextChanged - id:text-for-SelectedTextChanged
+AccessibilityNotification - LoadComplete
+This tests that chromium correctly recieves the SelectedTextChanged notification.  
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged.html b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged.html
index 60819bb..bf4e414 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged.html
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged.html
@@ -2,13 +2,15 @@
 <head>
 <script>
     function testNotification() {
-        // Mac specific - see notifyAccessibilityForSelectionChange
+        document.getElementById("text-for-SelectedTextChanged").select();
     }
 </script>
 </head>
 <body onload="test()">
 This tests that chromium correctly recieves the SelectedTextChanged notification.
 
+<input id="text-for-SelectedTextChanged" aria-help="text-for-SelectedTextChanged" value="text" type=text />
+
 <script type="text/javascript" src="post-notification.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification-ValueChanged-expected.txt b/LayoutTests/platform/chromium/accessibility/post-notification-ValueChanged-expected.txt
index e226cff..8cebff2 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification-ValueChanged-expected.txt
+++ b/LayoutTests/platform/chromium/accessibility/post-notification-ValueChanged-expected.txt
@@ -1,2 +1,3 @@
 AccessibilityNotification - ValueChanged - id:text-for-ValueChanged
+AccessibilityNotification - LoadComplete
 This tests that chromium correctly recieves the ValueChanged notification.  
diff --git a/LayoutTests/platform/chromium/accessibility/post-notification.js b/LayoutTests/platform/chromium/accessibility/post-notification.js
index af0336b..3add977 100644
--- a/LayoutTests/platform/chromium/accessibility/post-notification.js
+++ b/LayoutTests/platform/chromium/accessibility/post-notification.js
@@ -21,5 +21,5 @@ function test() {
   testNotification();
 
   // Use setTimeout so that asynchronous accessibility notifications can be processed.
-  setTimeout(testDone, 0);
+  setTimeout("setTimeout(testDone, 0);", 0);
 }
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 40f3c70..9dbde2c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-09-24  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Send webkit accessibility notifications to Chromium.
+        https://bugs.webkit.org/show_bug.cgi?id=45156
+
+        * WebCore.gypi:
+        * accessibility/chromium/AXObjectCacheChromium.cpp:
+        (WebCore::AXObjectCache::postPlatformNotification):
+        (WebCore::AXObjectCache::handleFocusedUIElementChanged):
+        (WebCore::AXObjectCache::handleScrolledToAnchor):
+        * dom/Document.cpp:
+        (WebCore::Document::implicitClose):
+        (WebCore::Document::setFocusedNode):
+        * editing/SelectionController.h:
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::postAccessibilityNotification):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+
 2010-09-24  David Hyatt  <hyatt at apple.com>
 
         Reviewed by Maciej Stachowiak.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 5762f2b..7cf50aa 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1333,6 +1333,7 @@
             'dom/XMLDocumentParserQt.cpp',
             'editing/android/EditorAndroid.cpp',
             'editing/chromium/EditorChromium.cpp',
+            'editing/chromium/SelectionControllerChromium.cpp',
             'editing/mac/EditorMac.mm',
             'editing/mac/SelectionControllerMac.mm',
             'editing/qt/EditorQt.cpp',
diff --git a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
index 18b206a..b02fe00 100644
--- a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
+++ b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
@@ -54,15 +54,17 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
     if (!client)
         return;
 
-    // TODO: Remove after the new postAccessibilityNotification is used downstream.
     switch (notification) {
-    case AXCheckedStateChanged:
-        client->didChangeAccessibilityObjectState(obj);
+    case AXActiveDescendantChanged:
+        if (!obj->document()->focusedNode() || (obj->node() != obj->document()->focusedNode()))
+            break;
+
+        // Calling handleFocusedUIElementChanged will focus the new active
+        // descendant and send the AXFocusedUIElementChanged notification.
+        handleFocusedUIElementChanged(0, obj->document()->focusedNode()->renderer());
         break;
+    case AXCheckedStateChanged:
     case AXChildrenChanged:
-        client->didChangeAccessibilityObjectChildren(obj);
-        break;
-    case AXActiveDescendantChanged:
     case AXFocusedUIElementChanged:
     case AXLayoutComplete:
     case AXLiveRegionChanged:
@@ -85,12 +87,27 @@ void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject*, AXT
 {
 }
 
-void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
+void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject* newFocusedRenderer)
 {
+    if (!newFocusedRenderer)
+        return;
+
+    Page* page = newFocusedRenderer->document()->page();
+    if (!page)
+        return;
+
+    AccessibilityObject* focusedObject = focusedUIElementForPage(page);
+    if (!focusedObject)
+        return;
+
+    postPlatformNotification(focusedObject, AXFocusedUIElementChanged);
 }
 
-void AXObjectCache::handleScrolledToAnchor(const Node*)
+void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode)
 {
+    // The anchor node may not be accessible. Post the notification for the
+    // first accessible object.
+    postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(anchorNode), AXScrolledToAnchor);
 }
 
 } // namespace WebCore
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index fa7b685..21a73d7 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -2053,7 +2053,7 @@ void Document::implicitClose()
             view()->layout();
     }
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
     if (f && renderObject && this == topDocument() && AXObjectCache::accessibilityEnabled()) {
         // The AX cache may have been cleared at this point, but we need to make sure it contains an
         // AX object to send the notification to. getOrCreate will make sure that an valid AX object
@@ -3167,7 +3167,7 @@ bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode)
         }
     }
 
-#if ((PLATFORM(MAC) || PLATFORM(WIN)) && !PLATFORM(CHROMIUM)) || PLATFORM(GTK)
+#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM)
     if (!focusChangeBlocked && m_focusedNode && AXObjectCache::accessibilityEnabled()) {
         RenderObject* oldFocusedRenderer = 0;
         RenderObject* newFocusedRenderer = 0;
diff --git a/WebCore/editing/SelectionController.h b/WebCore/editing/SelectionController.h
index 34d6ed9..e5fe71b 100644
--- a/WebCore/editing/SelectionController.h
+++ b/WebCore/editing/SelectionController.h
@@ -247,7 +247,7 @@ inline void SelectionController::setTypingStyle(PassRefPtr<CSSMutableStyleDeclar
     m_typingStyle = style;
 }
 
-#if !(PLATFORM(MAC) || PLATFORM(GTK))
+#if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(CHROMIUM))
 inline void SelectionController::notifyAccessibilityForSelectionChange()
 {
 }
diff --git a/WebCore/editing/chromium/SelectionControllerChromium.cpp b/WebCore/editing/chromium/SelectionControllerChromium.cpp
new file mode 100644
index 0000000..d627d9b
--- /dev/null
+++ b/WebCore/editing/chromium/SelectionControllerChromium.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SelectionController.h"
+
+#include "AXObjectCache.h"
+#include "Frame.h"
+
+namespace WebCore {
+
+void SelectionController::notifyAccessibilityForSelectionChange()
+{
+    // FIXME: Support editable text in chromium.
+    if (AXObjectCache::accessibilityEnabled() && m_selection.start().isNotNull() && m_selection.end().isNotNull()) {
+        Document* document = m_frame->document();
+        document->axObjectCache()->postNotification(m_selection.start().node()->renderer(), AXObjectCache::AXSelectedTextChanged, false);
+    }
+}
+
+} // namespace WebCore
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index 5175858..7542615 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -271,8 +271,6 @@ namespace WebCore {
         virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const = 0;
 
         virtual void postAccessibilityNotification(AccessibilityObject*, AXObjectCache::AXNotification) { }
-        virtual void didChangeAccessibilityObjectState(AccessibilityObject*) { }
-        virtual void didChangeAccessibilityObjectChildren(AccessibilityObject*) { }
 
     protected:
         virtual ~ChromeClient() { }
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 279e651..53cf356 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -799,7 +799,7 @@ void FrameView::layout(bool allowSubtree)
     
     m_layoutCount++;
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
     if (AXObjectCache::accessibilityEnabled())
         root->document()->axObjectCache()->postNotification(root, AXObjectCache::AXLayoutComplete, true);
 #endif
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index bf0ddd2..4a8823f 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-24  Chris Guillory   <chris.guillory at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Send webkit accessibility notifications to Chromium.
+        https://bugs.webkit.org/show_bug.cgi?id=45156
+
+        * public/WebAccessibilityCache.h:
+        * public/WebViewClient.h:
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::focusedNodeChanged):
+        (WebKit::ChromeClientImpl::getPopupMenuInfo):
+        * src/ChromeClientImpl.h:
+        * src/WebAccessibilityCache.cpp:
+        (WebKit::WebAccessibilityCache::accessibilityEnabled):
+
 2010-09-23  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h
index 52e438c..c9aec1f 100644
--- a/WebKit/chromium/public/WebAccessibilityCache.h
+++ b/WebKit/chromium/public/WebAccessibilityCache.h
@@ -45,6 +45,7 @@ public:
 
     WEBKIT_API static WebAccessibilityCache* create();
     WEBKIT_API static void enableAccessibility();
+    WEBKIT_API static bool accessibilityEnabled();
 
     virtual void initialize(WebView* view) = 0;
     virtual bool isInitialized() const = 0;
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index f686419..3b0e47a 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -276,12 +276,6 @@ public:
     // accessibility object.
     virtual void focusAccessibilityObject(const WebAccessibilityObject&) { }
 
-    // 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&) { }
-    
     // Notifies embedder about an accessibility notification.
     virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { }
 
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 744b3ac..5f702e0 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -256,7 +256,9 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
     if (!document) {
         ASSERT_NOT_REACHED();
         return;
-    } 
+    }
+
+    // TODO: Remove once the FocusedUIElementChanged notification is handled downstream.
     if (document && document->axObjectCache()->accessibilityEnabled()) {
         // Retrieve the focused AccessibilityObject.
         AccessibilityObject* focusedAccObj =
@@ -759,20 +761,6 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer,
     info->rightAligned = popupContainer->menuStyle().textDirection() == RTL;
 }
 
-void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* obj)
-{
-    // Alert assistive technology about the accessibility object state change
-    if (obj)
-        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));
-}
-
 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification)
 {
     // Alert assistive technology about the accessibility object notification.
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index fbaac87..02f1de6 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -166,8 +166,6 @@ public:
                              const WebCore::IntRect& bounds,
                              bool handleExternally);
     virtual void popupClosed(WebCore::PopupContainer* popupContainer);
-    virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
-    virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);
     virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification);
 
     // ChromeClientImpl:
diff --git a/WebKit/chromium/src/WebAccessibilityCache.cpp b/WebKit/chromium/src/WebAccessibilityCache.cpp
index 8a3f697..ab8f814 100644
--- a/WebKit/chromium/src/WebAccessibilityCache.cpp
+++ b/WebKit/chromium/src/WebAccessibilityCache.cpp
@@ -42,4 +42,9 @@ void WebAccessibilityCache::enableAccessibility()
     AXObjectCache::enableAccessibility();
 }
 
+bool WebAccessibilityCache::accessibilityEnabled()
+{
+    return AXObjectCache::accessibilityEnabled();
+}
+
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list