Closed
Bug 166319
Opened 23 years ago
Closed 22 years ago
support getCharacterExtents for nsIAccessibleText
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: yuanyi21, Assigned: simford)
References
Details
Attachments
(2 files, 1 obsolete file)
6.20 KB,
patch
|
yuanyi21
:
review+
Henry.Jia
:
superreview+
|
Details | Diff | Splinter Review |
6.21 KB,
patch
|
Details | Diff | Splinter Review |
Gnopernicus needs these two functions.
*** Bug 193818 has been marked as a duplicate of this bug. ***
simford, could you spend some time on this? getCharacterExtents is very useful
for Gnopernicus.
Assignee: kyle.yuan → Simford.Dong
Attachment #115460 -
Flags: review?(kyle.yuan)
Summary: support getCharacterExtents and getAttributeRange for nsIAccessibleText → support getCharacterExtents for nsIAccessibleText
Comment on attachment 115460 [details] [diff] [review]
patch
Good, work, Simford, some minor changes needed though.
>+ nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
>+ if (!doc)
>+ return NS_ERROR_FAILURE;
here (and in later parts), using NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE) is
better.
>+ nsRect aRect;
don't use a prefix for a local variable, it suppose to be an argument.
>+ const nsStyleFont *font = (const nsStyleFont*)
>+ sc->GetStyleData(eStyleStruct_Font);
merge the two lines into one.
>+ if (visibility && visibility->mLanguage) {
>+ visibility->mLanguage->GetLanguageGroup(getter_AddRefs(langGroup));
>+ }
please make sure the style of 1-line statement is consistent: either all in
brackets or not. I prefer the former.
>+ nscoord beforeWidth;
>+ if (NS_SUCCEEDED(GetText(0, aOffset, beforeString)) &&
>+ NS_SUCCEEDED(rc->GetWidth(beforeString, beforeWidth))){
please make sure always put a space before the '{'
Attachment #115460 -
Flags: review?(kyle.yuan) → review-
Attachment #115460 -
Attachment is obsolete: true
Attachment #115460 -
Flags: review-
Attachment #115469 -
Flags: review?(kyle.yuan)
Attachment #115469 -
Flags: review?(kyle.yuan) → review+
Attachment #115469 -
Flags: superreview?(Henry.Jia)
Comment on attachment 115469 [details] [diff] [review]
new patch due to comment #4
Seems ok. sr=Henry
Attachment #115469 -
Flags: superreview?(Henry.Jia) → superreview+
checked in!
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 10•22 years ago
|
||
*** Bug 201315 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•