Closed
Bug 762394
Opened 12 years ago
Closed 12 years ago
replace do_QueryObject() with static cast in CAccessibleText
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: tbsaunde, Assigned: drexler)
References
Details
(Whiteboard: [good first bug][mentor=trev.saunders@gmail.com][lang=c++])
Attachments
(2 files, 1 obsolete file)
21.12 KB,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
22.49 KB,
patch
|
Details | Diff | Splinter Review |
nsRefPtr<HypertextAccessible> foo = do_QueryObject(this); should become HypertextAccessible* foo = static_cast<HypertextAccessibleWrap*>(this); also rename it to ia2Text
Reporter | ||
Comment 1•12 years ago
|
||
> also rename it to ia2Text
actually, ia2AccessibleText
Assignee | ||
Comment 2•12 years ago
|
||
passed tests locally.
Assignee: nobody → andrew.quartey
Status: NEW → ASSIGNED
Attachment #633202 -
Flags: review?(trev.saunders)
Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 633202 [details] [diff] [review] patch > #include "HyperTextAccessible.h" >+#include "HyperTextAccessibleWrap.h" HypertextAccessibleWrap.h is enough > { > __try { >- nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this)); >- if (textAcc->IsDefunct()) >+ HyperTextAccessible* ia2AccessibleText = static_cast<HyperTextAccessibleWrap*>(this); same as bug 762396 rename the class not variable names :) Sorry I wasn't clearer. otherwise this one seems fine too
Attachment #633202 -
Flags: review?(trev.saunders)
Assignee | ||
Comment 4•12 years ago
|
||
updated patch addressing comments.
Attachment #633202 -
Attachment is obsolete: true
Attachment #633349 -
Flags: review?(trev.saunders)
Reporter | ||
Comment 5•12 years ago
|
||
Comment on attachment 633349 [details] [diff] [review] patch ># HG changeset patch ># Parent e116a5da6cedfe7f980979005c5f4eaa4e0bfa4c ># User Andrew Quartey <andrew.quartey@gmail.com> >Bug 762394 - Replace do_QueryObject() with static_cast in CAccessibleText > >diff --git a/accessible/src/msaa/HyperTextAccessibleWrap.h b/accessible/src/msaa/HyperTextAccessibleWrap.h >--- a/accessible/src/msaa/HyperTextAccessibleWrap.h >+++ b/accessible/src/msaa/HyperTextAccessibleWrap.h >@@ -4,17 +4,17 @@ > /* 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/. */ > > #ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ > #define mozilla_a11y_HyperTextAccessibleWrap_h__ > > #include "HyperTextAccessible.h" >-#include "CAccessibleText.h" >+#include "ia2AccessibleText.h" > #include "CAccessibleEditableText.h" > #include "ia2AccessibleHyperText.h" you should keep them in order, but actually I don't think you need to include it here at all. > STDMETHODIMP >-CAccessibleText::get_attributes(long aOffset, long *aStartOffset, >+ia2AccessibleText::get_attributes(long aOffset, long *aStartOffset, > long *aEndOffset, BSTR *aTextAttributes) nit, you break alignment here, and other methods with args on a second line. > {
Attachment #633349 -
Flags: review?(trev.saunders) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Updated patch addressing nits.
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 7•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/400bc23212f7
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/400bc23212f7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in
before you can comment on or make changes to this bug.
Description
•