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

  text->CopyText(aStartOffset, aEndOffset);
  return NS_OK;
}
static void
copyTextCB(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: copyTextCB, aStartPos=%d, aEndPos=%d",
                 aStartPos, aEndPos));
  text->CopyText(aStartPos, aEndPos);
}