Closed
Bug 386026
Opened 17 years ago
Closed 17 years ago
Need GetEditor or equivalent method work for editable descendants
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 390767
People
(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)
References
Details
Attachments
(1 file)
8.03 KB,
patch
|
Details | Diff | Splinter Review |
Please see Bug 345759 comment #16 for details In nsHypertextAccessilbe, we need GetEditor to check EDITABLE_STATE or get spellcheck selections.
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.
Er, I think we can just use the virtual function, use polymorphism.
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•17 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?
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•17 years ago
|
||
Actually I think after bug 237964, an editor can be associated with any parent node.
Comment 7•17 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.
What's the different between get nearest document and looking for the document in parent chain?
Comment 9•17 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•17 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•17 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•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•