Bug 763146 - put TextUpdater into a11y namespace, r=surkov

This commit is contained in:
Mark Capella 2012-06-10 18:18:27 -04:00
parent 846a6a41bf
commit 89f13eb656
2 changed files with 19 additions and 9 deletions

View File

@ -3,12 +3,15 @@
* 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_
#ifndef mozilla_a11y_TextUpdater_h__
#define mozilla_a11y_TextUpdater_h__
#include "AccEvent.h"
#include "HyperTextAccessible.h"
namespace mozilla {
namespace a11y {
/**
* Used to find a difference between old and new text and fire text change
* events.
@ -19,13 +22,11 @@ public:
/**
* Start text of the text leaf update.
*/
static void Run(DocAccessible* aDocument,
mozilla::a11y::TextLeafAccessible* aTextLeaf,
static void Run(DocAccessible* aDocument, TextLeafAccessible* aTextLeaf,
const nsAString& aNewText);
private:
TextUpdater(DocAccessible* aDocument,
mozilla::a11y::TextLeafAccessible* aTextLeaf) :
TextUpdater(DocAccessible* aDocument, TextLeafAccessible* aTextLeaf) :
mDocument(aDocument), mTextLeaf(aTextLeaf), mHyperText(nsnull),
mTextOffset(-1) { }
@ -84,9 +85,12 @@ private:
private:
DocAccessible* mDocument;
mozilla::a11y::TextLeafAccessible* mTextLeaf;
TextLeafAccessible* mTextLeaf;
HyperTextAccessible* mHyperText;
PRInt32 mTextOffset;
};
} // namespace a11y
} // namespace mozilla
#endif

View File

@ -4,12 +4,15 @@
* 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 _XULSelectControlAccessible_H_
#define _XULSelectControlAccessible_H_
#ifndef mozilla_a11y_XULSelectControlAccessible_h__
#define mozilla_a11y_XULSelectControlAccessible_h__
#include "AccessibleWrap.h"
#include "nsIDOMXULSelectCntrlEl.h"
namespace mozilla {
namespace a11y {
/**
* The basic implementation of accessible selection for XUL select controls.
*/
@ -43,5 +46,8 @@ protected:
nsCOMPtr<nsIDOMXULSelectControlElement> mSelectControl;
};
} // namespace a11y
} // namespace mozilla
#endif