Changeset 67982 in webkit
- Timestamp:
- Sep 21, 2010 1:22:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r67980 r67982 1 2010-09-21 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Chris Fleizach. 4 5 Send webkit accessibility notifications to Chromium. 6 https://bugs.webkit.org/show_bug.cgi?id=45156 7 8 * platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt: 9 * platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt: 10 * platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt: 11 * platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt: 12 * platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html: 13 * platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt: 14 * platform/chromium/accessibility/post-notification-LayoutComplete.html: 15 * platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt: 16 * platform/chromium/accessibility/post-notification-LoadComplete-expected.txt: 17 * platform/chromium/accessibility/post-notification-LoadComplete.html: 18 * platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt: 19 * platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt: 20 * platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt: 21 * platform/chromium/accessibility/post-notification-RowExpanded-expected.txt: 22 * platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt: 23 * platform/chromium/accessibility/post-notification-ScrolledToAnchor.html: 24 * platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt: 25 * platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt: 26 * platform/chromium/accessibility/post-notification-SelectedTextChanged.html: 27 * platform/chromium/accessibility/post-notification-ValueChanged-expected.txt: 28 * platform/chromium/accessibility/post-notification.js: 29 (test): 30 1 31 2010-09-21 Andrew Wilson <atwilson@chromium.org> 2 32 -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-ActiveDescendantChanged-expected.txt
r67498 r67982 1 AccessibilityNotification - FocusedUIElementChanged - id:ul-for-ActiveDescendantChanged 2 AccessibilityNotification - FocusedUIElementChanged - id:r1 1 3 AccessibilityNotification - ActiveDescendantChanged - id:ul-for-ActiveDescendantChanged 4 AccessibilityNotification - LoadComplete 2 5 This tests that chromium correctly recieves the ActiveDescendantChanged notification. 3 6 li1 -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-CheckedStateChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - CheckedStateChanged - id:checkbox-for-CheckedStateChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the CheckedStateChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-ChildrenChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - ChildrenChanged - id:div-for-ChildrenChanged 2 AccessibilityNotification - LayoutComplete 3 AccessibilityNotification - LoadComplete 2 4 This tests that chromium correctly recieves the ChildrenChanged notification. 3 5 text -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged-expected.txt
r67498 r67982 1 AccessibilityNotification - FocusedUIElementChanged - id:div-for-FocusedUIElementChanged 2 AccessibilityNotification - LoadComplete 1 3 This tests that chromium correctly recieves the FocusedUIElementChanged notification. 4 div -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html
r67498 r67982 3 3 <script> 4 4 function testNotification() { 5 // Not sent to the chromium port - see handleFocusedUIElementChanged5 document.body.children[0].focus(); 6 6 } 7 7 </script> … … 10 10 This tests that chromium correctly recieves the FocusedUIElementChanged notification. 11 11 12 <div id="div-for-FocusedUIElementChanged" aria-help="div-for-FocusedUIElementChanged" tabindex="-1">div</div> 13 12 14 <script type="text/javascript" src="post-notification.js"></script> 13 15 </body> -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete-expected.txt
r67498 r67982 1 AccessibilityNotification - LayoutComplete 2 AccessibilityNotification - LoadComplete 1 3 This tests that chromium correctly recieves the LayoutComplete notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-LayoutComplete.html
r67498 r67982 3 3 <script> 4 4 function testNotification() { 5 // Mac specific 5 // Triger layout operation. 6 document.body.children[0].style.width = 500; 6 7 } 7 8 </script> … … 10 11 This tests that chromium correctly recieves the LayoutComplete notification. 11 12 13 <div id="div-for-LayoutComplete" aria-help="div-for-LayoutComplete"><div></div></div> 14 12 15 <script type="text/javascript" src="post-notification.js"></script> 13 16 </body> -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-LiveRegionChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - LiveRegionChanged - id:ul-for-LiveRegionChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the LiveRegionChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete-expected.txt
r67498 r67982 1 AccessibilityNotification - LoadComplete 1 2 This tests that chromium correctly recieves the LoadComplete notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-LoadComplete.html
r67498 r67982 2 2 <head> 3 3 <script> 4 function testNotification() { 5 // Mac specific 6 } 4 function testNotification() { } 7 5 </script> 8 6 </head> -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-MenuListValueChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - MenuListValueChanged - id:select-for-MenuListValueChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the MenuListValueChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-RowCollapsed-expected.txt
r67498 r67982 1 1 AccessibilityNotification - RowCollapsed - id:div-for-RowCollapsed 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the RowCollapsed notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-RowCountChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - RowCountChanged - id:div-for-RowCountChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the RowCountChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-RowExpanded-expected.txt
r67498 r67982 1 1 AccessibilityNotification - RowExpanded - id:div-for-RowExpanded 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the RowExpanded notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor-expected.txt
r67498 r67982 1 AccessibilityNotification - ScrolledToAnchor - id:a-for-ScrolledToAnchor 2 AccessibilityNotification - ChildrenChanged 3 AccessibilityNotification - ChildrenChanged 4 AccessibilityNotification - LayoutComplete 5 AccessibilityNotification - LoadComplete 1 6 This tests that chromium correctly recieves the ScrolledToAnchor notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-ScrolledToAnchor.html
r67498 r67982 3 3 <script> 4 4 function testNotification() { 5 // Not sent to the chromium port - see handleScrolledToAnchor 5 window.location.href = '#a-for-ScrolledToAnchor'; 6 7 // Remove element to prevent another scroll notification. Appears to repro when test is run in isolation. 8 document.body.removeChild(document.body.children[0]); 6 9 } 7 10 </script> … … 10 13 This tests that chromium correctly recieves the ScrolledToAnchor notification. 11 14 15 <a id="a-for-ScrolledToAnchor" aria-help="a-for-ScrolledToAnchor"></a> 16 12 17 <script type="text/javascript" src="post-notification.js"></script> 13 18 </body> -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-SelectedChildrenChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - SelectedChildrenChanged - id:select-for-SelectedChildrenChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the SelectedChildrenChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged-expected.txt
r67498 r67982 1 This tests that chromium correctly recieves the SelectedTextChanged notification. 1 AccessibilityNotification - FocusedUIElementChanged - id:text-for-SelectedTextChanged 2 AccessibilityNotification - SelectedTextChanged - id:text-for-SelectedTextChanged 3 AccessibilityNotification - LoadComplete 4 This tests that chromium correctly recieves the SelectedTextChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-SelectedTextChanged.html
r67498 r67982 3 3 <script> 4 4 function testNotification() { 5 // Mac specific - see notifyAccessibilityForSelectionChange5 document.getElementById("text-for-SelectedTextChanged").select(); 6 6 } 7 7 </script> … … 10 10 This tests that chromium correctly recieves the SelectedTextChanged notification. 11 11 12 <input id="text-for-SelectedTextChanged" aria-help="text-for-SelectedTextChanged" value="text" type=text /> 13 12 14 <script type="text/javascript" src="post-notification.js"></script> 13 15 </body> -
trunk/LayoutTests/platform/chromium/accessibility/post-notification-ValueChanged-expected.txt
r67498 r67982 1 1 AccessibilityNotification - ValueChanged - id:text-for-ValueChanged 2 AccessibilityNotification - LoadComplete 2 3 This tests that chromium correctly recieves the ValueChanged notification. -
trunk/LayoutTests/platform/chromium/accessibility/post-notification.js
r67498 r67982 22 22 23 23 // Use setTimeout so that asynchronous accessibility notifications can be processed. 24 setTimeout( testDone, 0);24 setTimeout("setTimeout(testDone, 0);", 0); 25 25 } -
trunk/WebCore/ChangeLog
r67981 r67982 1 2010-09-21 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Chris Fleizach. 4 5 Send webkit accessibility notifications to Chromium. 6 https://bugs.webkit.org/show_bug.cgi?id=45156 7 8 * WebCore.gypi: 9 * accessibility/chromium/AXObjectCacheChromium.cpp: 10 (WebCore::AXObjectCache::postPlatformNotification): 11 (WebCore::AXObjectCache::handleFocusedUIElementChanged): 12 (WebCore::AXObjectCache::handleScrolledToAnchor): 13 * dom/Document.cpp: 14 (WebCore::Document::implicitClose): 15 (WebCore::Document::setFocusedNode): 16 * editing/SelectionController.h: 17 * editing/chromium/SelectionControllerChromium.cpp: Added. 18 (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 19 * page/FrameView.cpp: 20 (WebCore::FrameView::layout): 21 * page/chromium/ChromeClientChromium.h: 22 1 23 2010-09-21 Alejandro G. Castro <alex@igalia.com> 2 24 -
trunk/WebCore/WebCore.gypi
r67922 r67982 1334 1334 'editing/android/EditorAndroid.cpp', 1335 1335 'editing/chromium/EditorChromium.cpp', 1336 'editing/chromium/SelectionControllerChromium.cpp', 1336 1337 'editing/mac/EditorMac.mm', 1337 1338 'editing/mac/SelectionControllerMac.mm', -
trunk/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
r67498 r67982 64 64 return; 65 65 66 // TODO: Remove after the new postAccessibilityNotification is used downstream.67 66 switch (notification) { 67 case AXActiveDescendantChanged: 68 if (!obj->document()->focusedNode() || (obj->node() != obj->document()->focusedNode())) 69 break; 70 71 // Calling handleFocusedUIElementChanged will focus the new active 72 // descendant and send the AXFocusedUIElementChanged notification. 73 handleFocusedUIElementChanged(0, obj->document()->focusedNode()->renderer()); 74 break; 68 75 case AXCheckedStateChanged: 69 client->didChangeAccessibilityObjectState(obj);70 break;71 76 case AXChildrenChanged: 72 client->didChangeAccessibilityObjectChildren(obj);73 break;74 case AXActiveDescendantChanged:75 77 case AXFocusedUIElementChanged: 76 78 case AXLayoutComplete: … … 91 93 } 92 94 93 void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject* )95 void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject* newFocusedRenderer) 94 96 { 97 if (!newFocusedRenderer) 98 return; 99 100 Page* page = newFocusedRenderer->document()->page(); 101 if (!page) 102 return; 103 104 AccessibilityObject* focusedObject = focusedUIElementForPage(page); 105 if (!focusedObject) 106 return; 107 108 postPlatformNotification(focusedObject, AXFocusedUIElementChanged); 95 109 } 96 110 97 void AXObjectCache::handleScrolledToAnchor(const Node* )111 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) 98 112 { 113 // The anchor node may not be accessible. Post the notification for the 114 // first accessible object. 115 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(anchorNode), AXScrolledToAnchor); 99 116 } 100 117 -
trunk/WebCore/dom/Document.cpp
r67898 r67982 2052 2052 } 2053 2053 2054 #if PLATFORM(MAC) 2054 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) 2055 2055 if (f && renderObject && this == topDocument() && AXObjectCache::accessibilityEnabled()) { 2056 2056 // The AX cache may have been cleared at this point, but we need to make sure it contains an … … 3166 3166 } 3167 3167 3168 #if ((PLATFORM(MAC) || PLATFORM(WIN)) && !PLATFORM(CHROMIUM)) || PLATFORM(GTK)3168 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM) 3169 3169 if (!focusChangeBlocked && m_focusedNode && AXObjectCache::accessibilityEnabled()) { 3170 3170 RenderObject* oldFocusedRenderer = 0; -
trunk/WebCore/editing/SelectionController.h
r67909 r67982 248 248 } 249 249 250 #if !(PLATFORM(MAC) || PLATFORM(GTK) )250 #if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(CHROMIUM)) 251 251 inline void SelectionController::notifyAccessibilityForSelectionChange() 252 252 { -
trunk/WebCore/editing/chromium/SelectionControllerChromium.cpp
r67981 r67982 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.3 * 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * 4 4 * Redistribution and use in source and binary forms, with or without 5 5 * modification, are permitted provided that the following conditions are 6 6 * met: 7 * 7 * 8 8 * * Redistributions of source code must retain the above copyright 9 9 * notice, this list of conditions and the following disclaimer. … … 15 15 * contributors may be used to endorse or promote products derived from 16 16 * this software without specific prior written permission. 17 * 17 * 18 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 30 30 31 31 #include "config.h" 32 #include " WebAccessibilityCache.h"32 #include "SelectionController.h" 33 33 34 34 #include "AXObjectCache.h" 35 #include "Frame.h" 35 36 36 using namespace WebCore; 37 namespace WebCore { 37 38 38 namespace WebKit { 39 40 void WebAccessibilityCache::enableAccessibility() 39 void SelectionController::notifyAccessibilityForSelectionChange() 41 40 { 42 AXObjectCache::enableAccessibility(); 41 // FIXME: Support editable text in chromium. 42 if (AXObjectCache::accessibilityEnabled() && m_selection.start().isNotNull() && m_selection.end().isNotNull()) { 43 Document* document = m_frame->document(); 44 document->axObjectCache()->postNotification(m_selection.start().node()->renderer(), AXObjectCache::AXSelectedTextChanged, false); 45 } 43 46 } 44 47 45 } 48 } // namespace WebCore -
trunk/WebCore/page/FrameView.cpp
r67853 r67982 800 800 m_layoutCount++; 801 801 802 #if PLATFORM(MAC) 802 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) 803 803 if (AXObjectCache::accessibilityEnabled()) 804 804 root->document()->axObjectCache()->postNotification(root, AXObjectCache::AXLayoutComplete, true); -
trunk/WebCore/page/chromium/ChromeClientChromium.h
r67498 r67982 55 55 virtual void popupClosed(PopupContainer* popupContainer) = 0; 56 56 57 // Notifies embedder that the state of an accessibility object has changed.58 virtual void didChangeAccessibilityObjectState(AccessibilityObject*) = 0;59 60 // Notified embedder that the children of an accessibility object has changed.61 virtual void didChangeAccessibilityObjectChildren(AccessibilityObject*) = 0;62 63 57 // Notifies embedder about an accessibility notification. 64 58 virtual void postAccessibilityNotification(AccessibilityObject*, AXObjectCache::AXNotification) = 0; -
trunk/WebKit/chromium/ChangeLog
r67949 r67982 1 2010-09-21 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Chris Fleizach. 4 5 Send webkit accessibility notifications to Chromium. 6 https://bugs.webkit.org/show_bug.cgi?id=45156 7 8 * public/WebAccessibilityCache.h: 9 * public/WebViewClient.h: 10 * src/ChromeClientImpl.cpp: 11 (WebKit::ChromeClientImpl::focusedNodeChanged): 12 (WebKit::ChromeClientImpl::getPopupMenuInfo): 13 * src/ChromeClientImpl.h: 14 * src/WebAccessibilityCache.cpp: 15 (WebKit::WebAccessibilityCache::accessibilityEnabled): 16 1 17 2010-09-21 Steve Block <steveblock@google.com> 2 18 -
trunk/WebKit/chromium/public/WebAccessibilityCache.h
r62133 r67982 46 46 WEBKIT_API static WebAccessibilityCache* create(); 47 47 WEBKIT_API static void enableAccessibility(); 48 WEBKIT_API static bool accessibilityEnabled(); 48 49 49 50 virtual void initialize(WebView* view) = 0; -
trunk/WebKit/chromium/public/WebViewClient.h
r67498 r67982 277 277 virtual void focusAccessibilityObject(const WebAccessibilityObject&) { } 278 278 279 // Notifies embedder that the state of an accessibility object has changed.280 virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }281 282 // Notifies embedder that the children of an accessibility object has changed.283 virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { }284 285 279 // Notifies embedder about an accessibility notification. 286 280 virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { } -
trunk/WebKit/chromium/src/ChromeClientImpl.cpp
r67498 r67982 258 258 ASSERT_NOT_REACHED(); 259 259 return; 260 } 260 } 261 262 // TODO: Remove once the FocusedUIElementChanged notification is handled downstream. 261 263 if (document && document->axObjectCache()->accessibilityEnabled()) { 262 264 // Retrieve the focused AccessibilityObject. … … 761 763 } 762 764 763 void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* obj)764 {765 // Alert assistive technology about the accessibility object state change766 if (obj)767 m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));768 }769 770 void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj)771 {772 // Alert assistive technology about the accessibility object children change773 if (obj)774 m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj));775 }776 777 765 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification) 778 766 { -
trunk/WebKit/chromium/src/ChromeClientImpl.h
r67498 r67982 167 167 bool handleExternally); 168 168 virtual void popupClosed(WebCore::PopupContainer* popupContainer); 169 virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);170 virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);171 169 virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification); 172 170 -
trunk/WebKit/chromium/src/WebAccessibilityCache.cpp
r50714 r67982 43 43 } 44 44 45 bool WebAccessibilityCache::accessibilityEnabled() 46 { 47 return AXObjectCache::accessibilityEnabled(); 45 48 } 49 50 }
Note: See TracChangeset
for help on using the changeset viewer.