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)
Core
Disability Access APIs
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)
4.58 KB,
patch
|
surkov
:
feedback+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•12 years ago
|
||
I'm taking it !
Assignee | ||
Comment 2•12 years ago
|
||
The build seems ok but I don't know if there are any tests I should run !
Attachment #726577 -
Flags: review?
Reporter | ||
Comment 3•12 years ago
|
||
(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
Assignee | ||
Comment 4•12 years ago
|
||
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 !
Reporter | ||
Comment 5•12 years ago
|
||
(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()
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #726577 -
Attachment is obsolete: true
Attachment #726577 -
Flags: review?
Attachment #730895 -
Flags: review?
Reporter | ||
Comment 7•12 years ago
|
||
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)
Reporter | ||
Updated•12 years ago
|
Assignee: nobody → s
Reporter | ||
Updated•12 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 8•12 years ago
|
||
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+
Reporter | ||
Comment 9•12 years ago
|
||
(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)
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #730895 -
Attachment is obsolete: true
Attachment #733746 -
Flags: checkin?(surkov.alexander)
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #733747 -
Flags: review?(surkov.alexander)
Assignee | ||
Updated•12 years ago
|
Attachment #733746 -
Attachment is obsolete: true
Attachment #733746 -
Flags: checkin?(surkov.alexander)
Reporter | ||
Comment 12•12 years ago
|
||
Comment on attachment 733747 [details] [diff] [review]
patch
I will land it (sent to try server)
Attachment #733747 -
Flags: review?(surkov.alexander) → feedback+
Reporter | ||
Comment 13•12 years ago
|
||
Keywords: checkin-needed
Comment 14•12 years ago
|
||
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.
Description
•