nsIAccessibleText should use the text control specific selection functions instead of nsISelection

NEW
Unassigned

Status

()

9 years ago
7 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

(Blocks: 2 bugs)

Trunk
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
Using the specialized selection APIs for text controls will initialize the editor beforehand.  Currently, nsIAccessibleText seems to be using the document selection APIs, which is both wrong, and will not initialize the editor.

We need to switch to using those APIs (selectionStart and selectionEnd properties) in our nsIAccessibleText implementation.
Ehsan, what is specialized selection API?
(Reporter)

Comment 2

9 years ago
The following API:

nsITextContolFrame::SetSelectionStart
nsITextContolFrame::SetSelectionEnd
nsITextContolFrame::SetSelectionRange
nsITextContolFrame::GetSelectionRange

And also nsITextContolFrame::GetOwnedSelectionController if you need access to the selection controller used by the text control frame.
Assignee: bolterbugz → nobody
(Reporter)

Comment 3

9 years ago
Fixing this bug may be a simple task by the patch in bug 560665.  I suspect that if you also register nsEditorInitializerOnSelection on the SELECTION_ACCESSIBILITY selection type as well, you'd get a fix for free.  Of course someone on the a11y team needs to confirm this.

I'm setting a dependency for now.
Depends on: 560665
(Reporter)

Comment 4

9 years ago
(In reply to comment #3)
> Fixing this bug may be a simple task by the patch in bug 560665.  I suspect
> that if you also register nsEditorInitializerOnSelection on the
> SELECTION_ACCESSIBILITY selection type as well, you'd get a fix for free.  Of
> course someone on the a11y team needs to confirm this.
> 
> I'm setting a dependency for now.

What I said here might not be a good answer, because that code listens to selections on the pres shell, and we really don't want to do that here, because the text box has its own selection controller.  But I think a similar approach in nsTextInputListener might work here.
(Reporter)

Comment 5

9 years ago
Although, comment 4 is only true for editor initialization.  The selection manipulations performed by nsIAccessibleText would still be on the wrong selection object.
Blocks: 640591
Blocks: 389800
You need to log in before you can comment on or make changes to this bug.