Closed Bug 386971 Opened 15 years ago Closed 15 years ago

expose editor from nsIAccEditableText

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

Details

(Keywords: access)

Attachments

(2 files, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
No description provided.
Attachment #271047 - Flags: review?(ginn.chen)
Attached patch patch2Splinter Review
fix
Attachment #271047 - Attachment is obsolete: true
Attachment #271055 - Flags: review?(ginn.chen)
Attachment #271047 - Flags: review?(ginn.chen)
Comment on attachment 271055 [details] [diff] [review]
patch2

I think we want [noscript] for editor.

Also there's a extra space.
+   *  @param startPos - start index of the text whose attributes are modified.
+   * @param endPos - end index of the text whose attributes are modified.
Attachment #271055 - Flags: review?(ginn.chen) → review+
(In reply to comment #2)
> (From update of attachment 271055 [details] [diff] [review])
> I think we want [noscript] for editor.

Why?
Surkov, noscript is just an extra level of security. There's no reason to allow an extension to get hold of an nsIEditor, so why let them? It's better to reduce the attack surface as they say.
checked in with Ginn's comments
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Does it work?

I got

./../html/nsHyperTextAccessible.h:74: warning: virtual nsresult nsHyperTextAccessible::GetEditor(nsIEditor**) was hidden
nsDocAccessible.h:128: warning:   by virtual already_AddRefed<nsIEditor> nsDocAccessible::GetEditor()
./../html/nsHyperTextAccessible.h:74: warning: virtual nsresult nsHyperTextAccessible::GetEditor(nsIEditor**) was hidden
./../html/nsHTMLFormControlAccessible.h:122: warning:   by virtual already_AddRefed<nsIEditor> nsHTMLTextFieldAccessible::GetEditor()
./../html/nsHyperTextAccessible.h:74: warning: virtual nsresult nsHyperTextAccessible::GetEditor(nsIEditor**) was hidden
./../xul/nsXULFormControlAccessible.h:175: warning:   by virtual already_AddRefed<nsIEditor> nsXULTextFieldAccessible::GetEditor()
./../html/nsHyperTextAccessible.h:74: warning: virtual nsresult nsHyperTextAccessible::GetEditor(nsIEditor**) was hidden
./../xforms/nsXFormsAccessible.h:155: warning:   by virtual already_AddRefed<nsIEditor> nsXFormsEditableAccessible::GetEditor()
Attached patch patch3 (obsolete) — Splinter Review
Ginn, I'm not sure accessibleEditor is perfect name, but I can't think something better. Probably you will suggest more appropriate name.
Attachment #271821 - Flags: review?(ginn.chen)
what about GetAssociatedEditor?

Or maybe we can change
virtual already_AddRefed<nsIEditor> ns*Accessible::GetEditor()
to
GetEditorInternal()
(In reply to comment #8)
> what about GetAssociatedEditor?

I like this.

> Or maybe we can change
> virtual already_AddRefed<nsIEditor> ns*Accessible::GetEditor()
> to
> GetEditorInternal()
> 

I thought about this but it leads to mass renaming. Also we have SetEditor/CheckForEditor() and I don't know how they should be renamed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch patch4Splinter Review
Attachment #271821 - Attachment is obsolete: true
Attachment #271842 - Flags: review?(ginn.chen)
Attachment #271821 - Flags: review?(ginn.chen)
Attachment #271842 - Flags: review?(ginn.chen) → review+
checked in
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.