Closed Bug 850987 Opened 12 years ago Closed 12 years ago

RenderedToContentOffset/ContentToRenderedOffset should return an offset unchanged for HTMLTextFieldAccessible

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: surkov, Assigned: s)

References

(Blocks 1 open bug)

Details

(Whiteboard: [mentor=surkov.alexander@gmail.com][lang=c++])

Attachments

(1 file, 3 obsolete files)

spun off bug 770564 comment #7: rendered text equals to content text in textareas and inputs thus RenderedToContentOffset/ContentToRenderedOffset can be trivial and return the given offset (see accessible/src/generic/HyperTextAccessbile.h/cpp). You should add IsTextField() method to Accessible.h and add eHTMLTextFieldType from AccTypes.h to HTMLTextFieldAccessible
I'm taking it !
Attached patch patch (obsolete) — Splinter Review
The build seems ok but I don't know if there are any tests I should run !
Attachment #726577 - Flags: review?
(In reply to Alexandre BM (:rednaks) from comment #2) > Created attachment 726577 [details] [diff] [review] > patch > > The build seems ok but I don't know if there are any tests I should run ! the patch doesn't address the first paragraph of comment #0
Yes ! Sorry I missed to mention it ! I haven't very much time so it was a quick patch :) So can you tell me more about the first paragraph ? should I override the two methods in HTMLTextFieldAccessible or what ? Thanks !
(In reply to Alexandre BM (:rednaks) from comment #4) > Yes ! Sorry I missed to mention it ! I haven't very much time so it was a > quick patch :) > So can you tell me more about the first paragraph ? should I override the > two methods in HTMLTextFieldAccessible or what ? I think you can have one version at HyperTextAccessible that check if that's a IsTextField()
Attached patch patch V2 (obsolete) — Splinter Review
Attachment #726577 - Attachment is obsolete: true
Attachment #726577 - Flags: review?
Attachment #730895 - Flags: review?
Comment on attachment 730895 [details] [diff] [review] patch V2 Review of attachment 730895 [details] [diff] [review]: ----------------------------------------------------------------- you need to ask somebody for review
Attachment #730895 - Flags: review? → review?(trev.saunders)
Assignee: nobody → s
OS: Mac OS X → All
Hardware: x86 → All
Comment on attachment 730895 [details] [diff] [review] patch V2 >@@ -2005,16 +2005,22 @@ > uint32_t* aRenderedOffset) > { > if (!aFrame) { > // Current frame not rendered -- this can happen if text is set on > // something with display: none > *aRenderedOffset = 0; > return NS_OK; > } >+ >+ if(IsTextField()) { >+ *aRenderedOffset = aContentOffset; so, what happens if I have <textfield>foo<div>bar</div></textfield> ? I suspect even if we don't optimize that this might be fine. > nsresult > HyperTextAccessible::RenderedToContentOffset(nsIFrame* aFrame, uint32_t aRenderedOffset, > int32_t* aContentOffset) > { >+ if(IsTextField()) { >+ *aContentOffset = aRenderedOffset; same A>+++ b/accessible/src/generic/HyperTextAccessible.h Thu Mar 28 22:44:00 2013 +0100 >@@ -55,21 +55,21 @@ >- static nsresult ContentToRenderedOffset(nsIFrame *aFrame, int32_t aContentOffset, >+ nsresult ContentToRenderedOffset(nsIFrame *aFrame, int32_t aContentOffset, > uint32_t *aRenderedOffset); nit, fix alignment of second line >- static nsresult RenderedToContentOffset(nsIFrame *aFrame, uint32_t aRenderedOffset, >+ nsresult RenderedToContentOffset(nsIFrame *aFrame, uint32_t aRenderedOffset, > int32_t *aContentOffset); same
Attachment #730895 - Flags: review?(trev.saunders) → review+
(In reply to Trevor Saunders (:tbsaunde) from comment #8) > so, what happens if I have <textfield>foo<div>bar</div></textfield> ? I > suspect even if we don't optimize that this might be fine. textarea treats all content as CDATA so it displays it as a text. > A>+++ b/accessible/src/generic/HyperTextAccessible.h Thu Mar 28 22:44:00 > 2013 +0100 > >@@ -55,21 +55,21 @@ > >- static nsresult ContentToRenderedOffset(nsIFrame *aFrame, int32_t aContentOffset, > >+ nsresult ContentToRenderedOffset(nsIFrame *aFrame, int32_t aContentOffset, > > uint32_t *aRenderedOffset); > > nit, fix alignment of second line > > >- static nsresult RenderedToContentOffset(nsIFrame *aFrame, uint32_t aRenderedOffset, > >+ nsresult RenderedToContentOffset(nsIFrame *aFrame, uint32_t aRenderedOffset, > > int32_t *aContentOffset); > > same Alexandre, please fix these two and upload a patch (add checkin-needed keyword)
Attached patch patch V3 (obsolete) — Splinter Review
Attachment #730895 - Attachment is obsolete: true
Attachment #733746 - Flags: checkin?(surkov.alexander)
Keywords: checkin-needed
Attached patch patchSplinter Review
Attachment #733747 - Flags: review?(surkov.alexander)
Attachment #733746 - Attachment is obsolete: true
Attachment #733746 - Flags: checkin?(surkov.alexander)
Comment on attachment 733747 [details] [diff] [review] patch I will land it (sent to try server)
Attachment #733747 - Flags: review?(surkov.alexander) → feedback+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: