Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim:expandtab:shiftwidth=2:tabstop=2: |
michael@0 | 3 | */ |
michael@0 | 4 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ |
michael@0 | 9 | #define mozilla_a11y_HyperTextAccessibleWrap_h__ |
michael@0 | 10 | |
michael@0 | 11 | #include "HyperTextAccessible.h" |
michael@0 | 12 | #include "ia2AccessibleEditableText.h" |
michael@0 | 13 | #include "ia2AccessibleHypertext.h" |
michael@0 | 14 | #include "IUnknownImpl.h" |
michael@0 | 15 | |
michael@0 | 16 | namespace mozilla { |
michael@0 | 17 | template<class T> class StaticAutoPtr; |
michael@0 | 18 | template<class T> class StaticRefPtr; |
michael@0 | 19 | |
michael@0 | 20 | namespace a11y { |
michael@0 | 21 | |
michael@0 | 22 | class HyperTextAccessibleWrap : public HyperTextAccessible, |
michael@0 | 23 | public ia2AccessibleHypertext, |
michael@0 | 24 | public ia2AccessibleEditableText |
michael@0 | 25 | { |
michael@0 | 26 | public: |
michael@0 | 27 | HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) : |
michael@0 | 28 | HyperTextAccessible(aContent, aDoc) {} |
michael@0 | 29 | |
michael@0 | 30 | // IUnknown |
michael@0 | 31 | DECL_IUNKNOWN_INHERITED |
michael@0 | 32 | |
michael@0 | 33 | // nsISupports |
michael@0 | 34 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 35 | |
michael@0 | 36 | // Accessible |
michael@0 | 37 | virtual nsresult HandleAccEvent(AccEvent* aEvent); |
michael@0 | 38 | |
michael@0 | 39 | protected: |
michael@0 | 40 | virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText, |
michael@0 | 41 | uint32_t *aStartOffset, |
michael@0 | 42 | uint32_t *aEndOffset); |
michael@0 | 43 | |
michael@0 | 44 | static StaticRefPtr<Accessible> sLastTextChangeAcc; |
michael@0 | 45 | static StaticAutoPtr<nsString> sLastTextChangeString; |
michael@0 | 46 | static bool sLastTextChangeWasInsert; |
michael@0 | 47 | static uint32_t sLastTextChangeStart; |
michael@0 | 48 | static uint32_t sLastTextChangeEnd; |
michael@0 | 49 | |
michael@0 | 50 | friend void PlatformInit(); |
michael@0 | 51 | }; |
michael@0 | 52 | |
michael@0 | 53 | } // namespace a11y |
michael@0 | 54 | } // namespace mozilla |
michael@0 | 55 | |
michael@0 | 56 | #endif |