Closed Bug 257737 Opened 20 years ago Closed 20 years ago

[ATK] Implement getting BOUNDARY_WORD_END of nsAccessibleText

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Louie.Zhao, Assigned: Louie.Zhao)

References

Details

(Keywords: access)

Attachments

(1 file)

Getting BOUNDARY_WORD_END in "GetTExtAtOffset" of nsAccessibleText hasn't been implmented, which is needed by GOK to get the name of inputbox (both XUL and HTML) .
Attached patch patch v1 (deleted) — Splinter Review
Attachment #157688 - Flags: review?(aaronleventhal)
Attachment #157688 - Flags: review?(aaronleventhal) → review?(pkwarren)
Comment on attachment 157688 [details] [diff] [review] patch v1 >+ PRUnichar prevChar, offsetChar; >+ if (aOffset > 0) >+ GetCharacterAtOffset(aOffset - 1, &prevChar); >+ nsresult rv = GetCharacterAtOffset(aOffset, &offsetChar); >+ NS_ENSURE_SUCCESS(rv, rv); >+ PRBool isPrevEmpty = prevChar == ' ' || prevChar == '\t' || prevChar == '\n'; prevChar could be used unitialized here. >+ PRInt32 stepBackwardCount = 0; // Times of move backward to find the word(e.g. "AB_") start boundary ..... >+ else { >+ if (isPrevEmpty) { >+ if (isOffsetEmpty) >+ stepBackwardCount = 2; >+ else >+ stepBackwardCount = 0; Setting stepBackwardCount to zero here seems unnecessary. >+ GetCurrectOffset(aClosure, aDomSel, aStartOffset); I know that this function was not added in this patch, but don't you think this function should be named "GetCurrentOffset" instead of "GetCurrectOffset"? The rest of the code seems OK to me. r=pkwarren with these changes
Attachment #157688 - Flags: review?(pkwarren) → review+
Blocks: 263575
Attachment #157688 - Flags: superreview?(darin)
Comment on attachment 157688 [details] [diff] [review] patch v1 >Index: src/atk/nsAccessibleText.cpp >+ if (isPrevEmpty) { >+ if (isOffsetEmpty) >+ stepBackwardCount = 2; >+ else >+ stepBackwardCount = 0; >+ } >+ else >+ stepBackwardCount = 1; or this? if (!isPrevEmpty) stepBackwardCount = 1; else if (isOffsetEmpty) stepBackwardCount = 2; else stepBackwardCount = 0; sr=darin
Attachment #157688 - Flags: superreview?(darin) → superreview+
Checking in nsAccessibleText.cpp; /cvsroot/mozilla/accessible/src/atk/nsAccessibleText.cpp,v <-- nsAccessibleText.cpp new revision: 1.22; previous revision: 1.21 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: