Closed
Bug 762038
Opened 12 years ago
Closed 12 years ago
get rid HyperTextAccessible CID
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: surkov, Assigned: drexler)
References
Details
Attachments
(3 files)
7.71 KB,
patch
|
tbsaunde
:
review+
surkov
:
feedback+
|
Details | Diff | Splinter Review |
8.42 KB,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
8.73 KB,
patch
|
Details | Diff | Splinter Review |
All instances like nsRefPtr<HyperTextAccessible> text(do_QueryObject(obj)); replace on nsRefPtr<Accessible> acc(do_QueryObject(obj)); HyperTextAccessible* text = acc->AsHyperText(); remove NS_HYPERTEXTACCESSIBLE_IMPL_CID and fix HyperTextAccessible::QueryInterface
Updated•12 years ago
|
Whiteboard: [good first bug][mentor=trev.saunders@gmail.com][lang=c++]
Assignee | ||
Comment 1•12 years ago
|
||
Locally tested and sent to try: https://tbpl.mozilla.org/?tree=Try&rev=1c1fbb2ad915
Assignee: nobody → andrew.quartey
Status: NEW → ASSIGNED
Attachment #633848 -
Flags: review?(surkov.alexander)
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 633848 [details] [diff] [review] patch Review of attachment 633848 [details] [diff] [review]: ----------------------------------------------------------------- looks ok ::: accessible/src/base/nsAccessiblePivot.cpp @@ +154,5 @@ > NS_ENSURE_TRUE(aStartOffset <= aEndOffset && > (aStartOffset >= 0 || (aStartOffset != -1 && aEndOffset != -1)), > NS_ERROR_INVALID_ARG); > + > + nsRefPtr<Accessible> acc(do_QueryObject(aTextAccessible)); technically it may be null so add a check please, if null return invalid arg @@ +170,5 @@ > mStartOffset = aStartOffset; > mEndOffset = aEndOffset; > > nsRefPtr<Accessible> oldPosition = mPosition.forget(); > + mPosition = do_QueryObject(newPosition); mPosition = newPosition should be enough
Attachment #633848 -
Flags: review?(trev.saunders)
Attachment #633848 -
Flags: review?(surkov.alexander)
Attachment #633848 -
Flags: feedback+
Comment 3•12 years ago
|
||
Comment on attachment 633848 [details] [diff] [review] patch >- >- nsRefPtr<HyperTextAccessible> newPosition = do_QueryObject(aTextAccessible); >+ you introduce trailing whitespace here too.
Attachment #633848 -
Flags: review?(trev.saunders) → review+
Assignee | ||
Comment 4•12 years ago
|
||
fixed the nits and the Mac OS QI call failure for a HyperTextAccessible initialization i talked about in IRC. File in question is mozTextAccessible.mm
Attachment #634302 -
Flags: review?(trev.saunders)
Comment 5•12 years ago
|
||
Comment on attachment 634302 [details] [diff] [review] updated_patch >+ nsRefPtr<Accessible> acc(do_QueryObject(aTextAccessible)); >+ if (!acc) >+ return NS_ERROR_INVALID_ARG; >+ HyperTextAccessible* newPosition = acc->AsHyperText(); nit, blank line after return > if ((self = [super initWithAccessible:accessible])) { >- CallQueryInterface(accessible, &mGeckoTextAccessible); >+ mGeckoTextAccessible = accessible->AsHyperText(); so, this code is crazy, but I hope there is now an unmatched Release() somewhere. The easiest fix is probably to just NS_IF_ADDREF() on mGeckoTextAccessible, but that's really broken and would add to the pile ofthings that need to be fixed here. I suspect the correct fix is to change NS_IF_RELEASE() in expire() in this file to mGeckoTextAccessible = nsnull, but I'm not sure that's correct though it seems more sane than what we have now, and is atleast a step in the right direction.
Attachment #634302 -
Flags: review?(trev.saunders) → review+
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #5) Fixed nits and set mGeckoTextAccessible = nsnull in expire().
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b17e673803b4
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•