Bug 759305 - De-ns-ify nsHyperTextAcc, r=surkov

--HG--
rename : accessible/src/atk/nsHyperTextAccessibleWrap.h => accessible/src/atk/HyperTextAccessibleWrap.h
rename : accessible/src/html/nsHyperTextAccessible.cpp => accessible/src/generic/HyperTextAccessible.cpp
rename : accessible/src/html/nsHyperTextAccessible.h => accessible/src/generic/HyperTextAccessible.h
rename : accessible/src/mac/nsHyperTextAccessibleWrap.h => accessible/src/mac/HyperTextAccessibleWrap.h
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.cpp => accessible/src/msaa/HyperTextAccessibleWrap.cpp
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.h => accessible/src/msaa/HyperTextAccessibleWrap.h
rename : accessible/src/other/nsHyperTextAccessibleWrap.h => accessible/src/other/HyperTextAccessibleWrap.h
This commit is contained in:
Mark Capella 2012-05-31 04:04:41 -04:00
Родитель 51351e8a76
Коммит 6780d6fc0a
66 изменённых файлов: 404 добавлений и 392 удалений

Просмотреть файл

@ -376,7 +376,7 @@ AccessibleWrap::CreateMaiInterfaces(void)
interfacesBits |= 1 << MAI_INTERFACE_ACTION;
// Text, Editabletext, and Hypertext interface.
nsHyperTextAccessible* hyperText = AsHyperText();
HyperTextAccessible* hyperText = AsHyperText();
if (hyperText && hyperText->IsTextRole()) {
interfacesBits |= 1 << MAI_INTERFACE_TEXT;
interfacesBits |= 1 << MAI_INTERFACE_EDITABLE_TEXT;

Просмотреть файл

@ -4,12 +4,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _NSHYPERTEXTACCESSIBLEWRAP_H
#define _NSHYPERTEXTACCESSIBLEWRAP_H
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
#define mozilla_a11y_HyperTextAccessibleWrap_h__
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap;
typedef class HyperTextAccessible HyperTextAccessibleWrap;
#endif

Просмотреть файл

@ -6,7 +6,7 @@
#include "InterfaceInitFuncs.h"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsString.h"

Просмотреть файл

@ -6,7 +6,7 @@
#include "InterfaceInitFuncs.h"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsMaiHyperlink.h"
@ -19,7 +19,7 @@ getLinkCB(AtkHypertext *aText, gint aLinkIndex)
if (!accWrap)
return nsnull;
nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, nsnull);
Accessible* hyperLink = hyperText->GetLinkAt(aLinkIndex);
@ -42,7 +42,7 @@ getLinkCountCB(AtkHypertext *aText)
if (!accWrap)
return -1;
nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, -1);
return hyperText->GetLinkCount();
@ -55,7 +55,7 @@ getLinkIndexCB(AtkHypertext *aText, gint aCharIndex)
if (!accWrap)
return -1;
nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, -1);
PRInt32 index = -1;

Просмотреть файл

@ -6,7 +6,7 @@
#include "InterfaceInitFuncs.h"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsIPersistentProperties2.h"
@ -314,7 +314,7 @@ getCharacterCountCB(AtkText *aText)
if (!accWrap)
return 0;
nsHyperTextAccessible* textAcc = accWrap->AsHyperText();
HyperTextAccessible* textAcc = accWrap->AsHyperText();
return textAcc->IsDefunct() ?
0 : static_cast<gint>(textAcc->CharacterCount());
}

Просмотреть файл

@ -646,7 +646,7 @@ NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
if (!container)
return;
nsHyperTextAccessible* textAccessible = container->AsHyperText();
HyperTextAccessible* textAccessible = container->AsHyperText();
if (!textAccessible)
return;

Просмотреть файл

@ -5,9 +5,9 @@
#include "TextAttrs.h"
#include "HyperTextAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsHyperTextAccessibleWrap.h"
#include "StyleInfo.h"
#include "gfxFont.h"
@ -199,7 +199,7 @@ TextAttrsMgr::GetRange(TextAttr* aAttrArray[], PRUint32 aAttrArrayLen,
////////////////////////////////////////////////////////////////////////////////
TextAttrsMgr::LangTextAttr::
LangTextAttr(nsHyperTextAccessible* aRoot,
LangTextAttr(HyperTextAccessible* aRoot,
nsIContent* aRootElm, nsIContent* aElm) :
TTextAttr<nsString>(!aElm), mRootContent(aRootElm)
{

Просмотреть файл

@ -11,17 +11,17 @@
#include "nsIPersistentProperties2.h"
#include "nsStyleConsts.h"
class nsHyperTextAccessible;
class HyperTextAccessible;
namespace mozilla {
namespace a11y {
/**
* Used to expose text attributes for the hyper text accessible (see
* nsHyperTextAccessible class).
* HyperTextAccessible class).
*
* @note "invalid: spelling" text attribute is implemented entirely in
* nsHyperTextAccessible class.
* HyperTextAccessible class.
*/
class TextAttrsMgr
{
@ -29,7 +29,7 @@ public:
/**
* Constructor. Used to expose default text attributes.
*/
TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc) :
TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) :
mOffsetAcc(nsnull), mHyperTextAcc(aHyperTextAcc),
mOffsetAccIdx(-1), mIncludeDefAttrs(true) { }
@ -45,7 +45,7 @@ public:
* should be calculated for
* @param oOffsetAccIdx [optional] index in parent of offset accessible
*/
TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc,
TextAttrsMgr(HyperTextAccessible* aHyperTextAcc,
bool aIncludeDefAttrs,
Accessible* aOffsetAcc,
PRInt32 aOffsetAccIdx) :
@ -84,7 +84,7 @@ protected:
private:
Accessible* mOffsetAcc;
nsHyperTextAccessible* mHyperTextAcc;
HyperTextAccessible* mHyperTextAcc;
PRInt32 mOffsetAccIdx;
bool mIncludeDefAttrs;
@ -191,7 +191,7 @@ protected:
class LangTextAttr : public TTextAttr<nsString>
{
public:
LangTextAttr(nsHyperTextAccessible* aRoot, nsIContent* aRootElm,
LangTextAttr(HyperTextAccessible* aRoot, nsIContent* aRootElm,
nsIContent* aElm);
virtual ~LangTextAttr() { }

Просмотреть файл

@ -7,7 +7,7 @@
#define TextUpdater_h_
#include "AccEvent.h"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
/**
* Used to find a difference between old and new text and fire text change
@ -85,7 +85,7 @@ private:
private:
DocAccessible* mDocument;
mozilla::a11y::TextLeafAccessible* mTextLeaf;
nsHyperTextAccessible* mHyperText;
HyperTextAccessible* mHyperText;
PRInt32 mTextOffset;
};

Просмотреть файл

@ -10,7 +10,7 @@
#include "nsARIAMap.h"
#include "nsCoreUtils.h"
#include "DocAccessible.h"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsIAccessibleTypes.h"
#include "Role.h"
#include "States.h"
@ -254,7 +254,7 @@ nsAccUtils::IsARIASelected(Accessible* aAccessible)
nsGkAtoms::_true, eCaseMatters);
}
nsHyperTextAccessible*
HyperTextAccessible*
nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
{
// Get accessible from selection's focus DOM point (the DOM point where
@ -283,7 +283,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
}
do {
nsHyperTextAccessible* textAcc = accessible->AsHyperText();
HyperTextAccessible* textAcc = accessible->AsHyperText();
if (textAcc)
return textAcc;

Просмотреть файл

@ -23,7 +23,7 @@
class nsAccessNode;
class Accessible;
class nsHyperTextAccessible;
class HyperTextAccessible;
class nsHTMLTableAccessible;
class DocAccessible;
struct nsRoleMapEntry;
@ -157,7 +157,7 @@ public:
* @param aSelection [in] the given selection
* @return text accessible
*/
static nsHyperTextAccessible*
static HyperTextAccessible*
GetTextAccessibleFromSelection(nsISelection* aSelection);
/**

Просмотреть файл

@ -14,6 +14,7 @@
#endif
#include "FocusManager.h"
#include "HTMLListAccessible.h"
#include "HyperTextAccessibleWrap.h"
#include "nsAccessiblePivot.h"
#include "nsAccUtils.h"
#include "nsARIAMap.h"
@ -24,7 +25,6 @@
#include "nsHTMLSelectAccessible.h"
#include "nsHTMLTableAccessibleWrap.h"
#include "nsHTMLTextAccessible.h"
#include "nsHyperTextAccessibleWrap.h"
#include "nsXFormsFormControlsAccessible.h"
#include "nsXFormsWidgetsAccessible.h"
#include "OuterDocAccessible.h"
@ -205,7 +205,7 @@ nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
Accessible* accessible =
new nsHyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell));
new HyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
@ -1052,7 +1052,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
return nsnull;
}
newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
newAcc = new HyperTextAccessibleWrap(content, docAcc);
if (docAcc->BindToDocument(newAcc, aria::GetRoleMap(aNode)))
return newAcc;
return nsnull;
@ -1227,7 +1227,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// other accessibles can point to it, or so that it can hold a state, etc.
if (isHTML) {
// Interesting HTML container which may have selectable text and/or embedded objects
newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
newAcc = new HyperTextAccessibleWrap(content, docAcc);
}
else { // XUL, SVG, MathML etc.
// Interesting generic non-HTML container
@ -1657,7 +1657,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aContent);
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
roleMapEntry->role != roles::LINK) {
Accessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
Accessible* accessible = new HyperTextAccessibleWrap(aContent, aDoc);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1690,7 +1690,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
tag == nsGkAtoms::h5 ||
tag == nsGkAtoms::h6 ||
tag == nsGkAtoms::q) {
Accessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
Accessible* accessible = new HyperTextAccessibleWrap(aContent, aDoc);
NS_IF_ADDREF(accessible);
return accessible;
}

Просмотреть файл

@ -7,9 +7,9 @@
#include "nsAccessiblePivot.h"
#include "Accessible-inl.h"
#include "nsAccUtils.h"
#include "nsHyperTextAccessible.h"
#include "DocAccessible.h"
#include "HyperTextAccessible.h"
#include "nsAccUtils.h"
#include "States.h"
#include "nsArrayUtils.h"
@ -155,7 +155,7 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible,
(aStartOffset >= 0 || (aStartOffset != -1 && aEndOffset != -1)),
NS_ERROR_INVALID_ARG);
nsRefPtr<nsHyperTextAccessible> newPosition = do_QueryObject(aTextAccessible);
nsRefPtr<HyperTextAccessible> newPosition = do_QueryObject(aTextAccessible);
if (!newPosition || !IsRootDescendant(newPosition))
return NS_ERROR_INVALID_ARG;

Просмотреть файл

@ -6,10 +6,10 @@
#include "nsBaseWidgetAccessible.h"
#include "Accessible-inl.h"
#include "HyperTextAccessibleWrap.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsHyperTextAccessibleWrap.h"
#include "Role.h"
#include "States.h"

Просмотреть файл

@ -7,7 +7,7 @@
#define _nsBaseWidgetAccessible_H_
#include "AccessibleWrap.h"
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "nsIContent.h"
/**

Просмотреть файл

@ -243,7 +243,7 @@ nsCaretAccessible::NormalSelectionChanged(nsISelection* aSelection)
return; // No selection
}
nsHyperTextAccessible* textAcc =
HyperTextAccessible* textAcc =
nsAccUtils::GetTextAccessibleFromSelection(aSelection);
if (!textAcc)
return;
@ -278,7 +278,7 @@ nsCaretAccessible::SpellcheckSelectionChanged(nsISelection* aSelection)
// misspelled word). If spellchecking is disabled (for example,
// @spellcheck="false" on html:body) then we won't fire any event.
nsHyperTextAccessible* textAcc =
HyperTextAccessible* textAcc =
nsAccUtils::GetTextAccessibleFromSelection(aSelection);
if (!textAcc)
return;

Просмотреть файл

@ -6,8 +6,8 @@
#ifndef __nsCaretAccessible_h__
#define __nsCaretAccessible_h__
#include "HyperTextAccessible.h"
#include "NotificationController.h"
#include "nsHyperTextAccessible.h"
#include "nsISelectionListener.h"
@ -118,7 +118,7 @@ private:
// If it was on a control, then its control's selection. Otherwise, it's for
// a document where the selection changed.
nsCOMPtr<nsIWeakReference> mLastUsedSelection; // Weak ref to nsISelection
nsRefPtr<nsHyperTextAccessible> mLastTextAccessible;
nsRefPtr<HyperTextAccessible> mLastTextAccessible;
PRInt32 mLastCaretOffset;
mozilla::a11y::RootAccessible* mRootAccessible;

Просмотреть файл

@ -774,7 +774,7 @@ ARIAGridAccessible::GetSelectedColumnsArray(PRUint32* aColumnCount,
ARIAGridCellAccessible::
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -782,7 +782,7 @@ ARIAGridCellAccessible::
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(ARIAGridCellAccessible,
nsHyperTextAccessible,
HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
@ -956,7 +956,7 @@ ARIAGridCellAccessible::IsSelected(bool* aIsSelected)
void
ARIAGridCellAccessible::ApplyARIAState(PRUint64* aState) const
{
nsHyperTextAccessibleWrap::ApplyARIAState(aState);
HyperTextAccessibleWrap::ApplyARIAState(aState);
// Return if the gridcell has aria-selected="true".
if (*aState & states::SELECTED)
@ -982,7 +982,7 @@ ARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties* aAttribut
if (IsDefunct())
return NS_ERROR_FAILURE;
nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
// Expose "table-cell-index" attribute.

Просмотреть файл

@ -8,7 +8,7 @@
#include "nsIAccessibleTable.h"
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "TableAccessible.h"
#include "xpcAccessibleTable.h"
@ -88,7 +88,7 @@ protected:
/**
* Accessible for ARIA gridcell and rowheader/columnheader.
*/
class ARIAGridCellAccessible : public nsHyperTextAccessibleWrap,
class ARIAGridCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:

Просмотреть файл

@ -2736,7 +2736,7 @@ Accessible::StartOffset()
{
NS_PRECONDITION(IsLink(), "StartOffset is called not on hyper link!");
nsHyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull;
HyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull;
return hyperText ? hyperText->GetChildOffset(this) : 0;
}
@ -2745,7 +2745,7 @@ Accessible::EndOffset()
{
NS_PRECONDITION(IsLink(), "EndOffset is called on not hyper link!");
nsHyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull;
HyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull;
return hyperText ? (hyperText->GetChildOffset(this) + 1) : 0;
}

Просмотреть файл

@ -26,7 +26,7 @@ class AccGroupInfo;
class EmbeddedObjCollector;
class KeyBinding;
class Accessible;
class nsHyperTextAccessible;
class HyperTextAccessible;
class nsHTMLImageAccessible;
class nsHTMLImageMapAccessible;
struct nsRoleMapEntry;
@ -244,7 +244,6 @@ public:
*/
virtual mozilla::a11y::GroupPos GroupPosition();
/**
/**
* Used by ChildAtPoint() method to get direct or deepest child at point.
*/
@ -473,7 +472,7 @@ public:
DocAccessible* AsDoc();
inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; }
nsHyperTextAccessible* AsHyperText();
HyperTextAccessible* AsHyperText();
inline bool IsHTMLFileInput() const { return mFlags & eHTMLFileInputAccessible; }

Просмотреть файл

@ -78,7 +78,7 @@ static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
DocAccessible::
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsHyperTextAccessibleWrap(aRootContent, this),
HyperTextAccessibleWrap(aRootContent, this),
mDocument(aDocument), mScrollPositionChangedTicks(0),
mLoadState(eTreeConstructionPending), mLoadEventType(0),
mVirtualCursor(nsnull),
@ -162,14 +162,13 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible)
nsresult status;
if (!foundInterface) {
// HTML document accessible must inherit from nsHyperTextAccessible to get
// HTML document accessible must inherit from HyperTextAccessible to get
// support text interfaces. XUL document accessible doesn't need this.
// However at some point we may push <body> to implement the interfaces and
// return DocAccessible to inherit from AccessibleWrap.
status = IsHyperText() ?
nsHyperTextAccessible::QueryInterface(aIID,
(void**)&foundInterface) :
HyperTextAccessible::QueryInterface(aIID, (void**)&foundInterface) :
Accessible::QueryInterface(aIID, (void**)&foundInterface);
} else {
NS_ADDREF(foundInterface);
@ -180,8 +179,8 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible)
return status;
}
NS_IMPL_ADDREF_INHERITED(DocAccessible, nsHyperTextAccessible)
NS_IMPL_RELEASE_INHERITED(DocAccessible, nsHyperTextAccessible)
NS_IMPL_ADDREF_INHERITED(DocAccessible, HyperTextAccessible)
NS_IMPL_RELEASE_INHERITED(DocAccessible, HyperTextAccessible)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessible
@ -531,7 +530,7 @@ DocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
return NS_OK;
}
// nsHyperTextAccessible method
// HyperTextAccessible method
already_AddRefed<nsIEditor>
DocAccessible::GetEditor() const
{
@ -663,7 +662,7 @@ DocAccessible::Shutdown()
mNodeToAccessibleMap.Clear();
ClearCache(mAccessibleCache);
nsHyperTextAccessibleWrap::Shutdown();
HyperTextAccessibleWrap::Shutdown();
GetAccService()->NotifyOfDocumentShutdown(kungFuDeathGripDoc);
}
@ -1305,7 +1304,7 @@ DocAccessible::HandleAccEvent(AccEvent* aEvent)
if (logging::IsEnabled(logging::eDocLoad))
logging::DocLoadEventHandled(aEvent);
return nsHyperTextAccessible::HandleAccEvent(aEvent);
return HyperTextAccessible::HandleAccEvent(aEvent);
}
#endif
@ -1762,7 +1761,7 @@ DocAccessible::ProcessPendingEvent(AccEvent* aEvent)
{
PRUint32 eventType = aEvent->GetEventType();
if (eventType == nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED) {
nsHyperTextAccessible* hyperText = aEvent->GetAccessible()->AsHyperText();
HyperTextAccessible* hyperText = aEvent->GetAccessible()->AsHyperText();
PRInt32 caretOffset;
if (hyperText &&
NS_SUCCEEDED(hyperText->GetCaretOffset(&caretOffset))) {

Просмотреть файл

@ -10,8 +10,8 @@
#include "nsIAccessibleDocument.h"
#include "nsIAccessiblePivot.h"
#include "HyperTextAccessibleWrap.h"
#include "nsEventShell.h"
#include "nsHyperTextAccessibleWrap.h"
#include "NotificationController.h"
#include "nsClassHashtable.h"
@ -31,7 +31,7 @@ class nsAccessiblePivot;
const PRUint32 kDefaultCacheSize = 256;
class DocAccessible : public nsHyperTextAccessibleWrap,
class DocAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleDocument,
public nsIDocumentObserver,
public nsIObserver,
@ -91,7 +91,7 @@ public:
virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
// nsHyperTextAccessible
// HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// DocAccessible

Просмотреть файл

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "Accessible-inl.h"
#include "nsAccessibilityService.h"
@ -37,25 +37,26 @@
using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsHyperTextAccessible
// HyperTextAccessible
////////////////////////////////////////////////////////////////////////////////
nsHyperTextAccessible::
nsHyperTextAccessible(nsIContent* aNode, DocAccessible* aDoc) :
HyperTextAccessible::
HyperTextAccessible(nsIContent* aNode, DocAccessible* aDoc) :
AccessibleWrap(aNode, aDoc)
{
mFlags |= eHyperTextAccessible;
}
NS_IMPL_ADDREF_INHERITED(nsHyperTextAccessible, AccessibleWrap)
NS_IMPL_RELEASE_INHERITED(nsHyperTextAccessible, AccessibleWrap)
NS_IMPL_ADDREF_INHERITED(HyperTextAccessible, AccessibleWrap)
NS_IMPL_RELEASE_INHERITED(HyperTextAccessible, AccessibleWrap)
nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
nsresult
HyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
*aInstancePtr = nsnull;
if (aIID.Equals(NS_GET_IID(nsHyperTextAccessible))) {
*aInstancePtr = static_cast<nsHyperTextAccessible*>(this);
if (aIID.Equals(NS_GET_IID(HyperTextAccessible))) {
*aInstancePtr = static_cast<HyperTextAccessible*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
@ -86,7 +87,7 @@ nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePt
}
role
nsHyperTextAccessible::NativeRole()
HyperTextAccessible::NativeRole()
{
nsIAtom *tag = mContent->Tag();
@ -127,7 +128,7 @@ nsHyperTextAccessible::NativeRole()
}
PRUint64
nsHyperTextAccessible::NativeState()
HyperTextAccessible::NativeState()
{
PRUint64 states = AccessibleWrap::NativeState();
@ -147,8 +148,9 @@ nsHyperTextAccessible::NativeState()
}
// Substring must be entirely within the same text node
nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 aStartRenderedOffset,
PRUint32 aEndRenderedOffset)
nsIntRect
HyperTextAccessible::GetBoundsForString(nsIFrame* aFrame, PRUint32 aStartRenderedOffset,
PRUint32 aEndRenderedOffset)
{
nsIntRect screenRect;
NS_ENSURE_TRUE(aFrame, screenRect);
@ -215,11 +217,11 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a
* Gets the specified text.
*/
nsIFrame*
nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
nsAString *aText, nsIFrame **aEndFrame,
nsIntRect *aBoundsRect,
Accessible** aStartAcc,
Accessible** aEndAcc)
HyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
nsAString* aText, nsIFrame** aEndFrame,
nsIntRect* aBoundsRect,
Accessible** aStartAcc,
Accessible** aEndAcc)
{
if (aStartOffset == nsIAccessibleText::TEXT_OFFSET_END_OF_TEXT) {
aStartOffset = CharacterCount();
@ -414,8 +416,8 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
}
NS_IMETHODIMP
nsHyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset,
nsAString &aText)
HyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset,
nsAString& aText)
{
aText.Truncate();
@ -469,7 +471,8 @@ nsHyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset,
/*
* Gets the character count.
*/
NS_IMETHODIMP nsHyperTextAccessible::GetCharacterCount(PRInt32 *aCharacterCount)
NS_IMETHODIMP
HyperTextAccessible::GetCharacterCount(PRInt32* aCharacterCount)
{
NS_ENSURE_ARG_POINTER(aCharacterCount);
*aCharacterCount = 0;
@ -484,7 +487,8 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterCount(PRInt32 *aCharacterCount)
/*
* Gets the specified character.
*/
NS_IMETHODIMP nsHyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar *aCharacter)
NS_IMETHODIMP
HyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar* aCharacter)
{
NS_ENSURE_ARG_POINTER(aCharacter);
*aCharacter = nsnull;
@ -502,10 +506,10 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUni
}
Accessible*
nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
PRInt32 aNodeOffset,
PRInt32 *aHyperTextOffset,
bool aIsEndOffset)
HyperTextAccessible::DOMPointToHypertextOffset(nsINode* aNode,
PRInt32 aNodeOffset,
PRInt32* aHyperTextOffset,
bool aIsEndOffset)
{
if (!aHyperTextOffset)
return nsnull;
@ -637,9 +641,9 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
}
nsresult
nsHyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset,
nsIDOMNode **aNode,
PRInt32 *aOffset)
HyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset,
nsIDOMNode** aNode,
PRInt32* aOffset)
{
nsCOMPtr<nsIDOMNode> endNode;
PRInt32 endOffset;
@ -649,12 +653,12 @@ nsHyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset,
}
nsresult
nsHyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset,
PRInt32 aEndHTOffset,
nsIDOMNode **aStartNode,
PRInt32 *aStartOffset,
nsIDOMNode **aEndNode,
PRInt32 *aEndOffset)
HyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset,
PRInt32 aEndHTOffset,
nsIDOMNode** aStartNode,
PRInt32* aStartOffset,
nsIDOMNode** aEndNode,
PRInt32* aEndOffset)
{
NS_ENSURE_ARG_POINTER(aStartNode);
*aStartNode = nsnull;
@ -725,13 +729,13 @@ nsHyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset,
}
PRInt32
nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell,
nsIFrame *aFromFrame,
PRInt32 aFromOffset,
Accessible* aFromAccessible,
nsSelectionAmount aAmount,
nsDirection aDirection,
bool aNeedsStart)
HyperTextAccessible::GetRelativeOffset(nsIPresShell* aPresShell,
nsIFrame* aFromFrame,
PRInt32 aFromOffset,
Accessible* aFromAccessible,
nsSelectionAmount aAmount,
nsDirection aDirection,
bool aNeedsStart)
{
const bool kIsJumpLinesOk = true; // okay to jump lines
const bool kIsScrollViewAStop = false; // do not stop at scroll views
@ -834,9 +838,9 @@ BOUNDARY_LINE_END From the line end before/at/after the offset to the ne
*/
nsresult
nsHyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset,
nsAString &aText)
HyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32* aStartOffset, PRInt32* aEndOffset,
nsAString& aText)
{
aText.Truncate();
@ -1017,8 +1021,10 @@ nsHyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary
* nsIAccessibleText impl.
*/
NS_IMETHODIMP
nsHyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
HyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset,
AccessibleTextBoundary aBoundaryType,
PRInt32* aStartOffset,
PRInt32* aEndOffset, nsAString& aText)
{
if (aBoundaryType == BOUNDARY_CHAR) {
GetCharAt(aOffset, eGetBefore, aText, aStartOffset, aEndOffset);
@ -1029,8 +1035,10 @@ nsHyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset, AccessibleTextBounda
}
NS_IMETHODIMP
nsHyperTextAccessible::GetTextAtOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
HyperTextAccessible::GetTextAtOffset(PRInt32 aOffset,
AccessibleTextBoundary aBoundaryType,
PRInt32* aStartOffset,
PRInt32* aEndOffset, nsAString& aText)
{
if (aBoundaryType == BOUNDARY_CHAR) {
GetCharAt(aOffset, eGetAt, aText, aStartOffset, aEndOffset);
@ -1041,8 +1049,8 @@ nsHyperTextAccessible::GetTextAtOffset(PRInt32 aOffset, AccessibleTextBoundary a
}
NS_IMETHODIMP
nsHyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType,
PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText)
HyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType,
PRInt32* aStartOffset, PRInt32* aEndOffset, nsAString& aText)
{
if (aBoundaryType == BOUNDARY_CHAR) {
GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset);
@ -1058,11 +1066,11 @@ nsHyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundar
// out long rangeStartOffset,
// out long rangeEndOffset);
NS_IMETHODIMP
nsHyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs,
PRInt32 aOffset,
PRInt32 *aStartOffset,
PRInt32 *aEndOffset,
nsIPersistentProperties **aAttributes)
HyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs,
PRInt32 aOffset,
PRInt32* aStartOffset,
PRInt32* aEndOffset,
nsIPersistentProperties** aAttributes)
{
// 1. Get each attribute and its ranges one after another.
// 2. As we get each new attribute, we pass the current start and end offsets
@ -1134,7 +1142,7 @@ nsHyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs,
// nsIPersistentProperties
// nsIAccessibleText::defaultTextAttributes
NS_IMETHODIMP
nsHyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties **aAttributes)
HyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
@ -1154,7 +1162,7 @@ nsHyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties **aAttri
}
PRInt32
nsHyperTextAccessible::GetLevelInternal()
HyperTextAccessible::GetLevelInternal()
{
nsIAtom *tag = mContent->Tag();
if (tag == nsGkAtoms::h1)
@ -1174,7 +1182,7 @@ nsHyperTextAccessible::GetLevelInternal()
}
nsresult
nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
HyperTextAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes)
{
nsresult rv = AccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
@ -1223,9 +1231,10 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
/*
* Given an offset, the x, y, width, and height values are filled appropriately.
*/
NS_IMETHODIMP nsHyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt32 *aX, PRInt32 *aY,
PRInt32 *aWidth, PRInt32 *aHeight,
PRUint32 aCoordType)
NS_IMETHODIMP
HyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt32* aX, PRInt32* aY,
PRInt32* aWidth, PRInt32* aHeight,
PRUint32 aCoordType)
{
return GetRangeExtents(aOffset, aOffset + 1, aX, aY, aWidth, aHeight, aCoordType);
}
@ -1233,10 +1242,11 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt3
/*
* Given a start & end offset, the x, y, width, and height values are filled appropriately.
*/
NS_IMETHODIMP nsHyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt32 aEndOffset,
PRInt32 *aX, PRInt32 *aY,
PRInt32 *aWidth, PRInt32 *aHeight,
PRUint32 aCoordType)
NS_IMETHODIMP
HyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt32 aEndOffset,
PRInt32* aX, PRInt32* aY,
PRInt32* aWidth, PRInt32* aHeight,
PRUint32 aCoordType)
{
nsIntRect boundsRect;
nsIFrame *endFrameUnused;
@ -1258,8 +1268,8 @@ NS_IMETHODIMP nsHyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt
* the screen or this widget's window depending on coords.
*/
NS_IMETHODIMP
nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
PRUint32 aCoordType, PRInt32 *aOffset)
HyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
PRUint32 aCoordType, PRInt32* aOffset)
{
*aOffset = -1;
@ -1339,7 +1349,7 @@ nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
// nsIAccessibleHyperText
NS_IMETHODIMP
nsHyperTextAccessible::GetLinkCount(PRInt32 *aLinkCount)
HyperTextAccessible::GetLinkCount(PRInt32* aLinkCount)
{
NS_ENSURE_ARG_POINTER(aLinkCount);
*aLinkCount = 0;
@ -1352,7 +1362,7 @@ nsHyperTextAccessible::GetLinkCount(PRInt32 *aLinkCount)
}
NS_IMETHODIMP
nsHyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink)
HyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink)
{
NS_ENSURE_ARG_POINTER(aLink);
*aLink = nsnull;
@ -1368,8 +1378,8 @@ nsHyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink)
}
NS_IMETHODIMP
nsHyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink,
PRInt32* aIndex)
HyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink,
PRInt32* aIndex)
{
NS_ENSURE_ARG_POINTER(aLink);
@ -1382,8 +1392,7 @@ nsHyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink,
}
NS_IMETHODIMP
nsHyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset,
PRInt32* aLinkIndex)
HyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset, PRInt32* aLinkIndex)
{
NS_ENSURE_ARG_POINTER(aLinkIndex);
*aLinkIndex = -1; // API says this magic value means 'not found'
@ -1398,13 +1407,15 @@ nsHyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset,
/**
* nsIAccessibleEditableText impl.
*/
NS_IMETHODIMP nsHyperTextAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos,
nsISupports *aAttributes)
NS_IMETHODIMP
HyperTextAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos,
nsISupports* aAttributes)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHyperTextAccessible::SetTextContents(const nsAString &aText)
NS_IMETHODIMP
HyperTextAccessible::SetTextContents(const nsAString& aText)
{
PRInt32 numChars = CharacterCount();
if (numChars == 0 || NS_SUCCEEDED(DeleteText(0, numChars))) {
@ -1414,7 +1425,7 @@ NS_IMETHODIMP nsHyperTextAccessible::SetTextContents(const nsAString &aText)
}
NS_IMETHODIMP
nsHyperTextAccessible::InsertText(const nsAString &aText, PRInt32 aPosition)
HyperTextAccessible::InsertText(const nsAString& aText, PRInt32 aPosition)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -1431,7 +1442,7 @@ nsHyperTextAccessible::InsertText(const nsAString &aText, PRInt32 aPosition)
}
NS_IMETHODIMP
nsHyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
HyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -1446,7 +1457,7 @@ nsHyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
}
NS_IMETHODIMP
nsHyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
HyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -1461,7 +1472,7 @@ nsHyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
}
NS_IMETHODIMP
nsHyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
HyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -1476,7 +1487,7 @@ nsHyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
}
NS_IMETHODIMP
nsHyperTextAccessible::PasteText(PRInt32 aPosition)
HyperTextAccessible::PasteText(PRInt32 aPosition)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -1491,13 +1502,13 @@ nsHyperTextAccessible::PasteText(PRInt32 aPosition)
}
already_AddRefed<nsIEditor>
nsHyperTextAccessible::GetEditor() const
HyperTextAccessible::GetEditor() const
{
if (!mContent->HasFlag(NODE_IS_EDITABLE)) {
// If we're inside an editable container, then return that container's editor
Accessible* ancestor = Parent();
while (ancestor) {
nsHyperTextAccessible* hyperText = ancestor->AsHyperText();
HyperTextAccessible* hyperText = ancestor->AsHyperText();
if (hyperText) {
// Recursion will stop at container doc because it has its own impl
// of GetEditor()
@ -1528,7 +1539,7 @@ nsHyperTextAccessible::GetEditor() const
*/
nsresult
nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
HyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
{
bool isFocusable = State() & states::FOCUSABLE;
@ -1581,7 +1592,7 @@ nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
}
NS_IMETHODIMP
nsHyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset)
HyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset)
{
return SetSelectionRange(aCaretOffset, aCaretOffset);
}
@ -1590,7 +1601,7 @@ nsHyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset)
* Gets the offset position of the caret (cursor).
*/
NS_IMETHODIMP
nsHyperTextAccessible::GetCaretOffset(PRInt32 *aCaretOffset)
HyperTextAccessible::GetCaretOffset(PRInt32* aCaretOffset)
{
NS_ENSURE_ARG_POINTER(aCaretOffset);
*aCaretOffset = -1;
@ -1647,7 +1658,7 @@ nsHyperTextAccessible::GetCaretOffset(PRInt32 *aCaretOffset)
}
PRInt32
nsHyperTextAccessible::CaretLineNumber()
HyperTextAccessible::CaretLineNumber()
{
// Provide the line number for the caret, relative to the
// currently focused node. Use a 1-based index
@ -1714,15 +1725,15 @@ nsHyperTextAccessible::CaretLineNumber()
}
already_AddRefed<nsFrameSelection>
nsHyperTextAccessible::FrameSelection()
HyperTextAccessible::FrameSelection()
{
nsIFrame* frame = GetFrame();
return frame ? frame->GetFrameSelection() : nsnull;
}
void
nsHyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType,
nsTArray<nsRange*>* aRanges)
HyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType,
nsTArray<nsRange*>* aRanges)
{
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
if (!frameSelection)
@ -1765,7 +1776,7 @@ nsHyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType,
* Gets the number of selected regions.
*/
NS_IMETHODIMP
nsHyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount)
HyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount)
{
NS_ENSURE_ARG_POINTER(aSelectionCount);
*aSelectionCount = 0;
@ -1781,9 +1792,9 @@ nsHyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount)
* Gets the start and end offset of the specified selection.
*/
NS_IMETHODIMP
nsHyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum,
PRInt32* aStartOffset,
PRInt32* aEndOffset)
HyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum,
PRInt32* aStartOffset,
PRInt32* aEndOffset)
{
NS_ENSURE_ARG_POINTER(aStartOffset);
NS_ENSURE_ARG_POINTER(aEndOffset);
@ -1830,9 +1841,9 @@ nsHyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum,
* Changes the start and end offset of the specified selection.
*/
NS_IMETHODIMP
nsHyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum,
PRInt32 aStartOffset,
PRInt32 aEndOffset)
HyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum,
PRInt32 aStartOffset,
PRInt32 aEndOffset)
{
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
NS_ENSURE_STATE(frameSelection);
@ -1887,7 +1898,7 @@ nsHyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum,
* Adds a selection bounded by the specified offsets.
*/
NS_IMETHODIMP
nsHyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
HyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
{
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
NS_ENSURE_STATE(frameSelection);
@ -1906,7 +1917,7 @@ nsHyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset)
* Removes the specified selection.
*/
NS_IMETHODIMP
nsHyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum)
HyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum)
{
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
NS_ENSURE_STATE(frameSelection);
@ -1929,8 +1940,8 @@ nsHyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum)
// scrollSubstringTo(in long startIndex, in long endIndex,
// in unsigned long scrollType);
NS_IMETHODIMP
nsHyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex,
PRUint32 aScrollType)
HyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex,
PRUint32 aScrollType)
{
PRInt32 startOffset, endOffset;
nsCOMPtr<nsIDOMNode> startNode, endNode;
@ -1951,10 +1962,10 @@ nsHyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex,
// in unsigned long coordinateType,
// in long x, in long y);
NS_IMETHODIMP
nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
PRInt32 aEndIndex,
PRUint32 aCoordinateType,
PRInt32 aX, PRInt32 aY)
HyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
PRInt32 aEndIndex,
PRUint32 aCoordinateType,
PRInt32 aX, PRInt32 aY)
{
nsIFrame *frame = GetFrame();
if (!frame)
@ -2023,7 +2034,7 @@ nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
// Accessible public
nsresult
nsHyperTextAccessible::GetNameInternal(nsAString& aName)
HyperTextAccessible::GetNameInternal(nsAString& aName)
{
nsresult rv = AccessibleWrap::GetNameInternal(aName);
NS_ENSURE_SUCCESS(rv, rv);
@ -2042,7 +2053,7 @@ nsHyperTextAccessible::GetNameInternal(nsAString& aName)
}
void
nsHyperTextAccessible::InvalidateChildren()
HyperTextAccessible::InvalidateChildren()
{
mOffsets.Clear();
@ -2050,7 +2061,7 @@ nsHyperTextAccessible::InvalidateChildren()
}
bool
nsHyperTextAccessible::RemoveChild(Accessible* aAccessible)
HyperTextAccessible::RemoveChild(Accessible* aAccessible)
{
PRInt32 childIndex = aAccessible->IndexInParent();
PRInt32 count = mOffsets.Length() - childIndex;
@ -2061,10 +2072,11 @@ nsHyperTextAccessible::RemoveChild(Accessible* aAccessible)
}
////////////////////////////////////////////////////////////////////////////////
// nsHyperTextAccessible public static
// HyperTextAccessible public static
nsresult nsHyperTextAccessible::ContentToRenderedOffset(nsIFrame *aFrame, PRInt32 aContentOffset,
PRUint32 *aRenderedOffset)
nsresult
HyperTextAccessible::ContentToRenderedOffset(nsIFrame* aFrame, PRInt32 aContentOffset,
PRUint32* aRenderedOffset)
{
if (!aFrame) {
// Current frame not rendered -- this can happen if text is set on
@ -2092,8 +2104,9 @@ nsresult nsHyperTextAccessible::ContentToRenderedOffset(nsIFrame *aFrame, PRInt3
return NS_OK;
}
nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint32 aRenderedOffset,
PRInt32 *aContentOffset)
nsresult
HyperTextAccessible::RenderedToContentOffset(nsIFrame* aFrame, PRUint32 aRenderedOffset,
PRInt32* aContentOffset)
{
*aContentOffset = 0;
NS_ENSURE_TRUE(aFrame, NS_ERROR_FAILURE);
@ -2118,12 +2131,12 @@ nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint
}
////////////////////////////////////////////////////////////////////////////////
// nsHyperTextAccessible public
// HyperTextAccessible public
bool
nsHyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift,
nsAString& aChar, PRInt32* aStartOffset,
PRInt32* aEndOffset)
HyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift,
nsAString& aChar, PRInt32* aStartOffset,
PRInt32* aEndOffset)
{
aChar.Truncate();
@ -2144,8 +2157,8 @@ nsHyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift,
}
PRInt32
nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
bool aInvalidateAfter)
HyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
bool aInvalidateAfter)
{
if (aChildIndex == 0) {
if (aInvalidateAfter)
@ -2175,7 +2188,7 @@ nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
}
PRInt32
nsHyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset)
HyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset)
{
PRUint32 lastOffset = 0;
PRUint32 offsetCount = mOffsets.Length();
@ -2216,14 +2229,14 @@ nsHyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset)
}
////////////////////////////////////////////////////////////////////////////////
// nsHyperTextAccessible protected
// HyperTextAccessible protected
nsresult
nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame,
PRInt32 aOffset,
Accessible* aAccessible,
nsIDOMNode** aNode,
PRInt32* aNodeOffset)
HyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame,
PRInt32 aOffset,
Accessible* aAccessible,
nsIDOMNode** aNode,
PRInt32* aNodeOffset)
{
NS_ENSURE_ARG(aAccessible);
@ -2268,12 +2281,12 @@ nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame,
return NS_OK;
}
// nsHyperTextAccessible
// HyperTextAccessible
nsresult
nsHyperTextAccessible::RangeBoundToHypertextOffset(nsRange *aRange,
bool aIsStartBound,
bool aIsStartHTOffset,
PRInt32 *aHTOffset)
HyperTextAccessible::RangeBoundToHypertextOffset(nsRange* aRange,
bool aIsStartBound,
bool aIsStartHTOffset,
PRInt32* aHTOffset)
{
nsINode* node = nsnull;
PRInt32 nodeOffset = 0;
@ -2295,13 +2308,13 @@ nsHyperTextAccessible::RangeBoundToHypertextOffset(nsRange *aRange,
return NS_OK;
}
// nsHyperTextAccessible
// HyperTextAccessible
nsresult
nsHyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
PRInt32 aNodeOffset,
PRInt32 *aHTStartOffset,
PRInt32 *aHTEndOffset,
nsIPersistentProperties *aAttributes)
HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
PRInt32 aNodeOffset,
PRInt32* aHTStartOffset,
PRInt32* aHTEndOffset,
nsIPersistentProperties* aAttributes)
{
nsTArray<nsRange*> ranges;
GetSelectionDOMRanges(nsISelectionController::SELECTION_SPELLCHECK, &ranges);
@ -2372,7 +2385,7 @@ nsHyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
}
bool
nsHyperTextAccessible::IsTextRole()
HyperTextAccessible::IsTextRole()
{
if (mRoleMapEntry &&
(mRoleMapEntry->role == roles::GRAPHIC ||

Просмотреть файл

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _nsHyperTextAccessible_H_
#define _nsHyperTextAccessible_H_
#ifndef mozilla_a11y_HyperTextAccessible_h__
#define mozilla_a11y_HyperTextAccessible_h__
#include "nsIAccessibleText.h"
#include "nsIAccessibleHyperText.h"
@ -35,14 +35,14 @@ const PRUnichar kForcedNewLineChar = '\n';
/**
* Special Accessible that knows how contain both text and embedded objects
*/
class nsHyperTextAccessible : public AccessibleWrap,
public nsIAccessibleText,
public nsIAccessibleHyperText,
public nsIAccessibleEditableText
class HyperTextAccessible : public AccessibleWrap,
public nsIAccessibleText,
public nsIAccessibleHyperText,
public nsIAccessibleEditableText
{
public:
nsHyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHyperTextAccessible() { }
HyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~HyperTextAccessible() { }
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETEXT
@ -60,7 +60,7 @@ public:
virtual void InvalidateChildren();
virtual bool RemoveChild(Accessible* aAccessible);
// nsHyperTextAccessible (static helper method)
// HyperTextAccessible (static helper method)
// Convert content offset to rendered text offset
static nsresult ContentToRenderedOffset(nsIFrame *aFrame, PRInt32 aContentOffset,
@ -107,7 +107,7 @@ public:
}
//////////////////////////////////////////////////////////////////////////////
// nsHyperTextAccessible: DOM point to text offset conversions.
// HyperTextAccessible: DOM point to text offset conversions.
/**
* Turn a DOM Node and offset into a character offset into this hypertext.
@ -121,7 +121,7 @@ public:
* if >=0 and aNode is text, this represents a char offset
* if >=0 and aNode is not text, this represents a child node offset
* @param aResultOffset - the character offset into the current
* nsHyperTextAccessible
* HyperTextAccessible
* @param aIsEndOffset - if true, then then this offset is not inclusive. The character
* indicated by the offset returned is at [offset - 1]. This means
* if the passed-in offset is really in a descendant, then the offset returned
@ -131,7 +131,7 @@ public:
* descendant, then the returned offset will be on the relevant embedded object char.
*
* @return the accessible child which contained the offset, if
* it is within the current nsHyperTextAccessible,
* it is within the current HyperTextAccessible,
* otherwise nsnull
*/
Accessible* DOMPointToHypertextOffset(nsINode *aNode,
@ -261,7 +261,7 @@ public:
virtual already_AddRefed<nsIEditor> GetEditor() const;
protected:
// nsHyperTextAccessible
// HyperTextAccessible
/**
* Transform magic offset into text offset.
@ -410,19 +410,19 @@ private:
nsTArray<PRUint32> mOffsets;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsHyperTextAccessible,
NS_DEFINE_STATIC_IID_ACCESSOR(HyperTextAccessible,
NS_HYPERTEXTACCESSIBLE_IMPL_CID)
////////////////////////////////////////////////////////////////////////////////
// Accessible downcasting method
inline nsHyperTextAccessible*
inline HyperTextAccessible*
Accessible::AsHyperText()
{
return mFlags & eHyperTextAccessible ?
static_cast<nsHyperTextAccessible*>(this) : nsnull;
static_cast<HyperTextAccessible*>(this) : nsnull;
}
#endif // _nsHyperTextAccessible_H_
#endif

Просмотреть файл

@ -20,10 +20,12 @@ CPPSRCS = \
ARIAGridAccessible.cpp \
DocAccessible.cpp \
FormControlAccessible.cpp \
HyperTextAccessible.cpp \
OuterDocAccessible.cpp \
RootAccessible.cpp \
TextLeafAccessible.cpp \
$(NULL)
EXPORTS_NAMESPACES = mozilla/a11y
EXPORTS_mozilla/a11y = \

Просмотреть файл

@ -204,7 +204,7 @@ HTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32* aPosInSet,
HTMLButtonAccessible::
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -237,7 +237,7 @@ HTMLButtonAccessible::DoAction(PRUint8 aIndex)
PRUint64
HTMLButtonAccessible::State()
{
PRUint64 state = nsHyperTextAccessibleWrap::State();
PRUint64 state = HyperTextAccessibleWrap::State();
if (state == states::DEFUNCT)
return state;
@ -256,7 +256,7 @@ HTMLButtonAccessible::State()
PRUint64
HTMLButtonAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsEventStates elmState = mContent->AsElement()->State();
if (elmState.HasState(NS_EVENT_STATE_DEFAULT))
@ -320,13 +320,13 @@ HTMLButtonAccessible::IsWidget() const
HTMLTextFieldAccessible::
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible,
Accessible,
nsHyperTextAccessible,
HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)
@ -393,7 +393,7 @@ HTMLTextFieldAccessible::Value(nsString& aValue)
void
HTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
{
nsHyperTextAccessibleWrap::ApplyARIAState(aState);
HyperTextAccessibleWrap::ApplyARIAState(aState);
aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState);
}
@ -401,7 +401,7 @@ HTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
PRUint64
HTMLTextFieldAccessible::State()
{
PRUint64 state = nsHyperTextAccessibleWrap::State();
PRUint64 state = HyperTextAccessibleWrap::State();
if (state & states::DEFUNCT)
return state;
@ -420,7 +420,7 @@ HTMLTextFieldAccessible::State()
PRUint64
HTMLTextFieldAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
PRUint64 state = HyperTextAccessibleWrap::NativeState();
// can be focusable, focused, protected. readonly, unavailable, selected
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
@ -557,7 +557,7 @@ HTMLTextFieldAccessible::ContainerWidget() const
HTMLFileInputAccessible::
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
mFlags |= eHTMLFileInputAccessible;
}
@ -573,7 +573,7 @@ HTMLFileInputAccessible::NativeRole()
nsresult
HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
{
nsresult rv = nsHyperTextAccessibleWrap::HandleAccEvent(aEvent);
nsresult rv = HyperTextAccessibleWrap::HandleAccEvent(aEvent);
NS_ENSURE_SUCCESS(rv, rv);
// Redirect state change events for inherited states to child controls. Note,
@ -612,7 +612,7 @@ HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
HTMLGroupboxAccessible::
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -658,7 +658,7 @@ HTMLGroupboxAccessible::GetNameInternal(nsAString& aName)
Relation
HTMLGroupboxAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
// No override for label, so use <legend> for this <fieldset>
if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY)
rel.AppendTarget(mDoc, GetLegend());
@ -672,14 +672,14 @@ HTMLGroupboxAccessible::RelationByType(PRUint32 aType)
HTMLLegendAccessible::
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
Relation
HTMLLegendAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
return rel;
@ -702,14 +702,14 @@ HTMLLegendAccessible::NativeRole()
HTMLFigureAccessible::
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
nsresult
HTMLFigureAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes)
{
nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
// Expose figure xml-role.
@ -727,7 +727,7 @@ HTMLFigureAccessible::NativeRole()
nsresult
HTMLFigureAccessible::GetNameInternal(nsAString& aName)
{
nsresult rv = nsHyperTextAccessibleWrap::GetNameInternal(aName);
nsresult rv = HyperTextAccessibleWrap::GetNameInternal(aName);
NS_ENSURE_SUCCESS(rv, rv);
if (!aName.IsEmpty())
@ -745,7 +745,7 @@ HTMLFigureAccessible::GetNameInternal(nsAString& aName)
Relation
HTMLFigureAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY)
rel.AppendTarget(mDoc, Caption());
@ -772,7 +772,7 @@ HTMLFigureAccessible::Caption() const
HTMLFigcaptionAccessible::
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -785,7 +785,7 @@ HTMLFigcaptionAccessible::NativeRole()
Relation
HTMLFigcaptionAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
return rel;

Просмотреть файл

@ -7,7 +7,7 @@
#define MOZILLA_A11Y_HTMLFormControlAccessible_H_
#include "FormControlAccessible.h"
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
namespace mozilla {
namespace a11y {
@ -64,7 +64,7 @@ public:
* Accessible for HTML input@type="button", @type="submit", @type="image"
* and HTML button elements.
*/
class HTMLButtonAccessible : public nsHyperTextAccessibleWrap
class HTMLButtonAccessible : public HyperTextAccessibleWrap
{
public:
@ -93,7 +93,7 @@ public:
/**
* Accessible for HTML input@type="text" element.
*/
class HTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
class HTMLTextFieldAccessible : public HyperTextAccessibleWrap
{
public:
@ -107,7 +107,7 @@ public:
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
NS_IMETHOD DoAction(PRUint8 index);
// nsHyperTextAccessible
// HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible
@ -130,7 +130,7 @@ public:
/**
* Accessible for input@type="file" element.
*/
class HTMLFileInputAccessible : public nsHyperTextAccessibleWrap
class HTMLFileInputAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -143,7 +143,7 @@ public:
/**
* Accessible for HTML fieldset element.
*/
class HTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
class HTMLGroupboxAccessible : public HyperTextAccessibleWrap
{
public:
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -161,7 +161,7 @@ protected:
/**
* Accessible for HTML legend element.
*/
class HTMLLegendAccessible : public nsHyperTextAccessibleWrap
class HTMLLegendAccessible : public HyperTextAccessibleWrap
{
public:
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -174,7 +174,7 @@ public:
/**
* Accessible for HTML5 figure element.
*/
class HTMLFigureAccessible : public nsHyperTextAccessibleWrap
class HTMLFigureAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -193,7 +193,7 @@ protected:
/**
* Accessible for HTML5 figcaption element.
*/
class HTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap
class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc);

Просмотреть файл

@ -20,7 +20,7 @@ using namespace mozilla::a11y;
// HTMLListAccessible
////////////////////////////////////////////////////////////////////////////////
NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, nsHyperTextAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, HyperTextAccessible)
role
HTMLListAccessible::NativeRole()
@ -34,7 +34,7 @@ HTMLListAccessible::NativeRole()
PRUint64
HTMLListAccessible::NativeState()
{
return nsHyperTextAccessibleWrap::NativeState() | states::READONLY;
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
}
@ -44,7 +44,7 @@ HTMLListAccessible::NativeState()
HTMLLIAccessible::
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
HyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
{
mFlags |= eHTMLListItemAccessible;
@ -56,14 +56,14 @@ HTMLLIAccessible::
}
}
NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, nsHyperTextAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, HyperTextAccessible)
void
HTMLLIAccessible::Shutdown()
{
mBullet = nsnull;
nsHyperTextAccessibleWrap::Shutdown();
HyperTextAccessibleWrap::Shutdown();
}
role
@ -78,7 +78,7 @@ HTMLLIAccessible::NativeRole()
PRUint64
HTMLLIAccessible::NativeState()
{
return nsHyperTextAccessibleWrap::NativeState() | states::READONLY;
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
}
NS_IMETHODIMP

Просмотреть файл

@ -7,7 +7,7 @@
#ifndef mozilla_a11y_HTMLListAccessible_h__
#define mozilla_a11y_HTMLListAccessible_h__
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "nsBaseWidgetAccessible.h"
namespace mozilla {
@ -18,11 +18,11 @@ class HTMLListBulletAccessible;
/**
* Used for HTML list (like HTML ul).
*/
class HTMLListAccessible : public nsHyperTextAccessibleWrap
class HTMLListAccessible : public HyperTextAccessibleWrap
{
public:
HTMLListAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc) { }
HyperTextAccessibleWrap(aContent, aDoc) { }
virtual ~HTMLListAccessible() { }
// nsISupports
@ -37,7 +37,7 @@ public:
/**
* Used for HTML list item (e.g. HTML li).
*/
class HTMLLIAccessible : public nsHyperTextAccessibleWrap
class HTMLLIAccessible : public HyperTextAccessibleWrap
{
public:
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc);

Просмотреть файл

@ -26,11 +26,6 @@ CPPSRCS = \
nsHTMLSelectAccessible.cpp \
nsHTMLTableAccessible.cpp \
nsHTMLTextAccessible.cpp \
nsHyperTextAccessible.cpp \
$(NULL)
EXPORTS = \
nsHyperTextAccessible.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.

Просмотреть файл

@ -11,7 +11,7 @@ using namespace mozilla::a11y;
nsHTMLCanvasAccessible::
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc)
HyperTextAccessible(aContent, aDoc)
{
}

Просмотреть файл

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#ifndef _nsHTMLCanvasAccessible_H_
#define _nsHTMLCanvasAccessible_H_
@ -11,7 +11,7 @@
/**
* HTML canvas accessible (html:canvas).
*/
class nsHTMLCanvasAccessible : public nsHyperTextAccessible
class nsHTMLCanvasAccessible : public HyperTextAccessible
{
public:
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc);

Просмотреть файл

@ -22,12 +22,12 @@ using namespace mozilla::a11y;
nsHTMLLinkAccessible::
nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
// Expose nsIAccessibleHyperLink unconditionally
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, nsHyperTextAccessibleWrap,
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, HyperTextAccessibleWrap,
nsIAccessibleHyperLink)
////////////////////////////////////////////////////////////////////////////////
@ -42,7 +42,7 @@ nsHTMLLinkAccessible::NativeRole()
PRUint64
nsHTMLLinkAccessible::NativeState()
{
PRUint64 states = nsHyperTextAccessibleWrap::NativeState();
PRUint64 states = HyperTextAccessibleWrap::NativeState();
states &= ~states::READONLY;
@ -77,7 +77,7 @@ nsHTMLLinkAccessible::Value(nsString& aValue)
{
aValue.Truncate();
nsHyperTextAccessible::Value(aValue);
HyperTextAccessible::Value(aValue);
if (aValue.IsEmpty())
nsContentUtils::GetLinkLocation(mContent->AsElement(), aValue);
}
@ -85,7 +85,7 @@ nsHTMLLinkAccessible::Value(nsString& aValue)
PRUint8
nsHTMLLinkAccessible::ActionCount()
{
return IsLinked() ? 1 : nsHyperTextAccessible::ActionCount();
return IsLinked() ? 1 : HyperTextAccessible::ActionCount();
}
NS_IMETHODIMP
@ -94,7 +94,7 @@ nsHTMLLinkAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
aName.Truncate();
if (!IsLinked())
return nsHyperTextAccessible::GetActionName(aIndex, aName);
return HyperTextAccessible::GetActionName(aIndex, aName);
// Action 0 (default action): Jump to link
if (aIndex != eAction_Jump)
@ -108,7 +108,7 @@ NS_IMETHODIMP
nsHTMLLinkAccessible::DoAction(PRUint8 aIndex)
{
if (!IsLinked())
return nsHyperTextAccessible::DoAction(aIndex);
return HyperTextAccessible::DoAction(aIndex);
// Action 0 (default action): Jump to link
if (aIndex != eAction_Jump)

Просмотреть файл

@ -6,9 +6,9 @@
#ifndef _nsHTMLLinkAccessible_H_
#define _nsHTMLLinkAccessible_H_
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
class nsHTMLLinkAccessible : public nsHyperTextAccessibleWrap
class nsHTMLLinkAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);

Просмотреть файл

@ -174,7 +174,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
nsHTMLSelectOptionAccessible::
nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -225,7 +225,7 @@ nsHTMLSelectOptionAccessible::NativeState()
{
// As a nsHTMLSelectOptionAccessible we can have the following states:
// SELECTABLE, SELECTED, FOCUSED, FOCUSABLE, OFFSCREEN
// Upcall to Accessible, but skip nsHyperTextAccessible impl
// Upcall to Accessible, but skip HyperTextAccessible impl
// because we don't want EDITABLE or SELECTABLE_TEXT
PRUint64 state = Accessible::NativeState();
@ -307,7 +307,7 @@ nsHTMLSelectOptionAccessible::GetBoundsRect(nsRect& aTotalBounds,
if (combobox && (combobox->State() & states::COLLAPSED))
combobox->GetBoundsRect(aTotalBounds, aBoundingFrame);
else
nsHyperTextAccessibleWrap::GetBoundsRect(aTotalBounds, aBoundingFrame);
HyperTextAccessibleWrap::GetBoundsRect(aTotalBounds, aBoundingFrame);
}
/** select us! close combo box if necessary*/

Просмотреть файл

@ -69,7 +69,7 @@ protected:
/*
* Options inside the select, contained within the list
*/
class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap
class nsHTMLSelectOptionAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Select = 0 };

Просмотреть файл

@ -44,7 +44,7 @@ using namespace mozilla::a11y;
nsHTMLTableCellAccessible::
nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -52,7 +52,7 @@ nsHTMLTableCellAccessible::
// nsHTMLTableCellAccessible: nsISupports implementation
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLTableCellAccessible,
nsHyperTextAccessible,
HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
@ -67,7 +67,7 @@ nsHTMLTableCellAccessible::NativeRole()
PRUint64
nsHTMLTableCellAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsIFrame *frame = mContent->GetPrimaryFrame();
NS_ASSERTION(frame, "No frame for valid cell accessible!");
@ -87,7 +87,7 @@ nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttri
if (IsDefunct())
return NS_ERROR_FAILURE;
nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
// table-cell-index attribute
@ -1512,7 +1512,7 @@ nsHTMLTableAccessible::IsProbablyLayoutTable()
Relation
nsHTMLCaptionAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessible::RelationByType(aType);
Relation rel = HyperTextAccessible::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR)
rel.AppendTarget(Parent());

Просмотреть файл

@ -6,7 +6,7 @@
#ifndef _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "nsIAccessibleTable.h"
#include "TableAccessible.h"
#include "xpcAccessibleTable.h"
@ -17,7 +17,7 @@ class nsITableCellLayout;
/**
* HTML table cell accessible (html:td).
*/
class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap,
class nsHTMLTableCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
@ -178,11 +178,11 @@ protected:
/**
* HTML caption accessible (html:caption).
*/
class nsHTMLCaptionAccessible : public nsHyperTextAccessibleWrap
class nsHTMLCaptionAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLCaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc) { }
HyperTextAccessibleWrap(aContent, aDoc) { }
virtual ~nsHTMLCaptionAccessible() { }
// nsIAccessible

Просмотреть файл

@ -67,11 +67,11 @@ nsHTMLBRAccessible::GetNameInternal(nsAString& aName)
nsHTMLLabelAccessible::
nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLLabelAccessible, nsHyperTextAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLLabelAccessible, HyperTextAccessible)
nsresult
nsHTMLLabelAccessible::GetNameInternal(nsAString& aName)
@ -91,11 +91,11 @@ nsHTMLLabelAccessible::NativeRole()
nsHTMLOutputAccessible::
nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLOutputAccessible, nsHyperTextAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLOutputAccessible, HyperTextAccessible)
Relation
nsHTMLOutputAccessible::RelationByType(PRUint32 aType)

Просмотреть файл

@ -38,7 +38,7 @@ public:
/**
* Used for HTML label element.
*/
class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap
class nsHTMLLabelAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -53,7 +53,7 @@ public:
/**
* Used for HTML output element.
*/
class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap
class nsHTMLOutputAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc);

Просмотреть файл

@ -3,12 +3,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _NSHYPERTEXTACCESSIBLEWRAP_H
#define _NSHYPERTEXTACCESSIBLEWRAP_H
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
#define mozilla_a11y_HyperTextAccessibleWrap_h__
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap;
typedef class HyperTextAccessible HyperTextAccessibleWrap;
#endif

Просмотреть файл

@ -7,7 +7,7 @@
#import "mozHTMLAccessible.h"
#import "nsHyperTextAccessible.h"
#import "HyperTextAccessible.h"
#import "nsCocoaUtils.h"

Просмотреть файл

@ -4,13 +4,13 @@
#import "mozAccessible.h"
#import "nsHyperTextAccessible.h"
#import "HyperTextAccessible.h"
@interface mozTextAccessible : mozAccessible
{
// both of these are the same old mGeckoAccessible, but already
// QI'd for us, to the right type, for convenience.
nsHyperTextAccessible *mGeckoTextAccessible; // strong
HyperTextAccessible *mGeckoTextAccessible; // strong
nsIAccessibleEditableText *mGeckoEditableTextAccessible; // strong
}
@end

Просмотреть файл

@ -30,6 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED0(ARIAGridCellAccessibleWrap,
ARIAGridCellAccessible)
IMPL_IUNKNOWN_INHERITED1(ARIAGridCellAccessibleWrap,
nsHyperTextAccessibleWrap,
HyperTextAccessibleWrap,
CAccessibleTableCell)

Просмотреть файл

@ -8,7 +8,7 @@
#include "CAccessibleEditableText.h"
#include "AccessibleEditableText_i.c"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsCOMPtr.h"
#include "nsString.h"
@ -38,7 +38,7 @@ STDMETHODIMP
CAccessibleEditableText::copyText(long aStartOffset, long aEndOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -53,7 +53,7 @@ STDMETHODIMP
CAccessibleEditableText::deleteText(long aStartOffset, long aEndOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -68,7 +68,7 @@ STDMETHODIMP
CAccessibleEditableText::insertText(long aOffset, BSTR *aText)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -86,7 +86,7 @@ STDMETHODIMP
CAccessibleEditableText::cutText(long aStartOffset, long aEndOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -101,7 +101,7 @@ STDMETHODIMP
CAccessibleEditableText::pasteText(long aOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -117,7 +117,7 @@ CAccessibleEditableText::replaceText(long aStartOffset, long aEndOffset,
BSTR *aText)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;

Просмотреть файл

@ -10,7 +10,7 @@
#include "Accessible2.h"
#include "AccessibleText_i.c"
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "nsIPersistentProperties2.h"
@ -40,7 +40,7 @@ STDMETHODIMP
CAccessibleText::addSelection(long aStartOffset, long aEndOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -63,7 +63,7 @@ __try {
*aEndOffset = 0;
*aTextAttributes = NULL;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -95,7 +95,7 @@ CAccessibleText::get_caretOffset(long *aOffset)
__try {
*aOffset = -1;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -123,7 +123,7 @@ __try {
*aWidth = 0;
*aHeight = 0;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -153,7 +153,7 @@ CAccessibleText::get_nSelections(long *aNSelections)
__try {
*aNSelections = 0;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -177,7 +177,7 @@ CAccessibleText::get_offsetAtPoint(long aX, long aY,
__try {
*aOffset = 0;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -205,7 +205,7 @@ __try {
*aStartOffset = 0;
*aEndOffset = 0;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -229,7 +229,7 @@ CAccessibleText::get_text(long aStartOffset, long aEndOffset, BSTR *aText)
__try {
*aText = NULL;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -259,7 +259,7 @@ __try {
*aEndOffset = 0;
*aText = NULL;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -306,7 +306,7 @@ __try {
*aEndOffset = 0;
*aText = NULL;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -353,7 +353,7 @@ __try {
*aEndOffset = 0;
*aText = NULL;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -393,7 +393,7 @@ STDMETHODIMP
CAccessibleText::removeSelection(long aSelectionIndex)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -408,7 +408,7 @@ STDMETHODIMP
CAccessibleText::setCaretOffset(long aOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -424,7 +424,7 @@ CAccessibleText::setSelection(long aSelectionIndex, long aStartOffset,
long aEndOffset)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -442,7 +442,7 @@ CAccessibleText::get_nCharacters(long *aNCharacters)
__try {
*aNCharacters = 0;
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -458,7 +458,7 @@ CAccessibleText::scrollSubstringTo(long aStartIndex, long aEndIndex,
enum IA2ScrollType aScrollType)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -475,7 +475,7 @@ CAccessibleText::scrollSubstringToPoint(long aStartIndex, long aEndIndex,
long aX, long aY)
{
__try {
nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;

Просмотреть файл

@ -67,7 +67,7 @@ DocAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
*ppv = NULL;
if (IID_ISimpleDOMDocument != iid)
return nsHyperTextAccessibleWrap::QueryInterface(iid, ppv);
return HyperTextAccessibleWrap::QueryInterface(iid, ppv);
statistics::ISimpleDOMUsed();
*ppv = static_cast<ISimpleDOMDocument*>(this);

Просмотреть файл

@ -5,20 +5,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "nsEventShell.h"
NS_IMPL_ISUPPORTS_INHERITED0(nsHyperTextAccessibleWrap,
nsHyperTextAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(HyperTextAccessibleWrap,
HyperTextAccessible)
IMPL_IUNKNOWN_INHERITED2(nsHyperTextAccessibleWrap,
IMPL_IUNKNOWN_INHERITED2(HyperTextAccessibleWrap,
AccessibleWrap,
ia2AccessibleHypertext,
CAccessibleEditableText);
nsresult
nsHyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent)
HyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent)
{
PRUint32 eventType = aEvent->GetEventType();
@ -41,14 +41,14 @@ nsHyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent)
}
}
return nsHyperTextAccessible::HandleAccEvent(aEvent);
return HyperTextAccessible::HandleAccEvent(aEvent);
}
nsresult
nsHyperTextAccessibleWrap::GetModifiedText(bool aGetInsertedText,
nsAString& aText,
PRUint32 *aStartOffset,
PRUint32 *aEndOffset)
HyperTextAccessibleWrap::GetModifiedText(bool aGetInsertedText,
nsAString& aText,
PRUint32* aStartOffset,
PRUint32* aEndOffset)
{
aText.Truncate();
*aStartOffset = 0;

Просмотреть файл

@ -5,21 +5,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _NSHYPERTEXTACCESSIBLEWRAP_H
#define _NSHYPERTEXTACCESSIBLEWRAP_H
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
#define mozilla_a11y_HyperTextAccessibleWrap_h__
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
#include "CAccessibleText.h"
#include "CAccessibleEditableText.h"
#include "ia2AccessibleHyperText.h"
class nsHyperTextAccessibleWrap : public nsHyperTextAccessible,
public ia2AccessibleHypertext,
public CAccessibleEditableText
class HyperTextAccessibleWrap : public HyperTextAccessible,
public ia2AccessibleHypertext,
public CAccessibleEditableText
{
public:
nsHyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc) {}
HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
HyperTextAccessible(aContent, aDoc) {}
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -20,12 +20,12 @@ CPPSRCS = \
ApplicationAccessibleWrap.cpp \
ARIAGridAccessibleWrap.cpp \
DocAccessibleWrap.cpp \
HyperTextAccessibleWrap.cpp \
nsAccessNodeWrap.cpp \
nsHTMLWin32ObjectAccessible.cpp \
nsXULMenuAccessibleWrap.cpp \
nsXULListboxAccessibleWrap.cpp \
nsXULTreeGridAccessibleWrap.cpp \
nsHyperTextAccessibleWrap.cpp \
nsHTMLImageAccessibleWrap.cpp \
nsHTMLTableAccessibleWrap.cpp \
nsWinUtils.cpp \

Просмотреть файл

@ -9,7 +9,7 @@
#include "AccessibleHypertext_i.c"
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
// IUnknown
@ -18,7 +18,7 @@ ia2AccessibleHypertext::QueryInterface(REFIID iid, void** ppv)
{
*ppv = NULL;
if (IID_IAccessibleHypertext == iid) {
nsHyperTextAccessibleWrap* hyperAcc = static_cast<nsHyperTextAccessibleWrap*>(this);
HyperTextAccessibleWrap* hyperAcc = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperAcc->IsTextRole()) {
*ppv = static_cast<IAccessibleHypertext*>(this);
(reinterpret_cast<IUnknown*>(*ppv))->AddRef();
@ -38,7 +38,7 @@ ia2AccessibleHypertext::get_nHyperlinks(long* aHyperlinkCount)
__try {
*aHyperlinkCount = 0;
nsHyperTextAccessibleWrap* hyperText = static_cast<nsHyperTextAccessibleWrap*>(this);
HyperTextAccessibleWrap* hyperText = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperText->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -56,7 +56,7 @@ ia2AccessibleHypertext::get_hyperlink(long aLinkIndex,
__try {
*aHyperlink = NULL;
nsHyperTextAccessibleWrap* hyperText = static_cast<nsHyperTextAccessibleWrap*>(this);
HyperTextAccessibleWrap* hyperText = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperText->IsDefunct())
return CO_E_OBJNOTCONNECTED;
@ -84,7 +84,7 @@ ia2AccessibleHypertext::get_hyperlinkIndex(long aCharIndex, long* aHyperlinkInde
__try {
*aHyperlinkIndex = 0;
nsHyperTextAccessibleWrap* hyperAcc = static_cast<nsHyperTextAccessibleWrap*>(this);
HyperTextAccessibleWrap* hyperAcc = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;

Просмотреть файл

@ -132,7 +132,7 @@ protected:
ISimpleDOMNode *MakeAccessNode(nsINode *aNode);
/**
* It is used in nsHyperTextAccessibleWrap for IA2::newText/oldText
* It is used in HyperTextAccessibleWrap for IA2::newText/oldText
* implementation.
*/
static AccTextChangeEvent* gTextEvent;

Просмотреть файл

@ -27,7 +27,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableCellAccessibleWrap,
nsHTMLTableCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsHTMLTableCellAccessibleWrap,
nsHyperTextAccessibleWrap,
HyperTextAccessibleWrap,
CAccessibleTableCell)
@ -39,5 +39,5 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableHeaderCellAccessibleWrap,
nsHTMLTableHeaderCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsHTMLTableHeaderCellAccessibleWrap,
nsHyperTextAccessibleWrap,
HyperTextAccessibleWrap,
CAccessibleTableCell)

Просмотреть файл

@ -38,5 +38,5 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsXULListCellAccessibleWrap,
nsXULListCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsXULListCellAccessibleWrap,
nsHyperTextAccessibleWrap,
HyperTextAccessibleWrap,
CAccessibleTableCell)

Просмотреть файл

@ -3,12 +3,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _NSHYPERTEXTACCESSIBLEWRAP_H
#define _NSHYPERTEXTACCESSIBLEWRAP_H
#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
#define mozilla_a11y_HyperTextAccessibleWrap_h__
#include "nsHyperTextAccessible.h"
#include "HyperTextAccessible.h"
typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap;
typedef class HyperTextAccessible HyperTextAccessibleWrap;
#endif

Просмотреть файл

@ -48,7 +48,7 @@ nsXFormsAccessibleBase::nsXFormsAccessibleBase()
nsXFormsAccessible::
nsXFormsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -135,7 +135,7 @@ nsXFormsAccessible::NativeState()
rv = sXFormsService->IsValid(DOMNode, &isValid);
NS_ENSURE_SUCCESS(rv, 0);
PRUint64 states = nsHyperTextAccessibleWrap::NativeState();
PRUint64 states = HyperTextAccessibleWrap::NativeState();
if (!isRelevant)
states |= states::UNAVAILABLE;

Просмотреть файл

@ -6,7 +6,7 @@
#ifndef _nsXFormsAccessible_H_
#define _nsXFormsAccessible_H_
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "nsIXFormsUtilityService.h"
#define NS_NAMESPACE_XFORMS "http://www.w3.org/2002/xforms"
@ -33,7 +33,7 @@ protected:
* XForms hint and XForms label elements should have accessible object. This
* class is base class for accessible objects for these XForms elements.
*/
class nsXFormsAccessible : public nsHyperTextAccessibleWrap,
class nsXFormsAccessible : public HyperTextAccessibleWrap,
public nsXFormsAccessibleBase
{
public:
@ -109,7 +109,7 @@ class nsXFormsEditableAccessible : public nsXFormsAccessible
public:
nsXFormsEditableAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsHyperTextAccessible
// HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible

Просмотреть файл

@ -119,7 +119,11 @@ nsXFormsInputAccessible::
{
}
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible, Accessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible,
Accessible,
HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)
role
nsXFormsInputAccessible::NativeRole()

Просмотреть файл

@ -688,13 +688,13 @@ XULToolbarSeparatorAccessible::NativeState()
XULTextFieldAccessible::
XULTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible,
Accessible,
nsHyperTextAccessible,
HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)
@ -722,7 +722,7 @@ XULTextFieldAccessible::Value(nsString& aValue)
void
XULTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
{
nsHyperTextAccessibleWrap::ApplyARIAState(aState);
HyperTextAccessibleWrap::ApplyARIAState(aState);
aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState);
}
@ -730,7 +730,7 @@ XULTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
PRUint64
XULTextFieldAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsCOMPtr<nsIContent> inputField(GetInputField());
NS_ENSURE_TRUE(inputField, state);
@ -846,7 +846,7 @@ XULTextFieldAccessible::CacheChildren()
}
////////////////////////////////////////////////////////////////////////////////
// XULTextFieldAccessible: nsHyperTextAccessible protected
// XULTextFieldAccessible: HyperTextAccessible protected
already_AddRefed<nsFrameSelection>
XULTextFieldAccessible::FrameSelection()

Просмотреть файл

@ -9,7 +9,7 @@
// NOTE: alphabetically ordered
#include "AccessibleWrap.h"
#include "FormControlAccessible.h"
#include "nsHyperTextAccessibleWrap.h"
#include "HyperTextAccessibleWrap.h"
#include "XULSelectControlAccessible.h"
namespace mozilla {
@ -213,7 +213,7 @@ public:
/**
* Used for XUL textbox element.
*/
class XULTextFieldAccessible : public nsHyperTextAccessibleWrap
class XULTextFieldAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Click = 0 };
@ -226,7 +226,7 @@ public:
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
NS_IMETHOD DoAction(PRUint8 index);
// nsHyperTextAccessible
// HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible
@ -243,7 +243,7 @@ protected:
// Accessible
virtual void CacheChildren();
// nsHyperTextAccessible
// HyperTextAccessible
virtual already_AddRefed<nsFrameSelection> FrameSelection();
// nsXULTextFieldAccessible

Просмотреть файл

@ -926,7 +926,7 @@ nsXULListitemAccessible::ContainerWidget() const
nsXULListCellAccessible::
nsXULListCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -934,7 +934,7 @@ nsXULListCellAccessible::
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(nsXULListCellAccessible,
nsHyperTextAccessible,
HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -135,7 +135,7 @@ private:
/**
* Class represents xul:listcell.
*/
class nsXULListCellAccessible : public nsHyperTextAccessibleWrap,
class nsXULListCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:

Просмотреть файл

@ -29,7 +29,7 @@ using namespace mozilla::a11y;
nsXULTextAccessible::
nsXULTextAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -53,13 +53,13 @@ nsXULTextAccessible::NativeState()
{
// Labels and description have read only state
// They are not focusable or selectable
return nsHyperTextAccessibleWrap::NativeState() | states::READONLY;
return HyperTextAccessibleWrap::NativeState() | states::READONLY;
}
Relation
nsXULTextAccessible::RelationByType(PRUint32 aType)
{
Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
// Caption is the label for groupbox
nsIContent *parent = mContent->GetParent();
@ -107,12 +107,12 @@ nsXULTooltipAccessible::NativeRole()
nsXULLinkAccessible::
nsXULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
HyperTextAccessibleWrap(aContent, aDoc)
{
}
// Expose nsIAccessibleHyperLink unconditionally
NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAccessible, nsHyperTextAccessibleWrap,
NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAccessible, HyperTextAccessibleWrap,
nsIAccessibleHyperLink)
////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -6,13 +6,13 @@
#ifndef _nsXULTextAccessible_H_
#define _nsXULTextAccessible_H_
#include "HyperTextAccessibleWrap.h"
#include "nsBaseWidgetAccessible.h"
#include "nsHyperTextAccessibleWrap.h"
/**
* Used for XUL description and label elements.
*/
class nsXULTextAccessible : public nsHyperTextAccessibleWrap
class nsXULTextAccessible : public HyperTextAccessibleWrap
{
public:
nsXULTextAccessible(nsIContent* aContent, DocAccessible* aDoc);
@ -38,7 +38,7 @@ public:
virtual PRUint64 NativeState();
};
class nsXULLinkAccessible : public nsHyperTextAccessibleWrap
class nsXULLinkAccessible : public HyperTextAccessibleWrap
{
public:

Просмотреть файл

@ -76,7 +76,7 @@
Mozilla Bug 472326
</a><br>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261"
title="Test remaining implementations in nsHypertextAccessible::GetRole">
title="Test remaining implementations in nsHyperTextAccessible::GetRole">
bug 474261
</a><br>
<a target="_blank"