Closed Bug 1610750 Opened 4 years ago Closed 4 years ago

Remove some nsIEditor methods which are used by neither m-c, c-c nor BlueGriffon

Categories

(Core :: DOM: Editor, task, P5)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Obviously, the following methods of nsIEditor is not used by Gecko embedded products (I'm not sure about XUL addons for Thunderbird and SeaMonkey though).

We should just remove them from nsIEditor interface.

Priority: -- → P5
  • getAttributeValue
  • cloneAttribute
  • splitNode
  • joinNodes
  • markNodeDirty
  • removeEditorObserver

are not used from script. Therefore, we can get rid of them from nsIEditor.

However, EditorBase::GetAttributeValue() is referred by
HTMLEditor::CopyCellBackgroundColor() and it's just a wrapper of
Element::GetAttr(). Therefore, this patch makes
HTMLEditor::CopyCellBackgroundColor() use Element::GetAttr() directly.

And also EditorBase::MarkNodeDirty() is used from some friend classes.
Therefore, this patch redesigns it as MarkElementDirty() and make all of
them check whether the method call destroys the editor.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/a170089a8a03
Get rid of unused `nsIEditor` methods r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
  • nsIHTMLEditor.removeAllInlineProperties
  • nsIHTMLEditor.increaseFontSize
  • nsIHTMLEditor.decreaseFontSize
  • nsIHTMLEditor.setParagraphFormat
  • nsIHTMLEditor.getBackgroundColorState
  • nsIHTMLEditor.indent
  • nsIHTMLEditor.align
  • nsIEditorStyleSheets.replaceOverrideStyleSheet
  • nsITableEditor.selectBlockOfCells

These methods are not used by any Gecko products including comm-central and
BlueGriffon so that we should remove them. Note that only
HTMLEditor::GetBackgroundColorState() is used internally so that we need to
keep it as a public method of HTMLEditor.

Comment on attachment 9123232 [details]
Bug 1610750 - Remove unused scriptable methods of nsIHTMLEditor, nsIEditorStyleSheets and nsITableEditor r=m_kato!

Revision D61139 was moved to bug 1611751. Setting attachment 9123232 [details] to obsolete.

Attachment #9123232 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: