// return the IAccessible for the window.
parent_obj =
manager()->ToBrowserAccessibilityManagerWin()->parent_iaccessible();
-
// |parent| can only be NULL if the manager was created before the parent
// IAccessible was known and it wasn't subsequently set before a client
- // requested it. Crash hard if this happens so that we get crash reports.
- CHECK(parent_obj);
+ // requested it. This has been fixed. |parent| may also be NULL during
+ // destruction. Possible cases where this could occur include tabs being
+ // dragged to a new window, etc.
+ if (!parent_obj) {
+ DVLOG(1) << "In Function: "
+ << __FUNCTION__
+ << ". Parent IAccessible interface is NULL. Returning failure";
+ return E_FAIL;
+ }
}
-
parent_obj->AddRef();
*disp_parent = parent_obj;
return S_OK;
// WebKit marks everything as readonly unless it's editable text, so if it's
// not readonly, mark it as editable now. The final computation of the
// READONLY state for MSAA is below, after the switch.
- if (!HasState(ui::AX_STATE_READONLY))
+ if (!HasState(ui::AX_STATE_READ_ONLY))
ia2_state_ |= IA2_STATE_EDITABLE;
base::string16 invalid;
ia_state_ |= STATE_SYSTEM_LINKED;
ia_state_ |= STATE_SYSTEM_READONLY;
break;
- case ui::AX_ROLE_LABEL:
+ case ui::AX_ROLE_LABEL_TEXT:
ia_role_ = ROLE_SYSTEM_TEXT;
ia2_role_ = IA2_ROLE_LABEL;
break;
ia_role_ != ROLE_SYSTEM_DOCUMENT) {
ia_state_ &= ~(STATE_SYSTEM_READONLY);
}
- if (!HasState(ui::AX_STATE_READONLY))
+ if (!HasState(ui::AX_STATE_READ_ONLY))
ia_state_ &= ~(STATE_SYSTEM_READONLY);
if (GetBoolAttribute(ui::AX_ATTR_ARIA_READONLY))
ia_state_ |= STATE_SYSTEM_READONLY;