Closed Bug 767264 Opened 8 years ago Closed 8 years ago

remove uses of do_QueryObject() in CAccessibleHyperlink

Categories

(Core :: Disability Access APIs, defect)

All
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: tbsaunde, Assigned: capella)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

same as bugs 762394 accept you sttic cast to AccessibleWrap*
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Attached patch Patch (v1) (obsolete) — Splinter Review
First / quick try at this ....
Attachment #635671 - Flags: review?(trev.saunders)
Attached patch Patch (v2) (obsolete) — Splinter Review
Bah ... missed several nits...
Attachment #635671 - Attachment is obsolete: true
Attachment #635671 - Flags: review?(trev.saunders)
Attachment #635706 - Flags: review?(trev.saunders)
Comment on attachment 635706 [details] [diff] [review]
Patch (v2)

/src/msaa/ia2AccessibleHyperlink.cpp
>rename from accessible/src/msaa/CAccessibleHyperlink.cpp
>rename to accessible/src/msaa/ia2AccessibleHyperlink.cpp
>--- a/accessible/src/msaa/CAccessibleHyperlink.cpp
>+++ b/accessible/src/msaa/ia2AccessibleHyperlink.cpp
>@@ -1,53 +1,53 @@
> /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
> /* vim:expandtab:shiftwidth=2:tabstop=2:
>  */
> /* This Source Code Form is subject to the terms of the Mozilla Public
>  * License, v. 2.0. If a copy of the MPL was not distributed with this
>  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> 
>-#include "CAccessibleHyperlink.h"
>+#include "ia2AccessibleHyperlink.h"
> 
> #include "Accessible2.h"
> #include "AccessibleHyperlink.h"
> #include "AccessibleHyperlink_i.c"
> 
> #include "AccessibleWrap.h"
> #include "nsIWinAccessNode.h"

is that actually used?

>-CAccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
>+ia2AccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
> {
>   *ppv = NULL;
> 
>   if (IID_IAccessibleHyperlink == iid) {
>-    nsRefPtr<Accessible> thisObj = do_QueryObject(this);
>+    Accessible* thisObj = static_cast<AccessibleWrap*>(this);
>     if (!thisObj->IsLink())
>       return E_NOINTERFACE;

it seems you don't need the local variable.

>-CAccessibleHyperlink::get_anchor(long aIndex, VARIANT *aAnchor)
>+ia2AccessibleHyperlink::get_anchor(long aIndex, VARIANT* aAnchor)

type* name


I'm pretty sure this is fine, but it would be nice if David could tkae a glance and make sure I'm not missing something.
Attachment #635706 - Flags: review?(trev.saunders) → review+
Attached patch Patch (v3)Splinter Review
Nits addressed, and asking David to look this over as well ...
Attachment #635706 - Attachment is obsolete: true
Attachment #636020 - Flags: review?(dbolter)
Comment on attachment 636020 [details] [diff] [review]
Patch (v3)

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

looks fine - thanks. r=me
Attachment #636020 - Flags: review?(dbolter) → review+
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/49819cb04654
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Duplicate of this bug: 741702
You need to log in before you can comment on or make changes to this bug.