Diff
Modified: trunk/LayoutTests/ChangeLog (160484 => 160485)
--- trunk/LayoutTests/ChangeLog 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/LayoutTests/ChangeLog 2013-12-12 12:04:20 UTC (rev 160485)
@@ -1,3 +1,17 @@
+2013-12-12 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r160417.
+ http://trac.webkit.org/changeset/160417
+ https://bugs.webkit.org/show_bug.cgi?id=125629
+
+ The patch is causing crashes (Requested by zdobersek1 on
+ #webkit).
+
+ * accessibility/children-changed-sends-notification-expected.txt: Removed.
+ * accessibility/children-changed-sends-notification.html: Removed.
+ * accessibility/loading-iframe-sends-notification.html:
+ * platform/mac/TestExpectations:
+
2013-12-11 Darin Adler <[email protected]>
StylePendingImage needs to correctly manage the CSSValue pointer lifetime
Deleted: trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt (160484 => 160485)
--- trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/LayoutTests/accessibility/children-changed-sends-notification-expected.txt 2013-12-12 12:04:20 UTC (rev 160485)
@@ -1,18 +0,0 @@
-This test ensures that a notification is being emitted when children are added or removed for an accessibility object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Plain text paragraph
-
-End of test
-PARAGRAPH notification: AXChildrenAdded
-GLOBAL notification: AXChildrenAdded on element with role AXRole: AXParagraph
-PARAGRAPH notification: AXChildrenRemoved
-GLOBAL notification: AXChildrenRemoved on element with role AXRole: AXParagraph
-PASS paragraphNotificationCount is globalNotificationCount
-PASS globalNotificationCount is 2
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/accessibility/children-changed-sends-notification.html (160484 => 160485)
--- trunk/LayoutTests/accessibility/children-changed-sends-notification.html 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/LayoutTests/accessibility/children-changed-sends-notification.html 2013-12-12 12:04:20 UTC (rev 160485)
@@ -1,84 +0,0 @@
-<html>
-<head>
-<script src=""
-</head>
-<body>
-
-<p id="description"></p>
-<p id="paragraph">Plain text paragraph <a id="testLink" href="" a link at the end</a></p>
-<div>End of test</div>
-
-<div id="console"></div>
-
-<script>
-window.jsTestIsAsync = true;
-
-description("This test ensures that a notification is being emitted when children are added or removed for an accessibility object");
-
-function touchAccessibilityTree(accessibilityObject) {
- if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
- return false;
-
- var count = accessibilityObject.childrenCount;
- for (var i = 0; i < count; ++i) {
- if (!touchAccessibilityTree(accessibilityObject.childAtIndex(i)))
- return false;
- }
-
- return true;
-}
-
-function runTest() {
- window.paragraphNotificationCount = 0;
- window.globalNotificationCount = 0;
-
- if (window.accessibilityController) {
- var axWebArea = accessibilityController.rootElement.childAtIndex(0);
-
- // Ensure the accessibility hierarchy is generated.
- touchAccessibilityTree(axWebArea);
-
- window.paragraph = axWebArea.childAtIndex(1);
- paragraph.addNotificationListener(function(notification) {
- paragraphNotificationCount++;
- debug("PARAGRAPH notification: " + notification);
- });
-
- accessibilityController.addNotificationListener(function(element, notification) {
- if (!element.isEqual(paragraph))
- return;
-
- globalNotificationCount++;
- debug("GLOBAL notification: " + notification + " on element with role " + element.role);
- });
- }
-
- var par = document.getElementById('paragraph');
- window.newChild = document.createElement('button');
- par.appendChild(newChild);
-
- window.setTimeout(function() {
- var link = document.getElementById('testLink');
- link.style.display = 'none';
-
- // Ensure the accessibility hierarchy is regenerated.
- touchAccessibilityTree(axWebArea);
-
- shouldBe("paragraphNotificationCount", "globalNotificationCount");
- shouldBe("globalNotificationCount", "2");
-
- if (window.accessibilityController) {
- paragraph.removeNotificationListener();
- accessibilityController.removeNotificationListener();
- }
-
- finishJSTest();
- }, 0);
-}
-
-runTest();
-</script>
-
-<script src=""
-</body>
-</html>
Modified: trunk/LayoutTests/accessibility/loading-iframe-sends-notification.html (160484 => 160485)
--- trunk/LayoutTests/accessibility/loading-iframe-sends-notification.html 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/LayoutTests/accessibility/loading-iframe-sends-notification.html 2013-12-12 12:04:20 UTC (rev 160485)
@@ -53,9 +53,8 @@
shouldBeFalse("findByAccessibleTitleSubstring(root, 'InnerButton') != null");
window.accessibilityController.addNotificationListener(function (target, notification) {
- // Ignore this notification if it's not on the iframe or not about the iframe being loaded.
- if (target.description.indexOf("InnerFrame") == -1
- || (notification != "AXLoadComplete" && notification != "AXLayoutComplete"))
+ // Ignore this notification if it's not on the iframe.
+ if (target.description.indexOf("InnerFrame") == -1)
return;
debug("Got notification on iframe.");
Modified: trunk/LayoutTests/platform/mac/TestExpectations (160484 => 160485)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-12-12 12:04:20 UTC (rev 160485)
@@ -40,7 +40,6 @@
# Accessibility tests for notifications that don't exist or aren't needed on Mac OS X.
accessibility/aria-checkbox-sends-notification.html
-accessibility/children-changed-sends-notification.html
accessibility/menu-list-sends-change-notification.html
accessibility/multiselect-list-reports-active-option.html
Modified: trunk/Source/WebCore/ChangeLog (160484 => 160485)
--- trunk/Source/WebCore/ChangeLog 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/ChangeLog 2013-12-12 12:04:20 UTC (rev 160485)
@@ -1,3 +1,28 @@
+2013-12-12 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r160417.
+ http://trac.webkit.org/changeset/160417
+ https://bugs.webkit.org/show_bug.cgi?id=125629
+
+ The patch is causing crashes (Requested by zdobersek1 on
+ #webkit).
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::~AXObjectCache):
+ (WebCore::AXObjectCache::remove):
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::detachWrapper):
+ * accessibility/atk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::detachWrapper):
+ (WebCore::AXObjectCache::attachWrapper):
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * accessibility/ios/AXObjectCacheIOS.mm:
+ (WebCore::AXObjectCache::detachWrapper):
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::detachWrapper):
+ * accessibility/win/AXObjectCacheWin.cpp:
+ (WebCore::AXObjectCache::detachWrapper):
+
2013-12-12 Martin Robinson <[email protected]>
Remove a few more guards mistakenly added in r160367
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (160484 => 160485)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2013-12-12 12:04:20 UTC (rev 160485)
@@ -121,7 +121,7 @@
HashMap<AXID, RefPtr<AccessibilityObject>>::iterator end = m_objects.end();
for (HashMap<AXID, RefPtr<AccessibilityObject>>::iterator it = m_objects.begin(); it != end; ++it) {
AccessibilityObject* obj = (*it).value.get();
- detachWrapper(obj, CacheDestroyed);
+ detachWrapper(obj);
obj->detach();
removeAXID(obj);
}
@@ -493,7 +493,7 @@
if (!obj)
return;
- detachWrapper(obj, ElementDestroyed);
+ detachWrapper(obj);
obj->detach();
removeAXID(obj);
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (160484 => 160485)
--- trunk/Source/WebCore/accessibility/AXObjectCache.h 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h 2013-12-12 12:04:20 UTC (rev 160485)
@@ -71,8 +71,6 @@
enum PostType { PostSynchronously, PostAsynchronously };
-enum DetachmentType { CacheDestroyed, ElementDestroyed };
-
class AXObjectCache {
WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED;
public:
@@ -104,7 +102,7 @@
void remove(Widget*);
void remove(AXID);
- void detachWrapper(AccessibilityObject*, DetachmentType);
+ void detachWrapper(AccessibilityObject*);
void attachWrapper(AccessibilityObject*);
void childrenChanged(Node*);
void childrenChanged(RenderObject*);
@@ -286,7 +284,7 @@
inline void AXObjectCache::textChanged(Node*) { }
inline void AXObjectCache::textChanged(AccessibilityObject*) { }
inline void AXObjectCache::updateCacheAfterNodeIsAttached(Node*) { }
-inline void AXObjectCache::detachWrapper(AccessibilityObject*, DetachmentType) { }
+inline void AXObjectCache::detachWrapper(AccessibilityObject*) { }
inline void AXObjectCache::frameLoadingEventNotification(Frame*, AXLoadingEvent) { }
inline void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent) { }
inline void AXObjectCache::handleActiveDescendantChanged(Node*) { }
Modified: trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp (160484 => 160485)
--- trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp 2013-12-12 12:04:20 UTC (rev 160485)
@@ -31,37 +31,13 @@
#include "TextIterator.h"
#include "WebKitAccessibleWrapperAtk.h"
#include <wtf/gobject/GOwnPtr.h>
-#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
namespace WebCore {
-void AXObjectCache::detachWrapper(AccessibilityObject* obj, DetachmentType detachmentType)
+void AXObjectCache::detachWrapper(AccessibilityObject* obj)
{
- AtkObject* wrapper = obj->wrapper();
- ASSERT(wrapper);
-
- // If an object is being detached NOT because of the AXObjectCache being destroyed,
- // then it's being removed from the accessibility tree and we should emit a signal.
- if (detachmentType != CacheDestroyed) {
- if (obj->document()) {
- // Look for the right object to emit the signal from, but using the implementation
- // of atk_object_get_parent from AtkObject class (which uses a cached pointer if set)
- // since the accessibility hierarchy in WebCore will no longer be navigable.
- gpointer webkitAccessibleClass = g_type_class_peek_parent(WEBKIT_ACCESSIBLE_GET_CLASS(wrapper));
- gpointer atkObjectClass = g_type_class_peek_parent(webkitAccessibleClass);
- AtkObject* atkParent = ATK_OBJECT_CLASS(atkObjectClass)->get_parent(ATK_OBJECT(wrapper));
-
- // We don't want to emit any signal from an object outside WebKit's world.
- if (WEBKIT_IS_ACCESSIBLE(atkParent)) {
- // The accessibility hierarchy is already invalid, so the parent-children relationships
- // in the AccessibilityObject tree are not there anymore, so we can't know the offset.
- g_signal_emit_by_name(atkParent, "children-changed::remove", -1, wrapper);
- }
- }
- }
-
- webkitAccessibleDetach(WEBKIT_ACCESSIBLE(wrapper));
+ webkitAccessibleDetach(WEBKIT_ACCESSIBLE(obj->wrapper()));
}
void AXObjectCache::attachWrapper(AccessibilityObject* obj)
@@ -69,25 +45,6 @@
AtkObject* atkObj = ATK_OBJECT(webkitAccessibleNew(obj));
obj->setWrapper(atkObj);
g_object_unref(atkObj);
-
- // If an object is being attached and we are not in the middle of a layout update, then
- // we should report ATs by emitting the children-changed::add signal from the parent.
- Document* document = obj->document();
- if (!document || document->childNeedsStyleRecalc())
- return;
-
- // Don't emit the signal for objects that we already know won't be exposed directly.
- AccessibilityObject* coreParent = obj->parentObjectUnignored();
- if (!coreParent || coreParent->accessibilityIsIgnoredByDefault())
- return;
-
- // Look for the right object to emit the signal from.
- AtkObject* atkParent = coreParent ? coreParent->wrapper() : 0;
- if (!atkParent)
- return;
-
- size_t index = coreParent->children().find(obj);
- g_signal_emit_by_name(atkParent, "children-changed::add", index, atkObj);
}
static AccessibilityObject* getListObject(AccessibilityObject* object)
@@ -186,50 +143,29 @@
if (!axObject)
return;
- switch (notification) {
- case AXCheckedStateChanged:
+ if (notification == AXCheckedStateChanged) {
if (!coreObject->isCheckboxOrRadio())
return;
atk_object_notify_state_change(axObject, ATK_STATE_CHECKED, coreObject->isChecked());
- break;
-
- case AXChildrenChanged:
- // We need to make sure that the children AtkObjects are created at this moment,
- // so the children-changed::add signal gets properly emitted in attachWrapper().
- if (int numOfChildren = atk_object_get_n_accessible_children(axObject)) {
- for (int i = 0; i < numOfChildren; ++i)
- GRefPtr<AtkObject> child(atk_object_ref_accessible_child(axObject, i));
- }
- break;
-
- case AXSelectedChildrenChanged:
- case AXMenuListValueChanged:
+ } else if (notification == AXSelectedChildrenChanged || notification == AXMenuListValueChanged) {
if (notification == AXMenuListValueChanged && coreObject->isMenuList()) {
g_signal_emit_by_name(axObject, "focus-event", true);
atk_object_notify_state_change(axObject, ATK_STATE_FOCUSED, true);
}
notifyChildrenSelectionChange(coreObject);
- break;
+ } else if (notification == AXValueChanged) {
+ if (!ATK_IS_VALUE(axObject))
+ return;
- case AXValueChanged:
- if (ATK_IS_VALUE(axObject)) {
- AtkPropertyValues propertyValues;
- propertyValues.property_name = "accessible-value";
+ AtkPropertyValues propertyValues;
+ propertyValues.property_name = "accessible-value";
- memset(&propertyValues.new_value, 0, sizeof(GValue));
- atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value);
+ memset(&propertyValues.new_value, 0, sizeof(GValue));
+ atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value);
- g_signal_emit_by_name(ATK_OBJECT(axObject), "property-change::accessible-value", &propertyValues, NULL);
- }
- break;
-
- case AXInvalidStatusChanged:
+ g_signal_emit_by_name(ATK_OBJECT(axObject), "property-change::accessible-value", &propertyValues, NULL);
+ } else if (notification == AXInvalidStatusChanged)
atk_object_notify_state_change(axObject, ATK_STATE_INVALID_ENTRY, coreObject->invalidStatus() != "false");
- break;
-
- default:
- break;
- }
}
void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject* object, AXTextChange textChange, unsigned offset, const String& text)
Modified: trunk/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm (160484 => 160485)
--- trunk/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm 2013-12-12 12:04:20 UTC (rev 160485)
@@ -37,7 +37,7 @@
namespace WebCore {
-void AXObjectCache::detachWrapper(AccessibilityObject* obj, DetachmentType)
+void AXObjectCache::detachWrapper(AccessibilityObject* obj)
{
[obj->wrapper() detach];
obj->setWrapper(0);
Modified: trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm (160484 => 160485)
--- trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm 2013-12-12 12:04:20 UTC (rev 160485)
@@ -43,7 +43,7 @@
namespace WebCore {
-void AXObjectCache::detachWrapper(AccessibilityObject* obj, DetachmentType)
+void AXObjectCache::detachWrapper(AccessibilityObject* obj)
{
[obj->wrapper() detach];
obj->setWrapper(0);
Modified: trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp (160484 => 160485)
--- trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp 2013-12-12 12:04:20 UTC (rev 160485)
@@ -42,7 +42,7 @@
namespace WebCore {
-void AXObjectCache::detachWrapper(AccessibilityObject* obj, DetachmentType)
+void AXObjectCache::detachWrapper(AccessibilityObject* obj)
{
// On Windows, AccessibilityObjects are created when get_accChildCount is
// called, but they are not wrapped until get_accChild is called, so this
Modified: trunk/Tools/ChangeLog (160484 => 160485)
--- trunk/Tools/ChangeLog 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Tools/ChangeLog 2013-12-12 12:04:20 UTC (rev 160485)
@@ -1,3 +1,16 @@
+2013-12-12 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r160417.
+ http://trac.webkit.org/changeset/160417
+ https://bugs.webkit.org/show_bug.cgi?id=125629
+
+ The patch is causing crashes (Requested by zdobersek1 on
+ #webkit).
+
+ * DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
+ (axObjectEventListener):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+
2013-12-12 Zan Dobersek <[email protected]>
Use of ar T option not supported by older binutils
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp (160484 => 160485)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp 2013-12-12 12:04:20 UTC (rev 160485)
@@ -113,10 +113,8 @@
if (g_value_get_boolean(¶mValues[1]))
notificationName = "AXFocusedUIElementChanged";
} else if (!g_strcmp0(signalQuery.signal_name, "children-changed")) {
- const gchar* childrenChangedDetail = g_quark_to_string(signalHint->detail);
- signalName.set(g_strdup_printf("children-changed:%s", childrenChangedDetail));
+ signalName.set(g_strdup("children-changed"));
signalValue.set(g_strdup_printf("%d", g_value_get_uint(¶mValues[1])));
- notificationName = !g_strcmp0(childrenChangedDetail, "add") ? "AXChildrenAdded" : "AXChildrenRemoved";
} else if (!g_strcmp0(signalQuery.signal_name, "property-change")) {
signalName.set(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
if (!g_strcmp0(g_quark_to_string(signalHint->detail), "accessible-value"))
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp (160484 => 160485)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp 2013-12-12 11:54:02 UTC (rev 160484)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp 2013-12-12 12:04:20 UTC (rev 160485)
@@ -102,10 +102,8 @@
if (g_value_get_boolean(¶mValues[1]))
notificationName = "AXFocusedUIElementChanged";
} else if (!g_strcmp0(signalQuery.signal_name, "children-changed")) {
- const gchar* childrenChangedDetail = g_quark_to_string(signalHint->detail);
- signalName.set(g_strdup_printf("children-changed:%s", childrenChangedDetail));
+ signalName.set(g_strdup("children-changed"));
signalValue.set(g_strdup_printf("%d", g_value_get_uint(¶mValues[1])));
- notificationName = !g_strcmp0(childrenChangedDetail, "add") ? "AXChildrenAdded" : "AXChildrenRemoved";
} else if (!g_strcmp0(signalQuery.signal_name, "property-change")) {
signalName.set(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
if (!g_strcmp0(g_quark_to_string(signalHint->detail), "accessible-value"))