nsHyperTextAccessible::GetDOMPointByFrameOffset should take nsAccessible*

RESOLVED FIXED in mozilla14

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: surkov, Assigned: maxli)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug][mentor=trev.saunders@gmail.com][lang=c++])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
1) replace nsIAccessible to nsAccessible in GetDOMPointByFrameOffset (http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHyperTextAccessible.h#393)

2) replace the following block in nsHyperTextAccessible::GetDOMPointByFrameOffset:

nsCOMPtr<nsIDOMNode> DOMNode;
aAccessible->GetDOMNode(getter_AddRefs(DOMNode));
nsCOMPtr<nsIContent> content(do_QueryInterface(DOMNode));
NS_ENSURE_STATE(content);

nsCOMPtr<nsIContent> parent(content->GetParent());
NS_ENSURE_STATE(parent);

to

NS_ASSERTION(aAccessible->IsDoc(), "Shouldn't be called on document accessible!");

nsIContent* content = aAccessible->GetContent();
NS_ASSERTION(content, "Shouldn't operate on defunct accessible!");

nsIContent* parentContent = content->GetParent();
(Assignee)

Comment 1

5 years ago
Created attachment 615091 [details] [diff] [review]
Patch (v1)
Assignee: nobody → maxli
Attachment #615091 - Flags: review?(trev.saunders)
Comment on attachment 615091 [details] [diff] [review]
Patch (v1)

> nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame *aFrame,
>                                                 PRInt32 aOffset,
>-                                                nsIAccessible *aAccessible,
>+                                                nsAccessible *aAccessible,

type* name here and below.

>+    NS_ASSERTION(aAccessible->IsDoc(), 
>+                 "Shouldn't be called on document accessible!");

that should be !aAccessible->IsDoc()
Attachment #615091 - Flags: review?(trev.saunders)
(Assignee)

Comment 3

5 years ago
Created attachment 615100 [details] [diff] [review]
Patch (v2)
Attachment #615091 - Attachment is obsolete: true
Attachment #615100 - Flags: review?(trev.saunders)
Attachment #615100 - Flags: review?(trev.saunders) → review+
(Reporter)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/eae5257fcaca
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/eae5257fcaca
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.