NS_IMETHODIMP
xpcAccessibleHyperText::ScriptableDeleteText(int32_t aStartOffset,
                                             int32_t aEndOffset)
{
  HyperTextAccessible* text = static_cast<HyperTextAccessible*>(this);
  if (text->IsDefunct())
    return NS_ERROR_FAILURE;

  text->DeleteText(aStartOffset, aEndOffset);
  return NS_OK;
}
static void
deleteTextCB(AtkEditableText *aText, gint aStartPos, gint aEndPos)
{
  AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
  if (!accWrap)
    return;

  HyperTextAccessible* text = accWrap->AsHyperText();
  if (!text || !text->IsTextRole())
    return;

  MAI_LOG_DEBUG(("EditableText: deleteTextCB, aStartPos=%d, aEndPos=%d",
                 aStartPos, aEndPos));
  text->DeleteText(aStartPos, aEndPos);
}