Last Comment Bug 762396 - replace do_QueryObject() with static cast in CAccessibleEditableText
: replace do_QueryObject() with static cast in CAccessibleEditableText
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)
: mozilla16
Assigned To: Andrew Quartey [:drexler]
:
Mentors:
Depends on:
Blocks: 762038
  Show dependency treegraph
 
Reported: 2012-06-07 00:29 PDT by Trevor Saunders (:tbsaunde)
Modified: 2012-06-16 06:49 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (5.18 KB, patch)
2012-06-14 11:20 PDT, Andrew Quartey [:drexler]
no flags Details | Diff | Review
patch (9.29 KB, patch)
2012-06-14 18:29 PDT, Andrew Quartey [:drexler]
tbsaunde+mozbugs: review+
Details | Diff | Review
updated_patch (9.41 KB, patch)
2012-06-15 09:15 PDT, Andrew Quartey [:drexler]
no flags Details | Diff | Review

Description Trevor Saunders (:tbsaunde) 2012-06-07 00:29:38 PDT
similar to bug 762394
Comment 1 Andrew Quartey [:drexler] 2012-06-14 11:20:08 PDT
Created attachment 633201 [details] [diff] [review]
patch

passed all tests locally.
Comment 2 Trevor Saunders (:tbsaunde) 2012-06-14 14:49:22 PDT
Comment on attachment 633201 [details] [diff] [review]
patch

> #include "HyperTextAccessible.h"
>+#include "HyperTextAccessibleWrap.h"

the second neccessarily includes the first, so only include the second.

> CAccessibleEditableText::copyText(long aStartOffset, long aEndOffset)
> {
> __try {
>-  nsRefPtr<HyperTextAccessible> textAcc(do_QueryObject(this));
>-  if (textAcc->IsDefunct())
>+  HyperTextAccessible* ia2AccessibleText = static_cast<HyperTextAccessibleWrap*>(this);

uh, I meant rename the class, not the variables, so CAccessibleEditableText is what should be changed to ia2AccessibleEditableText


otherwise seems fine.
Comment 3 Andrew Quartey [:drexler] 2012-06-14 18:29:46 PDT
Created attachment 633351 [details] [diff] [review]
patch

Updated patch addressing comments.
Comment 4 Trevor Saunders (:tbsaunde) 2012-06-15 04:55:49 PDT
Comment on attachment 633351 [details] [diff] [review]
patch

>+ia2AccessibleEditableText::copyText(long aStartOffset, long aEndOffset)

nit, same issue here and below were you break alignment.
Comment 5 Andrew Quartey [:drexler] 2012-06-15 09:15:35 PDT
Created attachment 633550 [details] [diff] [review]
updated_patch

Updated patch addressing nits.
Comment 6 Geoff Lankow (:darktrojan) 2012-06-15 23:09:13 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/25ca50ce8653
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-06-16 06:49:46 PDT
https://hg.mozilla.org/mozilla-central/rev/25ca50ce8653

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