void AXObjectCache::detachWrapper(AccessibilityObject* obj, AccessibilityDetachmentType detachmentType) { 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 != AccessibilityDetachmentType::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)); }
AtkObject* DumpRenderTreeSupportEfl::focusedAccessibleElement(const Evas_Object* ewkFrame) { AtkObject* wrapper = rootAccessibleElement(ewkFrame); if (!wrapper) return 0; return webkitAccessibleGetFocusedElement(WEBKIT_ACCESSIBLE(wrapper)); }
String DumpRenderTreeSupportEfl::accessibilityHelpText(const AtkObject* axObject) { if (!axObject || !WEBKIT_IS_ACCESSIBLE(axObject)) return String(); WebCore::AccessibilityObject* coreObject = webkitAccessibleGetAccessibilityObject(WEBKIT_ACCESSIBLE(axObject)); if (!coreObject) return String(); return coreObject->helpText(); }
void AXObjectCache::detachWrapper(AccessibilityObject* obj) { webkit_accessible_detach(WEBKIT_ACCESSIBLE(obj->wrapper())); }