Need GetEditor or equivalent method work for editable descendants

RESOLVED DUPLICATE of bug 390767

Status

()

Core
Disability Access APIs
RESOLVED DUPLICATE of bug 390767
11 years ago
11 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Please see Bug 345759 comment #16 for details

In nsHypertextAccessilbe, we need GetEditor to check EDITABLE_STATE or get spellcheck selections.
(Assignee)

Comment 1

11 years ago
I plan to implement a GetEditorInChain() method in nsHyperTextAccessible.
It will get nsDocAccessibleWrap from parent chain, and get editor from nsDocAccessibleWrap.

But how can we separate form control and descendant hypertext accessible?
We have nsXULTextFieldAccessible, nsHTMLTextFieldAccessible, nsXFormsEditableAccessible, implement GetEditor(), we don't want get editor from ancestor doc accessible for them.
(Assignee)

Comment 2

11 years ago
Er, I think we can just use the virtual function, use polymorphism.
(Assignee)

Comment 3

11 years ago
Created attachment 270157 [details] [diff] [review]
patch

I got a lot of problems to solve if I overwrite GetEditor to get a editor from ancestor.
So I add GetEditorInChain() rather than overwrite it.

Some GetState() need to be revised, e.g. nsHTMLLIAccessible::GetState
I'm NOT going to cover them in this bug.
Attachment #270157 - Flags: review?(surkov.alexander)

Comment 4

11 years ago
(In reply to comment #3)
> Created an attachment (id=270157) [details]
> patch
> 
> I got a lot of problems to solve if I overwrite GetEditor to get a editor from
> ancestor.

What kind of problem? Also why do you traverse to document, why you can't to get document and check if it's editable?
(Assignee)

Comment 5

11 years ago
If I overwrite GetEditor, in some cases, GetParent returns weird result, parent obj is same to child obj.

I think GetDocument tends to get the top document, but I want to get the nearest document.
e.g. MIDAS demo page, the whole document is not editable, but the rich edit area is editable, and I need that editor to do some work.

Comment 6

11 years ago
Actually I think after bug 237964, an editor can be associated with any parent node.

Comment 7

11 years ago
By the way, GetDocument gets the nearest document, but because of bug 237964 you probably want to go up the parent chain looking for the document. Take a look at their API.
(Assignee)

Comment 8

11 years ago
What's the different between get nearest document and looking for the document in parent chain?

Comment 9

11 years ago
There is no difference, but that's not what I'm suggesting.

I'm saying that after bug 237964 it might not be a document that has an editor. Any node can. So you have to go up parent chain and check every node for document.

Comment 10

11 years ago
Comment on attachment 270157 [details] [diff] [review]
patch

cancelling request until point about bug 237964 is clear.
Attachment #270157 - Flags: review?(surkov.alexander)

Comment 11

11 years ago
I *think* the solution in bug 390767 does what we need, ad is simpler. This bug should become resolved through that. Perhaps it's a duplicate.
Depends on: 390767

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 390767
You need to log in before you can comment on or make changes to this bug.