Last Comment Bug 741701 - CAccessibleHyperlink::get_anchor shouldn't use nsIWinAccessNode
: CAccessibleHyperlink::get_anchor shouldn't use nsIWinAccessNode
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: Mark Capella [:capella]
:
Mentors:
Depends on:
Blocks: 648267
  Show dependency treegraph
 
Reported: 2012-04-02 23:16 PDT by alexander :surkov
Modified: 2012-04-10 08:27 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (1.70 KB, patch)
2012-04-08 10:55 PDT, Mark Capella [:capella]
tbsaunde+mozbugs: review+
surkov.alexander: feedback+
Details | Diff | Splinter Review

Description alexander :surkov 2012-04-02 23:16:37 PDT
1) do nsAccessibleWrap* anchor = static_cast<nsAccessibleWrap*>(thisObj->AnchorAt(aIndex));
2) replace winAccessNode->QueryNativeInterface call to anchor->QueryInterface
Comment 1 Mark Capella [:capella] 2012-04-08 10:55:15 PDT
Created attachment 613191 [details] [diff] [review]
Patch (v1)

Quick patch ...
Comment 2 Trevor Saunders (:tbsaunde) 2012-04-08 12:08:38 PDT
Comment on attachment 613191 [details] [diff] [review]
Patch (v1)

> 
> #include "nsAccessible.h"
>+#include "nsAccessibleWrap.h"

nsAccessibleWrap.h needs to include nsAccessible.h so you could stop including nsAccessible.h directly, but no big deal either way.

otherwise this looks fine, but this is untested code that can be tricky so asking surkov to take a look too.
Comment 3 alexander :surkov 2012-04-08 23:22:35 PDT
Comment on attachment 613191 [details] [diff] [review]
Patch (v1)

Review of attachment 613191 [details] [diff] [review]:
-----------------------------------------------------------------

i'll fix those before landing

::: accessible/src/msaa/CAccessibleHyperlink.cpp
@@ +83,5 @@
>    if (aIndex < 0 || aIndex >= static_cast<long>(thisObj->AnchorCount()))
>      return E_INVALIDARG;
>  
> +  nsAccessibleWrap* anchor = static_cast<nsAccessibleWrap*>
> +                             (thisObj->AnchorAt(aIndex));

wrong indentation

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