--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -371,17 +371,17 @@ AccessibleWrap::CreateMaiInterfaces(void
// The Component interface is supported by all accessibles.
interfacesBits |= 1 << MAI_INTERFACE_COMPONENT;
// Add Action interface if the action count is more than zero.
if (ActionCount() > 0)
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;
if (!nsAccUtils::MustPrune(this))
interfacesBits |= 1 << MAI_INTERFACE_HYPERTEXT;
}
// Value interface.
rename from accessible/src/atk/nsHyperTextAccessibleWrap.h
rename to accessible/src/atk/HyperTextAccessibleWrap.h
--- a/accessible/src/atk/nsHyperTextAccessibleWrap.h
+++ b/accessible/src/atk/HyperTextAccessibleWrap.h
@@ -1,15 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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
--- a/accessible/src/atk/nsMaiInterfaceEditableText.cpp
+++ b/accessible/src/atk/nsMaiInterfaceEditableText.cpp
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "InterfaceInitFuncs.h"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsString.h"
extern "C" {
static gboolean
setRunAttributesCB(AtkEditableText *aText, AtkAttributeSet *aAttribSet,
--- a/accessible/src/atk/nsMaiInterfaceHypertext.cpp
+++ b/accessible/src/atk/nsMaiInterfaceHypertext.cpp
@@ -1,30 +1,30 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "InterfaceInitFuncs.h"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsMaiHyperlink.h"
extern "C" {
static AtkHyperlink*
getLinkCB(AtkHypertext *aText, gint aLinkIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return nsnull;
- nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
+ HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, nsnull);
Accessible* hyperLink = hyperText->GetLinkAt(aLinkIndex);
if (!hyperLink)
return nsnull;
AtkObject* hyperLinkAtkObj = AccessibleWrap::GetAtkObject(hyperLink);
AccessibleWrap* accChild = GetAccessibleWrap(hyperLinkAtkObj);
@@ -37,30 +37,30 @@ getLinkCB(AtkHypertext *aText, gint aLin
static gint
getLinkCountCB(AtkHypertext *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return -1;
- nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
+ HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, -1);
return hyperText->GetLinkCount();
}
static gint
getLinkIndexCB(AtkHypertext *aText, gint aCharIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return -1;
- nsHyperTextAccessible* hyperText = accWrap->AsHyperText();
+ HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, -1);
PRInt32 index = -1;
nsresult rv = hyperText->GetLinkIndexAtOffset(aCharIndex, &index);
NS_ENSURE_SUCCESS(rv, -1);
return index;
}
--- a/accessible/src/atk/nsMaiInterfaceText.cpp
+++ b/accessible/src/atk/nsMaiInterfaceText.cpp
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "InterfaceInitFuncs.h"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsMai.h"
#include "nsIPersistentProperties2.h"
using namespace mozilla::a11y;
AtkAttributeSet* ConvertToAtkAttributeSet(nsIPersistentProperties* aAttributes);
@@ -309,17 +309,17 @@ getRangeExtentsCB(AtkText *aText, gint a
static gint
getCharacterCountCB(AtkText *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return 0;
- nsHyperTextAccessible* textAcc = accWrap->AsHyperText();
+ HyperTextAccessible* textAcc = accWrap->AsHyperText();
return textAcc->IsDefunct() ?
0 : static_cast<gint>(textAcc->CharacterCount());
}
static gint
getOffsetAtPointCB(AtkText *aText,
gint aX, gint aY,
AtkCoordType aCoords)
--- a/accessible/src/base/NotificationController.cpp
+++ b/accessible/src/base/NotificationController.cpp
@@ -641,17 +641,17 @@ NotificationController::CoalesceTextChan
void
NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
{
DocAccessible* document = aEvent->GetDocAccessible();
Accessible* container = document->GetContainerAccessible(aEvent->mNode);
if (!container)
return;
- nsHyperTextAccessible* textAccessible = container->AsHyperText();
+ HyperTextAccessible* textAccessible = container->AsHyperText();
if (!textAccessible)
return;
// Don't fire event for the first html:br in an editor.
if (aEvent->mAccessible->Role() == roles::WHITESPACE) {
nsCOMPtr<nsIEditor> editor = textAccessible->GetEditor();
if (editor) {
bool isEmpty = false;
--- a/accessible/src/base/TextAttrs.cpp
+++ b/accessible/src/base/TextAttrs.cpp
@@ -1,18 +1,18 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "TextAttrs.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
-#include "nsHyperTextAccessibleWrap.h"
#include "StyleInfo.h"
#include "gfxFont.h"
#include "gfxUserFontSet.h"
#include "nsFontMetrics.h"
#include "nsLayoutUtils.h"
using namespace mozilla;
@@ -194,17 +194,17 @@ TextAttrsMgr::GetRange(TextAttr* aAttrAr
}
////////////////////////////////////////////////////////////////////////////////
// LangTextAttr
////////////////////////////////////////////////////////////////////////////////
TextAttrsMgr::LangTextAttr::
- LangTextAttr(nsHyperTextAccessible* aRoot,
+ LangTextAttr(HyperTextAccessible* aRoot,
nsIContent* aRootElm, nsIContent* aElm) :
TTextAttr<nsString>(!aElm), mRootContent(aRootElm)
{
aRoot->Language(mRootNativeValue);
mIsRootDefined = !mRootNativeValue.IsEmpty();
if (aElm)
mIsDefined = GetLang(aElm, mNativeValue);
--- a/accessible/src/base/TextAttrs.h
+++ b/accessible/src/base/TextAttrs.h
@@ -6,51 +6,51 @@
#ifndef nsTextAttrs_h_
#define nsTextAttrs_h_
#include "nsIContent.h"
#include "nsIFrame.h"
#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
{
public:
/**
* Constructor. Used to expose default text attributes.
*/
- TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc) :
+ TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) :
mOffsetAcc(nsnull), mHyperTextAcc(aHyperTextAcc),
mOffsetAccIdx(-1), mIncludeDefAttrs(true) { }
/**
* Constructor. Used to expose text attributes at the given offset.
*
* @param aHyperTextAcc [in] hyper text accessible text attributes are
* calculated for
* @param aIncludeDefAttrs [optional] indicates whether default text
* attributes should be included into list of exposed
* text attributes
* @param oOffsetAcc [optional] offset an accessible the text attributes
* 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) :
mOffsetAcc(aOffsetAcc), mHyperTextAcc(aHyperTextAcc),
mOffsetAccIdx(aOffsetAccIdx), mIncludeDefAttrs(aIncludeDefAttrs) { }
/*
* Return text attributes and hyper text offsets where these attributes are
@@ -79,17 +79,17 @@ protected:
* @param aEndHTOffset [in, out] the end offset
*/
class TextAttr;
void GetRange(TextAttr* aAttrArray[], PRUint32 aAttrArrayLen,
PRInt32* aStartHTOffset, PRInt32* aEndHTOffset);
private:
Accessible* mOffsetAcc;
- nsHyperTextAccessible* mHyperTextAcc;
+ HyperTextAccessible* mHyperTextAcc;
PRInt32 mOffsetAccIdx;
bool mIncludeDefAttrs;
protected:
/**
* Interface class of text attribute class implementations.
*/
@@ -186,17 +186,17 @@ protected:
/**
* Class is used for the work with 'language' text attribute.
*/
class LangTextAttr : public TTextAttr<nsString>
{
public:
- LangTextAttr(nsHyperTextAccessible* aRoot, nsIContent* aRootElm,
+ LangTextAttr(HyperTextAccessible* aRoot, nsIContent* aRootElm,
nsIContent* aElm);
virtual ~LangTextAttr() { }
protected:
// TextAttr
virtual bool GetValueFor(nsIContent* aElm, nsString* aValue);
virtual void ExposeValue(nsIPersistentProperties* aAttributes,
--- a/accessible/src/base/TextUpdater.h
+++ b/accessible/src/base/TextUpdater.h
@@ -2,17 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 TextUpdater_h_
#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
* events.
*/
class TextUpdater
{
public:
@@ -80,13 +80,13 @@ private:
* The constant used to skip string difference calculation in case of long
* strings.
*/
const static PRUint32 kMaxStrLen = 1 << 6;
private:
DocAccessible* mDocument;
mozilla::a11y::TextLeafAccessible* mTextLeaf;
- nsHyperTextAccessible* mHyperText;
+ HyperTextAccessible* mHyperText;
PRInt32 mTextOffset;
};
#endif
--- a/accessible/src/base/nsAccUtils.cpp
+++ b/accessible/src/base/nsAccUtils.cpp
@@ -5,17 +5,17 @@
#include "nsAccUtils.h"
#include "Accessible-inl.h"
#include "nsAccessibilityService.h"
#include "nsARIAMap.h"
#include "nsCoreUtils.h"
#include "DocAccessible.h"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsIAccessibleTypes.h"
#include "Role.h"
#include "States.h"
#include "TextLeafAccessible.h"
#include "nsIDOMXULContainerElement.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
@@ -249,17 +249,17 @@ nsAccUtils::GetSelectableContainer(Acces
bool
nsAccUtils::IsARIASelected(Accessible* aAccessible)
{
return aAccessible->GetContent()->
AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_selected,
nsGkAtoms::_true, eCaseMatters);
}
-nsHyperTextAccessible*
+HyperTextAccessible*
nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
{
// Get accessible from selection's focus DOM point (the DOM point where
// selection is ended).
nsCOMPtr<nsIDOMNode> focusDOMNode;
aSelection->GetFocusNode(getter_AddRefs(focusDOMNode));
if (!focusDOMNode)
@@ -278,17 +278,17 @@ nsAccUtils::GetTextAccessibleFromSelecti
Accessible* accessible = doc ?
doc->GetAccessibleOrContainer(resultNode) : nsnull;
if (!accessible) {
NS_NOTREACHED("No nsIAccessibleText for selection change event!");
return nsnull;
}
do {
- nsHyperTextAccessible* textAcc = accessible->AsHyperText();
+ HyperTextAccessible* textAcc = accessible->AsHyperText();
if (textAcc)
return textAcc;
accessible = accessible->Parent();
} while (accessible);
NS_NOTREACHED("We must reach document accessible implementing nsIAccessibleText!");
return nsnull;
--- a/accessible/src/base/nsAccUtils.h
+++ b/accessible/src/base/nsAccUtils.h
@@ -18,17 +18,17 @@
#include "nsIDocShell.h"
#include "nsIDOMNode.h"
#include "nsIPersistentProperties2.h"
#include "nsIPresShell.h"
#include "nsPoint.h"
class nsAccessNode;
class Accessible;
-class nsHyperTextAccessible;
+class HyperTextAccessible;
class nsHTMLTableAccessible;
class DocAccessible;
struct nsRoleMapEntry;
#ifdef MOZ_XUL
class nsXULTreeAccessible;
#endif
class nsAccUtils
@@ -152,17 +152,17 @@ public:
/**
* Return text accessible containing focus point of the given selection.
* Used for normal and misspelling selection changes processing.
*
* @param aSelection [in] the given selection
* @return text accessible
*/
- static nsHyperTextAccessible*
+ static HyperTextAccessible*
GetTextAccessibleFromSelection(nsISelection* aSelection);
/**
* Converts the given coordinates to coordinates relative screen.
*
* @param aX [in] the given x coord
* @param aY [in] the given y coord
* @param aCoordinateType [in] specifies coordinates origin (refer to
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -9,27 +9,27 @@
#include "Accessible-inl.h"
#include "ApplicationAccessibleWrap.h"
#include "ARIAGridAccessibleWrap.h"
#ifdef MOZ_ACCESSIBILITY_ATK
#include "AtkSocketAccessible.h"
#endif
#include "FocusManager.h"
#include "HTMLListAccessible.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsAccessiblePivot.h"
#include "nsAccUtils.h"
#include "nsARIAMap.h"
#include "nsIAccessibleProvider.h"
#include "nsHTMLCanvasAccessible.h"
#include "nsHTMLImageMapAccessible.h"
#include "nsHTMLLinkAccessible.h"
#include "nsHTMLSelectAccessible.h"
#include "nsHTMLTableAccessibleWrap.h"
#include "nsHTMLTextAccessible.h"
-#include "nsHyperTextAccessibleWrap.h"
#include "nsXFormsFormControlsAccessible.h"
#include "nsXFormsWidgetsAccessible.h"
#include "OuterDocAccessible.h"
#include "Role.h"
#include "RootAccessibleWrap.h"
#include "States.h"
#include "Statistics.h"
#ifdef XP_WIN
@@ -200,17 +200,17 @@ nsAccessibilityService::CreateHTMLLIAcce
return accessible;
}
already_AddRefed<Accessible>
nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
Accessible* accessible =
- new nsHyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell));
+ new HyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell));
NS_ADDREF(accessible);
return accessible;
}
already_AddRefed<Accessible>
nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
@@ -1047,17 +1047,17 @@ nsAccessibilityService::GetOrCreateAcces
if (nsLayoutUtils::GetAllInFlowRectsUnion(weakFrame,
weakFrame->GetParent()).IsEmpty()) {
if (aIsSubtreeHidden)
*aIsSubtreeHidden = true;
return nsnull;
}
- newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
+ newAcc = new HyperTextAccessibleWrap(content, docAcc);
if (docAcc->BindToDocument(newAcc, aria::GetRoleMap(aNode)))
return newAcc;
return nsnull;
}
nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aNode);
if (roleMapEntry && !nsCRT::strcmp(roleMapEntry->roleString, "presentation")) {
// Ignore presentation role if element is focusable (focus event shouldn't
@@ -1222,17 +1222,17 @@ nsAccessibilityService::GetOrCreateAcces
(isHTML && nsCoreUtils::HasClickListener(content)) ||
HasUniversalAriaProperty(content) || roleMapEntry ||
HasRelatedContent(content) || nsCoreUtils::IsXLink(content))) {
// This content is focusable or has an interesting dynamic content accessibility property.
// If it's interesting we need it in the accessibility hierarchy so that events or
// 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
newAcc = new AccessibleWrap(content, docAcc);
}
}
return docAcc->BindToDocument(newAcc, roleMapEntry) ? newAcc : nsnull;
@@ -1652,17 +1652,17 @@ nsAccessibilityService::CreateHTMLAccess
}
if (tag == nsGkAtoms::a) {
// Only some roles truly enjoy life as nsHTMLLinkAccessibles, for details
// see closed bug 494807.
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;
}
Accessible* accessible = new nsHTMLLinkAccessible(aContent, aDoc);
NS_IF_ADDREF(accessible);
return accessible;
}
@@ -1685,17 +1685,17 @@ nsAccessibilityService::CreateHTMLAccess
tag == nsGkAtoms::form ||
tag == nsGkAtoms::h1 ||
tag == nsGkAtoms::h2 ||
tag == nsGkAtoms::h3 ||
tag == nsGkAtoms::h4 ||
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;
}
if (nsCoreUtils::IsHTMLTableHeader(aContent)) {
Accessible* accessible = new nsHTMLTableHeaderCellAccessibleWrap(aContent,
aDoc);
NS_IF_ADDREF(accessible);
--- a/accessible/src/base/nsAccessiblePivot.cpp
+++ b/accessible/src/base/nsAccessiblePivot.cpp
@@ -2,19 +2,19 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "nsAccessiblePivot.h"
#include "Accessible-inl.h"
+#include "DocAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsAccUtils.h"
-#include "nsHyperTextAccessible.h"
-#include "DocAccessible.h"
#include "States.h"
#include "nsArrayUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsISupportsPrimitives.h"
using namespace mozilla::a11y;
@@ -150,17 +150,17 @@ nsAccessiblePivot::SetTextRange(nsIAcces
NS_ENSURE_ARG(aTextAccessible);
// Check that start offset is smaller than end offset, and that if a value is
// smaller than 0, both should be -1.
NS_ENSURE_TRUE(aStartOffset <= aEndOffset &&
(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;
// Make sure the given offsets don't exceed the character count.
PRInt32 charCount = newPosition->CharacterCount();
if (aEndOffset > charCount)
return NS_ERROR_FAILURE;
--- a/accessible/src/base/nsBaseWidgetAccessible.cpp
+++ b/accessible/src/base/nsBaseWidgetAccessible.cpp
@@ -1,20 +1,20 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "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"
#include "nsGUIEvent.h"
#include "nsILink.h"
#include "nsIFrame.h"
#include "nsINameSpaceManager.h"
#include "nsIURI.h"
--- a/accessible/src/base/nsBaseWidgetAccessible.h
+++ b/accessible/src/base/nsBaseWidgetAccessible.h
@@ -2,17 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 _nsBaseWidgetAccessible_H_
#define _nsBaseWidgetAccessible_H_
#include "AccessibleWrap.h"
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsIContent.h"
/**
* This file contains a number of classes that are used as base
* classes for the different accessibility implementations of
* the HTML and XUL widget sets. --jgaunt
*/
--- a/accessible/src/base/nsCaretAccessible.cpp
+++ b/accessible/src/base/nsCaretAccessible.cpp
@@ -238,17 +238,17 @@ nsCaretAccessible::NormalSelectionChange
PRInt32 rangeCount = 0;
aSelection->GetRangeCount(&rangeCount);
if (rangeCount == 0) {
mLastTextAccessible = nsnull;
return; // No selection
}
- nsHyperTextAccessible* textAcc =
+ HyperTextAccessible* textAcc =
nsAccUtils::GetTextAccessibleFromSelection(aSelection);
if (!textAcc)
return;
PRInt32 caretOffset = -1;
nsresult rv = textAcc->GetCaretOffset(&caretOffset);
if (NS_FAILED(rv))
return;
@@ -273,17 +273,17 @@ void
nsCaretAccessible::SpellcheckSelectionChanged(nsISelection* aSelection)
{
// XXX: fire an event for accessible of focus node of the selection. If
// spellchecking is enabled then we will fire the number of events for
// the same accessible for newly appended range of the selection (for every
// 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;
nsRefPtr<AccEvent> event =
new AccEvent(nsIAccessibleEvent::EVENT_TEXT_ATTRIBUTE_CHANGED, textAcc);
if (event)
textAcc->Document()->FireDelayedAccessibleEvent(event);
--- a/accessible/src/base/nsCaretAccessible.h
+++ b/accessible/src/base/nsCaretAccessible.h
@@ -1,18 +1,18 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 __nsCaretAccessible_h__
#define __nsCaretAccessible_h__
+#include "HyperTextAccessible.h"
#include "NotificationController.h"
-#include "nsHyperTextAccessible.h"
#include "nsISelectionListener.h"
/*
* This special accessibility class is for the caret, which is really the currently focused selection.
* There is only 1 visible caret per top level window (RootAccessible),
* However, there may be several visible selections.
*
@@ -113,15 +113,15 @@ private:
// Currently focused control.
nsCOMPtr<nsIContent> mCurrentControl;
// Info for the the last selection event.
// 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;
};
#endif
--- a/accessible/src/generic/ARIAGridAccessible.cpp
+++ b/accessible/src/generic/ARIAGridAccessible.cpp
@@ -769,25 +769,25 @@ ARIAGridAccessible::GetSelectedColumnsAr
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Constructor
ARIAGridCellAccessible::
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(ARIAGridCellAccessible,
- nsHyperTextAccessible,
+ HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessibleTableCell
NS_IMETHODIMP
ARIAGridCellAccessible::GetTable(nsIAccessibleTable** aTable)
{
@@ -951,17 +951,17 @@ ARIAGridCellAccessible::IsSelected(bool*
}
////////////////////////////////////////////////////////////////////////////////
// Accessible
void
ARIAGridCellAccessible::ApplyARIAState(PRUint64* aState) const
{
- nsHyperTextAccessibleWrap::ApplyARIAState(aState);
+ HyperTextAccessibleWrap::ApplyARIAState(aState);
// Return if the gridcell has aria-selected="true".
if (*aState & states::SELECTED)
return;
// Check aria-selected="true" on the row.
Accessible* row = Parent();
if (!row || row->Role() != roles::ROW)
@@ -977,17 +977,17 @@ ARIAGridCellAccessible::ApplyARIAState(P
}
nsresult
ARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes)
{
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.
Accessible* thisRow = Parent();
if (!thisRow || thisRow->Role() != roles::ROW)
return NS_OK;
--- a/accessible/src/generic/ARIAGridAccessible.h
+++ b/accessible/src/generic/ARIAGridAccessible.h
@@ -3,17 +3,17 @@
* 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 MOZILLA_A11Y_ARIAGridAccessible_h_
#define MOZILLA_A11Y_ARIAGridAccessible_h_
#include "nsIAccessibleTable.h"
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "TableAccessible.h"
#include "xpcAccessibleTable.h"
namespace mozilla {
namespace a11y {
/**
* Accessible for ARIA grid and treegrid.
@@ -83,17 +83,17 @@ protected:
nsresult GetSelectedColumnsArray(PRUint32 *acolumnCount,
PRInt32 **aColumns = nsnull);
};
/**
* Accessible for ARIA gridcell and rowheader/columnheader.
*/
-class ARIAGridCellAccessible : public nsHyperTextAccessibleWrap,
+class ARIAGridCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -2731,26 +2731,26 @@ Accessible::IsLink()
return mParent && mParent->IsHyperText() && nsAccUtils::IsEmbeddedObject(this);
}
PRUint32
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;
}
PRUint32
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;
}
bool
Accessible::IsLinkSelected()
{
NS_PRECONDITION(IsLink(),
"IsLinkSelected() called on something that is not a hyper link!");
--- a/accessible/src/generic/Accessible.h
+++ b/accessible/src/generic/Accessible.h
@@ -21,17 +21,17 @@
#include "nsTArray.h"
#include "nsRefPtrHashtable.h"
class AccEvent;
class AccGroupInfo;
class EmbeddedObjCollector;
class KeyBinding;
class Accessible;
-class nsHyperTextAccessible;
+class HyperTextAccessible;
class nsHTMLImageAccessible;
class nsHTMLImageMapAccessible;
struct nsRoleMapEntry;
class Relation;
namespace mozilla {
namespace a11y {
@@ -240,17 +240,16 @@ public:
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
/**
* Return group position (level, position in set and set size).
*/
virtual mozilla::a11y::GroupPos GroupPosition();
/**
- /**
* Used by ChildAtPoint() method to get direct or deepest child at point.
*/
enum EWhichChildAtPoint {
eDirectChild,
eDeepestChild
};
/**
@@ -468,17 +467,17 @@ public:
inline bool IsAutoCompletePopup() const { return mFlags & eAutoCompletePopupAccessible; }
inline bool IsCombobox() const { return mFlags & eComboboxAccessible; }
inline bool IsDoc() const { return mFlags & eDocAccessible; }
DocAccessible* AsDoc();
inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; }
- nsHyperTextAccessible* AsHyperText();
+ HyperTextAccessible* AsHyperText();
inline bool IsHTMLFileInput() const { return mFlags & eHTMLFileInputAccessible; }
inline bool IsHTMLListItem() const { return mFlags & eHTMLListItemAccessible; }
mozilla::a11y::HTMLLIAccessible* AsHTMLListItem();
inline bool IsImage() const { return mFlags & eImageAccessible; }
nsHTMLImageAccessible* AsImage();
--- a/accessible/src/generic/DocAccessible.cpp
+++ b/accessible/src/generic/DocAccessible.cpp
@@ -73,17 +73,17 @@ static nsIAtom** kRelationAttrs[] =
static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
////////////////////////////////////////////////////////////////////////////////
// Constructor/desctructor
DocAccessible::
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
- nsHyperTextAccessibleWrap(aRootContent, this),
+ HyperTextAccessibleWrap(aRootContent, this),
mDocument(aDocument), mScrollPositionChangedTicks(0),
mLoadState(eTreeConstructionPending), mLoadEventType(0),
mVirtualCursor(nsnull),
mPresShell(aPresShell)
{
mFlags |= eDocAccessible;
mDependentIDsHash.Init();
@@ -157,36 +157,35 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_
NS_INTERFACE_MAP_ENTRY(nsIAccessiblePivotObserver)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessibleDocument)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleCursorable,
mIsCursorable)
foundInterface = 0;
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);
status = NS_OK;
}
*aInstancePtr = foundInterface;
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
ENameValueFlag
DocAccessible::Name(nsString& aName)
{
aName.Truncate();
@@ -526,17 +525,17 @@ DocAccessible::GetVirtualCursor(nsIAcces
mVirtualCursor = new nsAccessiblePivot(this);
mVirtualCursor->AddObserver(this);
}
NS_ADDREF(*aVirtualCursor = mVirtualCursor);
return NS_OK;
}
-// nsHyperTextAccessible method
+// HyperTextAccessible method
already_AddRefed<nsIEditor>
DocAccessible::GetEditor() const
{
// Check if document is editable (designMode="on" case). Otherwise check if
// the html:body (for HTML document case) or document element is editable.
if (!mDocument->HasFlag(NODE_IS_EDITABLE) &&
!mContent->HasFlag(NODE_IS_EDITABLE))
return nsnull;
@@ -658,17 +657,17 @@ DocAccessible::Shutdown()
}
mPresShell = nsnull; // Avoid reentrancy
mDependentIDsHash.Clear();
mNodeToAccessibleMap.Clear();
ClearCache(mAccessibleCache);
- nsHyperTextAccessibleWrap::Shutdown();
+ HyperTextAccessibleWrap::Shutdown();
GetAccService()->NotifyOfDocumentShutdown(kungFuDeathGripDoc);
}
nsIFrame*
DocAccessible::GetFrame() const
{
nsIFrame* root = nsnull;
@@ -1300,17 +1299,17 @@ DocAccessible::ParentChainChanged(nsICon
#ifdef DEBUG
nsresult
DocAccessible::HandleAccEvent(AccEvent* aEvent)
{
if (logging::IsEnabled(logging::eDocLoad))
logging::DocLoadEventHandled(aEvent);
- return nsHyperTextAccessible::HandleAccEvent(aEvent);
+ return HyperTextAccessible::HandleAccEvent(aEvent);
}
#endif
////////////////////////////////////////////////////////////////////////////////
// Public members
void*
DocAccessible::GetNativeWindow() const
@@ -1757,17 +1756,17 @@ DocAccessible::FireDelayedAccessibleEven
return NS_OK;
}
void
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))) {
nsRefPtr<AccEvent> caretMoveEvent =
new AccCaretMoveEvent(hyperText, caretOffset);
nsEventShell::FireEvent(caretMoveEvent);
PRInt32 selectionCount;
--- a/accessible/src/generic/DocAccessible.h
+++ b/accessible/src/generic/DocAccessible.h
@@ -5,18 +5,18 @@
#ifndef mozilla_a11y_DocAccessible_h__
#define mozilla_a11y_DocAccessible_h__
#include "nsIAccessibleCursorable.h"
#include "nsIAccessibleDocument.h"
#include "nsIAccessiblePivot.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsEventShell.h"
-#include "nsHyperTextAccessibleWrap.h"
#include "NotificationController.h"
#include "nsClassHashtable.h"
#include "nsDataHashtable.h"
#include "nsIDocument.h"
#include "nsIDocumentObserver.h"
#include "nsIEditor.h"
#include "nsIObserver.h"
@@ -26,17 +26,17 @@
#include "nsCOMArray.h"
#include "nsIDocShellTreeNode.h"
class nsIScrollableView;
class nsAccessiblePivot;
const PRUint32 kDefaultCacheSize = 256;
-class DocAccessible : public nsHyperTextAccessibleWrap,
+class DocAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleDocument,
public nsIDocumentObserver,
public nsIObserver,
public nsIScrollPositionListener,
public nsSupportsWeakReference,
public nsIAccessibleCursorable,
public nsIAccessiblePivotObserver
{
@@ -86,17 +86,17 @@ public:
virtual void SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry);
#ifdef DEBUG
virtual nsresult HandleAccEvent(AccEvent* aEvent);
#endif
virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
- // nsHyperTextAccessible
+ // HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// DocAccessible
/**
* Return presentation shell for this document accessible.
*/
nsIPresShell* PresShell() const { return mPresShell; }
rename from accessible/src/html/nsHyperTextAccessible.cpp
rename to accessible/src/generic/HyperTextAccessible.cpp
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/generic/HyperTextAccessible.cpp
@@ -1,14 +1,14 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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"
#include "nsAccUtils.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
#include "TextAttrs.h"
@@ -32,35 +32,36 @@
#include "nsIServiceManager.h"
#include "nsTextFragment.h"
#include "nsTypedSelection.h"
#include "gfxSkipChars.h"
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;
}
// ARIA roles that these interfaces are not appropriate for.
if (!IsTextRole())
return Accessible::QueryInterface(aIID, aInstancePtr);
@@ -81,17 +82,17 @@ nsresult nsHyperTextAccessible::QueryInt
NS_ADDREF_THIS();
return NS_OK;
}
return Accessible::QueryInterface(aIID, aInstancePtr);
}
role
-nsHyperTextAccessible::NativeRole()
+HyperTextAccessible::NativeRole()
{
nsIAtom *tag = mContent->Tag();
if (tag == nsGkAtoms::dd)
return roles::DEFINITION;
if (tag == nsGkAtoms::form)
return roles::FORM;
@@ -122,17 +123,17 @@ nsHyperTextAccessible::NativeRole()
nsIFrame *frame = GetFrame();
if (frame && frame->GetType() == nsGkAtoms::blockFrame)
return roles::PARAGRAPH;
return roles::TEXT_CONTAINER; // In ATK this works
}
PRUint64
-nsHyperTextAccessible::NativeState()
+HyperTextAccessible::NativeState()
{
PRUint64 states = AccessibleWrap::NativeState();
nsCOMPtr<nsIEditor> editor = GetEditor();
if (editor) {
states |= states::EDITABLE;
} else if (mContent->Tag() == nsGkAtoms::article) {
@@ -142,18 +143,19 @@ nsHyperTextAccessible::NativeState()
if (HasChildren())
states |= states::SELECTABLE_TEXT;
return states;
}
// 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);
if (aFrame->GetType() != nsGkAtoms::textFrame) {
// XXX fallback for non-text frames, happens for bullets right now
// but in the future bullets will have proper text frames
return aFrame->GetScreenRectExternal();
}
@@ -210,21 +212,21 @@ nsIntRect nsHyperTextAccessible::GetBoun
return screenRect;
}
/*
* 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();
}
if (aStartOffset == nsIAccessibleText::TEXT_OFFSET_CARET) {
GetCaretOffset(&aStartOffset);
}
if (aEndOffset == nsIAccessibleText::TEXT_OFFSET_END_OF_TEXT) {
@@ -409,18 +411,18 @@ nsHyperTextAccessible::GetPosAndText(PRI
if (aStartAcc && aEndAcc)
NS_IF_ADDREF(*aEndAcc = *aStartAcc);
}
return startFrame;
}
NS_IMETHODIMP
-nsHyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset,
- nsAString &aText)
+HyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset,
+ nsAString& aText)
{
aText.Truncate();
if (IsDefunct())
return NS_ERROR_FAILURE;
PRInt32 startOffset = ConvertMagicOffset(aStartOffset);
PRInt32 endOffset = ConvertMagicOffset(aEndOffset);
@@ -464,32 +466,34 @@ nsHyperTextAccessible::GetText(PRInt32 a
endChild->AppendTextTo(aText, 0, endOffset - endChildOffset);
return NS_OK;
}
/*
* Gets the character count.
*/
-NS_IMETHODIMP nsHyperTextAccessible::GetCharacterCount(PRInt32 *aCharacterCount)
+NS_IMETHODIMP
+HyperTextAccessible::GetCharacterCount(PRInt32* aCharacterCount)
{
NS_ENSURE_ARG_POINTER(aCharacterCount);
*aCharacterCount = 0;
if (IsDefunct())
return NS_ERROR_FAILURE;
*aCharacterCount = CharacterCount();
return NS_OK;
}
/*
* 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;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsAutoString character;
@@ -497,20 +501,20 @@ NS_IMETHODIMP nsHyperTextAccessible::Get
*aCharacter = character.First();
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
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;
*aHyperTextOffset = 0;
if (!aNode)
return nsnull;
@@ -632,34 +636,34 @@ nsHyperTextAccessible::DOMPointToHyperte
return childAccAtOffset;
}
}
return nsnull;
}
nsresult
-nsHyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset,
- nsIDOMNode **aNode,
- PRInt32 *aOffset)
+HyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset,
+ nsIDOMNode** aNode,
+ PRInt32* aOffset)
{
nsCOMPtr<nsIDOMNode> endNode;
PRInt32 endOffset;
return HypertextOffsetsToDOMRange(aHTOffset, aHTOffset, aNode, aOffset,
getter_AddRefs(endNode), &endOffset);
}
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;
NS_ENSURE_ARG_POINTER(aStartOffset);
*aStartOffset = -1;
NS_ENSURE_ARG_POINTER(aEndNode);
@@ -720,23 +724,23 @@ nsHyperTextAccessible::HypertextOffsetsT
NS_ADDREF(*aEndNode = endNode);
*aEndOffset = endOffset;
return NS_OK;
}
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
const bool kIsKeyboardSelect = true; // is keyboard selection
const bool kIsVisualBidi = false; // use visual order for bidi text
EWordMovementType wordMovementType = aNeedsStart ? eStartWord : eEndWord;
if (aAmount == eSelectLine) {
@@ -829,19 +833,19 @@ Gets the specified text relative to aBou
BOUNDARY_CHAR The character before/at/after the offset is returned.
BOUNDARY_WORD_START From the word start before/at/after the offset to the next word start.
BOUNDARY_WORD_END From the word end before/at/after the offset to the next work end.
BOUNDARY_LINE_START From the line start before/at/after the offset to the next line start.
BOUNDARY_LINE_END From the line end before/at/after the offset to the next line start.
*/
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();
NS_ENSURE_ARG_POINTER(aStartOffset);
NS_ENSURE_ARG_POINTER(aEndOffset);
*aStartOffset = *aEndOffset = 0;
if (!mDoc)
@@ -1012,62 +1016,66 @@ nsHyperTextAccessible::GetTextHelper(EGe
GetPosAndText(finalStartOffset, finalEndOffset, &aText);
return NS_OK;
}
/**
* 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);
return NS_OK;
}
return GetTextHelper(eGetBefore, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
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);
return NS_OK;
}
return GetTextHelper(eGetAt, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
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);
return NS_OK;
}
return GetTextHelper(eGetAfter, aBoundaryType, aOffset, aStartOffset, aEndOffset, aText);
}
// nsIPersistentProperties
// nsIAccessibleText::getTextAttributes(in boolean includeDefAttrs,
// in long offset,
// 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
// as in/out parameters. In other words, as attributes are collected,
// the attribute range itself can only stay the same or get smaller.
NS_ENSURE_ARG_POINTER(aStartOffset);
*aStartOffset = 0;
@@ -1129,17 +1137,17 @@ nsHyperTextAccessible::GetTextAttributes
*aStartOffset = startOffset;
*aEndOffset = endOffset;
return NS_OK;
}
// nsIPersistentProperties
// nsIAccessibleText::defaultTextAttributes
NS_IMETHODIMP
-nsHyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties **aAttributes)
+HyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPersistentProperties> attributes =
@@ -1149,17 +1157,17 @@ nsHyperTextAccessible::GetDefaultTextAtt
NS_ADDREF(*aAttributes = attributes);
TextAttrsMgr textAttrsMgr(this);
textAttrsMgr.GetAttributes(*aAttributes);
return NS_OK;
}
PRInt32
-nsHyperTextAccessible::GetLevelInternal()
+HyperTextAccessible::GetLevelInternal()
{
nsIAtom *tag = mContent->Tag();
if (tag == nsGkAtoms::h1)
return 1;
if (tag == nsGkAtoms::h2)
return 2;
if (tag == nsGkAtoms::h3)
return 3;
@@ -1169,17 +1177,17 @@ nsHyperTextAccessible::GetLevelInternal(
return 5;
if (tag == nsGkAtoms::h6)
return 6;
return AccessibleWrap::GetLevelInternal();
}
nsresult
-nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
+HyperTextAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes)
{
nsresult rv = AccessibleWrap::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
// Indicate when the current object uses block-level formatting
// via formatting: block
// XXX: 'formatting' attribute is deprecated and will be removed in Mozilla2,
// use 'display' attribute instead.
@@ -1218,30 +1226,32 @@ nsHyperTextAccessible::GetAttributesInte
NS_LITERAL_STRING("complementary"));
return NS_OK;
}
/*
* 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);
}
/*
* 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;
if (!GetPosAndText(aStartOffset, aEndOffset, nsnull, &endFrameUnused, &boundsRect) ||
boundsRect.IsEmpty()) {
return NS_ERROR_FAILURE;
}
@@ -1253,18 +1263,18 @@ NS_IMETHODIMP nsHyperTextAccessible::Get
return nsAccUtils::ConvertScreenCoordsTo(aX, aY, aCoordType, this);
}
/*
* Gets the offset of the character located at coordinates x and y. x and y are interpreted as being relative to
* 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;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsIFrame *hyperFrame = GetFrame();
if (!hyperFrame) {
@@ -1334,175 +1344,176 @@ nsHyperTextAccessible::GetOffsetAtPoint(
return NS_OK; // Not found, will return -1
}
////////////////////////////////////////////////////////////////////////////////
// nsIAccessibleHyperText
NS_IMETHODIMP
-nsHyperTextAccessible::GetLinkCount(PRInt32 *aLinkCount)
+HyperTextAccessible::GetLinkCount(PRInt32* aLinkCount)
{
NS_ENSURE_ARG_POINTER(aLinkCount);
*aLinkCount = 0;
if (IsDefunct())
return NS_ERROR_FAILURE;
*aLinkCount = GetLinkCount();
return NS_OK;
}
NS_IMETHODIMP
-nsHyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink)
+HyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink)
{
NS_ENSURE_ARG_POINTER(aLink);
*aLink = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
Accessible* link = GetLinkAt(aIndex);
if (link)
CallQueryInterface(link, aLink);
return NS_OK;
}
NS_IMETHODIMP
-nsHyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink,
- PRInt32* aIndex)
+HyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink,
+ PRInt32* aIndex)
{
NS_ENSURE_ARG_POINTER(aLink);
if (IsDefunct())
return NS_ERROR_FAILURE;
nsRefPtr<Accessible> link(do_QueryObject(aLink));
*aIndex = GetLinkIndex(link);
return NS_OK;
}
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'
if (IsDefunct())
return NS_ERROR_FAILURE;
*aLinkIndex = GetLinkIndexAtOffset(aOffset);
return NS_OK;
}
/**
* 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))) {
return InsertText(aText, 0);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
-nsHyperTextAccessible::InsertText(const nsAString &aText, PRInt32 aPosition)
+HyperTextAccessible::InsertText(const nsAString& aText, PRInt32 aPosition)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor = GetEditor();
nsCOMPtr<nsIPlaintextEditor> peditor(do_QueryInterface(editor));
NS_ENSURE_STATE(peditor);
nsresult rv = SetSelectionRange(aPosition, aPosition);
NS_ENSURE_SUCCESS(rv, rv);
return peditor->InsertText(aText);
}
NS_IMETHODIMP
-nsHyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
+HyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor = GetEditor();
NS_ENSURE_STATE(editor);
nsresult rv = SetSelectionRange(aStartPos, aEndPos);
NS_ENSURE_SUCCESS(rv, rv);
return editor->Copy();
}
NS_IMETHODIMP
-nsHyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
+HyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor = GetEditor();
NS_ENSURE_STATE(editor);
nsresult rv = SetSelectionRange(aStartPos, aEndPos);
NS_ENSURE_SUCCESS(rv, rv);
return editor->Cut();
}
NS_IMETHODIMP
-nsHyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
+HyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor = GetEditor();
NS_ENSURE_STATE(editor);
nsresult rv = SetSelectionRange(aStartPos, aEndPos);
NS_ENSURE_SUCCESS(rv, rv);
return editor->DeleteSelection(nsIEditor::eNone, nsIEditor::eStrip);
}
NS_IMETHODIMP
-nsHyperTextAccessible::PasteText(PRInt32 aPosition)
+HyperTextAccessible::PasteText(PRInt32 aPosition)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIEditor> editor = GetEditor();
NS_ENSURE_STATE(editor);
nsresult rv = SetSelectionRange(aPosition, aPosition);
NS_ENSURE_SUCCESS(rv, rv);
return editor->Paste(nsIClipboard::kGlobalClipboard);
}
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()
return hyperText->GetEditor();
}
ancestor = ancestor->Parent();
}
@@ -1523,17 +1534,17 @@ nsHyperTextAccessible::GetEditor() const
return editor.forget();
}
/**
* =================== Caret & Selection ======================
*/
nsresult
-nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
+HyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
{
bool isFocusable = State() & states::FOCUSABLE;
// If accessible is focusable then focus it before setting the selection to
// neglect control's selection changes on focus if any (for example, inputs
// that do select all on focus).
// some input controls
if (isFocusable)
@@ -1576,26 +1587,26 @@ nsHyperTextAccessible::SetSelectionRange
DOMFocusManager->MoveFocus(window, nsnull, nsIFocusManager::MOVEFOCUS_CARET,
nsIFocusManager::FLAG_BYMOVEFOCUS, getter_AddRefs(result));
}
return NS_OK;
}
NS_IMETHODIMP
-nsHyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset)
+HyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset)
{
return SetSelectionRange(aCaretOffset, 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;
if (IsDefunct())
return NS_ERROR_FAILURE;
// Not focused focusable accessible except document accessible doesn't have
@@ -1642,17 +1653,17 @@ nsHyperTextAccessible::GetCaretOffset(PR
return NS_OK;
}
DOMPointToHypertextOffset(focusNode, focusOffset, aCaretOffset);
return NS_OK;
}
PRInt32
-nsHyperTextAccessible::CaretLineNumber()
+HyperTextAccessible::CaretLineNumber()
{
// Provide the line number for the caret, relative to the
// currently focused node. Use a 1-based index
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
if (!frameSelection)
return -1;
nsISelection* domSel =
@@ -1709,25 +1720,25 @@ nsHyperTextAccessible::CaretLineNumber()
caretFrame = parentFrame;
}
NS_NOTREACHED("DOM ancestry had this hypertext but frame ancestry didn't");
return lineNumber;
}
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)
return;
nsISelection* domSel = frameSelection->GetSelection(aType);
if (!domSel)
return;
@@ -1760,35 +1771,35 @@ nsHyperTextAccessible::GetSelectionDOMRa
}
}
}
/*
* Gets the number of selected regions.
*/
NS_IMETHODIMP
-nsHyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount)
+HyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount)
{
NS_ENSURE_ARG_POINTER(aSelectionCount);
*aSelectionCount = 0;
nsTArray<nsRange*> ranges;
GetSelectionDOMRanges(nsISelectionController::SELECTION_NORMAL, &ranges);
*aSelectionCount = PRInt32(ranges.Length());
return NS_OK;
}
/*
* 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);
*aStartOffset = *aEndOffset = 0;
nsTArray<nsRange*> ranges;
GetSelectionDOMRanges(nsISelectionController::SELECTION_NORMAL, &ranges);
@@ -1825,19 +1836,19 @@ nsHyperTextAccessible::GetSelectionBound
DOMPointToHypertextOffset(endNode, endOffset, aEndOffset, true);
return NS_OK;
}
/*
* 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);
nsCOMPtr<nsISelection> domSel =
frameSelection->GetSelection(nsISelectionController::SELECTION_NORMAL);
NS_ENSURE_STATE(domSel);
@@ -1882,17 +1893,17 @@ nsHyperTextAccessible::SetSelectionBound
domSel->AddRange(range);
return NS_OK;
}
/*
* 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);
nsCOMPtr<nsISelection> domSel =
frameSelection->GetSelection(nsISelectionController::SELECTION_NORMAL);
NS_ENSURE_STATE(domSel);
@@ -1901,17 +1912,17 @@ nsHyperTextAccessible::AddSelection(PRIn
return SetSelectionBounds(rangeCount, aStartOffset, aEndOffset);
}
/*
* Removes the specified selection.
*/
NS_IMETHODIMP
-nsHyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum)
+HyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum)
{
nsRefPtr<nsFrameSelection> frameSelection = FrameSelection();
NS_ENSURE_STATE(frameSelection);
nsCOMPtr<nsISelection> domSel =
frameSelection->GetSelection(nsISelectionController::SELECTION_NORMAL);
NS_ENSURE_STATE(domSel);
@@ -1924,18 +1935,18 @@ nsHyperTextAccessible::RemoveSelection(P
domSel->GetRangeAt(aSelectionNum, getter_AddRefs(range));
return domSel->RemoveRange(range);
}
// void nsIAccessibleText::
// 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;
nsresult rv = HypertextOffsetsToDOMRange(aStartIndex, aEndIndex,
getter_AddRefs(startNode),
&startOffset,
getter_AddRefs(endNode),
@@ -1946,20 +1957,20 @@ nsHyperTextAccessible::ScrollSubstringTo
endNode, endOffset, aScrollType);
}
// void nsIAccessibleText::
// scrollSubstringToPoint(in long startIndex, in long endIndex,
// 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)
return NS_ERROR_FAILURE;
nsIntPoint coords;
nsresult rv = nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType,
this, &coords);
@@ -2018,17 +2029,17 @@ nsHyperTextAccessible::ScrollSubstringTo
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// Accessible public
nsresult
-nsHyperTextAccessible::GetNameInternal(nsAString& aName)
+HyperTextAccessible::GetNameInternal(nsAString& aName)
{
nsresult rv = AccessibleWrap::GetNameInternal(aName);
NS_ENSURE_SUCCESS(rv, rv);
// Get name from title attribute for HTML abbr and acronym elements making it
// a valid name from markup. Otherwise their name isn't picked up by recursive
// name computation algorithm. See NS_OK_NAME_FROM_TOOLTIP.
if (aName.IsEmpty() && IsAbbreviation()) {
@@ -2037,39 +2048,40 @@ nsHyperTextAccessible::GetNameInternal(n
name.CompressWhitespace();
aName = name;
}
}
return NS_OK;
}
void
-nsHyperTextAccessible::InvalidateChildren()
+HyperTextAccessible::InvalidateChildren()
{
mOffsets.Clear();
AccessibleWrap::InvalidateChildren();
}
bool
-nsHyperTextAccessible::RemoveChild(Accessible* aAccessible)
+HyperTextAccessible::RemoveChild(Accessible* aAccessible)
{
PRInt32 childIndex = aAccessible->IndexInParent();
PRInt32 count = mOffsets.Length() - childIndex;
if (count > 0)
mOffsets.RemoveElementsAt(childIndex, count);
return Accessible::RemoveChild(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
// something with display: none
*aRenderedOffset = 0;
return NS_OK;
}
NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
@@ -2087,18 +2099,19 @@ nsresult nsHyperTextAccessible::ContentT
PRInt32 ourContentStart = iter.GetOriginalOffset();
*aRenderedOffset = iter.ConvertOriginalToSkipped(aContentOffset + ourContentStart) -
ourRenderedStart;
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);
NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
"Need text frame for offset conversion");
NS_ASSERTION(aFrame->GetPrevContinuation() == nsnull,
"Call on primary frame only");
@@ -2113,22 +2126,22 @@ nsresult nsHyperTextAccessible::Rendered
PRInt32 ourContentStart = iter.GetOriginalOffset();
*aContentOffset = iter.ConvertSkippedToOriginal(aRenderedOffset + ourRenderedStart) - ourContentStart;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
-// 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();
PRInt32 offset = ConvertMagicOffset(aOffset) + static_cast<PRInt32>(aShift);
PRInt32 childIdx = GetChildIndexAtOffset(offset);
if (childIdx == -1)
return false;
@@ -2139,18 +2152,18 @@ nsHyperTextAccessible::GetCharAt(PRInt32
*aStartOffset = offset;
if (aEndOffset)
*aEndOffset = aChar.IsEmpty() ? offset : offset + 1;
return true;
}
PRInt32
-nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
- bool aInvalidateAfter)
+HyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
+ bool aInvalidateAfter)
{
if (aChildIndex == 0) {
if (aInvalidateAfter)
mOffsets.Clear();
return aChildIndex;
}
@@ -2170,17 +2183,17 @@ nsHyperTextAccessible::GetChildOffset(PR
lastOffset += nsAccUtils::TextLength(child);
mOffsets.AppendElement(lastOffset);
}
return mOffsets[aChildIndex - 1];
}
PRInt32
-nsHyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset)
+HyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset)
{
PRUint32 lastOffset = 0;
PRUint32 offsetCount = mOffsets.Length();
if (offsetCount > 0) {
lastOffset = mOffsets[offsetCount - 1];
if (aOffset < lastOffset) {
PRUint32 low = 0, high = offsetCount;
while (high > low) {
@@ -2211,24 +2224,24 @@ nsHyperTextAccessible::GetChildIndexAtOf
if (aOffset == lastOffset)
return mOffsets.Length() - 1;
return -1;
}
////////////////////////////////////////////////////////////////////////////////
-// 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);
nsCOMPtr<nsIDOMNode> node;
if (!aFrame) {
// If the given frame is null then set offset after the DOM node of the
// given accessible.
@@ -2263,22 +2276,22 @@ nsHyperTextAccessible::GetDOMPointByFram
*aNodeOffset = parent->IndexOf(content);
node = do_QueryInterface(parent);
}
NS_IF_ADDREF(*aNode = node);
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;
if (aIsStartBound) {
node = aRange->GetStartParent();
nodeOffset = aRange->StartOffset();
} else {
@@ -2290,23 +2303,23 @@ nsHyperTextAccessible::RangeBoundToHyper
DOMPointToHypertextOffset(node, nodeOffset, aHTOffset);
if (aIsStartHTOffset && !startAcc)
*aHTOffset = 0;
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);
PRUint32 rangeCount = ranges.Length();
if (!rangeCount)
return NS_OK;
@@ -2367,17 +2380,17 @@ nsHyperTextAccessible::GetSpellTextAttri
return NS_OK;
}
}
return NS_OK;
}
bool
-nsHyperTextAccessible::IsTextRole()
+HyperTextAccessible::IsTextRole()
{
if (mRoleMapEntry &&
(mRoleMapEntry->role == roles::GRAPHIC ||
mRoleMapEntry->role == roles::IMAGE_MAP ||
mRoleMapEntry->role == roles::SLIDER ||
mRoleMapEntry->role == roles::PROGRESSBAR ||
mRoleMapEntry->role == roles::SEPARATOR))
return false;
rename from accessible/src/html/nsHyperTextAccessible.h
rename to accessible/src/generic/HyperTextAccessible.h
--- a/accessible/src/html/nsHyperTextAccessible.h
+++ b/accessible/src/generic/HyperTextAccessible.h
@@ -1,15 +1,15 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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"
#include "nsIAccessibleEditableText.h"
#include "AccCollector.h"
#include "AccessibleWrap.h"
@@ -30,24 +30,24 @@ const PRUnichar kForcedNewLineChar = '\n
0x224f, \
0x4839, \
{ 0xa9, 0x2e, 0x95, 0x23, 0x97, 0x05, 0xf3, 0x0b } \
}
/**
* 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
NS_DECL_NSIACCESSIBLEHYPERTEXT
NS_DECL_NSIACCESSIBLEEDITABLETEXT
NS_DECLARE_STATIC_IID_ACCESSOR(NS_HYPERTEXTACCESSIBLE_IMPL_CID)
// Accessible
@@ -55,17 +55,17 @@ public:
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
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,
PRUint32 *aRenderedOffset);
// Convert rendered text offset to content offset
static nsresult RenderedToContentOffset(nsIFrame *aFrame, PRUint32 aRenderedOffset,
PRInt32 *aContentOffset);
@@ -102,41 +102,41 @@ public:
*/
PRInt32 GetLinkIndexAtOffset(PRUint32 aOffset)
{
Accessible* child = GetChildAtOffset(aOffset);
return child ? GetLinkIndex(child) : -1;
}
//////////////////////////////////////////////////////////////////////////////
- // 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.
* Will look for closest match when the DOM node does not have an accessible
* object associated with it. Will return an offset for the end of
* the string if the node is not found.
*
* @param aNode - the node to look for
* @param aNodeOffset - the offset to look for
* if -1 just look directly for the node
* 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
* will come just after the relevant embedded object characer.
* If false, then the offset is inclusive. The character indicated
* by the offset returned is at [offset]. If the passed-in offset in inside a
* 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,
PRInt32 aNodeOffset,
PRInt32* aHypertextOffset,
bool aIsEndOffset = false);
/**
@@ -256,17 +256,17 @@ public:
// EditableTextAccessible
/**
* Return the editor associated with the accessible.
*/
virtual already_AddRefed<nsIEditor> GetEditor() const;
protected:
- // nsHyperTextAccessible
+ // HyperTextAccessible
/**
* Transform magic offset into text offset.
*/
PRInt32 ConvertMagicOffset(PRInt32 aOffset)
{
if (aOffset == nsIAccessibleText::TEXT_OFFSET_END_OF_TEXT)
return CharacterCount();
@@ -405,24 +405,24 @@ protected:
private:
/**
* End text offsets array.
*/
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
--- a/accessible/src/generic/Makefile.in
+++ b/accessible/src/generic/Makefile.in
@@ -15,20 +15,22 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
Accessible.cpp \
ApplicationAccessible.cpp \
ARIAGridAccessible.cpp \
DocAccessible.cpp \
FormControlAccessible.cpp \
+ HyperTextAccessible.cpp \
OuterDocAccessible.cpp \
RootAccessible.cpp \
TextLeafAccessible.cpp \
$(NULL)
+
EXPORTS_NAMESPACES = mozilla/a11y
EXPORTS_mozilla/a11y = \
Accessible.h \
$(null)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
--- a/accessible/src/html/HTMLFormControlAccessible.cpp
+++ b/accessible/src/html/HTMLFormControlAccessible.cpp
@@ -199,17 +199,17 @@ HTMLRadioButtonAccessible::GetPositionAn
}
////////////////////////////////////////////////////////////////////////////////
// HTMLButtonAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLButtonAccessible::
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
PRUint8
HTMLButtonAccessible::ActionCount()
{
return 1;
}
@@ -232,17 +232,17 @@ HTMLButtonAccessible::DoAction(PRUint8 a
DoCommand();
return NS_OK;
}
PRUint64
HTMLButtonAccessible::State()
{
- PRUint64 state = nsHyperTextAccessibleWrap::State();
+ PRUint64 state = HyperTextAccessibleWrap::State();
if (state == states::DEFUNCT)
return state;
// Inherit states from input@type="file" suitable for the button. Note,
// no special processing for unavailable state since inheritance is supplied
// other code paths.
if (mParent && mParent->IsHTMLFileInput()) {
PRUint64 parentState = mParent->State();
@@ -251,17 +251,17 @@ HTMLButtonAccessible::State()
}
return state;
}
PRUint64
HTMLButtonAccessible::NativeState()
{
- PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
+ PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsEventStates elmState = mContent->AsElement()->State();
if (elmState.HasState(NS_EVENT_STATE_DEFAULT))
state |= states::DEFAULT;
return state;
}
@@ -315,23 +315,23 @@ HTMLButtonAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
// HTMLTextFieldAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLTextFieldAccessible::
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible,
Accessible,
- nsHyperTextAccessible,
+ HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)
role
HTMLTextFieldAccessible::NativeRole()
{
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::password, eIgnoreCase)) {
@@ -388,25 +388,25 @@ HTMLTextFieldAccessible::Value(nsString&
if (inputElement) {
inputElement->GetValue(aValue);
}
}
void
HTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
{
- nsHyperTextAccessibleWrap::ApplyARIAState(aState);
+ HyperTextAccessibleWrap::ApplyARIAState(aState);
aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState);
}
PRUint64
HTMLTextFieldAccessible::State()
{
- PRUint64 state = nsHyperTextAccessibleWrap::State();
+ PRUint64 state = HyperTextAccessibleWrap::State();
if (state & states::DEFUNCT)
return state;
// Inherit states from input@type="file" suitable for the button. Note,
// no special processing for unavailable state since inheritance is supplied
// by other code paths.
if (mParent && mParent->IsHTMLFileInput()) {
PRUint64 parentState = mParent->State();
@@ -415,17 +415,17 @@ HTMLTextFieldAccessible::State()
}
return 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,
nsGkAtoms::password, eIgnoreCase)) {
state |= states::PROTECTED;
}
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::readonly)) {
@@ -552,33 +552,33 @@ HTMLTextFieldAccessible::ContainerWidget
////////////////////////////////////////////////////////////////////////////////
// HTMLFileInputAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLFileInputAccessible::
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
mFlags |= eHTMLFileInputAccessible;
}
role
HTMLFileInputAccessible::NativeRole()
{
// JAWS wants a text container, others don't mind. No specific role in
// AT APIs.
return roles::TEXT_CONTAINER;
}
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,
// unavailable state is not redirected. That's a standard for unavailable
// state handling.
AccStateChangeEvent* event = downcast_accEvent(aEvent);
if (event &&
(event->GetState() == states::BUSY ||
@@ -607,17 +607,17 @@ HTMLFileInputAccessible::HandleAccEvent(
}
////////////////////////////////////////////////////////////////////////////////
// HTMLGroupboxAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLGroupboxAccessible::
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
role
HTMLGroupboxAccessible::NativeRole()
{
return roles::GROUPING;
}
@@ -653,38 +653,38 @@ HTMLGroupboxAccessible::GetNameInternal(
}
return NS_OK;
}
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());
return rel;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLLegendAccessible
////////////////////////////////////////////////////////////////////////////////
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;
Accessible* groupbox = Parent();
if (groupbox && groupbox->Role() == roles::GROUPING)
rel.AppendTarget(groupbox);
return rel;
@@ -697,24 +697,24 @@ HTMLLegendAccessible::NativeRole()
}
////////////////////////////////////////////////////////////////////////////////
// HTMLFigureAccessible
////////////////////////////////////////////////////////////////////////////////
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.
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
NS_LITERAL_STRING("figure"));
return NS_OK;
}
@@ -722,17 +722,17 @@ role
HTMLFigureAccessible::NativeRole()
{
return roles::FIGURE;
}
nsresult
HTMLFigureAccessible::GetNameInternal(nsAString& aName)
{
- nsresult rv = nsHyperTextAccessibleWrap::GetNameInternal(aName);
+ nsresult rv = HyperTextAccessibleWrap::GetNameInternal(aName);
NS_ENSURE_SUCCESS(rv, rv);
if (!aName.IsEmpty())
return NS_OK;
nsIContent* captionContent = Caption();
if (captionContent) {
return nsTextEquivUtils::
@@ -740,17 +740,17 @@ HTMLFigureAccessible::GetNameInternal(ns
}
return NS_OK;
}
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());
return rel;
}
nsIContent*
HTMLFigureAccessible::Caption() const
@@ -767,30 +767,30 @@ HTMLFigureAccessible::Caption() const
}
////////////////////////////////////////////////////////////////////////////////
// HTMLFigcaptionAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLFigcaptionAccessible::
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
role
HTMLFigcaptionAccessible::NativeRole()
{
return roles::CAPTION;
}
Relation
HTMLFigcaptionAccessible::RelationByType(PRUint32 aType)
{
- Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
+ Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
return rel;
Accessible* figure = Parent();
if (figure &&
figure->GetContent()->NodeInfo()->Equals(nsGkAtoms::figure,
mContent->GetNameSpaceID())) {
rel.AppendTarget(figure);
--- a/accessible/src/html/HTMLFormControlAccessible.h
+++ b/accessible/src/html/HTMLFormControlAccessible.h
@@ -2,17 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 MOZILLA_A11Y_HTMLFormControlAccessible_H_
#define MOZILLA_A11Y_HTMLFormControlAccessible_H_
#include "FormControlAccessible.h"
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
namespace mozilla {
namespace a11y {
/**
* Accessible for HTML progress element.
*/
typedef ProgressMeterAccessible<1> HTMLProgressMeterAccessible;
@@ -59,17 +59,17 @@ public:
PRInt32 *aSetSize);
};
/**
* Accessible for HTML input@type="button", @type="submit", @type="image"
* and HTML button elements.
*/
-class HTMLButtonAccessible : public nsHyperTextAccessibleWrap
+class HTMLButtonAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Click = 0 };
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsIAccessible
@@ -88,31 +88,31 @@ public:
// Widgets
virtual bool IsWidget() const;
};
/**
* Accessible for HTML input@type="text" element.
*/
-class HTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
+class HTMLTextFieldAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Click = 0 };
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
NS_IMETHOD DoAction(PRUint8 index);
- // nsHyperTextAccessible
+ // HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible
virtual void Value(nsString& aValue);
virtual void ApplyARIAState(PRUint64* aState) const;
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 State();
@@ -125,30 +125,30 @@ public:
virtual bool IsWidget() const;
virtual Accessible* ContainerWidget() const;
};
/**
* Accessible for input@type="file" element.
*/
-class HTMLFileInputAccessible : public nsHyperTextAccessibleWrap
+class HTMLFileInputAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual nsresult HandleAccEvent(AccEvent* aAccEvent);
};
/**
* Accessible for HTML fieldset element.
*/
-class HTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
+class HTMLGroupboxAccessible : public HyperTextAccessibleWrap
{
public:
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
virtual Relation RelationByType(PRUint32 aType);
@@ -156,30 +156,30 @@ public:
protected:
nsIContent* GetLegend();
};
/**
* Accessible for HTML legend element.
*/
-class HTMLLegendAccessible : public nsHyperTextAccessibleWrap
+class HTMLLegendAccessible : public HyperTextAccessibleWrap
{
public:
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual Relation RelationByType(PRUint32 aType);
};
/**
* Accessible for HTML5 figure element.
*/
-class HTMLFigureAccessible : public nsHyperTextAccessibleWrap
+class HTMLFigureAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual nsresult GetAttributesInternal(nsIPersistentProperties* aAttributes);
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
@@ -188,17 +188,17 @@ public:
protected:
nsIContent* Caption() const;
};
/**
* Accessible for HTML5 figcaption element.
*/
-class HTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap
+class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap
{
public:
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual Relation RelationByType(PRUint32 aType);
};
--- a/accessible/src/html/HTMLListAccessible.cpp
+++ b/accessible/src/html/HTMLListAccessible.cpp
@@ -15,75 +15,75 @@
using namespace mozilla;
using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// HTMLListAccessible
////////////////////////////////////////////////////////////////////////////////
-NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, nsHyperTextAccessible)
+NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, HyperTextAccessible)
role
HTMLListAccessible::NativeRole()
{
if (mContent->Tag() == nsGkAtoms::dl)
return roles::DEFINITION_LIST;
return roles::LIST;
}
PRUint64
HTMLListAccessible::NativeState()
{
- return nsHyperTextAccessibleWrap::NativeState() | states::READONLY;
+ return HyperTextAccessibleWrap::NativeState() | states::READONLY;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLLIAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLLIAccessible::
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
+ HyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
{
mFlags |= eHTMLListItemAccessible;
nsBlockFrame* blockFrame = do_QueryFrame(GetFrame());
if (blockFrame && blockFrame->HasBullet()) {
mBullet = new HTMLListBulletAccessible(mContent, mDoc);
if (!Document()->BindToDocument(mBullet, nsnull))
mBullet = nsnull;
}
}
-NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, nsHyperTextAccessible)
+NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, HyperTextAccessible)
void
HTMLLIAccessible::Shutdown()
{
mBullet = nsnull;
- nsHyperTextAccessibleWrap::Shutdown();
+ HyperTextAccessibleWrap::Shutdown();
}
role
HTMLLIAccessible::NativeRole()
{
if (mContent->Tag() == nsGkAtoms::dt)
return roles::TERM;
return roles::LISTITEM;
}
PRUint64
HTMLLIAccessible::NativeState()
{
- return nsHyperTextAccessibleWrap::NativeState() | states::READONLY;
+ return HyperTextAccessibleWrap::NativeState() | states::READONLY;
}
NS_IMETHODIMP
HTMLLIAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
PRInt32* aWidth, PRInt32* aHeight)
{
nsresult rv = AccessibleWrap::GetBounds(aX, aY, aWidth, aHeight);
if (NS_FAILED(rv) || !mBullet || mBullet->IsInside())
--- a/accessible/src/html/HTMLListAccessible.h
+++ b/accessible/src/html/HTMLListAccessible.h
@@ -2,47 +2,47 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 mozilla_a11y_HTMLListAccessible_h__
#define mozilla_a11y_HTMLListAccessible_h__
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsBaseWidgetAccessible.h"
namespace mozilla {
namespace a11y {
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
NS_DECL_ISUPPORTS_INHERITED
// Accessible
virtual a11y::role NativeRole();
virtual PRUint64 NativeState();
};
/**
* Used for HTML list item (e.g. HTML li).
*/
-class HTMLLIAccessible : public nsHyperTextAccessibleWrap
+class HTMLLIAccessible : public HyperTextAccessibleWrap
{
public:
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~HTMLLIAccessible() { }
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
--- a/accessible/src/html/Makefile.in
+++ b/accessible/src/html/Makefile.in
@@ -21,21 +21,16 @@ CPPSRCS = \
HTMLFormControlAccessible.cpp \
HTMLListAccessible.cpp \
nsHTMLImageAccessible.cpp \
nsHTMLImageMapAccessible.cpp \
nsHTMLLinkAccessible.cpp \
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.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = \
--- a/accessible/src/html/nsHTMLCanvasAccessible.cpp
+++ b/accessible/src/html/nsHTMLCanvasAccessible.cpp
@@ -6,17 +6,17 @@
#include "nsHTMLCanvasAccessible.h"
#include "Role.h"
using namespace mozilla::a11y;
nsHTMLCanvasAccessible::
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessible(aContent, aDoc)
+ HyperTextAccessible(aContent, aDoc)
{
}
role
nsHTMLCanvasAccessible::NativeRole()
{
return roles::CANVAS;
}
--- a/accessible/src/html/nsHTMLCanvasAccessible.h
+++ b/accessible/src/html/nsHTMLCanvasAccessible.h
@@ -1,22 +1,22 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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_
/**
* HTML canvas accessible (html:canvas).
*/
-class nsHTMLCanvasAccessible : public nsHyperTextAccessible
+class nsHTMLCanvasAccessible : public HyperTextAccessible
{
public:
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLCanvasAccessible() { }
// Accessible
virtual mozilla::a11y::role NativeRole();
};
--- a/accessible/src/html/nsHTMLLinkAccessible.cpp
+++ b/accessible/src/html/nsHTMLLinkAccessible.cpp
@@ -17,37 +17,37 @@
using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsHTMLLinkAccessible
////////////////////////////////////////////////////////////////////////////////
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)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessible
role
nsHTMLLinkAccessible::NativeRole()
{
return roles::LINK;
}
PRUint64
nsHTMLLinkAccessible::NativeState()
{
- PRUint64 states = nsHyperTextAccessibleWrap::NativeState();
+ PRUint64 states = HyperTextAccessibleWrap::NativeState();
states &= ~states::READONLY;
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::name)) {
// This is how we indicate it is a named anchor
// In other words, this anchor can be selected as a location :)
// There is no other better state to use to indicate this.
states |= states::SELECTABLE;
@@ -72,48 +72,48 @@ nsHTMLLinkAccessible::NativeLinkState()
return nsCoreUtils::HasClickListener(mContent) ? states::LINKED : 0;
}
void
nsHTMLLinkAccessible::Value(nsString& aValue)
{
aValue.Truncate();
- nsHyperTextAccessible::Value(aValue);
+ HyperTextAccessible::Value(aValue);
if (aValue.IsEmpty())
nsContentUtils::GetLinkLocation(mContent->AsElement(), aValue);
}
PRUint8
nsHTMLLinkAccessible::ActionCount()
{
- return IsLinked() ? 1 : nsHyperTextAccessible::ActionCount();
+ return IsLinked() ? 1 : HyperTextAccessible::ActionCount();
}
NS_IMETHODIMP
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)
return NS_ERROR_INVALID_ARG;
aName.AssignLiteral("jump");
return NS_OK;
}
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)
return NS_ERROR_INVALID_ARG;
if (IsDefunct())
return NS_ERROR_FAILURE;
--- a/accessible/src/html/nsHTMLLinkAccessible.h
+++ b/accessible/src/html/nsHTMLLinkAccessible.h
@@ -1,19 +1,19 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 _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);
NS_DECL_ISUPPORTS_INHERITED
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
--- a/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -169,17 +169,17 @@ nsHTMLSelectListAccessible::CacheOptSibl
////////////////////////////////////////////////////////////////////////////////
// nsHTMLSelectOptionAccessible
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectOptionAccessible::
nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
////////////////////////////////////////////////////////////////////////////////
// nsHTMLSelectOptionAccessible: Accessible public
role
nsHTMLSelectOptionAccessible::NativeRole()
@@ -220,17 +220,17 @@ nsHTMLSelectOptionAccessible::GetNameInt
return NS_OK;
}
PRUint64
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();
Accessible* select = GetSelect();
if (!select)
return state;
PRUint64 selectState = select->State();
@@ -302,17 +302,17 @@ nsHTMLSelectOptionAccessible::GetLevelIn
void
nsHTMLSelectOptionAccessible::GetBoundsRect(nsRect& aTotalBounds,
nsIFrame** aBoundingFrame)
{
Accessible* combobox = GetCombobox();
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*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
{
if (aIndex == eAction_Select) {
aName.AssignLiteral("select");
return NS_OK;
--- a/accessible/src/html/nsHTMLSelectAccessible.h
+++ b/accessible/src/html/nsHTMLSelectAccessible.h
@@ -64,17 +64,17 @@ protected:
* Recursive helper for CacheChildren().
*/
void CacheOptSiblings(nsIContent *aParentContent);
};
/*
* Options inside the select, contained within the list
*/
-class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap
+class nsHTMLSelectOptionAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Select = 0 };
nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLSelectOptionAccessible() {}
// nsIAccessible
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -39,40 +39,40 @@
using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsHTMLTableCellAccessible
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableCellAccessible::
nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
////////////////////////////////////////////////////////////////////////////////
// nsHTMLTableCellAccessible: nsISupports implementation
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLTableCellAccessible,
- nsHyperTextAccessible,
+ HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
// nsHTMLTableCellAccessible: Accessible implementation
role
nsHTMLTableCellAccessible::NativeRole()
{
return roles::CELL;
}
PRUint64
nsHTMLTableCellAccessible::NativeState()
{
- PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
+ PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsIFrame *frame = mContent->GetPrimaryFrame();
NS_ASSERTION(frame, "No frame for valid cell accessible!");
if (frame) {
state |= states::SELECTABLE;
if (frame->IsSelected())
state |= states::SELECTED;
@@ -82,17 +82,17 @@ nsHTMLTableCellAccessible::NativeState()
}
nsresult
nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
{
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
nsCOMPtr<nsIAccessibleTable> tableAcc(GetTableAccessible());
if (!tableAcc)
return NS_OK;
PRInt32 rowIdx = -1, colIdx = -1;
@@ -1507,17 +1507,17 @@ nsHTMLTableAccessible::IsProbablyLayoutT
////////////////////////////////////////////////////////////////////////////////
// nsHTMLCaptionAccessible
////////////////////////////////////////////////////////////////////////////////
Relation
nsHTMLCaptionAccessible::RelationByType(PRUint32 aType)
{
- Relation rel = nsHyperTextAccessible::RelationByType(aType);
+ Relation rel = HyperTextAccessible::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR)
rel.AppendTarget(Parent());
return rel;
}
role
nsHTMLCaptionAccessible::NativeRole()
--- a/accessible/src/html/nsHTMLTableAccessible.h
+++ b/accessible/src/html/nsHTMLTableAccessible.h
@@ -1,28 +1,28 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 _nsHTMLTableAccessible_H_
#define _nsHTMLTableAccessible_H_
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsIAccessibleTable.h"
#include "TableAccessible.h"
#include "xpcAccessibleTable.h"
class nsITableLayout;
class nsITableCellLayout;
/**
* HTML table cell accessible (html:td).
*/
-class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap,
+class nsHTMLTableCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@@ -173,21 +173,21 @@ protected:
#ifdef SHOW_LAYOUT_HEURISTIC
nsString mLayoutHeuristic;
#endif
};
/**
* 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
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual Relation RelationByType(PRUint32 aRelationType);
};
--- a/accessible/src/html/nsHTMLTextAccessible.cpp
+++ b/accessible/src/html/nsHTMLTextAccessible.cpp
@@ -62,21 +62,21 @@ nsHTMLBRAccessible::GetNameInternal(nsAS
}
////////////////////////////////////////////////////////////////////////////////
// nsHTMLLabelAccessible
////////////////////////////////////////////////////////////////////////////////
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)
{
return nsTextEquivUtils::GetNameFromSubtree(this, aName);
}
role
@@ -86,21 +86,21 @@ nsHTMLLabelAccessible::NativeRole()
}
////////////////////////////////////////////////////////////////////////////////
// nsHTMLOuputAccessible
////////////////////////////////////////////////////////////////////////////////
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)
{
Relation rel = AccessibleWrap::RelationByType(aType);
if (aType == nsIAccessibleRelation::RELATION_CONTROLLED_BY)
rel.AppendIter(new IDRefsIterator(mDoc, mContent, nsGkAtoms::_for));
--- a/accessible/src/html/nsHTMLTextAccessible.h
+++ b/accessible/src/html/nsHTMLTextAccessible.h
@@ -33,32 +33,32 @@ public:
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
};
/**
* Used for HTML label element.
*/
-class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap
+class nsHTMLLabelAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// Accessible
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
};
/**
* Used for HTML output element.
*/
-class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap
+class nsHTMLOutputAccessible : public HyperTextAccessibleWrap
{
public:
nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// Accessible
virtual mozilla::a11y::role NativeRole();
rename from accessible/src/mac/nsHyperTextAccessibleWrap.h
rename to accessible/src/mac/HyperTextAccessibleWrap.h
--- a/accessible/src/mac/nsHyperTextAccessibleWrap.h
+++ b/accessible/src/mac/HyperTextAccessibleWrap.h
@@ -1,14 +1,14 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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
--- a/accessible/src/mac/mozHTMLAccessible.mm
+++ b/accessible/src/mac/mozHTMLAccessible.mm
@@ -2,17 +2,17 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#import "mozHTMLAccessible.h"
-#import "nsHyperTextAccessible.h"
+#import "HyperTextAccessible.h"
#import "nsCocoaUtils.h"
@implementation mozHeadingAccessible
- (id)value
{
if (!mGeckoAccessible || !mGeckoAccessible->IsHyperText())
--- a/accessible/src/mac/mozTextAccessible.h
+++ b/accessible/src/mac/mozTextAccessible.h
@@ -1,16 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#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
--- a/accessible/src/msaa/ARIAGridAccessibleWrap.cpp
+++ b/accessible/src/msaa/ARIAGridAccessibleWrap.cpp
@@ -25,11 +25,11 @@ IMPL_IUNKNOWN_INHERITED1(ARIAGridAccessi
////////////////////////////////////////////////////////////////////////////////
// ARIAGridCellAccessibleWrap
////////////////////////////////////////////////////////////////////////////////
NS_IMPL_ISUPPORTS_INHERITED0(ARIAGridCellAccessibleWrap,
ARIAGridCellAccessible)
IMPL_IUNKNOWN_INHERITED1(ARIAGridCellAccessibleWrap,
- nsHyperTextAccessibleWrap,
+ HyperTextAccessibleWrap,
CAccessibleTableCell)
--- a/accessible/src/msaa/CAccessibleEditableText.cpp
+++ b/accessible/src/msaa/CAccessibleEditableText.cpp
@@ -3,17 +3,17 @@
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "CAccessibleEditableText.h"
#include "AccessibleEditableText_i.c"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsCOMPtr.h"
#include "nsString.h"
// IUnknown
STDMETHODIMP
CAccessibleEditableText::QueryInterface(REFIID iid, void** ppv)
@@ -33,47 +33,47 @@ CAccessibleEditableText::QueryInterface(
}
// IAccessibleEditableText
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;
nsresult rv = textAcc->CopyText(aStartOffset, aEndOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
nsresult rv = textAcc->DeleteText(aStartOffset, aEndOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
PRUint32 length = ::SysStringLen(*aText);
nsAutoString text(*aText, length);
nsresult rv = textAcc->InsertText(text, aOffset);
return GetHRESULT(rv);
@@ -81,48 +81,48 @@ CAccessibleEditableText::insertText(long
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
nsresult rv = textAcc->CutText(aStartOffset, aEndOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
nsresult rv = textAcc->PasteText(aOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
STDMETHODIMP
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;
nsresult rv = textAcc->DeleteText(aStartOffset, aEndOffset);
if (NS_FAILED(rv))
return GetHRESULT(rv);
PRUint32 length = ::SysStringLen(*aText);
--- a/accessible/src/msaa/CAccessibleText.cpp
+++ b/accessible/src/msaa/CAccessibleText.cpp
@@ -5,17 +5,17 @@
* 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 "CAccessibleText.h"
#include "Accessible2.h"
#include "AccessibleText_i.c"
-#include "nsHyperTextAccessible.h"
+#include "HyperTextAccessible.h"
#include "nsIPersistentProperties2.h"
// IUnknown
STDMETHODIMP
CAccessibleText::QueryInterface(REFIID iid, void** ppv)
{
@@ -35,17 +35,17 @@ CAccessibleText::QueryInterface(REFIID i
}
// IAccessibleText
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;
nsresult rv = textAcc->AddSelection(aStartOffset, aEndOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
@@ -58,17 +58,17 @@ CAccessibleText::get_attributes(long aOf
__try {
if (!aStartOffset || !aEndOffset || !aTextAttributes)
return E_INVALIDARG;
*aStartOffset = 0;
*aEndOffset = 0;
*aTextAttributes = NULL;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
PRInt32 startOffset = 0, endOffset = 0;
nsCOMPtr<nsIPersistentProperties> attributes;
nsresult rv = textAcc->GetTextAttributes(true, aOffset,
&startOffset, &endOffset,
getter_AddRefs(attributes));
@@ -90,17 +90,17 @@ CAccessibleText::get_attributes(long aOf
}
STDMETHODIMP
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;
PRInt32 offset = 0;
nsresult rv = textAcc->GetCaretOffset(&offset);
if (NS_FAILED(rv))
return GetHRESULT(rv);
@@ -118,17 +118,17 @@ CAccessibleText::get_characterExtents(lo
long *aWidth, long *aHeight)
{
__try {
*aX = 0;
*aY = 0;
*aWidth = 0;
*aHeight = 0;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
PRUint32 geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ?
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE :
nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
PRInt32 x = 0, y =0, width = 0, height = 0;
@@ -148,17 +148,17 @@ CAccessibleText::get_characterExtents(lo
}
STDMETHODIMP
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;
PRInt32 selCount = 0;
nsresult rv = textAcc->GetSelectionCount(&selCount);
if (NS_FAILED(rv))
return GetHRESULT(rv);
@@ -172,17 +172,17 @@ CAccessibleText::get_nSelections(long *a
STDMETHODIMP
CAccessibleText::get_offsetAtPoint(long aX, long aY,
enum IA2CoordinateType aCoordType,
long *aOffset)
{
__try {
*aOffset = 0;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
PRUint32 geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ?
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE :
nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
PRInt32 offset = 0;
@@ -200,17 +200,17 @@ CAccessibleText::get_offsetAtPoint(long
STDMETHODIMP
CAccessibleText::get_selection(long aSelectionIndex, long *aStartOffset,
long *aEndOffset)
{
__try {
*aStartOffset = 0;
*aEndOffset = 0;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
PRInt32 startOffset = 0, endOffset = 0;
nsresult rv = textAcc->GetSelectionBounds(aSelectionIndex,
&startOffset, &endOffset);
if (NS_FAILED(rv))
return GetHRESULT(rv);
@@ -224,17 +224,17 @@ CAccessibleText::get_selection(long aSel
}
STDMETHODIMP
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;
nsAutoString text;
nsresult rv = textAcc->GetText(aStartOffset, aEndOffset, text);
if (NS_FAILED(rv))
return GetHRESULT(rv);
@@ -254,17 +254,17 @@ CAccessibleText::get_textBeforeOffset(lo
long *aStartOffset, long *aEndOffset,
BSTR *aText)
{
__try {
*aStartOffset = 0;
*aEndOffset = 0;
*aText = NULL;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
nsresult rv = NS_OK;
nsAutoString text;
PRInt32 startOffset = 0, endOffset = 0;
if (aBoundaryType == IA2_TEXT_BOUNDARY_ALL) {
@@ -301,17 +301,17 @@ CAccessibleText::get_textAfterOffset(lon
long *aStartOffset, long *aEndOffset,
BSTR *aText)
{
__try {
*aStartOffset = 0;
*aEndOffset = 0;
*aText = NULL;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
nsresult rv = NS_OK;
nsAutoString text;
PRInt32 startOffset = 0, endOffset = 0;
if (aBoundaryType == IA2_TEXT_BOUNDARY_ALL) {
@@ -348,17 +348,17 @@ CAccessibleText::get_textAtOffset(long a
long *aStartOffset, long *aEndOffset,
BSTR *aText)
{
__try {
*aStartOffset = 0;
*aEndOffset = 0;
*aText = NULL;
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
nsresult rv = NS_OK;
nsAutoString text;
PRInt32 startOffset = 0, endOffset = 0;
if (aBoundaryType == IA2_TEXT_BOUNDARY_ALL) {
@@ -388,48 +388,48 @@ CAccessibleText::get_textAtOffset(long a
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
nsresult rv = textAcc->RemoveSelection(aSelectionIndex);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
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;
nsresult rv = textAcc->SetCaretOffset(aOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
STDMETHODIMP
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;
nsresult rv = textAcc->SetSelectionBounds(aSelectionIndex,
aStartOffset, aEndOffset);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
@@ -437,50 +437,50 @@ CAccessibleText::setSelection(long aSele
}
STDMETHODIMP
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;
*aNCharacters = textAcc->CharacterCount();
return S_OK;
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
STDMETHODIMP
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;
nsresult rv = textAcc->ScrollSubstringTo(aStartIndex, aEndIndex, aScrollType);
return GetHRESULT(rv);
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
}
STDMETHODIMP
CAccessibleText::scrollSubstringToPoint(long aStartIndex, long aEndIndex,
enum IA2CoordinateType aCoordType,
long aX, long aY)
{
__try {
- nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+ nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
PRUint32 geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ?
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE :
nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
nsresult rv = textAcc->ScrollSubstringToPoint(aStartIndex, aEndIndex,
--- a/accessible/src/msaa/DocAccessibleWrap.cpp
+++ b/accessible/src/msaa/DocAccessibleWrap.cpp
@@ -62,17 +62,17 @@ STDMETHODIMP_(ULONG) DocAccessibleWrap::
// Microsoft COM QueryInterface
STDMETHODIMP
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);
(reinterpret_cast<IUnknown*>(*ppv))->AddRef();
return S_OK;
}
STDMETHODIMP
rename from accessible/src/msaa/nsHyperTextAccessibleWrap.cpp
rename to accessible/src/msaa/HyperTextAccessibleWrap.cpp
--- a/accessible/src/msaa/nsHyperTextAccessibleWrap.cpp
+++ b/accessible/src/msaa/HyperTextAccessibleWrap.cpp
@@ -1,29 +1,29 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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();
if (eventType == nsIAccessibleEvent::EVENT_TEXT_REMOVED ||
eventType == nsIAccessibleEvent::EVENT_TEXT_INSERTED) {
Accessible* accessible = aEvent->GetAccessible();
if (accessible) {
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryObject(accessible));
@@ -36,24 +36,24 @@ nsHyperTextAccessibleWrap::HandleAccEven
NS_IF_ADDREF(gTextEvent = downcast_accEvent(aEvent));
(static_cast<IUnknown*>(instancePtr))->Release();
}
}
}
}
- 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;
*aEndOffset = 0;
if (!gTextEvent)
return NS_OK;
rename from accessible/src/msaa/nsHyperTextAccessibleWrap.h
rename to accessible/src/msaa/HyperTextAccessibleWrap.h
--- a/accessible/src/msaa/nsHyperTextAccessibleWrap.h
+++ b/accessible/src/msaa/HyperTextAccessibleWrap.h
@@ -1,30 +1,30 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// Accessible
--- a/accessible/src/msaa/Makefile.in
+++ b/accessible/src/msaa/Makefile.in
@@ -15,22 +15,22 @@ EXPORT_LIBRARY = ..
LIBXUL_LIBRARY = 1
CPPSRCS = \
AccessibleWrap.cpp \
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 \
CAccessibleText.cpp \
CAccessibleEditableText.cpp \
CAccessibleHyperlink.cpp \
CAccessibleTable.cpp \
CAccessibleTableCell.cpp \
--- a/accessible/src/msaa/ia2AccessibleHypertext.cpp
+++ b/accessible/src/msaa/ia2AccessibleHypertext.cpp
@@ -4,26 +4,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "ia2AccessibleHypertext.h"
#include "AccessibleHypertext_i.c"
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
// IUnknown
STDMETHODIMP
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();
return S_OK;
}
return E_NOINTERFACE;
}
@@ -33,17 +33,17 @@ ia2AccessibleHypertext::QueryInterface(R
// IAccessibleHypertext
STDMETHODIMP
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;
*aHyperlinkCount = hyperText->GetLinkCount();
return S_OK;
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
@@ -51,17 +51,17 @@ ia2AccessibleHypertext::get_nHyperlinks(
STDMETHODIMP
ia2AccessibleHypertext::get_hyperlink(long aLinkIndex,
IAccessibleHyperlink** aHyperlink)
{
__try {
*aHyperlink = NULL;
- nsHyperTextAccessibleWrap* hyperText = static_cast<nsHyperTextAccessibleWrap*>(this);
+ HyperTextAccessibleWrap* hyperText = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperText->IsDefunct())
return CO_E_OBJNOTCONNECTED;
Accessible* hyperLink = hyperText->GetLinkAt(aLinkIndex);
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryObject(hyperLink));
if (!winAccessNode)
return E_FAIL;
@@ -79,17 +79,17 @@ ia2AccessibleHypertext::get_hyperlink(lo
}
STDMETHODIMP
ia2AccessibleHypertext::get_hyperlinkIndex(long aCharIndex, long* aHyperlinkIndex)
{
__try {
*aHyperlinkIndex = 0;
- nsHyperTextAccessibleWrap* hyperAcc = static_cast<nsHyperTextAccessibleWrap*>(this);
+ HyperTextAccessibleWrap* hyperAcc = static_cast<HyperTextAccessibleWrap*>(this);
if (hyperAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
*aHyperlinkIndex = hyperAcc->GetLinkIndexAtOffset(aCharIndex);
return S_OK;
} __except(nsAccessNodeWrap::FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return E_FAIL;
--- a/accessible/src/msaa/nsAccessNodeWrap.h
+++ b/accessible/src/msaa/nsAccessNodeWrap.h
@@ -127,17 +127,17 @@ protected:
* Return ISimpleDOMNode instance for existing accessible object or
* creates new nsAccessNode instance if the accessible doesn't exist.
*
* @note ISimpleDOMNode is returned addrefed
*/
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;
};
/**
* Converts nsresult to HRESULT.
*/
--- a/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp
@@ -22,22 +22,22 @@ IMPL_IUNKNOWN_INHERITED1(nsHTMLTableAcce
////////////////////////////////////////////////////////////////////////////////
// nsHTMLTableCellAccessibleWrap
////////////////////////////////////////////////////////////////////////////////
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableCellAccessibleWrap,
nsHTMLTableCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsHTMLTableCellAccessibleWrap,
- nsHyperTextAccessibleWrap,
+ HyperTextAccessibleWrap,
CAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
// nsHTMLTableCellAccessibleWrap
////////////////////////////////////////////////////////////////////////////////
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableHeaderCellAccessibleWrap,
nsHTMLTableHeaderCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsHTMLTableHeaderCellAccessibleWrap,
- nsHyperTextAccessibleWrap,
+ HyperTextAccessibleWrap,
CAccessibleTableCell)
--- a/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp
@@ -33,10 +33,10 @@ nsXULListCellAccessibleWrap::
nsXULListCellAccessible(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED0(nsXULListCellAccessibleWrap,
nsXULListCellAccessible)
IMPL_IUNKNOWN_INHERITED1(nsXULListCellAccessibleWrap,
- nsHyperTextAccessibleWrap,
+ HyperTextAccessibleWrap,
CAccessibleTableCell)
rename from accessible/src/other/nsHyperTextAccessibleWrap.h
rename to accessible/src/other/HyperTextAccessibleWrap.h
--- a/accessible/src/other/nsHyperTextAccessibleWrap.h
+++ b/accessible/src/other/HyperTextAccessibleWrap.h
@@ -1,14 +1,14 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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
--- a/accessible/src/xforms/nsXFormsAccessible.cpp
+++ b/accessible/src/xforms/nsXFormsAccessible.cpp
@@ -43,17 +43,17 @@ nsXFormsAccessibleBase::nsXFormsAccessib
}
////////////////////////////////////////////////////////////////////////////////
// nsXFormsAccessible
////////////////////////////////////////////////////////////////////////////////
nsXFormsAccessible::
nsXFormsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
nsresult
nsXFormsAccessible::GetBoundChildElementValue(const nsAString& aTagName,
nsAString& aValue)
{
NS_ENSURE_TRUE(sXFormsService, NS_ERROR_FAILURE);
@@ -130,17 +130,17 @@ nsXFormsAccessible::NativeState()
bool isRequired = false;
rv = sXFormsService->IsRequired(DOMNode, &isRequired);
NS_ENSURE_SUCCESS(rv, 0);
bool isValid = false;
rv = sXFormsService->IsValid(DOMNode, &isValid);
NS_ENSURE_SUCCESS(rv, 0);
- PRUint64 states = nsHyperTextAccessibleWrap::NativeState();
+ PRUint64 states = HyperTextAccessibleWrap::NativeState();
if (!isRelevant)
states |= states::UNAVAILABLE;
if (isReadonly)
states |= states::READONLY;
if (isRequired)
--- a/accessible/src/xforms/nsXFormsAccessible.h
+++ b/accessible/src/xforms/nsXFormsAccessible.h
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 _nsXFormsAccessible_H_
#define _nsXFormsAccessible_H_
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "nsIXFormsUtilityService.h"
#define NS_NAMESPACE_XFORMS "http://www.w3.org/2002/xforms"
/**
* Utility class that provides access to nsIXFormsUtilityService.
*/
class nsXFormsAccessibleBase
@@ -28,17 +28,17 @@ protected:
};
/**
* Every XForms element that is bindable to XForms model or is able to contain
* 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:
nsXFormsAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
// Returns value of child xforms 'hint' element.
virtual void Description(nsString& aDescription);
@@ -104,17 +104,17 @@ public:
* The class is base for accessible objects for XForms elements that have
* editable area.
*/
class nsXFormsEditableAccessible : public nsXFormsAccessible
{
public:
nsXFormsEditableAccessible(nsIContent* aContent, DocAccessible* aDoc);
- // nsHyperTextAccessible
+ // HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible
virtual PRUint64 NativeState();
};
/**
--- a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp
+++ b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp
@@ -114,17 +114,21 @@ nsXFormsTriggerAccessible::DoAction(PRUi
////////////////////////////////////////////////////////////////////////////////
nsXFormsInputAccessible::
nsXFormsInputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsXFormsEditableAccessible(aContent, aDoc)
{
}
-NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible, Accessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
+NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible,
+ Accessible,
+ HyperTextAccessible,
+ nsIAccessibleText,
+ nsIAccessibleEditableText)
role
nsXFormsInputAccessible::NativeRole()
{
return roles::ENTRY;
}
PRUint8
--- a/accessible/src/xul/XULFormControlAccessible.cpp
+++ b/accessible/src/xul/XULFormControlAccessible.cpp
@@ -683,23 +683,23 @@ XULToolbarSeparatorAccessible::NativeSta
}
////////////////////////////////////////////////////////////////////////////////
// XULTextFieldAccessible
////////////////////////////////////////////////////////////////////////////////
XULTextFieldAccessible::
XULTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible,
Accessible,
- nsHyperTextAccessible,
+ HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)
////////////////////////////////////////////////////////////////////////////////
// XULTextFieldAccessible: nsIAccessible
void
XULTextFieldAccessible::Value(nsString& aValue)
@@ -717,25 +717,25 @@ XULTextFieldAccessible::Value(nsString&
nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
if (menuList)
menuList->GetLabel(aValue);
}
void
XULTextFieldAccessible::ApplyARIAState(PRUint64* aState) const
{
- nsHyperTextAccessibleWrap::ApplyARIAState(aState);
+ HyperTextAccessibleWrap::ApplyARIAState(aState);
aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState);
}
PRUint64
XULTextFieldAccessible::NativeState()
{
- PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
+ PRUint64 state = HyperTextAccessibleWrap::NativeState();
nsCOMPtr<nsIContent> inputField(GetInputField());
NS_ENSURE_TRUE(inputField, state);
// Create a temporary accessible from the HTML text field to get
// the accessible state from. Doesn't add to cache into document cache.
nsRefPtr<HTMLTextFieldAccessible> tempAccessible =
new HTMLTextFieldAccessible(inputField, mDoc);
@@ -841,17 +841,17 @@ XULTextFieldAccessible::CacheChildren()
nsAccTreeWalker walker(mDoc, inputContent, false);
Accessible* child = nsnull;
while ((child = walker.NextChild()) && AppendChild(child));
}
////////////////////////////////////////////////////////////////////////////////
-// XULTextFieldAccessible: nsHyperTextAccessible protected
+// XULTextFieldAccessible: HyperTextAccessible protected
already_AddRefed<nsFrameSelection>
XULTextFieldAccessible::FrameSelection()
{
nsCOMPtr<nsIContent> inputContent(GetInputField());
nsIFrame* frame = inputContent->GetPrimaryFrame();
return frame ? frame->GetFrameSelection() : nsnull;
}
--- a/accessible/src/xul/XULFormControlAccessible.h
+++ b/accessible/src/xul/XULFormControlAccessible.h
@@ -4,17 +4,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MOZILLA_A11Y_XULFormControlAccessible_H_
#define MOZILLA_A11Y_XULFormControlAccessible_H_
// NOTE: alphabetically ordered
#include "AccessibleWrap.h"
#include "FormControlAccessible.h"
-#include "nsHyperTextAccessibleWrap.h"
+#include "HyperTextAccessibleWrap.h"
#include "XULSelectControlAccessible.h"
namespace mozilla {
namespace a11y {
/**
* Used for XUL progressmeter element.
*/
@@ -208,47 +208,47 @@ public:
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
};
/**
* Used for XUL textbox element.
*/
-class XULTextFieldAccessible : public nsHyperTextAccessibleWrap
+class XULTextFieldAccessible : public HyperTextAccessibleWrap
{
public:
enum { eAction_Click = 0 };
XULTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
NS_IMETHOD DoAction(PRUint8 index);
- // nsHyperTextAccessible
+ // HyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// Accessible
virtual void Value(nsString& aValue);
virtual void ApplyARIAState(PRUint64* aState) const;
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
virtual bool CanHaveAnonChildren();
// ActionAccessible
virtual PRUint8 ActionCount();
protected:
// Accessible
virtual void CacheChildren();
- // nsHyperTextAccessible
+ // HyperTextAccessible
virtual already_AddRefed<nsFrameSelection> FrameSelection();
// nsXULTextFieldAccessible
already_AddRefed<nsIContent> GetInputField() const;
};
} // namespace a11y
} // namespace mozilla
--- a/accessible/src/xul/nsXULListboxAccessible.cpp
+++ b/accessible/src/xul/nsXULListboxAccessible.cpp
@@ -921,25 +921,25 @@ nsXULListitemAccessible::ContainerWidget
////////////////////////////////////////////////////////////////////////////////
// nsXULListCellAccessible
////////////////////////////////////////////////////////////////////////////////
nsXULListCellAccessible::
nsXULListCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(nsXULListCellAccessible,
- nsHyperTextAccessible,
+ HyperTextAccessible,
nsIAccessibleTableCell)
////////////////////////////////////////////////////////////////////////////////
// nsXULListCellAccessible: nsIAccessibleTableCell implementation
NS_IMETHODIMP
nsXULListCellAccessible::GetTable(nsIAccessibleTable **aTable)
{
--- a/accessible/src/xul/nsXULListboxAccessible.h
+++ b/accessible/src/xul/nsXULListboxAccessible.h
@@ -130,17 +130,17 @@ protected:
private:
bool mIsCheckbox;
};
/**
* Class represents xul:listcell.
*/
-class nsXULListCellAccessible : public nsHyperTextAccessibleWrap,
+class nsXULListCellAccessible : public HyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsXULListCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
--- a/accessible/src/xul/nsXULTextAccessible.cpp
+++ b/accessible/src/xul/nsXULTextAccessible.cpp
@@ -24,17 +24,17 @@
using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsXULTextAccessible
////////////////////////////////////////////////////////////////////////////////
nsXULTextAccessible::
nsXULTextAccessible(nsIContent* aContent, DocAccessible* aDoc) :
- nsHyperTextAccessibleWrap(aContent, aDoc)
+ HyperTextAccessibleWrap(aContent, aDoc)
{
}
nsresult
nsXULTextAccessible::GetNameInternal(nsAString& aName)
{
// if the value attr doesn't exist, the screen reader must get the accessible text
// from the accessible text interface or from the children
@@ -48,23 +48,23 @@ nsXULTextAccessible::NativeRole()
return roles::LABEL;
}
PRUint64
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();
if (parent && parent->Tag() == nsGkAtoms::caption) {
Accessible* parent = Parent();
if (parent && parent->Role() == roles::GROUPING)
rel.AppendTarget(parent);
}
@@ -102,22 +102,22 @@ nsXULTooltipAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
// nsXULLinkAccessible
////////////////////////////////////////////////////////////////////////////////
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)
////////////////////////////////////////////////////////////////////////////////
// nsXULLinkAccessible. nsIAccessible
void
nsXULLinkAccessible::Value(nsString& aValue)
{
--- a/accessible/src/xul/nsXULTextAccessible.h
+++ b/accessible/src/xul/nsXULTextAccessible.h
@@ -1,23 +1,23 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 _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);
// Accessible
virtual nsresult GetNameInternal(nsAString& aName);
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
@@ -33,17 +33,17 @@ class nsXULTooltipAccessible : public ns
public:
nsXULTooltipAccessible(nsIContent* aContent, DocAccessible* aDoc);
// Accessible
virtual mozilla::a11y::role NativeRole();
virtual PRUint64 NativeState();
};
-class nsXULLinkAccessible : public nsHyperTextAccessibleWrap
+class nsXULLinkAccessible : public HyperTextAccessibleWrap
{
public:
nsXULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
// nsIAccessible
--- a/accessible/tests/mochitest/role/test_general.html
+++ b/accessible/tests/mochitest/role/test_general.html
@@ -71,17 +71,17 @@
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=472326"
title="html:input of type "file" no longer rendered to screen readers">
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"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
title="Expose click action if mouseup and mousedown are registered">
Mozilla Bug 423409
</a>
<a target="_blank"