diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-19 13:46:04 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-19 13:46:04 +0100 |
commit | 616475a0c1109460fe42045ca3380f4d8f0752cd (patch) | |
tree | f28d81584e97fa7b988cef20969cc6046a00c62a /accessible/windows/ia2/ia2AccessibleText.cpp | |
parent | a14048f0a23b0e50576ab3b5e87aebd616b35d43 (diff) | |
download | uxp-616475a0c1109460fe42045ca3380f4d8f0752cd.tar.gz |
Remove SEH try blocks from a11y code.
Diffstat (limited to 'accessible/windows/ia2/ia2AccessibleText.cpp')
-rw-r--r-- | accessible/windows/ia2/ia2AccessibleText.cpp | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/accessible/windows/ia2/ia2AccessibleText.cpp b/accessible/windows/ia2/ia2AccessibleText.cpp index 7ac766f300..86b3abdf61 100644 --- a/accessible/windows/ia2/ia2AccessibleText.cpp +++ b/accessible/windows/ia2/ia2AccessibleText.cpp @@ -28,8 +28,6 @@ bool ia2AccessibleText::sLastTextChangeWasInsert = false; STDMETHODIMP ia2AccessibleText::addSelection(long aStartOffset, long aEndOffset) { - A11Y_TRYBLOCK_BEGIN - MOZ_ASSERT(!HyperTextProxyFor(this)); HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this); @@ -38,16 +36,12 @@ ia2AccessibleText::addSelection(long aStartOffset, long aEndOffset) return textAcc->AddToSelection(aStartOffset, aEndOffset) ? S_OK : E_INVALIDARG; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_attributes(long aOffset, long *aStartOffset, long *aEndOffset, BSTR *aTextAttributes) { - A11Y_TRYBLOCK_BEGIN - if (!aStartOffset || !aEndOffset || !aTextAttributes) return E_INVALIDARG; @@ -74,15 +68,11 @@ ia2AccessibleText::get_attributes(long aOffset, long *aStartOffset, *aEndOffset = endOffset; return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_caretOffset(long *aOffset) { - A11Y_TRYBLOCK_BEGIN - if (!aOffset) return E_INVALIDARG; @@ -97,8 +87,6 @@ ia2AccessibleText::get_caretOffset(long *aOffset) *aOffset = textAcc->CaretOffset(); return *aOffset != -1 ? S_OK : S_FALSE; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -107,8 +95,6 @@ ia2AccessibleText::get_characterExtents(long aOffset, long* aX, long* aY, long* aWidth, long* aHeight) { - A11Y_TRYBLOCK_BEGIN - if (!aX || !aY || !aWidth || !aHeight) return E_INVALIDARG; *aX = *aY = *aWidth = *aHeight = 0; @@ -129,15 +115,11 @@ ia2AccessibleText::get_characterExtents(long aOffset, *aWidth = rect.width; *aHeight = rect.height; return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_nSelections(long* aNSelections) { - A11Y_TRYBLOCK_BEGIN - if (!aNSelections) return E_INVALIDARG; *aNSelections = 0; @@ -151,8 +133,6 @@ ia2AccessibleText::get_nSelections(long* aNSelections) *aNSelections = textAcc->SelectionCount(); return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -160,8 +140,6 @@ ia2AccessibleText::get_offsetAtPoint(long aX, long aY, enum IA2CoordinateType aCoordType, long* aOffset) { - A11Y_TRYBLOCK_BEGIN - if (!aOffset) return E_INVALIDARG; *aOffset = 0; @@ -179,16 +157,12 @@ ia2AccessibleText::get_offsetAtPoint(long aX, long aY, *aOffset = textAcc->OffsetAtPoint(aX, aY, geckoCoordType); return *aOffset == -1 ? S_FALSE : S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_selection(long aSelectionIndex, long* aStartOffset, long* aEndOffset) { - A11Y_TRYBLOCK_BEGIN - if (!aStartOffset || !aEndOffset) return E_INVALIDARG; *aStartOffset = *aEndOffset = 0; @@ -207,15 +181,11 @@ ia2AccessibleText::get_selection(long aSelectionIndex, long* aStartOffset, *aStartOffset = startOffset; *aEndOffset = endOffset; return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_text(long aStartOffset, long aEndOffset, BSTR* aText) { - A11Y_TRYBLOCK_BEGIN - if (!aText) return E_INVALIDARG; @@ -239,8 +209,6 @@ ia2AccessibleText::get_text(long aStartOffset, long aEndOffset, BSTR* aText) *aText = ::SysAllocStringLen(text.get(), text.Length()); return *aText ? S_OK : E_OUTOFMEMORY; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -249,8 +217,6 @@ ia2AccessibleText::get_textBeforeOffset(long aOffset, long* aStartOffset, long* aEndOffset, BSTR* aText) { - A11Y_TRYBLOCK_BEGIN - if (!aStartOffset || !aEndOffset || !aText) return E_INVALIDARG; @@ -287,8 +253,6 @@ ia2AccessibleText::get_textBeforeOffset(long aOffset, *aText = ::SysAllocStringLen(text.get(), text.Length()); return *aText ? S_OK : E_OUTOFMEMORY; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -297,8 +261,6 @@ ia2AccessibleText::get_textAfterOffset(long aOffset, long* aStartOffset, long* aEndOffset, BSTR* aText) { - A11Y_TRYBLOCK_BEGIN - if (!aStartOffset || !aEndOffset || !aText) return E_INVALIDARG; @@ -335,8 +297,6 @@ ia2AccessibleText::get_textAfterOffset(long aOffset, *aText = ::SysAllocStringLen(text.get(), text.Length()); return *aText ? S_OK : E_OUTOFMEMORY; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -345,8 +305,6 @@ ia2AccessibleText::get_textAtOffset(long aOffset, long* aStartOffset, long* aEndOffset, BSTR* aText) { - A11Y_TRYBLOCK_BEGIN - if (!aStartOffset || !aEndOffset || !aText) return E_INVALIDARG; @@ -381,15 +339,11 @@ ia2AccessibleText::get_textAtOffset(long aOffset, *aText = ::SysAllocStringLen(text.get(), text.Length()); return *aText ? S_OK : E_OUTOFMEMORY; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::removeSelection(long aSelectionIndex) { - A11Y_TRYBLOCK_BEGIN - MOZ_ASSERT(!HyperTextProxyFor(this)); HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this); @@ -398,15 +352,11 @@ ia2AccessibleText::removeSelection(long aSelectionIndex) return textAcc->RemoveFromSelection(aSelectionIndex) ? S_OK : E_INVALIDARG; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::setCaretOffset(long aOffset) { - A11Y_TRYBLOCK_BEGIN - MOZ_ASSERT(!HyperTextProxyFor(this)); HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this); @@ -418,16 +368,12 @@ ia2AccessibleText::setCaretOffset(long aOffset) textAcc->SetCaretOffset(aOffset); return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::setSelection(long aSelectionIndex, long aStartOffset, long aEndOffset) { - A11Y_TRYBLOCK_BEGIN - MOZ_ASSERT(!HyperTextProxyFor(this)); HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this); @@ -436,15 +382,11 @@ ia2AccessibleText::setSelection(long aSelectionIndex, long aStartOffset, return textAcc->SetSelectionBoundsAt(aSelectionIndex, aStartOffset, aEndOffset) ? S_OK : E_INVALIDARG; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_nCharacters(long* aNCharacters) { - A11Y_TRYBLOCK_BEGIN - if (!aNCharacters) return E_INVALIDARG; *aNCharacters = 0; @@ -457,16 +399,12 @@ ia2AccessibleText::get_nCharacters(long* aNCharacters) *aNCharacters = textAcc->CharacterCount(); return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::scrollSubstringTo(long aStartIndex, long aEndIndex, enum IA2ScrollType aScrollType) { - A11Y_TRYBLOCK_BEGIN - MOZ_ASSERT(!HyperTextProxyFor(this)); HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this); @@ -478,8 +416,6 @@ ia2AccessibleText::scrollSubstringTo(long aStartIndex, long aEndIndex, textAcc->ScrollSubstringTo(aStartIndex, aEndIndex, aScrollType); return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP @@ -487,8 +423,6 @@ ia2AccessibleText::scrollSubstringToPoint(long aStartIndex, long aEndIndex, enum IA2CoordinateType aCoordType, long aX, long aY) { - A11Y_TRYBLOCK_BEGIN - uint32_t geckoCoordType = (aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE) ? nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE : nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE; @@ -505,28 +439,18 @@ ia2AccessibleText::scrollSubstringToPoint(long aStartIndex, long aEndIndex, textAcc->ScrollSubstringToPoint(aStartIndex, aEndIndex, geckoCoordType, aX, aY); return S_OK; - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_newText(IA2TextSegment *aNewText) { - A11Y_TRYBLOCK_BEGIN - return GetModifiedText(true, aNewText); - - A11Y_TRYBLOCK_END } STDMETHODIMP ia2AccessibleText::get_oldText(IA2TextSegment *aOldText) { - A11Y_TRYBLOCK_BEGIN - return GetModifiedText(false, aOldText); - - A11Y_TRYBLOCK_END } // ia2AccessibleText |