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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Louie.Zhao, Assigned: Louie.Zhao)
References
Details
(Keywords: access)
Attachments
(1 file)
(deleted),
patch
|
pkwarren
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
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) .
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #157688 -
Flags: review?(aaronleventhal)
Updated•20 years ago
|
Attachment #157688 -
Flags: review?(aaronleventhal) → review?(pkwarren)
Comment 2•20 years ago
|
||
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+
Updated•20 years ago
|
Attachment #157688 -
Flags: superreview?(darin)
Comment 3•20 years ago
|
||
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+
Comment 4•20 years ago
|
||
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.
Description
•