Last Comment Bug 740702 - nsHyperTextAccessible::GetDOMPointByFrameOffset should take nsAccessible*
: nsHyperTextAccessible::GetDOMPointByFrameOffset should take nsAccessible*
Status: RESOLVED FIXED
[good first bug][mentor=trev.saunders...
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Max Li [:maxli]
:
Mentors:
Depends on:
Blocks: dexpcoma11y
  Show dependency treegraph
 
Reported: 2012-03-29 21:38 PDT by alexander :surkov
Modified: 2012-04-16 08:34 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (3.08 KB, patch)
2012-04-14 17:34 PDT, Max Li [:maxli]
no flags Details | Diff | Review
Patch (v2) (3.46 KB, patch)
2012-04-14 19:27 PDT, Max Li [:maxli]
tbsaunde+mozbugs: review+
Details | Diff | Review

Description alexander :surkov 2012-03-29 21:38:47 PDT
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();
Comment 1 Max Li [:maxli] 2012-04-14 17:34:27 PDT
Created attachment 615091 [details] [diff] [review]
Patch (v1)
Comment 2 Trevor Saunders (:tbsaunde) 2012-04-14 18:44:08 PDT
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()
Comment 3 Max Li [:maxli] 2012-04-14 19:27:58 PDT
Created attachment 615100 [details] [diff] [review]
Patch (v2)
Comment 5 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-16 08:34:48 PDT
https://hg.mozilla.org/mozilla-central/rev/eae5257fcaca

Note You need to log in before you can comment on or make changes to this bug.